[netcdf4-python] 01/06: Imported Upstream version 1.2.5
Bas Couwenberg
sebastic at debian.org
Tue Nov 29 18:36:23 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository netcdf4-python.
commit dcdd8a66d2aa314e5a98da8568cd47c25baa03b8
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Tue Nov 29 19:12:23 2016 +0100
Imported Upstream version 1.2.5
---
Changelog | 28 +
MANIFEST.in | 5 +-
README.md | 5 +-
README.release | 23 +
appveyor.yml | 11 +-
conda.recipe/meta.yaml | 7 +-
docs/netCDF4/index.html | 644 +-
netCDF4/_netCDF4.c | 39056 ++++++++++++++----------
netCDF4/_netCDF4.pyx | 345 +-
netcdftime/__init__.py | 13 +-
netcdftime/_datetime.c | 6201 ----
netcdftime/_datetime.pyx | 136 -
netcdftime/_netcdftime.c | 35225 +++++++++++++++++++++
netcdftime/{netcdftime.py => _netcdftime.pyx} | 669 +-
setup.py | 13 +-
test/tst_atts.py | 10 +-
test/tst_dap.py | 23 +-
test/tst_masked4.py | 108 +
test/tst_multifile.py | 1 +
test/tst_netcdftime.py | 343 +-
test/tst_vlen.py | 43 +
21 files changed, 60384 insertions(+), 22525 deletions(-)
diff --git a/Changelog b/Changelog
index b0ab062..0746d53 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,31 @@
+ version 1.2.5 (tag v1.2.5rel)
+==============================
+ * Add MFDataset.set_auto_maskandscale (plus set_auto_scale, set_auto_mask).
+ Fixes issue #570.
+ * Use valid_min/valid_max/valid_range attributes when defining mask
+ (issue #576). Values outside the valid range are considered to
+ be missing when defining the mask.
+ * Fix for issue #584 (add support for dates before -4712-1-1 in 360_day
+ and 365_day calendars to netcdftime.utime).
+ * Fix for issue #593: add support for datetime.timedelta operations
+ (adding and subtracting timedelta, subtracting two datetime
+ instances to compute time duration between them), implement
+ datetime.replace() and datetime.__str__(). datetime.__repr__()
+ includes the full state of an instance. Add datetime.calendar.
+ datetime comparison operators have full accuracy now.
+ * Fix for issue #585 by increasing the size of the buffer used to store the
+ filepath.
+ * Fix for issue #592: Add support for string array attributes. (When
+ reading, a vlen string array attribute is returned as a list of
+ strings. To write, use var.setncattr_string("name", ["two", "strings"]).)
+ * Fix for issue #596 - julian day calculations wrong for negative years,
+ caused incorrect rountrip num2date(date2num(date)) roundtrip for dates with year
+ < 0.
+ * Make sure negative years work in utime.num2date (issue #596).
+ * raise NotImplementedError when trying to pickle Dataset, Variable,
+ CompoundType, VLType, EnumType and MFDataset (issue #602).
+ * Fix for issue #527: initialize vldata[i].p in Variable._get(...).
+
version 1.2.4 (tag v1.2.4rel)
==============================
* Fix for issue #554. It is now ensured that data is in native endian
diff --git a/MANIFEST.in b/MANIFEST.in
index a14727f..f0a2beb 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -19,9 +19,8 @@ include utils/nc3tonc4
include utils/nc4tonc3
include utils/ncinfo
include netcdftime/__init__.py
-include netcdftime/_datetime.pyx
-include netcdftime/netcdftime.py
-include netcdftime/_datetime.c
+include netcdftime/_netcdftime.pyx
+include netcdftime/_netcdftime.c
include netCDF4/__init__.py
include netCDF4/_netCDF4.pyx
include netCDF4/utils.py
diff --git a/README.md b/README.md
index 190e5a4..432a803 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,10 @@
## News
For the latest updates, see the [Changelog](https://github.com/Unidata/netcdf4-python/blob/master/Changelog).
-4/11/2016: Version [1.2.4](https://pypi.python.org/pypi/netCDF4/1.2.4) released.
+12/1/2016: Version [1.2.5](https://pypi.python.org/pypi/netCDF4/1.2.5) released.
+See the [Changelog](https://github.com/Unidata/netcdf4-python/blob/master/Changelog) for changes.
+
+4/15/2016: Version [1.2.4](https://pypi.python.org/pypi/netCDF4/1.2.4) released.
Bugs in handling of variables with specified non-native "endian-ness" (byte-order) fixed ([issue #554]
(https://github.com/Unidata/netcdf4-python/issues/554)). Build instructions updated and warning issued
to deal with potential backwards incompatibility introduced when using HDF5 1.10.x
diff --git a/README.release b/README.release
new file mode 100644
index 0000000..5cba50e
--- /dev/null
+++ b/README.release
@@ -0,0 +1,23 @@
+* create a release branch ('vX.Y.Zrel'). In the release branch...
+* make sure version number in setup.py and netCDF4/_netCDF4.pyx are up to date
+ (in _netCDF4.pyx, change 'Version' in first line of docstring at top of file,
+ and __version__ variable). If netcdftime module has any updates,
+ increment __version__ in netcdftime/_netcdftime.pyx. Regenerate netcdftime/_netcdftime.c
+ from _netcdftime.pyx as needed.
+* make sure include/constants.pyx has all zeros, then generate C source by
+ running 'cython -I../include _netCDF4.pyx' in the netCDF4 directory.
+* update Changelog and README.md as needed.
+* commit and push all of the above changes.
+* install the module (python setup.py install), then run 'sh create_docs.sh'
+ to update html docs. Commit and push the update to docs/netCDF4/index.html.
+* create a pull request for the release branch.
+* After release branch has been merged, tag a release
+ git tag -a vX.Y.Zrel -m "version X.Y.Z release"
+ git push origin --tags
+* push an empty commit to the netcdf4-python-wheels repo to trigger new builds.
+* update the pypi entry, upload the macosx wheels and the windows wheels
+ from Christoph Gohkle's site. Lastly, create a source tarball using
+ 'python setup.py sdist' and upload to pypi.
+* update web docs by copying docs/netCDF4/index.html somewhere, switch
+ to the gh-pages branch, copy the index.html file back, commit and push
+ the updated index.html file (see README.gh-pages).
diff --git a/appveyor.yml b/appveyor.yml
index 2d5a1d6..eab9290 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -17,19 +17,19 @@ environment:
matrix:
- TARGET_ARCH: x86
- CONDA_NPY: 110
+ CONDA_NPY: 111
CONDA_PY: 27
- TARGET_ARCH: x64
- CONDA_NPY: 110
+ CONDA_NPY: 111
CONDA_PY: 27
- TARGET_ARCH: x86
- CONDA_NPY: 110
+ CONDA_NPY: 111
CONDA_PY: 35
- TARGET_ARCH: x64
- CONDA_NPY: 110
+ CONDA_NPY: 111
CONDA_PY: 35
platform:
@@ -61,7 +61,8 @@ install:
- cmd: conda update --yes --quiet conda
# Conda build tools.
- - cmd: conda install --yes --quiet obvious-ci --channel conda-forge
+ - cmd: conda config --add channels conda-forge --force
+ - cmd: conda install --yes --quiet obvious-ci
- cmd: obvci_install_conda_build_tools.py
- cmd: conda info
diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml
index 23a706c..bebc347 100644
--- a/conda.recipe/meta.yaml
+++ b/conda.recipe/meta.yaml
@@ -18,15 +18,16 @@ requirements:
build:
- python
- setuptools
- - numpy x.x
- cython
- - hdf5
+ - numpy x.x
+ - msinttypes # [win and py<35]
+ - hdf5 1.8.15.1
- libnetcdf
run:
- python
- setuptools
- numpy x.x
- - hdf5
+ - hdf5 1.8.15.1
- libnetcdf
test:
diff --git a/docs/netCDF4/index.html b/docs/netCDF4/index.html
index 1e3d4de..9004cc9 100644
--- a/docs/netCDF4/index.html
+++ b/docs/netCDF4/index.html
@@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<title>netCDF4 API documentation</title>
- <meta name="description" content="Version 1.2.4
+ <meta name="description" content="Version 1.2.5
-------------
- - -
@@ -868,6 +868,7 @@ table {
.codehilite .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
.codehilite .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.codehilite .cp { color: #BC7A00 } /* Comment.Preproc */
+.codehilite .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
.codehilite .c1 { color: #408080; font-style: italic } /* Comment.Single */
.codehilite .cs { color: #408080; font-style: italic } /* Comment.Special */
.codehilite .gd { color: #A00000 } /* Generic.Deleted */
@@ -1178,9 +1179,6 @@ table {
<li class="mono"><a href="#netCDF4.MFDataset.renameDimension">renameDimension</a></li>
<li class="mono"><a href="#netCDF4.MFDataset.renameGroup">renameGroup</a></li>
<li class="mono"><a href="#netCDF4.MFDataset.renameVariable">renameVariable</a></li>
- <li class="mono"><a href="#netCDF4.MFDataset.set_auto_mask">set_auto_mask</a></li>
- <li class="mono"><a href="#netCDF4.MFDataset.set_auto_maskandscale">set_auto_maskandscale</a></li>
- <li class="mono"><a href="#netCDF4.MFDataset.set_auto_scale">set_auto_scale</a></li>
<li class="mono"><a href="#netCDF4.MFDataset.set_fill_off">set_fill_off</a></li>
<li class="mono"><a href="#netCDF4.MFDataset.set_fill_on">set_fill_on</a></li>
<li class="mono"><a href="#netCDF4.MFDataset.setncattr">setncattr</a></li>
@@ -1190,6 +1188,9 @@ table {
<li class="mono"><a href="#netCDF4.MFDataset.__init__">__init__</a></li>
<li class="mono"><a href="#netCDF4.MFDataset.close">close</a></li>
<li class="mono"><a href="#netCDF4.MFDataset.ncattrs">ncattrs</a></li>
+ <li class="mono"><a href="#netCDF4.MFDataset.set_auto_mask">set_auto_mask</a></li>
+ <li class="mono"><a href="#netCDF4.MFDataset.set_auto_maskandscale">set_auto_maskandscale</a></li>
+ <li class="mono"><a href="#netCDF4.MFDataset.set_auto_scale">set_auto_scale</a></li>
</ul>
</li>
@@ -1200,7 +1201,9 @@ table {
<ul>
<li class="mono"><a href="#netCDF4.MFTime.__init__">__init__</a></li>
<li class="mono"><a href="#netCDF4.MFTime.ncattrs">ncattrs</a></li>
+ <li class="mono"><a href="#netCDF4.MFTime.set_auto_mask">set_auto_mask</a></li>
<li class="mono"><a href="#netCDF4.MFTime.set_auto_maskandscale">set_auto_maskandscale</a></li>
+ <li class="mono"><a href="#netCDF4.MFTime.set_auto_scale">set_auto_scale</a></li>
<li class="mono"><a href="#netCDF4.MFTime.typecode">typecode</a></li>
</ul>
@@ -1256,7 +1259,7 @@ table {
<header id="section-intro">
<h1 class="title"><span class="name">netCDF4</span> module</h1>
- <h2>Version 1.2.4</h2>
+ <h2>Version 1.2.5</h2>
<hr />
<h1>Introduction</h1>
<p>netcdf4-python is a Python interface to the netCDF C library. </p>
@@ -1383,8 +1386,8 @@ keyword in the <code>Dataset</code> constructor. The default format is
accomplished via the <a href="#netCDF4.Dataset.close"><code>close</code></a> method of the <a href="#netCDF4.Dataset"><code>Dataset</code></a>
instance.</p>
<p>Here's an example:</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="kn">from</span> <span class="nn">netCDF4</span> <span class="kn">import</span> <span class="n">Dataset</span>
-<span class="o">>>></span> <span class="n">rootgrp</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s">"test.nc"</span><span class="p">,</span> <span class="s">"w"</span><span class="p">,</span> <span class="n">format</span><span class="o">=</span><span class="s">"NETCDF4"</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="kn">from</span> <span class="nn">netCDF4</span> <span class="kn">import</span> <span class="n">Dataset</span>
+<span class="o">>>></span> <span class="n">rootgrp</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s2">"test.nc"</span><span class="p">,</span> <span class="s2">"w"</span><span class="p">,</span> <span class="n">format</span><span class="o">=</span><span class="s2">"NETCDF4"</span><span class="p">)</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">data_model</span>
<span class="n">NETCDF4</span>
<span class="o">>>></span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
@@ -1400,7 +1403,7 @@ version 4.0.1).</p>
<p>netCDF version 4 added support for organizing data in hierarchical
groups, which are analogous to directories in a filesystem. Groups serve
as containers for variables, dimensions and attributes, as well as other
-groups. A <a href="#netCDF4.Dataset"><code>Dataset</code></a> defines creates a special group, called
+groups. A <a href="#netCDF4.Dataset"><code>Dataset</code></a> creates a special group, called
the 'root group', which is similar to the root directory in a unix
filesystem. To create <a href="#netCDF4.Group"><code>Group</code></a> instances, use the
<a href="#netCDF4.Dataset.createGroup"><code>createGroup</code></a> method of a <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a>
@@ -1410,13 +1413,13 @@ instances contained within the root group can be accessed by name using
the <code>groups</code> dictionary attribute of the <a href="#netCDF4.Dataset"><code>Dataset</code></a> instance. Only
<code>NETCDF4</code> formatted files support Groups, if you try to create a Group
in a netCDF 3 file you will get an error message.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">rootgrp</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s">"test.nc"</span><span class="p">,</span> <span class="s">"a"</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">fcstgrp</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createGroup</span><span class="p">(</span><span class="s">"forecasts"</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">analgrp</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createGroup</span><span class="p">(</span><span class="s">"analyses"</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">rootgrp</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s2">"test.nc"</span><span class="p">,</span> <span class="s2">"a"</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">fcstgrp</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createGroup</span><span class="p">(</span><span class="s2">"forecasts"</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">analgrp</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createGroup</span><span class="p">(</span><span class="s2">"analyses"</span><span class="p">)</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">groups</span>
-<span class="n">OrderedDict</span><span class="p">([(</span><span class="s">"forecasts"</span><span class="p">,</span>
+<span class="n">OrderedDict</span><span class="p">([(</span><span class="s2">"forecasts"</span><span class="p">,</span>
<span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">_netCDF4</span><span class="o">.</span><span class="n">Group</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b4b7b0</span><span class="o">></span><span class="p">),</span>
- <span class="p">(</span><span class="s">"analyses"</span><span class="p">,</span>
+ <span class="p">(</span><span class="s2">"analyses"</span><span class="p">,</span>
<span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">_netCDF4</span><span class="o">.</span><span class="n">Group</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b4b970</span><span class="o">></span><span class="p">)])</span>
</pre></div>
@@ -1428,8 +1431,8 @@ instances contained within that group. Each <a href="#netCDF4.Group"><code>Group
<code>path</code> attribute that contains a simulated unix directory path to
that group. To simplify the creation of nested groups, you can
use a unix-like path as an argument to <a href="#netCDF4.Dataset.createGroup"><code>createGroup</code></a>.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">fcstgrp1</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createGroup</span><span class="p">(</span><span class="s">"/forecasts/model1"</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">fcstgrp2</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createGroup</span><span class="p">(</span><span class="s">"/forecasts/model2"</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">fcstgrp1</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createGroup</span><span class="p">(</span><span class="s2">"/forecasts/model1"</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">fcstgrp2</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createGroup</span><span class="p">(</span><span class="s2">"/forecasts/model2"</span><span class="p">)</span>
</pre></div>
@@ -1441,7 +1444,7 @@ returned.</p>
<a href="#netCDF4.Dataset"><code>Dataset</code></a>. The function <code>walktree</code> is a Python generator that is used
to walk the directory tree. Note that printing the <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a>
object yields summary information about it's contents.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="k">def</span> <span class="nf">walktree</span><span class="p">(</span><span class="n">top</span><span class="p">):</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="k">def</span> <span class="nf">walktree</span><span class="p">(</span><span class="n">top</span><span class="p">):</span>
<span class="o">>>></span> <span class="n">values</span> <span class="o">=</span> <span class="n">top</span><span class="o">.</span><span class="n">groups</span><span class="o">.</span><span class="n">values</span><span class="p">()</span>
<span class="o">>>></span> <span class="k">yield</span> <span class="n">values</span>
<span class="o">>>></span> <span class="k">for</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">top</span><span class="o">.</span><span class="n">groups</span><span class="o">.</span><span class="n">values</span><span class="p">():</span>
@@ -1451,27 +1454,27 @@ object yields summary information about it's contents.</p>
<span class="o">>>></span> <span class="k">for</span> <span class="n">children</span> <span class="ow">in</span> <span class="n">walktree</span><span class="p">(</span><span class="n">rootgrp</span><span class="p">):</span>
<span class="o">>>></span> <span class="k">for</span> <span class="n">child</span> <span class="ow">in</span> <span class="n">children</span><span class="p">:</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">child</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Dataset"</span><span class="o">></span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Dataset"</span><span class="o">></span>
<span class="n">root</span> <span class="n">group</span> <span class="p">(</span><span class="n">NETCDF4</span> <span class="nb">file</span> <span class="n">format</span><span class="p">):</span>
<span class="n">dimensions</span><span class="p">:</span>
<span class="n">variables</span><span class="p">:</span>
<span class="n">groups</span><span class="p">:</span> <span class="n">forecasts</span><span class="p">,</span> <span class="n">analyses</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Group"</span><span class="o">></span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Group"</span><span class="o">></span>
<span class="n">group</span> <span class="o">/</span><span class="n">forecasts</span><span class="p">:</span>
<span class="n">dimensions</span><span class="p">:</span>
<span class="n">variables</span><span class="p">:</span>
<span class="n">groups</span><span class="p">:</span> <span class="n">model1</span><span class="p">,</span> <span class="n">model2</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Group"</span><span class="o">></span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Group"</span><span class="o">></span>
<span class="n">group</span> <span class="o">/</span><span class="n">analyses</span><span class="p">:</span>
<span class="n">dimensions</span><span class="p">:</span>
<span class="n">variables</span><span class="p">:</span>
<span class="n">groups</span><span class="p">:</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Group"</span><span class="o">></span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Group"</span><span class="o">></span>
<span class="n">group</span> <span class="o">/</span><span class="n">forecasts</span><span class="o">/</span><span class="n">model1</span><span class="p">:</span>
<span class="n">dimensions</span><span class="p">:</span>
<span class="n">variables</span><span class="p">:</span>
<span class="n">groups</span><span class="p">:</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Group"</span><span class="o">></span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Group"</span><span class="o">></span>
<span class="n">group</span> <span class="o">/</span><span class="n">forecasts</span><span class="o">/</span><span class="n">model2</span><span class="p">:</span>
<span class="n">dimensions</span><span class="p">:</span>
<span class="n">variables</span><span class="p">:</span>
@@ -1492,19 +1495,19 @@ value is set to <code>None</code> or 0. In this example, there both the <code>ti
<code>level</code> dimensions are unlimited. Having more than one unlimited
dimension is a new netCDF 4 feature, in netCDF 3 files there may be only
one, and it must be the first (leftmost) dimension of the variable.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">level</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s">"level"</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">time</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s">"time"</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">lat</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s">"lat"</span><span class="p">,</span> <span class="mi">73</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">lon</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s">"lon"</span><span class="p">,</span> <span class="mi">144</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">level</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s2">"level"</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">time</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s2">"time"</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">lat</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s2">"lat"</span><span class="p">,</span> <span class="mi">73</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">lon</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s2">"lon"</span><span class="p">,</span> <span class="mi">144</span><span class="p">)</span>
</pre></div>
<p>All of the <a href="#netCDF4.Dimension"><code>Dimension</code></a> instances are stored in a python dictionary.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="k">print</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">dimensions</span>
-<span class="n">OrderedDict</span><span class="p">([(</span><span class="s">"level"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">_netCDF4</span><span class="o">.</span><span class="n">Dimension</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b48030</span><span class="o">></span><span class="p">),</span>
- <span class="p">(</span><span class="s">"time"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">_netCDF4</span><span class="o">.</span><span class="n">Dimension</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b481c0</span><span class="o">></span><span class="p">),</span>
- <span class="p">(</span><span class="s">"lat"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">_netCDF4</span><span class="o">.</span><span class="n">Dimension</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b480f8</span><span class="o">></span><span class="p">),</span>
- <span class="p">(</span><span class="s">"lon"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">_netCDF4</span><span class="o">.</span><span class="n">Dimension</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b48a08</span><span class="o">></span><span class="p">)])</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="k">print</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">dimensions</span>
+<span class="n">OrderedDict</span><span class="p">([(</span><span class="s2">"level"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">_netCDF4</span><span class="o">.</span><span class="n">Dimension</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b48030</span><span class="o">></span><span class="p">),</span>
+ <span class="p">(</span><span class="s2">"time"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">_netCDF4</span><span class="o">.</span><span class="n">Dimension</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b481c0</span><span class="o">></span><span class="p">),</span>
+ <span class="p">(</span><span class="s2">"lat"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">_netCDF4</span><span class="o">.</span><span class="n">Dimension</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b480f8</span><span class="o">></span><span class="p">),</span>
+ <span class="p">(</span><span class="s2">"lon"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">_netCDF4</span><span class="o">.</span><span class="n">Dimension</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b48a08</span><span class="o">></span><span class="p">)])</span>
</pre></div>
@@ -1512,7 +1515,7 @@ one, and it must be the first (leftmost) dimension of the variable.</p>
the current size of that dimension.
The <a href="#netCDF4.Dimension.isunlimited"><code>isunlimited</code></a> method of a <a href="#netCDF4.Dimension"><code>Dimension</code></a> instance
can be used to determine if the dimensions is unlimited, or appendable.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="k">print</span> <span class="nb">len</span><span class="p">(</span><span class="n">lon</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="k">print</span> <span class="nb">len</span><span class="p">(</span><span class="n">lon</span><span class="p">)</span>
<span class="mi">144</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">lon</span><span class="o">.</span><span class="n">isunlimited</span><span class="p">()</span>
<span class="bp">False</span>
@@ -1524,13 +1527,13 @@ can be used to determine if the dimensions is unlimited, or appendable.</p>
<p>Printing the <a href="#netCDF4.Dimension"><code>Dimension</code></a> object
provides useful summary info, including the name and length of the dimension,
and whether it is unlimited.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="k">for</span> <span class="n">dimobj</span> <span class="ow">in</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">dimensions</span><span class="o">.</span><span class="n">values</span><span class="p">():</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="k">for</span> <span class="n">dimobj</span> <span class="ow">in</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">dimensions</span><span class="o">.</span><span class="n">values</span><span class="p">():</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">dimobj</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Dimension"</span><span class="o">></span> <span class="p">(</span><span class="n">unlimited</span><span class="p">):</span> <span class="n">name</span> <span class="o">=</span> <span class="s">"level"</span><span class="p">,</span> <span class="n">size</span> <span class="o">=</span> <span class="mi">0</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Dimension"</span><span class="o">></span> <span class="p">(</span><span class="n">unlimited</span><span class="p">):</span> <span class="n">name</span> <span class="o">=</span> <span class="s">"time"</span><span class="p">,</span> <span class="n">size</span> <span class="o">=</span> <span class="mi">0</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Dimension"</span><span class="o">></span><span class="p">:</span> <span class="n">name</span> <span class="o">=</span> <span class="s">"lat"</span><span class="p">,</span> <span class="n">size</span> <span class="o">=</span> <span class="mi">73</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Dimension"</span><span class="o">></span><span class="p">:</span> <span class="n">name</span> <span class="o">=</span> <span class="s">"lon"</span><span class="p">,</span> <span class="n">size</span> <span class="o">=</span> <span class="mi">144</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Dimension"</span><span class="o">></span> <span class="p">(</span><span class="n">unlimited</span><span class="p">):</span> <span class="n">name</span> <span class="o">=</span> <span class="s">"time"</span><span class="p">,</span> <span class="n">size</span> <span class="o">=</span> <span class="mi">0</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Dimension"</span><span class="o">></span> <span class="p">(</span><span class="n">unlimited</span><span class="p">):</span> <span class="n">name</span> <span class="o">=</span> <span class="s2">"level"</span><span class="p">,</span> <span class="n">size</span> <span class="o">=</span> <span class="mi">0</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Dimension"</span><span class="o">></span> <span class="p">(</span><span class="n">unlimited</span><span class="p">):</span> <span class="n">name</span> <span class="o">=</span> <span class="s2">"time"</span><span class="p">,</span> <span class="n">size</span> <span class="o">=</span> <span class="mi">0</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Dimension"</span><span class="o">></span><span class="p">:</span> <span class="n">name</span> <span class="o">=</span> <span class="s2">"lat"</span><span class="p">,</span> <span class="n">size</span> <span class="o">=</span> <span class="mi">73</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Dimension"</span><span class="o">></span><span class="p">:</span> <span class="n">name</span> <span class="o">=</span> <span class="s2">"lon"</span><span class="p">,</span> <span class="n">size</span> <span class="o">=</span> <span class="mi">144</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Dimension"</span><span class="o">></span> <span class="p">(</span><span class="n">unlimited</span><span class="p">):</span> <span class="n">name</span> <span class="o">=</span> <span class="s2">"time"</span><span class="p">,</span> <span class="n">size</span> <span class="o">=</span> <span class="mi">0</span>
</pre></div>
@@ -1554,7 +1557,7 @@ You can specify the datatype as a numpy dtype object, or anything that
can be converted to a numpy dtype object. Valid datatype specifiers
include: <code>'f4'</code> (32-bit floating point), <code>'f8'</code> (64-bit floating
point), <code>'i4'</code> (32-bit signed integer), <code>'i2'</code> (16-bit signed
-integer), <code>'i8'</code> (64-bit singed integer), <code>'i1'</code> (8-bit signed
+integer), <code>'i8'</code> (64-bit signed integer), <code>'i1'</code> (8-bit signed
integer), <code>'u1'</code> (8-bit unsigned integer), <code>'u2'</code> (16-bit unsigned
integer), <code>'u4'</code> (32-bit unsigned integer), <code>'u8'</code> (64-bit unsigned
integer), or <code>'S1'</code> (single-character string). The old Numeric
@@ -1567,18 +1570,18 @@ can only be used if the file format is <code>NETCDF4</code>.</p>
coordinate variables. The <a href="#netCDF4.Dataset.createVariable"><code>createVariable</code></a>
method returns an instance of the <a href="#netCDF4.Variable"><code>Variable</code></a> class whose methods can be
used later to access and set variable data and attributes.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">times</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"time"</span><span class="p">,</span><span class="s">"f8"</span><span class="p">,(</span><span class="s">"time"</span><span class="p">,))</span>
-<span class="o">>>></span> <span class="n">levels</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"level"</span><span class="p">,</span><span class="s">"i4"</span><span class="p">,(</span><span class="s">"level"</span><span class="p">,))</span>
-<span class="o">>>></span> <span class="n">latitudes</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"latitude"</span><span class="p">,</span><span class="s">"f4"</span><span class="p">,(</span><span class="s">"lat"</span><span class="p">,))</span>
-<span class="o">>>></span> <span class="n">longitudes</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"longitude"</span><span class="p">,</span><span class="s">"f4"</span><span class="p">,(</span><span class="s">"lon"</span><span class="p">,))</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">times</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"time"</span><span class="p">,</span><span class="s2">"f8"</span><span class="p">,(</span><span class="s2">"time"</span><span class="p">,))</span>
+<span class="o">>>></span> <span class="n">levels</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"level"</span><span class="p">,</span><span class="s2">"i4"</span><span class="p">,(</span><span class="s2">"level"</span><span class="p">,))</span>
+<span class="o">>>></span> <span class="n">latitudes</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"latitude"</span><span class="p">,</span><span class="s2">"f4"</span><span class="p">,(</span><span class="s2">"lat"</span><span class="p">,))</span>
+<span class="o">>>></span> <span class="n">longitudes</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"longitude"</span><span class="p">,</span><span class="s2">"f4"</span><span class="p">,(</span><span class="s2">"lon"</span><span class="p">,))</span>
<span class="o">>>></span> <span class="c1"># two dimensions unlimited</span>
-<span class="o">>>></span> <span class="n">temp</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"temp"</span><span class="p">,</span><span class="s">"f4"</span><span class="p">,(</span><span class="s">"time"</span><span class="p">,</span><span class="s">"level"</span><span class="p">,</span><span class="s">"lat"</spa [...]
+<span class="o">>>></span> <span class="n">temp</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"temp"</span><span class="p">,</span><span class="s2">"f4"</span><span class="p">,(</span><span class="s2">"time"</span><span class="p">,</span><span class="s2">"level"</span><span class="p">,</span><span class="s2">"lat" [...]
</pre></div>
<p>To get summary info on a <a href="#netCDF4.Variable"><code>Variable</code></a> instance in an interactive session, just print it.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="k">print</span> <span class="n">temp</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Variable"</span><span class="o">></span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="k">print</span> <span class="n">temp</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Variable"</span><span class="o">></span>
<span class="n">float32</span> <span class="n">temp</span><span class="p">(</span><span class="n">time</span><span class="p">,</span> <span class="n">level</span><span class="p">,</span> <span class="n">lat</span><span class="p">,</span> <span class="n">lon</span><span class="p">)</span>
<span class="n">least_significant_digit</span><span class="p">:</span> <span class="mi">3</span>
<span class="n">units</span><span class="p">:</span> <span class="n">K</span>
@@ -1588,21 +1591,21 @@ used later to access and set variable data and attributes.</p>
<p>You can use a path to create a Variable inside a hierarchy of groups.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">ftemp</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"/forecasts/model1/temp"</span><span class="p">,</span><span class="s">"f4"</span><span class="p">,(</span><span class="s">"time"</span><span class="p">,</span><span class="s">"level"</span><span class= [...]
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">ftemp</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"/forecasts/model1/temp"</span><span class="p">,</span><span class="s2">"f4"</span><span class="p">,(</span><span class="s2">"time"</span><span class="p">,</span><span class="s2">"level"</ [...]
</pre></div>
<p>If the intermediate groups do not yet exist, they will be created.</p>
<p>You can also query a <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> instance directly to obtain <a href="#netCDF4.Group"><code>Group</code></a> or
<a href="#netCDF4.Variable"><code>Variable</code></a> instances using paths.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="k">print</span> <span class="n">rootgrp</span><span class="p">[</span><span class="s">"/forecasts/model1"</span><span class="p">]</span> <span class="c1"># a Group instance</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Group"</span><span class="o">></span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="k">print</span> <span class="n">rootgrp</span><span class="p">[</span><span class="s2">"/forecasts/model1"</span><span class="p">]</span> <span class="c1"># a Group instance</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Group"</span><span class="o">></span>
<span class="n">group</span> <span class="o">/</span><span class="n">forecasts</span><span class="o">/</span><span class="n">model1</span><span class="p">:</span>
<span class="n">dimensions</span><span class="p">(</span><span class="n">sizes</span><span class="p">):</span>
<span class="n">variables</span><span class="p">(</span><span class="n">dimensions</span><span class="p">):</span> <span class="n">float32</span> <span class="n">temp</span><span class="p">(</span><span class="n">time</span><span class="p">,</span><span class="n">level</span><span class="p">,</span><span class="n">lat</span><span class="p">,</span><span class="n">lon</span><span class="p">)</span>
<span class="n">groups</span><span class="p">:</span>
-<span class="o">>>></span> <span class="k">print</span> <span class="n">rootgrp</span><span class="p">[</span><span class="s">"/forecasts/model1/temp"</span><span class="p">]</span> <span class="c1"># a Variable instance</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Variable"</span><span class="o">></span>
+<span class="o">>>></span> <span class="k">print</span> <span class="n">rootgrp</span><span class="p">[</span><span class="s2">"/forecasts/model1/temp"</span><span class="p">]</span> <span class="c1"># a Variable instance</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Variable"</span><span class="o">></span>
<span class="n">float32</span> <span class="n">temp</span><span class="p">(</span><span class="n">time</span><span class="p">,</span> <span class="n">level</span><span class="p">,</span> <span class="n">lat</span><span class="p">,</span> <span class="n">lon</span><span class="p">)</span>
<span class="n">path</span> <span class="o">=</span> <span class="o">/</span><span class="n">forecasts</span><span class="o">/</span><span class="n">model1</span>
<span class="n">unlimited</span> <span class="n">dimensions</span><span class="p">:</span> <span class="n">time</span><span class="p">,</span> <span class="n">level</span>
@@ -1613,12 +1616,12 @@ used later to access and set variable data and attributes.</p>
<p>All of the variables in the <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> are stored in a
Python dictionary, in the same way as the dimensions:</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="k">print</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">variables</span>
-<span class="n">OrderedDict</span><span class="p">([(</span><span class="s">"time"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">Variable</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b4ba70</span><span class="o">></span><span class="p">),</span>
- <span class="p">(</span><span class="s">"level"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">Variable</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b4bab0</span><span class="o">></span><span class="p">),</span>
- <span class="p">(</span><span class="s">"latitude"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">Variable</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b4baf0</span><span class="o">></span><span class="p">),</span>
- <span class="p">(</span><span class="s">"longitude"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">Variable</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b4bb30</span><span class="o">></span><span class="p">),</span>
- <span class="p">(</span><span class="s">"temp"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">Variable</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b4bb70</span><span class="o">></span><span class="p">)])</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="k">print</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">variables</span>
+<span class="n">OrderedDict</span><span class="p">([(</span><span class="s2">"time"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">Variable</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b4ba70</span><span class="o">></span><span class="p">),</span>
+ <span class="p">(</span><span class="s2">"level"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">Variable</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b4bab0</span><span class="o">></span><span class="p">),</span>
+ <span class="p">(</span><span class="s2">"latitude"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">Variable</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b4baf0</span><span class="o">></span><span class="p">),</span>
+ <span class="p">(</span><span class="s2">"longitude"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">Variable</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b4bb30</span><span class="o">></span><span class="p">),</span>
+ <span class="p">(</span><span class="s2">"temp"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">Variable</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1b4bb70</span><span class="o">></span><span class="p">)])</span>
</pre></div>
@@ -1634,16 +1637,16 @@ values to <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCD
attributes are set by assigning values to <a href="#netCDF4.Variable"><code>Variable</code></a> instances
variables. Attributes can be strings, numbers or sequences. Returning to
our example,</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="kn">import</span> <span class="nn">time</span>
-<span class="o">>>></span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">description</span> <span class="o">=</span> <span class="s">"bogus example script"</span>
-<span class="o">>>></span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">history</span> <span class="o">=</span> <span class="s">"Created "</span> <span class="o">+</span> <span class="n">time</span><span class="o">.</span><span class="n">ctime</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">())</span>
-<span class="o">>>></span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">source</span> <span class="o">=</span> <span class="s">"netCDF4 python module tutorial"</span>
-<span class="o">>>></span> <span class="n">latitudes</span><span class="o">.</span><span class="n">units</span> <span class="o">=</span> <span class="s">"degrees north"</span>
-<span class="o">>>></span> <span class="n">longitudes</span><span class="o">.</span><span class="n">units</span> <span class="o">=</span> <span class="s">"degrees east"</span>
-<span class="o">>>></span> <span class="n">levels</span><span class="o">.</span><span class="n">units</span> <span class="o">=</span> <span class="s">"hPa"</span>
-<span class="o">>>></span> <span class="n">temp</span><span class="o">.</span><span class="n">units</span> <span class="o">=</span> <span class="s">"K"</span>
-<span class="o">>>></span> <span class="n">times</span><span class="o">.</span><span class="n">units</span> <span class="o">=</span> <span class="s">"hours since 0001-01-01 00:00:00.0"</span>
-<span class="o">>>></span> <span class="n">times</span><span class="o">.</span><span class="n">calendar</span> <span class="o">=</span> <span class="s">"gregorian"</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="kn">import</span> <span class="nn">time</span>
+<span class="o">>>></span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">description</span> <span class="o">=</span> <span class="s2">"bogus example script"</span>
+<span class="o">>>></span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">history</span> <span class="o">=</span> <span class="s2">"Created "</span> <span class="o">+</span> <span class="n">time</span><span class="o">.</span><span class="n">ctime</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">())</span>
+<span class="o">>>></span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">source</span> <span class="o">=</span> <span class="s2">"netCDF4 python module tutorial"</span>
+<span class="o">>>></span> <span class="n">latitudes</span><span class="o">.</span><span class="n">units</span> <span class="o">=</span> <span class="s2">"degrees north"</span>
+<span class="o">>>></span> <span class="n">longitudes</span><span class="o">.</span><span class="n">units</span> <span class="o">=</span> <span class="s2">"degrees east"</span>
+<span class="o">>>></span> <span class="n">levels</span><span class="o">.</span><span class="n">units</span> <span class="o">=</span> <span class="s2">"hPa"</span>
+<span class="o">>>></span> <span class="n">temp</span><span class="o">.</span><span class="n">units</span> <span class="o">=</span> <span class="s2">"K"</span>
+<span class="o">>>></span> <span class="n">times</span><span class="o">.</span><span class="n">units</span> <span class="o">=</span> <span class="s2">"hours since 0001-01-01 00:00:00.0"</span>
+<span class="o">>>></span> <span class="n">times</span><span class="o">.</span><span class="n">calendar</span> <span class="o">=</span> <span class="s2">"gregorian"</span>
</pre></div>
@@ -1652,8 +1655,8 @@ our example,</p>
attributes. This method is provided as a convenience, since using the
built-in <code>dir</code> Python function will return a bunch of private methods
and attributes that cannot (or should not) be modified by the user.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="k">for</span> <span class="n">name</span> <span class="ow">in</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">ncattrs</span><span class="p">():</span>
-<span class="o">>>></span> <span class="k">print</span> <span class="s">"Global attr"</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="s">"="</span><span class="p">,</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">rootgrp</span><span class="p">,</span><span class="n">name</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="k">for</span> <span class="n">name</span> <span class="ow">in</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">ncattrs</span><span class="p">():</span>
+<span class="o">>>></span> <span class="k">print</span> <span class="s2">"Global attr"</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="s2">"="</span><span class="p">,</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">rootgrp</span><span class="p">,</span><span class="n">name</span><span class="p">)</span>
<span class="n">Global</span> <span class="n">attr</span> <span class="n">description</span> <span class="o">=</span> <span class="n">bogus</span> <span class="n">example</span> <span class="n">script</span>
<span class="n">Global</span> <span class="n">attr</span> <span class="n">history</span> <span class="o">=</span> <span class="n">Created</span> <span class="n">Mon</span> <span class="n">Nov</span> <span class="mi">7</span> <span class="mf">10.30</span><span class="p">:</span><span class="mi">56</span> <span class="mi">2005</span>
<span class="n">Global</span> <span class="n">attr</span> <span class="n">source</span> <span class="o">=</span> <span class="n">netCDF4</span> <span class="n">python</span> <span class="n">module</span> <span class="n">tutorial</span>
@@ -1663,10 +1666,10 @@ and attributes that cannot (or should not) be modified by the user.</p>
<p>The <code>__dict__</code> attribute of a <a href="#netCDF4.Dataset"><code>Dataset</code></a>, <a href="#netCDF4.Group"><code>Group</code></a> or <a href="#netCDF4.Variable"><code>Variable</code></a>
instance provides all the netCDF attribute name/value pairs in a python
dictionary:</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="k">print</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">__dict__</span>
-<span class="n">OrderedDict</span><span class="p">([(</span><span class="s">u"description"</span><span class="p">,</span> <span class="s">u"bogus example script"</span><span class="p">),</span>
- <span class="p">(</span><span class="s">u"history"</span><span class="p">,</span> <span class="s">u"Created Thu Mar 3 19:30:33 2011"</span><span class="p">),</span>
- <span class="p">(</span><span class="s">u"source"</span><span class="p">,</span> <span class="s">u"netCDF4 python module tutorial"</span><span class="p">)])</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="k">print</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">__dict__</span>
+<span class="n">OrderedDict</span><span class="p">([(</span><span class="s2">u"description"</span><span class="p">,</span> <span class="s2">u"bogus example script"</span><span class="p">),</span>
+ <span class="p">(</span><span class="s2">u"history"</span><span class="p">,</span> <span class="s2">u"Created Thu Mar 3 19:30:33 2011"</span><span class="p">),</span>
+ <span class="p">(</span><span class="s2">u"source"</span><span class="p">,</span> <span class="s2">u"netCDF4 python module tutorial"</span><span class="p">)])</span>
</pre></div>
@@ -1676,12 +1679,12 @@ removes the attribute <code>foo</code> the the group <code>grp</code>).</p>
<h2><div id='section6'>6) Writing data to and retrieving data from a netCDF variable.</h2>
<p>Now that you have a netCDF <a href="#netCDF4.Variable"><code>Variable</code></a> instance, how do you put data
into it? You can just treat it like an array and assign data to a slice.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="kn">import</span> <span class="nn">numpy</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="kn">import</span> <span class="nn">numpy</span>
<span class="o">>>></span> <span class="n">lats</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="o">-</span><span class="mi">90</span><span class="p">,</span><span class="mi">91</span><span class="p">,</span><span class="mf">2.5</span><span class="p">)</span>
<span class="o">>>></span> <span class="n">lons</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="o">-</span><span class="mi">180</span><span class="p">,</span><span class="mi">180</span><span class="p">,</span><span class="mf">2.5</span><span class="p">)</span>
<span class="o">>>></span> <span class="n">latitudes</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">lats</span>
<span class="o">>>></span> <span class="n">longitudes</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">lons</span>
-<span class="o">>>></span> <span class="k">print</span> <span class="s">"latitudes =</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="n">latitudes</span><span class="p">[:]</span>
+<span class="o">>>></span> <span class="k">print</span> <span class="s2">"latitudes =</span><span class="se">\n</span><span class="s2">"</span><span class="p">,</span><span class="n">latitudes</span><span class="p">[:]</span>
<span class="n">latitudes</span> <span class="o">=</span>
<span class="p">[</span><span class="o">-</span><span class="mf">90.</span> <span class="o">-</span><span class="mf">87.5</span> <span class="o">-</span><span class="mf">85.</span> <span class="o">-</span><span class="mf">82.5</span> <span class="o">-</span><span class="mf">80.</span> <span class="o">-</span><span class="mf">77.5</span> <span class="o">-</span><span class="mf">75.</span> <span class="o">-</span><span class="mf">72.5</span> <span class="o">-</span><span class="mf">70. [...]
<span class="o">-</span><span class="mf">60.</span> <span class="o">-</span><span class="mf">57.5</span> <span class="o">-</span><span class="mf">55.</span> <span class="o">-</span><span class="mf">52.5</span> <span class="o">-</span><span class="mf">50.</span> <span class="o">-</span><span class="mf">47.5</span> <span class="o">-</span><span class="mf">45.</span> <span class="o">-</span><span class="mf">42.5</span> <span class="o">-</span><span class="mf">40.</span> <span class="o [...]
@@ -1696,19 +1699,19 @@ into it? You can just treat it like an array and assign data to a slice.</p>
<p>Unlike NumPy's array objects, netCDF <a href="#netCDF4.Variable"><code>Variable</code></a>
objects with unlimited dimensions will grow along those dimensions if you
assign data outside the currently defined range of indices.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="c1"># append along two unlimited dimensions by assigning to slice.</span>
-<span class="o">>>></span> <span class="n">nlats</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">rootgrp</span><span class="o">.</span><span class="n">dimensions</span><span class="p">[</span><span class="s">"lat"</span><span class="p">])</span>
-<span class="o">>>></span> <span class="n">nlons</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">rootgrp</span><span class="o">.</span><span class="n">dimensions</span><span class="p">[</span><span class="s">"lon"</span><span class="p">])</span>
-<span class="o">>>></span> <span class="k">print</span> <span class="s">"temp shape before adding data = "</span><span class="p">,</span><span class="n">temp</span><span class="o">.</span><span class="n">shape</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="c1"># append along two unlimited dimensions by assigning to slice.</span>
+<span class="o">>>></span> <span class="n">nlats</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">rootgrp</span><span class="o">.</span><span class="n">dimensions</span><span class="p">[</span><span class="s2">"lat"</span><span class="p">])</span>
+<span class="o">>>></span> <span class="n">nlons</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">rootgrp</span><span class="o">.</span><span class="n">dimensions</span><span class="p">[</span><span class="s2">"lon"</span><span class="p">])</span>
+<span class="o">>>></span> <span class="k">print</span> <span class="s2">"temp shape before adding data = "</span><span class="p">,</span><span class="n">temp</span><span class="o">.</span><span class="n">shape</span>
<span class="n">temp</span> <span class="n">shape</span> <span class="n">before</span> <span class="n">adding</span> <span class="n">data</span> <span class="o">=</span> <span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">73</span><span class="p">,</span> <span class="mi">144</span><span class="p">)</span>
<span class="o">>>></span>
<span class="o">>>></span> <span class="kn">from</span> <span class="nn">numpy.random</span> <span class="kn">import</span> <span class="n">uniform</span>
<span class="o">>>></span> <span class="n">temp</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="mi">5</span><span class="p">,</span><span class="mi">0</span><span class="p">:</span><span class="mi">10</span><span class="p">,:,:]</span> <span class="o">=</span> <span class="n">uniform</span><span class="p">(</span><span class="n">size</span><span class="o">=</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> [...]
-<span class="o">>>></span> <span class="k">print</span> <span class="s">"temp shape after adding data = "</span><span class="p">,</span><span class="n">temp</span><span class="o">.</span><span class="n">shape</span>
+<span class="o">>>></span> <span class="k">print</span> <span class="s2">"temp shape after adding data = "</span><span class="p">,</span><span class="n">temp</span><span class="o">.</span><span class="n">shape</span>
<span class="n">temp</span> <span class="n">shape</span> <span class="n">after</span> <span class="n">adding</span> <span class="n">data</span> <span class="o">=</span> <span class="p">(</span><span class="mi">6</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">73</span><span class="p">,</span> <span class="mi">144</span><span class="p">)</span>
<span class="o">>>></span>
<span class="o">>>></span> <span class="c1"># levels have grown, but no values yet assigned.</span>
-<span class="o">>>></span> <span class="k">print</span> <span class="s">"levels shape after adding pressure data = "</span><span class="p">,</span><span class="n">levels</span><span class="o">.</span><span class="n">shape</span>
+<span class="o">>>></span> <span class="k">print</span> <span class="s2">"levels shape after adding pressure data = "</span><span class="p">,</span><span class="n">levels</span><span class="o">.</span><span class="n">shape</span>
<span class="n">levels</span> <span class="n">shape</span> <span class="n">after</span> <span class="n">adding</span> <span class="n">pressure</span> <span class="n">data</span> <span class="o">=</span> <span class="p">(</span><span class="mi">10</span><span class="p">,)</span>
</pre></div>
@@ -1716,7 +1719,7 @@ assign data outside the currently defined range of indices.</p>
<p>Note that the size of the levels variable grows when data is appended
along the <code>level</code> dimension of the variable <code>temp</code>, even though no
data has yet been assigned to levels.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="c1"># now, assign data to levels dimension variable.</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="c1"># now, assign data to levels dimension variable.</span>
<span class="o">>>></span> <span class="n">levels</span><span class="p">[:]</span> <span class="o">=</span> <span class="p">[</span><span class="mf">1000.</span><span class="p">,</span><span class="mf">850.</span><span class="p">,</span><span class="mf">700.</span><span class="p">,</span><span class="mf">500.</span><span class="p">,</span><span class="mf">300.</span><span class="p">,</span><span class="mf">250.</span><span class="p">,</span><span class="mf">200.</span><span cla [...]
</pre></div>
@@ -1729,7 +1732,7 @@ integer sequence indexing behaves differently for netCDF variables
than for numpy arrays. Only 1-d boolean arrays and integer sequences are
allowed, and these indices work independently along each dimension (similar
to the way vector subscripts work in fortran). This means that</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">temp</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="p">[</span><span class="mi">0</span><span [...]
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">temp</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="p">[</span><span class="mi"> [...]
</pre></div>
@@ -1745,14 +1748,14 @@ While this behaviour may cause some confusion for those used to NumPy's 'fancy i
it provides a very powerful way to extract data from multidimensional netCDF
variables by using logical operations on the dimension arrays to create slices.</p>
<p>For example,</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">tempdat</span> <span class="o">=</span> <span class="n">temp</span><span class="p">[::</span><span class="mi">2</span><span class="p">,</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">6</span><span class="p">],</span> <span class="n">lats</span><span class="o">></span><span class="mi">0</span><span class="p"> [...]
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">tempdat</span> <span class="o">=</span> <span class="n">temp</span><span class="p">[::</span><span class="mi">2</span><span class="p">,</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">6</span><span class="p">],</span> <span class="n">lats</span><span class="o">></span><span class="mi">0</span><sp [...]
</pre></div>
<p>will extract time indices 0,2 and 4, pressure levels
850, 500 and 200 hPa, all Northern Hemisphere latitudes and Eastern
Hemisphere longitudes, resulting in a numpy array of shape (3, 3, 36, 71).</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="k">print</span> <span class="s">"shape of fancy temp slice = "</span><span class="p">,</span><span class="n">tempdat</span><span class="o">.</span><span class="n">shape</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="k">print</span> <span class="s2">"shape of fancy temp slice = "</span><span class="p">,</span><span class="n">tempdat</span><span class="o">.</span><span class="n">shape</span>
<span class="n">shape</span> <span class="n">of</span> <span class="n">fancy</span> <span class="n">temp</span> <span class="nb">slice</span> <span class="o">=</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">36</span><span class="p">,</span> <span class="mi">71</span><span class="p">)</span>
</pre></div>
@@ -1769,16 +1772,16 @@ awkward to deal with, without a utility to convert the values to and
from calendar dates. The function called <a href="#netCDF4.num2date"><code>num2date</code></a> and <a href="#netCDF4.date2num"><code>date2num</code></a> are
provided with this package to do just that. Here's an example of how they
can be used:</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="c1"># fill in times.</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="c1"># fill in times.</span>
<span class="o">>>></span> <span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span><span class="p">,</span> <span class="n">timedelta</span>
<span class="o">>>></span> <span class="kn">from</span> <span class="nn">netCDF4</span> <span class="kn">import</span> <span class="n">num2date</span><span class="p">,</span> <span class="n">date2num</span>
<span class="o">>>></span> <span class="n">dates</span> <span class="o">=</span> <span class="p">[</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2001</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="o">+</span><span class="n">n</span><span class="o">*</span><span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">= [...]
<span class="o">>>></span> <span class="n">times</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">date2num</span><span class="p">(</span><span class="n">dates</span><span class="p">,</span><span class="n">units</span><span class="o">=</span><span class="n">times</span><span class="o">.</span><span class="n">units</span><span class="p">,</span><span class="n">calendar</span><span class="o">=</span><span class="n">times</span><span class="o">.</span><span [...]
-<span class="o">>>></span> <span class="k">print</span> <span class="s">"time values (in units </span><span class="si">%s</span><span class="s">): "</span> <span class="o">%</span> <span class="n">times</span><span class="o">.</span><span class="n">units</span><span class="o">+</span><span class="s">"</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="n">times</span><span class="p">[:]</span>
+<span class="o">>>></span> <span class="k">print</span> <span class="s2">"time values (in units </span><span class="si">%s</span><span class="s2">): "</span> <span class="o">%</span> <span class="n">times</span><span class="o">.</span><span class="n">units</span><span class="o">+</span><span class="s2">"</span><span class="se">\n</span><span class="s2">"</span><span class="p">,</span><span class="n">times</span><span class="p">[:]</span>
<span class="n">time</span> <span class="n">values</span> <span class="p">(</span><span class="ow">in</span> <span class="n">units</span> <span class="n">hours</span> <span class="n">since</span> <span class="n">January</span> <span class="mi">1</span><span class="p">,</span> <span class="mo">0001</span><span class="p">):</span>
<span class="p">[</span> <span class="mf">17533056.</span> <span class="mf">17533068.</span> <span class="mf">17533080.</span> <span class="mf">17533092.</span> <span class="mf">17533104.</span><span class="p">]</span>
<span class="o">>>></span> <span class="n">dates</span> <span class="o">=</span> <span class="n">num2date</span><span class="p">(</span><span class="n">times</span><span class="p">[:],</span><span class="n">units</span><span class="o">=</span><span class="n">times</span><span class="o">.</span><span class="n">units</span><span class="p">,</span><span class="n">calendar</span><span class="o">=</span><span class="n">times</span><span class="o">.</span><span class="n">calendar</spa [...]
-<span class="o">>>></span> <span class="k">print</span> <span class="s">"dates corresponding to time values:</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="n">dates</span>
+<span class="o">>>></span> <span class="k">print</span> <span class="s2">"dates corresponding to time values:</span><span class="se">\n</span><span class="s2">"</span><span class="p">,</span><span class="n">dates</span>
<span class="n">dates</span> <span class="n">corresponding</span> <span class="n">to</span> <span class="n">time</span> <span class="n">values</span><span class="p">:</span>
<span class="p">[</span><span class="mi">2001</span><span class="o">-</span><span class="mo">03</span><span class="o">-</span><span class="mo">01</span> <span class="mo">00</span><span class="p">:</span><span class="mo">00</span><span class="p">:</span><span class="mo">00</span> <span class="mi">2001</span><span class="o">-</span><span class="mo">03</span><span class="o">-</span><span class="mo">01</span> <span class="mi">12</span><span class="p">:</span><span class="mo">00</span><span c [...]
<span class="mi">2001</span><span class="o">-</span><span class="mo">03</span><span class="o">-</span><span class="mo">02</span> <span class="mi">12</span><span class="p">:</span><span class="mo">00</span><span class="p">:</span><span class="mo">00</span> <span class="mi">2001</span><span class="o">-</span><span class="mo">03</span><span class="o">-</span><span class="mo">03</span> <span class="mo">00</span><span class="p">:</span><span class="mo">00</span><span class="p">:</span><span [...]
@@ -1805,19 +1808,19 @@ the same variable (with the same unlimited dimension). The files
must in be in <code>NETCDF3_64BIT_OFFSET</code>, <code>NETCDF3_64BIT_DATA</code>, <code>NETCDF3_CLASSIC</code> or
<code>NETCDF4_CLASSIC</code> format (<code>NETCDF4</code> formatted multi-file
datasets are not supported).</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="k">for</span> <span class="n">nf</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">10</span><span class="p">):</span>
-<span class="o">>>></span> <span class="n">f</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s">"mftest</span><span class="si">%s</span><span class="s">.nc"</span> <span class="o">%</span> <span class="n">nf</span><span class="p">,</span><span class="s">"w"</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">f</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s">"x"</span><span class="p">,</span><span class="bp">None</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">x</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"x"</span><span class="p">,</span><span class="s">"i"</span><span class="p">,(</span><span class="s">"x"</span><span class="p">,))</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="k">for</span> <span class="n">nf</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">10</span><span class="p">):</span>
+<span class="o">>>></span> <span class="n">f</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s2">"mftest</span><span class="si">%s</span><span class="s2">.nc"</span> <span class="o">%</span> <span class="n">nf</span><span class="p">,</span><span class="s2">"w"</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">f</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s2">"x"</span><span class="p">,</span><span class="bp">None</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">x</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"x"</span><span class="p">,</span><span class="s2">"i"</span><span class="p">,(</span><span class="s2">"x"</span><span class="p">,))</span>
<span class="o">>>></span> <span class="n">x</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="mi">10</span><span class="p">]</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="n">nf</span><span class="o">*</span><span class="mi">10</span><span class="p">,</span><span class="mi">10</span><span class="o">*</span><span class="p">(</span>< [...]
<span class="o">>>></span> <span class="n">f</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
</pre></div>
<p>Now read all the files back in at once with <a href="#netCDF4.MFDataset"><code>MFDataset</code></a></p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="kn">from</span> <span class="nn">netCDF4</span> <span class="kn">import</span> <span class="n">MFDataset</span>
-<span class="o">>>></span> <span class="n">f</span> <span class="o">=</span> <span class="n">MFDataset</span><span class="p">(</span><span class="s">"mftest*nc"</span><span class="p">)</span>
-<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s">"x"</span><span class="p">][:]</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="kn">from</span> <span class="nn">netCDF4</span> <span class="kn">import</span> <span class="n">MFDataset</span>
+<span class="o">>>></span> <span class="n">f</span> <span class="o">=</span> <span class="n">MFDataset</span><span class="p">(</span><span class="s2">"mftest*nc"</span><span class="p">)</span>
+<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s2">"x"</span><span class="p">][:]</span>
<span class="p">[</span> <span class="mi">0</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span> <span class="mi">7</span> <span class="mi">8</span> <span class="mi">9</span> <span class="mi">10</span> <span class="mi">11</span> <span class="mi">12</span> <span class="mi">13</span> <span class="mi">14</span> <span class="mi">15</span> <span class="mi">16</span> <span cla [...]
<span class="mi">25</span> <span class="mi">26</span> <span class="mi">27</span> <span class="mi">28</span> <span class="mi">29</span> <span class="mi">30</span> <span class="mi">31</span> <span class="mi">32</span> <span class="mi">33</span> <span class="mi">34</span> <span class="mi">35</span> <span class="mi">36</span> <span class="mi">37</span> <span class="mi">38</span> <span class="mi">39</span> <span class="mi">40</span> <span class="mi">41</span> <span class="mi">42</span> <span [...]
<span class="mi">50</span> <span class="mi">51</span> <span class="mi">52</span> <span class="mi">53</span> <span class="mi">54</span> <span class="mi">55</span> <span class="mi">56</span> <span class="mi">57</span> <span class="mi">58</span> <span class="mi">59</span> <span class="mi">60</span> <span class="mi">61</span> <span class="mi">62</span> <span class="mi">63</span> <span class="mi">64</span> <span class="mi">65</span> <span class="mi">66</span> <span class="mi">67</span> <span [...]
@@ -1863,24 +1866,24 @@ retained (in this case bits=4). Effectively, this makes the compression
'lossy' instead of 'lossless', that is some precision in the data is
sacrificed for the sake of disk space.</p>
<p>In our example, try replacing the line</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">temp</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"temp"</span><span class="p">,</span><span class="s">"f4"</span><span class="p">,(</span><span class="s">"time"</span><span class="p">,</span><span class="s">"level"</span><span class="p">,</span><span c [...]
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">temp</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"temp"</span><span class="p">,</span><span class="s2">"f4"</span><span class="p">,(</span><span class="s2">"time"</span><span class="p">,</span><span class="s2">"level"</span><span class="p [...]
</pre></div>
<p>with</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">temp</span> <span class="o">=</span> <span class="n">dataset</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"temp"</span><span class="p">,</span><span class="s">"f4"</span><span class="p">,(</span><span class="s">"time"</span><span class="p">,</span><span class="s">"level"</span><span class="p">,</span><span c [...]
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">temp</span> <span class="o">=</span> <span class="n">dataset</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"temp"</span><span class="p">,</span><span class="s2">"f4"</span><span class="p">,(</span><span class="s2">"time"</span><span class="p">,</span><span class="s2">"level"</span><span class="p [...]
</pre></div>
<p>and then</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">temp</span> <span class="o">=</span> <span class="n">dataset</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"temp"</span><span class="p">,</span><span class="s">"f4"</span><span class="p">,(</span><span class="s">"time"</span><span class="p">,</span><span class="s">"level"</span><span class="p">,</span><span c [...]
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">temp</span> <span class="o">=</span> <span class="n">dataset</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"temp"</span><span class="p">,</span><span class="s2">"f4"</span><span class="p">,(</span><span class="s2">"time"</span><span class="p">,</span><span class="s2">"level"</span><span class="p [...]
</pre></div>
<p>and see how much smaller the resulting files are.</p>
<h2><div id='section10'>10) Beyond homogeneous arrays of a fixed type - compound data types.</h2>
-<p>Compound data types map directly to numpy structured (a.k.a 'record'
-arrays). Structured arrays are akin to C structs, or derived types
+<p>Compound data types map directly to numpy structured (a.k.a 'record')
+arrays. Structured arrays are akin to C structs, or derived types
in Fortran. They allow for the construction of table-like structures
composed of combinations of other data types, including other
compound types. Compound types might be useful for representing multiple
@@ -1892,27 +1895,27 @@ are created from the corresponding numpy data type using the
<a href="#netCDF4.Dataset.createCompoundType"><code>createCompoundType</code></a> method of a <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> instance.
Since there is no native complex data type in netcdf, compound types are handy
for storing numpy complex arrays. Here's an example:</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">f</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s">"complex.nc"</span><span class="p">,</span><span class="s">"w"</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">f</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s2">"complex.nc"</span><span class="p">,</span><span class="s2">"w"</span><span class="p">)</span>
<span class="o">>>></span> <span class="n">size</span> <span class="o">=</span> <span class="mi">3</span> <span class="c1"># length of 1-d complex array</span>
<span class="o">>>></span> <span class="c1"># create sample complex data.</span>
<span class="o">>>></span> <span class="n">datac</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">exp</span><span class="p">(</span><span class="mi">1j</span><span class="o">*</span><span class="p">(</span><span class="mf">1.</span><span class="o">+</span><span class="n">numpy</span><span class="o">.</span><span class="n">linspace</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">num [...]
<span class="o">>>></span> <span class="c1"># create complex128 compound data type.</span>
-<span class="o">>>></span> <span class="n">complex128</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">dtype</span><span class="p">([(</span><span class="s">"real"</span><span class="p">,</span><span class="n">numpy</span><span class="o">.</span><span class="n">float64</span><span class="p">),(</span><span class="s">"imag"</span><span class="p">,</span><span class="n">numpy</span><span class="o">.</span><span [...]
-<span class="o">>>></span> <span class="n">complex128_t</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createCompoundType</span><span class="p">(</span><span class="n">complex128</span><span class="p">,</span><span class="s">"complex128"</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">complex128</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">dtype</span><span class="p">([(</span><span class="s2">"real"</span><span class="p">,</span><span class="n">numpy</span><span class="o">.</span><span class="n">float64</span><span class="p">),(</span><span class="s2">"imag"</span><span class="p">,</span><span class="n">numpy</span><span class="o">.</span><sp [...]
+<span class="o">>>></span> <span class="n">complex128_t</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createCompoundType</span><span class="p">(</span><span class="n">complex128</span><span class="p">,</span><span class="s2">"complex128"</span><span class="p">)</span>
<span class="o">>>></span> <span class="c1"># create a variable with this data type, write some data to it.</span>
-<span class="o">>>></span> <span class="n">f</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s">"x_dim"</span><span class="p">,</span><span class="bp">None</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">v</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"cmplx_var"</span><span class="p">,</span><span class="n">complex128_t</span><span class="p">,</span><span class="s">"x_dim"</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">f</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s2">"x_dim"</span><span class="p">,</span><span class="bp">None</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">v</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"cmplx_var"</span><span class="p">,</span><span class="n">complex128_t</span><span class="p">,</span><span class="s2">"x_dim"</span><span class="p">)</span>
<span class="o">>>></span> <span class="n">data</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">empty</span><span class="p">(</span><span class="n">size</span><span class="p">,</span><span class="n">complex128</span><span class="p">)</span> <span class="c1"># numpy structured array</span>
-<span class="o">>>></span> <span class="n">data</span><span class="p">[</span><span class="s">"real"</span><span class="p">]</span> <span class="o">=</span> <span class="n">datac</span><span class="o">.</span><span class="n">real</span><span class="p">;</span> <span class="n">data</span><span class="p">[</span><span class="s">"imag"</span><span class="p">]</span> <span class="o">=</span> <span class="n">datac</span><span class="o">.</span><span class="n">imag</span>
+<span class="o">>>></span> <span class="n">data</span><span class="p">[</span><span class="s2">"real"</span><span class="p">]</span> <span class="o">=</span> <span class="n">datac</span><span class="o">.</span><span class="n">real</span><span class="p">;</span> <span class="n">data</span><span class="p">[</span><span class="s2">"imag"</span><span class="p">]</span> <span class="o">=</span> <span class="n">datac</span><span class="o">.</span><span class="n">im [...]
<span class="o">>>></span> <span class="n">v</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">data</span> <span class="c1"># write numpy structured array to netcdf compound var</span>
<span class="o">>>></span> <span class="c1"># close and reopen the file, check the contents.</span>
-<span class="o">>>></span> <span class="n">f</span><span class="o">.</span><span class="n">close</span><span class="p">();</span> <span class="n">f</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s">"complex.nc"</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">v</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s">"cmplx_var"</span><span class="p">]</span>
+<span class="o">>>></span> <span class="n">f</span><span class="o">.</span><span class="n">close</span><span class="p">();</span> <span class="n">f</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s2">"complex.nc"</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">v</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s2">"cmplx_var"</span><span class="p">]</span>
<span class="o">>>></span> <span class="n">datain</span> <span class="o">=</span> <span class="n">v</span><span class="p">[:]</span> <span class="c1"># read in all the data into a numpy structured array</span>
<span class="o">>>></span> <span class="c1"># create an empty numpy complex array</span>
<span class="o">>>></span> <span class="n">datac2</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">empty</span><span class="p">(</span><span class="n">datain</span><span class="o">.</span><span class="n">shape</span><span class="p">,</span><span class="n">numpy</span><span class="o">.</span><span class="n">complex128</span><span class="p">)</span>
<span class="o">>>></span> <span class="c1"># .. fill it with contents of structured array.</span>
-<span class="o">>>></span> <span class="n">datac2</span><span class="o">.</span><span class="n">real</span> <span class="o">=</span> <span class="n">datain</span><span class="p">[</span><span class="s">"real"</span><span class="p">];</span> <span class="n">datac2</span><span class="o">.</span><span class="n">imag</span> <span class="o">=</span> <span class="n">datain</span><span class="p">[</span><span class="s">"imag"</span><span class="p">]</span>
+<span class="o">>>></span> <span class="n">datac2</span><span class="o">.</span><span class="n">real</span> <span class="o">=</span> <span class="n">datain</span><span class="p">[</span><span class="s2">"real"</span><span class="p">];</span> <span class="n">datac2</span><span class="o">.</span><span class="n">imag</span> <span class="o">=</span> <span class="n">datain</span><span class="p">[</span><span class="s2">"imag"</span><span class="p">]</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">datac</span><span class="o">.</span><span class="n">dtype</span><span class="p">,</span><span class="n">datac</span> <span class="c1"># original data</span>
<span class="n">complex128</span> <span class="p">[</span> <span class="mf">0.54030231</span><span class="o">+</span><span class="mf">0.84147098j</span> <span class="o">-</span><span class="mf">0.84147098</span><span class="o">+</span><span class="mf">0.54030231j</span> <span class="o">-</span><span class="mf">0.54030231</span><span class="o">-</span><span class="mf">0.84147098j</span><span class="p">]</span>
<span class="o">>>></span>
@@ -1925,22 +1928,22 @@ for storing numpy complex arrays. Here's an example:</p>
ones first. All of the compound types defined for a <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> are stored in a
Python dictionary, just like variables and dimensions. As always, printing
objects gives useful summary information in an interactive session:</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="k">print</span> <span class="n">f</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Dataset"</span><span class="o">></span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="k">print</span> <span class="n">f</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Dataset"</span><span class="o">></span>
<span class="n">root</span> <span class="n">group</span> <span class="p">(</span><span class="n">NETCDF4</span> <span class="nb">file</span> <span class="n">format</span><span class="p">):</span>
<span class="n">dimensions</span><span class="p">:</span> <span class="n">x_dim</span>
<span class="n">variables</span><span class="p">:</span> <span class="n">cmplx_var</span>
<span class="n">groups</span><span class="p">:</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Variable"</span><span class="o">></span>
-<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s">"cmplx_var"</span><span class="p">]</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Variable"</span><span class="o">></span>
+<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s2">"cmplx_var"</span><span class="p">]</span>
<span class="n">compound</span> <span class="n">cmplx_var</span><span class="p">(</span><span class="n">x_dim</span><span class="p">)</span>
-<span class="n">compound</span> <span class="n">data</span> <span class="nb">type</span><span class="p">:</span> <span class="p">[(</span><span class="s">"real"</span><span class="p">,</span> <span class="s">"<f8"</span><span class="p">),</span> <span class="p">(</span><span class="s">"imag"</span><span class="p">,</span> <span class="s">"<f8"</span><span class="p">)]</span>
+<span class="n">compound</span> <span class="n">data</span> <span class="nb">type</span><span class="p">:</span> <span class="p">[(</span><span class="s2">"real"</span><span class="p">,</span> <span class="s2">"<f8"</span><span class="p">),</span> <span class="p">(</span><span class="s2">"imag"</span><span class="p">,</span> <span class="s2">"<f8"</span><span class="p">)]</span>
<span class="n">unlimited</span> <span class="n">dimensions</span><span class="p">:</span> <span class="n">x_dim</span>
<span class="n">current</span> <span class="n">shape</span> <span class="o">=</span> <span class="p">(</span><span class="mi">3</span><span class="p">,)</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">cmptypes</span>
-<span class="n">OrderedDict</span><span class="p">([(</span><span class="s">"complex128"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">CompoundType</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1029eb7e8</span><span class="o">></span><span class="p">)])</span>
-<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">cmptypes</span><span class="p">[</span><span class="s">"complex128"</span><span class="p">]</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.CompoundType"</span><span class="o">></span><span class="p">:</span> <span class="n">name</span> <span class="o">=</span> <span class="s">"complex128"</span><span class="p">,</span> <span class="n">numpy</span> <span class="n">dtype</span> <span class="o">=</span> <span class="p">[(</span><span class="s">u"real"</span><span class="p">,</span><span class="s">"< [...]
+<span class="n">OrderedDict</span><span class="p">([(</span><span class="s2">"complex128"</span><span class="p">,</span> <span class="o"><</span><span class="n">netCDF4</span><span class="o">.</span><span class="n">CompoundType</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x1029eb7e8</span><span class="o">></span><span class="p">)])</span>
+<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">cmptypes</span><span class="p">[</span><span class="s2">"complex128"</span><span class="p">]</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.CompoundType"</span><span class="o">></span><span class="p">:</span> <span class="n">name</span> <span class="o">=</span> <span class="s2">"complex128"</span><span class="p">,</span> <span class="n">numpy</span> <span class="n">dtype</span> <span class="o">=</span> <span class="p">[(</span><span class="s2">u"real"</span><span class="p">,</span><span class="s2">" [...]
</pre></div>
@@ -1949,8 +1952,8 @@ objects gives useful summary information in an interactive session:</p>
of variable length sequences having the same type. To create a variable-length
data type, use the <a href="#netCDF4.Dataset.createVLType"><code>createVLType</code></a> method
method of a <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#netCDF4.Group"><code>Group</code></a> instance.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">f</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s">"tst_vlen.nc"</span><span class="p">,</span><span class="s">"w"</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">vlen_t</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createVLType</span><span class="p">(</span><span class="n">numpy</span><span class="o">.</span><span class="n">int32</span><span class="p">,</span> <span class="s">"phony_vlen"</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">f</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s2">"tst_vlen.nc"</span><span class="p">,</span><span class="s2">"w"</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">vlen_t</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createVLType</span><span class="p">(</span><span class="n">numpy</span><span class="o">.</span><span class="n">int32</span><span class="p">,</span> <span class="s2">"phony_vlen"</span><span class="p">)</span>
</pre></div>
@@ -1959,9 +1962,9 @@ new datatype must be specified. Any of the primitive datatypes can be
used (signed and unsigned integers, 32 and 64 bit floats, and characters),
but compound data types cannot.
A new variable can then be created using this datatype.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">x</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s">"x"</span><span class="p">,</span><span class="mi">3</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">y</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s">"y"</span><span class="p">,</span><span class="mi">4</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">vlvar</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"phony_vlen_var"</span><span class="p">,</span> <span class="n">vlen_t</span><span class="p">,</span> <span class="p">(</span><span class="s">"y"</span><span class="p">,</span><span class="s">"x"</span><span class="p">))</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">x</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s2">"x"</span><span class="p">,</span><span class="mi">3</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">y</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s2">"y"</span><span class="p">,</span><span class="mi">4</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">vlvar</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"phony_vlen_var"</span><span class="p">,</span> <span class="n">vlen_t</span><span class="p">,</span> <span class="p">(</span><span class="s2">"y"</span><span class="p">,</span><span class="s2">"x"</span><span class="p">))</span>
</pre></div>
@@ -1970,15 +1973,15 @@ in python as object arrays (arrays of dtype <code>object</code>). These are arra
elements are Python object pointers, and can contain any type of python object.
For this application, they must contain 1-D numpy arrays all of the same type
but of varying length.
-In this case, they contain 1-D numpy <code>int32</code> arrays of random length betwee
+In this case, they contain 1-D numpy <code>int32</code> arrays of random length between
1 and 10.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="kn">import</span> <span class="nn">random</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="kn">import</span> <span class="nn">random</span>
<span class="o">>>></span> <span class="n">data</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">empty</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">y</span><span class="p">)</span><span class="o">*</span><span class="nb">len</span><span class="p">(</span><span class="n">x</span><span class="p">),</span><span class="nb">object</span><span class="p">)</span>
<span class="o">>>></span> <span class="k">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">y</span><span class="p">)</span><span class="o">*</span><span class="nb">len</span><span class="p">(</span><span class="n">x</span><span class="p">)):</span>
-<span class="o">>>></span> <span class="n">data</span><span class="p">[</span><span class="n">n</span><span class="p">]</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">10</span><span class="p">),</span><span class="n"> [...]
+<span class="o">>>></span> <span class="n">data</span><span class="p">[</span><span class="n">n</span><span class="p">]</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">10</span><span class="p">),</span><span class="n"> [...]
<span class="o">>>></span> <span class="n">data</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">data</span><span class="p">,(</span><span class="nb">len</span><span class="p">(</span><span class="n">y</span><span class="p">),</span><span class="nb">len</span><span class="p">(</span><span class="n">x</span><span class="p">)))</span>
<span class="o">>>></span> <span class="n">vlvar</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">data</span>
-<span class="o">>>></span> <span class="k">print</span> <span class="s">"vlen variable =</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="n">vlvar</span><span class="p">[:]</span>
+<span class="o">>>></span> <span class="k">print</span> <span class="s2">"vlen variable =</span><span class="se">\n</span><span class="s2">"</span><span class="p">,</span><span class="n">vlvar</span><span class="p">[:]</span>
<span class="n">vlen</span> <span class="n">variable</span> <span class="o">=</span>
<span class="p">[[[</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span> <span class="mi">7</span> <span class="mi">8</span> <span class="mi">9</span> <span class="mi">10</span><span class="p">]</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span><span class="p">]</ [...]
<span class="p">[[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span> <span class="mi">7</span><span class="p">]</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span><span class="p">]</span> <span class="p">[</span><span class="mi">1</span> <span [...]
@@ -1986,19 +1989,19 @@ In this case, they contain 1-D numpy <code>int32</code> arrays of random length
<span class="p">[[</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span> <span class="mi">7</span> <span class="mi">8</span> <span class="mi">9</span> <span class="mi">10</span><span class="p">]</span> <span class="p">[</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class= [...]
<span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span> <span class="mi">7</span> <span class="mi">8</span><span class="p">]]]</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Dataset"</span><span class="o">></span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Dataset"</span><span class="o">></span>
<span class="n">root</span> <span class="n">group</span> <span class="p">(</span><span class="n">NETCDF4</span> <span class="nb">file</span> <span class="n">format</span><span class="p">):</span>
<span class="n">dimensions</span><span class="p">:</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span>
<span class="n">variables</span><span class="p">:</span> <span class="n">phony_vlen_var</span>
<span class="n">groups</span><span class="p">:</span>
-<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s">"phony_vlen_var"</span><span class="p">]</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Variable"</span><span class="o">></span>
+<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s2">"phony_vlen_var"</span><span class="p">]</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Variable"</span><span class="o">></span>
<span class="n">vlen</span> <span class="n">phony_vlen_var</span><span class="p">(</span><span class="n">y</span><span class="p">,</span> <span class="n">x</span><span class="p">)</span>
<span class="n">vlen</span> <span class="n">data</span> <span class="nb">type</span><span class="p">:</span> <span class="n">int32</span>
<span class="n">unlimited</span> <span class="n">dimensions</span><span class="p">:</span>
<span class="n">current</span> <span class="n">shape</span> <span class="o">=</span> <span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
-<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">VLtypes</span><span class="p">[</span><span class="s">"phony_vlen"</span><span class="p">]</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.VLType"</span><span class="o">></span><span class="p">:</span> <span class="n">name</span> <span class="o">=</span> <span class="s">"phony_vlen"</span><span class="p">,</span> <span class="n">numpy</span> <span class="n">dtype</span> <span class="o">=</span> <span class="n">int32</span>
+<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">VLtypes</span><span class="p">[</span><span class="s2">"phony_vlen"</span><span class="p">]</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.VLType"</span><span class="o">></span><span class="p">:</span> <span class="n">name</span> <span class="o">=</span> <span class="s2">"phony_vlen"</span><span class="p">,</span> <span class="n">numpy</span> <span class="n">dtype</span> <span class="o">=</span> <span class="n">int32</span>
</pre></div>
@@ -2007,33 +2010,33 @@ variables, For vlen strings, you don't need to create a vlen data type.
Instead, simply use the python <code>str</code> builtin (or a numpy string datatype
with fixed length greater than 1) when calling the
<a href="#netCDF4.Dataset.createVariable"><code>createVariable</code></a> method.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">z</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s">"z"</span><span class="p">,</span><span class="mi">10</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">strvar</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"strvar"</span><span class="p">,</span> <span class="nb">str</span><span class="p">,</span> <span class="s">"z"</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">z</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s2">"z"</span><span class="p">,</span><span class="mi">10</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">strvar</span> <span class="o">=</span> <span class="n">rootgrp</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"strvar"</span><span class="p">,</span> <span class="nb">str</span><span class="p">,</span> <span class="s2">"z"</span><span class="p">)</span>
</pre></div>
<p>In this example, an object array is filled with random python strings with
random lengths between 2 and 12 characters, and the data in the object
array is assigned to the vlen string variable.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">chars</span> <span class="o">=</span> <span class="s">"1234567890aabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"</span>
-<span class="o">>>></span> <span class="n">data</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">empty</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span><span class="s">"O"</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">chars</span> <span class="o">=</span> <span class="s2">"1234567890aabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"</span>
+<span class="o">>>></span> <span class="n">data</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">empty</span><span class="p">(</span><span class="mi">10</span><span class="p">,</span><span class="s2">"O"</span><span class="p">)</span>
<span class="o">>>></span> <span class="k">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">10</span><span class="p">):</span>
<span class="o">>>></span> <span class="n">stringlen</span> <span class="o">=</span> <span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">12</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">data</span><span class="p">[</span><span class="n">n</span><span class="p">]</span> <span class="o">=</span> <span class="s">""</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">random</span><span class="o">.</span><span class="n">choice</span><span class="p">(</span><span class="n">chars</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span> <span [...]
+<span class="o">>>></span> <span class="n">data</span><span class="p">[</span><span class="n">n</span><span class="p">]</span> <span class="o">=</span> <span class="s2">""</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">random</span><span class="o">.</span><span class="n">choice</span><span class="p">(</span><span class="n">chars</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span> <spa [...]
<span class="o">>>></span> <span class="n">strvar</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">data</span>
-<span class="o">>>></span> <span class="k">print</span> <span class="s">"variable-length string variable:</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="n">strvar</span><span class="p">[:]</span>
+<span class="o">>>></span> <span class="k">print</span> <span class="s2">"variable-length string variable:</span><span class="se">\n</span><span class="s2">"</span><span class="p">,</span><span class="n">strvar</span><span class="p">[:]</span>
<span class="n">variable</span><span class="o">-</span><span class="n">length</span> <span class="n">string</span> <span class="n">variable</span><span class="p">:</span>
<span class="p">[</span><span class="n">aDy29jPt</span> <span class="mi">5</span><span class="n">DS9X8</span> <span class="n">jd7aplD</span> <span class="n">b8t4RM</span> <span class="n">jHh8hq</span> <span class="n">KtaPWF9cQj</span> <span class="n">Q1hHN5WoXSiT</span> <span class="n">MMxsVeq</span> <span class="n">tdLUzvVTzj</span><span class="p">]</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Dataset"</span><span class="o">></span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Dataset"</span><span class="o">></span>
<span class="n">root</span> <span class="n">group</span> <span class="p">(</span><span class="n">NETCDF4</span> <span class="nb">file</span> <span class="n">format</span><span class="p">):</span>
<span class="n">dimensions</span><span class="p">:</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span>
<span class="n">variables</span><span class="p">:</span> <span class="n">phony_vlen_var</span><span class="p">,</span> <span class="n">strvar</span>
<span class="n">groups</span><span class="p">:</span>
-<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s">"strvar"</span><span class="p">]</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">"netCDF4._netCDF4.Variable"</span><span class="o">></span>
+<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s2">"strvar"</span><span class="p">]</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s2">"netCDF4._netCDF4.Variable"</span><span class="o">></span>
<span class="n">vlen</span> <span class="n">strvar</span><span class="p">(</span><span class="n">z</span><span class="p">)</span>
-<span class="n">vlen</span> <span class="n">data</span> <span class="nb">type</span><span class="p">:</span> <span class="o"><</span><span class="nb">type</span> <span class="s">"str"</span><span class="o">></span>
+<span class="n">vlen</span> <span class="n">data</span> <span class="nb">type</span><span class="p">:</span> <span class="o"><</span><span class="nb">type</span> <span class="s2">"str"</span><span class="o">></span>
<span class="n">unlimited</span> <span class="n">dimensions</span><span class="p">:</span>
<span class="n">current</span> <span class="n">size</span> <span class="o">=</span> <span class="p">(</span><span class="mi">10</span><span class="p">,)</span>
</pre></div>
@@ -2050,21 +2053,21 @@ a numpy data type, they are read and written as integer arrays.</p>
The base integer data type and a python dictionary describing the allowed
values and their names are used to define an Enum data type using
<a href="#netCDF4.Dataset.createEnumType"><code>createEnumType</code></a>.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">nc</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s">'clouds.nc'</span><span class="p">,</span><span class="s">'w'</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">nc</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s1">'clouds.nc'</span><span class="p">,</span><span class="s1">'w'</span><span class="p">)</span>
<span class="o">>>></span> <span class="c1"># python dict with allowed values and their names.</span>
-<span class="o">>>></span> <span class="n">enum_dict</span> <span class="o">=</span> <span class="p">{</span><span class="s">u'Altocumulus'</span><span class="p">:</span> <span class="mi">7</span><span class="p">,</span> <span class="s">u'Missing'</span><span class="p">:</span> <span class="mi">255</span><span class="p">,</span>
-<span class="o">>>></span> <span class="s">u'Stratus'</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span> <span class="s">u'Clear'</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
-<span class="o">>>></span> <span class="s">u'Nimbostratus'</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> <span class="s">u'Cumulus'</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> <span class="s">u'Altostratus'</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span>
-<span class="o">>>></span> <span class="s">u'Cumulonimbus'</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s">u'Stratocumulus'</span><span class="p">:</span> <span class="mi">3</span><span class="p">}</span>
+<span class="o">>>></span> <span class="n">enum_dict</span> <span class="o">=</span> <span class="p">{</span><span class="s1">u'Altocumulus'</span><span class="p">:</span> <span class="mi">7</span><span class="p">,</span> <span class="s1">u'Missing'</span><span class="p">:</span> <span class="mi">255</span><span class="p">,</span>
+<span class="o">>>></span> <span class="s1">u'Stratus'</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span> <span class="s1">u'Clear'</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
+<span class="o">>>></span> <span class="s1">u'Nimbostratus'</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> <span class="s1">u'Cumulus'</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> <span class="s1">u'Altostratus'</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span>
+<span class="o">>>></span> <span class="s1">u'Cumulonimbus'</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">u'Stratocumulus'</span><span class="p">:</span> <span class="mi">3</span><span class="p">}</span>
<span class="o">>>></span> <span class="c1"># create the Enum type called 'cloud_t'.</span>
-<span class="o">>>></span> <span class="n">cloud_type</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">createEnumType</span><span class="p">(</span><span class="n">numpy</span><span class="o">.</span><span class="n">uint8</span><span class="p">,</span><span class="s">'cloud_t'</span><span class="p">,</span><span class="n">enum_dict</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">cloud_type</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">createEnumType</span><span class="p">(</span><span class="n">numpy</span><span class="o">.</span><span class="n">uint8</span><span class="p">,</span><span class="s1">'cloud_t'</span><span class="p">,</span><span class="n">enum_dict</span><span class="p">)</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">cloud_type</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">'netCDF4._netCDF4.EnumType'</span><span class="o">></span><span class="p">:</span> <span class="n">name</span> <span class="o">=</span> <span class="s">'cloud_t'</span><span class="p">,</span>
-<span class="n">numpy</span> <span class="n">dtype</span> <span class="o">=</span> <span class="n">uint8</span><span class="p">,</span> <span class="n">fields</span><span class="o">/</span><span class="n">values</span> <span class="o">=</span><span class="p">{</span><span class="s">u'Cumulus'</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span>
-<span class="s">u'Altocumulus'</span><span class="p">:</span> <span class="mi">7</span><span class="p">,</span> <span class="s">u'Missing'</span><span class="p">:</span> <span class="mi">255</span><span class="p">,</span>
-<span class="s">u'Stratus'</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span> <span class="s">u'Clear'</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
-<span class="s">u'Cumulonimbus'</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s">u'Stratocumulus'</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span>
-<span class="s">u'Nimbostratus'</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> <span class="s">u'Altostratus'</span><span class="p">:</span> <span class="mi">5</span><span class="p">}</span>
+<span class="o"><</span><span class="nb">type</span> <span class="s1">'netCDF4._netCDF4.EnumType'</span><span class="o">></span><span class="p">:</span> <span class="n">name</span> <span class="o">=</span> <span class="s1">'cloud_t'</span><span class="p">,</span>
+<span class="n">numpy</span> <span class="n">dtype</span> <span class="o">=</span> <span class="n">uint8</span><span class="p">,</span> <span class="n">fields</span><span class="o">/</span><span class="n">values</span> <span class="o">=</span><span class="p">{</span><span class="s1">u'Cumulus'</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span>
+<span class="s1">u'Altocumulus'</span><span class="p">:</span> <span class="mi">7</span><span class="p">,</span> <span class="s1">u'Missing'</span><span class="p">:</span> <span class="mi">255</span><span class="p">,</span>
+<span class="s1">u'Stratus'</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span> <span class="s1">u'Clear'</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
+<span class="s1">u'Cumulonimbus'</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">u'Stratocumulus'</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span>
+<span class="s1">u'Nimbostratus'</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> <span class="s1">u'Altostratus'</span><span class="p">:</span> <span class="mi">5</span><span class="p">}</span>
</pre></div>
@@ -2073,32 +2076,32 @@ Integer data is written to the variable that represents the named
cloud types in enum_dict. A <code>ValueError</code> will be raised if an attempt
is made to write an integer value not associated with one of the
specified names.</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="n">time</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s">'time'</span><span class="p">,</span><span class="bp">None</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="n">time</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s1">'time'</span><span class="p">,</span><span class="bp">None</span><span class="p">)</span>
<span class="o">>>></span> <span class="c1"># create a 1d variable of type 'cloud_type'.</span>
<span class="o">>>></span> <span class="c1"># The fill_value is set to the 'Missing' named value.</span>
<span class="o">>>></span> <span class="n">cloud_var</span> <span class="o">=</span>
-<span class="o">>>></span> <span class="n">nc</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">'primary_cloud'</span><span class="p">,</span><span class="n">cloud_type</span><span class="p">,</span><span class="s">'time'</span><span class="p">,</span>
-<span class="o">>>></span> <span class="n">fill_value</span><span class="o">=</span><span class="n">enum_dict</span><span class="p">[</span><span class="s">'Missing'</span><span class="p">])</span>
+<span class="o">>>></span> <span class="n">nc</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s1">'primary_cloud'</span><span class="p">,</span><span class="n">cloud_type</span><span class="p">,</span><span class="s1">'time'</span><span class="p">,</span>
+<span class="o">>>></span> <span class="n">fill_value</span><span class="o">=</span><span class="n">enum_dict</span><span class="p">[</span><span class="s1">'Missing'</span><span class="p">])</span>
<span class="o">>>></span> <span class="c1"># write some data to the variable.</span>
-<span class="o">>>></span> <span class="n">cloud_var</span><span class="p">[:]</span> <span class="o">=</span> <span class="p">[</span><span class="n">enum_dict</span><span class="p">[</span><span class="s">'Clear'</span><span class="p">],</span><span class="n">enum_dict</span><span class="p">[</span><span class="s">'Stratus'</span><span class="p">],</span>
-<span class="o">>>></span> <span class="n">enum_dict</span><span class="p">[</span><span class="s">'Cumulus'</span><span class="p">],</span><span class="n">enum_dict</span><span class="p">[</span><span class="s">'Missing'</span><span class="p">],</span>
-<span class="o">>>></span> <span class="n">enum_dict</span><span class="p">[</span><span class="s">'Cumulonimbus'</span><span class="p">]]</span>
+<span class="o">>>></span> <span class="n">cloud_var</span><span class="p">[:]</span> <span class="o">=</span> <span class="p">[</span><span class="n">enum_dict</span><span class="p">[</span><span class="s1">'Clear'</span><span class="p">],</span><span class="n">enum_dict</span><span class="p">[</span><span class="s1">'Stratus'</span><span class="p">],</span>
+<span class="o">>>></span> <span class="n">enum_dict</span><span class="p">[</span><span class="s1">'Cumulus'</span><span class="p">],</span><span class="n">enum_dict</span><span class="p">[</span><span class="s1">'Missing'</span><span class="p">],</span>
+<span class="o">>>></span> <span class="n">enum_dict</span><span class="p">[</span><span class="s1">'Cumulonimbus'</span><span class="p">]]</span>
<span class="o">>>></span> <span class="n">nc</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
<span class="o">>>></span> <span class="c1"># reopen the file, read the data.</span>
-<span class="o">>>></span> <span class="n">nc</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s">'clouds.nc'</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">cloud_var</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s">'primary_cloud'</span><span class="p">]</span>
+<span class="o">>>></span> <span class="n">nc</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s1">'clouds.nc'</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">cloud_var</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s1">'primary_cloud'</span><span class="p">]</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">cloud_var</span>
-<span class="o"><</span><span class="nb">type</span> <span class="s">'netCDF4._netCDF4.Variable'</span><span class="o">></span>
+<span class="o"><</span><span class="nb">type</span> <span class="s1">'netCDF4._netCDF4.Variable'</span><span class="o">></span>
<span class="n">enum</span> <span class="n">primary_cloud</span><span class="p">(</span><span class="n">time</span><span class="p">)</span>
<span class="n">_FillValue</span><span class="p">:</span> <span class="mi">255</span>
<span class="n">enum</span> <span class="n">data</span> <span class="nb">type</span><span class="p">:</span> <span class="n">uint8</span>
<span class="n">unlimited</span> <span class="n">dimensions</span><span class="p">:</span> <span class="n">time</span>
<span class="n">current</span> <span class="n">shape</span> <span class="o">=</span> <span class="p">(</span><span class="mi">5</span><span class="p">,)</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">cloud_var</span><span class="o">.</span><span class="n">datatype</span><span class="o">.</span><span class="n">enum_dict</span>
-<span class="p">{</span><span class="s">u'Altocumulus'</span><span class="p">:</span> <span class="mi">7</span><span class="p">,</span> <span class="s">u'Missing'</span><span class="p">:</span> <span class="mi">255</span><span class="p">,</span> <span class="s">u'Stratus'</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span>
-<span class="s">u'Clear'</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="s">u'Nimbostratus'</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> <span class="s">u'Cumulus'</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span>
-<span class="s">u'Altostratus'</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> <span class="s">u'Cumulonimbus'</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
-<span class="s">u'Stratocumulus'</span><span class="p">:</span> <span class="mi">3</span><span class="p">}</span>
+<span class="p">{</span><span class="s1">u'Altocumulus'</span><span class="p">:</span> <span class="mi">7</span><span class="p">,</span> <span class="s1">u'Missing'</span><span class="p">:</span> <span class="mi">255</span><span class="p">,</span> <span class="s1">u'Stratus'</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span>
+<span class="s1">u'Clear'</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="s1">u'Nimbostratus'</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> <span class="s1">u'Cumulus'</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span>
+<span class="s1">u'Altostratus'</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> <span class="s1">u'Cumulonimbus'</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
+<span class="s1">u'Stratocumulus'</span><span class="p">:</span> <span class="mi">3</span><span class="p">}</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">cloud_var</span><span class="p">[:]</span>
<span class="p">[</span><span class="mi">0</span> <span class="mi">2</span> <span class="mi">4</span> <span class="o">--</span> <span class="mi">1</span><span class="p">]</span>
<span class="o">>>></span> <span class="n">nc</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
@@ -2204,15 +2207,15 @@ The datetime objects should not include a time-zone offset.</p>
<p><strong><code>units</code></strong>: a string of the form <code><time units> since <reference time></code>
describing the time units. <code><time units></code> can be days, hours, minutes,
seconds, milliseconds or microseconds. <code><reference time></code> is the time
-origin. Accuracy is somewhere between a millisecond and a microsecond,
-depending on the time interval and the calendar used.</p>
+origin. </p>
<p><strong><code>calendar</code></strong>: describes the calendar used in the time calculations.
All the values currently defined in the
<a href="http://cfconventions.org">CF metadata convention</a>
Valid calendars <code>'standard', 'gregorian', 'proleptic_gregorian'
'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'</code>.
Default is <code>'standard'</code>, which is a mixed Julian/Gregorian calendar.</p>
-<p>returns a numeric time value, or an array of numeric time values.</p></div>
+<p>returns a numeric time value, or an array of numeric time values
+with approximately millisecond accuracy.</p></div>
<div class="source_cont">
</div>
@@ -2252,15 +2255,15 @@ UTC with no time-zone offset, even if the specified
<p><strong><code>units</code></strong>: a string of the form <code><time units> since <reference time></code>
describing the time units. <code><time units></code> can be days, hours, minutes,
seconds, milliseconds or microseconds. <code><reference time></code> is the time
-origin. Accuracy is somewhere between a millisecond and a microsecond,
-depending on the time interval and the calendar used.</p>
+origin.</p>
<p><strong><code>calendar</code></strong>: describes the calendar used in the time calculations.
All the values currently defined in the
<a href="http://cfconventions.org">CF metadata convention</a>
Valid calendars <code>'standard', 'gregorian', 'proleptic_gregorian'
'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'</code>.
Default is <code>'standard'</code>, which is a mixed Julian/Gregorian calendar.</p>
-<p>returns a datetime instance, or an array of datetime instances.</p>
+<p>returns a datetime instance, or an array of datetime instances with
+approximately millisecond accuracy.</p>
<p><strong><em>Note</em></strong>: The datetime instances returned are 'real' python datetime
objects if <code>calendar='proleptic_gregorian'</code>, or
<code>calendar='standard'</code> or <code>'gregorian'</code>
@@ -2622,7 +2625,7 @@ variable-length types defined for the <a href="#netCDF4.Group"><code>Group</code
<div class="item">
<div class="name def" id="netCDF4.Dataset.__init__">
- <p>def <span class="ident">__init__</span>(</p><p>self, filename, mode="r", clobber=True, diskless=False, persist=False, weakref=False, format='NETCDF4')</p>
+ <p>def <span class="ident">__init__</span>(</p><p>self, filename, mode="r", clobber=True, diskless=False, persist=False, keepweakref=False, format='NETCDF4')</p>
</div>
@@ -2638,7 +2641,7 @@ serial files); an existing file is opened for reading and writing.
Appending <code>s</code> to modes <code>w</code>, <code>r+</code> or <code>a</code> will enable unbuffered shared
access to <code>NETCDF3_CLASSIC</code>, <code>NETCDF3_64BIT_OFFSET</code> or
<code>NETCDF3_64BIT_DATA</code> formatted files.
-Unbuffered acesss may be useful even if you don't need shared
+Unbuffered access may be useful even if you don't need shared
access, since it may be faster for programs that don't access data
sequentially. This option is ignored for <code>NETCDF4</code> and <code>NETCDF4_CLASSIC</code>
formatted files.</p>
@@ -2652,7 +2655,7 @@ Only relevant if <code>mode = 'w'</code> (if <code>mode = 'r','a'</code> or <cod
is automatically detected). Default <code>'NETCDF4'</code>, which means the data is
stored in an HDF5 file, using netCDF 4 API features. Setting
<code>format='NETCDF4_CLASSIC'</code> will create an HDF5 file, using only netCDF 3
-compatibile API features. netCDF 3 clients must be recompiled and linked
+compatible API features. netCDF 3 clients must be recompiled and linked
against the netCDF 4 library to read files in <code>NETCDF4_CLASSIC</code> format.
<code>'NETCDF3_CLASSIC'</code> is the classic netCDF 3 file format that does not
handle 2+ Gb files. <code>'NETCDF3_64BIT_OFFSET'</code> is the 64-bit offset
@@ -2674,11 +2677,12 @@ keep a strong reference to the parent Dataset instance, which in turn keeps a
reference to child Dimension and Variable instances, creates circular references.
Circular references complicate garbage collection, which may mean increased
memory usage for programs that create may Dataset instances with lots of
-Variables. Setting <code>keepweakref=True</code> allows Dataset instances to be
-garbage collected as soon as they go out of scope, potential reducing memory
-usage. However, in most 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.</p></div>
+Variables. It also will result in the Dataset object never being deleted, which
+means it may keep open files alive as well. Setting <code>keepweakref=True</code> allows
+Dataset instances to be garbage collected as soon as they go out of scope, potentially
+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.</p></div>
<div class="source_cont">
</div>
@@ -2821,7 +2825,7 @@ For example, <code>createVariable('/GroupA/GroupB/VarC', float, ('x','y'))</code
and <code>GroupA/GroupB</code>, plus the variable <code>GroupA/GroupB/VarC</code>, if the preceding
groups don't already exist.</p>
<p>The <code>datatype</code> can be a numpy datatype object, or a string that describes
-a numpy dtype object (like the <code>dtype.str</code> attribue of a numpy array).
+a numpy dtype object (like the <code>dtype.str</code> attribute of a numpy array).
Supported specifiers include: <code>'S1' or 'c' (NC_CHAR), 'i1' or 'b' or 'B'
(NC_BYTE), 'u1' (NC_UBYTE), 'i2' or 'h' or 's' (NC_SHORT), 'u2'
(NC_USHORT), 'i4' or 'i' or 'l' (NC_INT), 'u4' (NC_UINT), 'i8' (NC_INT64),
@@ -2961,10 +2965,10 @@ open/create the Dataset. Requires netcdf >= 4.1.2</p></div>
<div class="desc"><p>Returns a list of variables that match specific conditions.</p>
<p>Can pass in key=value parameters and variables are returned that
contain all of the matches. For example, </p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="c1"># Get variables with x-axis attribute.</span>
-<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="s">'X'</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="c1"># Get variables with x-axis attribute.</span>
+<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="s1">'X'</span><span class="p">)</span>
<span class="o">>>></span> <span class="c1"># Get variables with matching "standard_name" attribute</span>
-<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">standard_name</span><span class="o">=</span><span class="s">'northward_sea_water_velocity'</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">standard_name</span><span class="o">=</span><span class="s1">'northward_sea_water_velocity'</span><span class="p">)</span>
</pre></div>
@@ -2972,8 +2976,8 @@ contain all of the matches. For example, </p>
callable returns True. The callable should accept a single parameter,
the attribute value. None is given as the attribute value when the
attribute does not exist on the variable. For example,</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="c1"># Get Axis variables</span>
-<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="k">lambda</span> <span class="n">v</span><span class="p">:</span> <span class="n">v</span> <span class="ow">in</span> <span class="p">[</span><span class="s">'X'</span><span class="p">,</span> <span class="s">& [...]
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="c1"># Get Axis variables</span>
+<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="k">lambda</span> <span class="n">v</span><span class="p">:</span> <span class="n">v</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">'X'</span><span class="p">,</span> <span class="s1" [...]
<span class="o">>>></span> <span class="c1"># Get variables that don't have an "axis" attribute</span>
<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="k">lambda</span> <span class="n">v</span><span class="p">:</span> <span class="n">v</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">)</span>
<span class="o">>>></span> <span class="c1"># Get variables that have a "grid_mapping" attribute</span>
@@ -2993,7 +2997,7 @@ attribute does not exist on the variable. For example,</p>
- <div class="desc"><p>retrievel a netCDF dataset or group attribute.
+ <div class="desc"><p>retrieve a netCDF dataset or group attribute.
Use if you need to get a netCDF attribute with the same
name as one of the reserved python attributes.</p></div>
<div class="source_cont">
@@ -3183,7 +3187,7 @@ sure the data is actually written before being read.</p></div>
controlled by the variable's <code>_Fill_Value</code> attribute, but is usually
sufficient to the use the netCDF default <code>_Fill_Value</code> (defined
separately for each variable type). The default behavior of the netCDF
-library correspongs to <code>set_fill_on</code>. Data which are equal to the
+library corresponds to <code>set_fill_on</code>. Data which are equal to the
<code>_Fill_Value</code> indicate that the variable was created, but never written
to.</p></div>
<div class="source_cont">
@@ -3219,7 +3223,8 @@ with the same name as one of the reserved python attributes.</p></div>
<div class="desc"><p>set a netCDF dataset or group string attribute using name,value pair.
Use if you need to ensure that a netCDF attribute is created with type
-<code>NC_STRING</code> if the file format is <code>NETCDF4</code>.</p></div>
+<code>NC_STRING</code> if the file format is <code>NETCDF4</code>.
+Use if you need to set an attribute to an array of variable-length strings.</p></div>
<div class="source_cont">
</div>
@@ -3880,7 +3885,7 @@ For example, <code>createVariable('/GroupA/GroupB/VarC', float, ('x','y'))</code
and <code>GroupA/GroupB</code>, plus the variable <code>GroupA/GroupB/VarC</code>, if the preceding
groups don't already exist.</p>
<p>The <code>datatype</code> can be a numpy datatype object, or a string that describes
-a numpy dtype object (like the <code>dtype.str</code> attribue of a numpy array).
+a numpy dtype object (like the <code>dtype.str</code> attribute of a numpy array).
Supported specifiers include: <code>'S1' or 'c' (NC_CHAR), 'i1' or 'b' or 'B'
(NC_BYTE), 'u1' (NC_UBYTE), 'i2' or 'h' or 's' (NC_SHORT), 'u2'
(NC_USHORT), 'i4' or 'i' or 'l' (NC_INT), 'u4' (NC_UINT), 'i8' (NC_INT64),
@@ -4032,10 +4037,10 @@ open/create the Dataset. Requires netcdf >= 4.1.2</p></div>
<div class="desc inherited"><p>Returns a list of variables that match specific conditions.</p>
<p>Can pass in key=value parameters and variables are returned that
contain all of the matches. For example, </p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="c1"># Get variables with x-axis attribute.</span>
-<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="s">'X'</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="c1"># Get variables with x-axis attribute.</span>
+<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="s1">'X'</span><span class="p">)</span>
<span class="o">>>></span> <span class="c1"># Get variables with matching "standard_name" attribute</span>
-<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">standard_name</span><span class="o">=</span><span class="s">'northward_sea_water_velocity'</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">standard_name</span><span class="o">=</span><span class="s1">'northward_sea_water_velocity'</span><span class="p">)</span>
</pre></div>
@@ -4043,8 +4048,8 @@ contain all of the matches. For example, </p>
callable returns True. The callable should accept a single parameter,
the attribute value. None is given as the attribute value when the
attribute does not exist on the variable. For example,</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="c1"># Get Axis variables</span>
-<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="k">lambda</span> <span class="n">v</span><span class="p">:</span> <span class="n">v</span> <span class="ow">in</span> <span class="p">[</span><span class="s">'X'</span><span class="p">,</span> <span class="s">& [...]
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="c1"># Get Axis variables</span>
+<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="k">lambda</span> <span class="n">v</span><span class="p">:</span> <span class="n">v</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">'X'</span><span class="p">,</span> <span class="s1" [...]
<span class="o">>>></span> <span class="c1"># Get variables that don't have an "axis" attribute</span>
<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="k">lambda</span> <span class="n">v</span><span class="p">:</span> <span class="n">v</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">)</span>
<span class="o">>>></span> <span class="c1"># Get variables that have a "grid_mapping" attribute</span>
@@ -4068,7 +4073,7 @@ attribute does not exist on the variable. For example,</p>
- <div class="desc inherited"><p>retrievel a netCDF dataset or group attribute.
+ <div class="desc inherited"><p>retrieve a netCDF dataset or group attribute.
Use if you need to get a netCDF attribute with the same
name as one of the reserved python attributes.</p></div>
<div class="source_cont">
@@ -4302,7 +4307,7 @@ sure the data is actually written before being read.</p></div>
controlled by the variable's <code>_Fill_Value</code> attribute, but is usually
sufficient to the use the netCDF default <code>_Fill_Value</code> (defined
separately for each variable type). The default behavior of the netCDF
-library correspongs to <code>set_fill_on</code>. Data which are equal to the
+library corresponds to <code>set_fill_on</code>. Data which are equal to the
<code>_Fill_Value</code> indicate that the variable was created, but never written
to.</p></div>
<div class="source_cont">
@@ -4346,7 +4351,8 @@ with the same name as one of the reserved python attributes.</p></div>
<div class="desc inherited"><p>set a netCDF dataset or group string attribute using name,value pair.
Use if you need to ensure that a netCDF attribute is created with type
-<code>NC_STRING</code> if the file format is <code>NETCDF4</code>.</p></div>
+<code>NC_STRING</code> if the file format is <code>NETCDF4</code>.
+Use if you need to set an attribute to an array of variable-length strings.</p></div>
<div class="source_cont">
</div>
@@ -4406,18 +4412,18 @@ Datasets must be in <code>NETCDF4_CLASSIC, NETCDF3_CLASSIC, NETCDF3_64BIT_OFFSET
or NETCDF3_64BIT_DATA</code> format (<code>NETCDF4</code> Datasets won't work).</p>
<p>Adapted from <a href="http://pysclint.sourceforge.net/pycdf">pycdf</a> by Andre Gosselin.</p>
<p>Example usage (See <a href="#netCDF4.MFDataset.__init__"><code>__init__</code></a> for more details):</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="kn">import</span> <span class="nn">numpy</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="kn">import</span> <span class="nn">numpy</span>
<span class="o">>>></span> <span class="c1"># create a series of netCDF files with a variable sharing</span>
<span class="o">>>></span> <span class="c1"># the same unlimited dimension.</span>
<span class="o">>>></span> <span class="k">for</span> <span class="n">nf</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">10</span><span class="p">):</span>
-<span class="o">>>></span> <span class="n">f</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s">"mftest</span><span class="si">%s</span><span class="s">.nc"</span> <span class="o">%</span> <span class="n">nf</span><span class="p">,</span><span class="s">"w"</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">f</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s">"x"</span><span class="p">,</span><span class="bp">None</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">x</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"x"</span><span class="p">,</span><span class="s">"i"</span><span class="p">,(</span><span class="s">"x"</span><span class="p">,))</span>
+<span class="o">>>></span> <span class="n">f</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s2">"mftest</span><span class="si">%s</span><span class="s2">.nc"</span> <span class="o">%</span> <span class="n">nf</span><span class="p">,</span><span class="s2">"w"</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">f</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s2">"x"</span><span class="p">,</span><span class="bp">None</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">x</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"x"</span><span class="p">,</span><span class="s2">"i"</span><span class="p">,(</span><span class="s2">"x"</span><span class="p">,))</span>
<span class="o">>>></span> <span class="n">x</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="mi">10</span><span class="p">]</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="n">nf</span><span class="o">*</span><span class="mi">10</span><span class="p">,</span><span class="mi">10</span><span class="o">*</span><span class="p">(</span>< [...]
<span class="o">>>></span> <span class="n">f</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
<span class="o">>>></span> <span class="c1"># now read all those files in at once, in one Dataset.</span>
-<span class="o">>>></span> <span class="n">f</span> <span class="o">=</span> <span class="n">MFDataset</span><span class="p">(</span><span class="s">"mftest*nc"</span><span class="p">)</span>
-<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s">"x"</span><span class="p">][:]</span>
+<span class="o">>>></span> <span class="n">f</span> <span class="o">=</span> <span class="n">MFDataset</span><span class="p">(</span><span class="s2">"mftest*nc"</span><span class="p">)</span>
+<span class="o">>>></span> <span class="k">print</span> <span class="n">f</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s2">"x"</span><span class="p">][:]</span>
<span class="p">[</span> <span class="mi">0</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span> <span class="mi">7</span> <span class="mi">8</span> <span class="mi">9</span> <span class="mi">10</span> <span class="mi">11</span> <span class="mi">12</span> <span class="mi">13</span> <span class="mi">14</span> <span class="mi">15</span> <span class="mi">16</span> <span cla [...]
<span class="mi">25</span> <span class="mi">26</span> <span class="mi">27</span> <span class="mi">28</span> <span class="mi">29</span> <span class="mi">30</span> <span class="mi">31</span> <span class="mi">32</span> <span class="mi">33</span> <span class="mi">34</span> <span class="mi">35</span> <span class="mi">36</span> <span class="mi">37</span> <span class="mi">38</span> <span class="mi">39</span> <span class="mi">40</span> <span class="mi">41</span> <span class="mi">42</span> <span [...]
<span class="mi">50</span> <span class="mi">51</span> <span class="mi">52</span> <span class="mi">53</span> <span class="mi">54</span> <span class="mi">55</span> <span class="mi">56</span> <span class="mi">57</span> <span class="mi">58</span> <span class="mi">59</span> <span class="mi">60</span> <span class="mi">61</span> <span class="mi">62</span> <span class="mi">63</span> <span class="mi">64</span> <span class="mi">65</span> <span class="mi">66</span> <span class="mi">67</span> <span [...]
@@ -4786,7 +4792,7 @@ For example, <code>createVariable('/GroupA/GroupB/VarC', float, ('x','y'))</code
and <code>GroupA/GroupB</code>, plus the variable <code>GroupA/GroupB/VarC</code>, if the preceding
groups don't already exist.</p>
<p>The <code>datatype</code> can be a numpy datatype object, or a string that describes
-a numpy dtype object (like the <code>dtype.str</code> attribue of a numpy array).
+a numpy dtype object (like the <code>dtype.str</code> attribute of a numpy array).
Supported specifiers include: <code>'S1' or 'c' (NC_CHAR), 'i1' or 'b' or 'B'
(NC_BYTE), 'u1' (NC_UBYTE), 'i2' or 'h' or 's' (NC_SHORT), 'u2'
(NC_USHORT), 'i4' or 'i' or 'l' (NC_INT), 'u4' (NC_UINT), 'i8' (NC_INT64),
@@ -4938,10 +4944,10 @@ open/create the Dataset. Requires netcdf >= 4.1.2</p></div>
<div class="desc inherited"><p>Returns a list of variables that match specific conditions.</p>
<p>Can pass in key=value parameters and variables are returned that
contain all of the matches. For example, </p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="c1"># Get variables with x-axis attribute.</span>
-<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="s">'X'</span><span class="p">)</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="c1"># Get variables with x-axis attribute.</span>
+<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="s1">'X'</span><span class="p">)</span>
<span class="o">>>></span> <span class="c1"># Get variables with matching "standard_name" attribute</span>
-<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">standard_name</span><span class="o">=</span><span class="s">'northward_sea_water_velocity'</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">standard_name</span><span class="o">=</span><span class="s1">'northward_sea_water_velocity'</span><span class="p">)</span>
</pre></div>
@@ -4949,8 +4955,8 @@ contain all of the matches. For example, </p>
callable returns True. The callable should accept a single parameter,
the attribute value. None is given as the attribute value when the
attribute does not exist on the variable. For example,</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="c1"># Get Axis variables</span>
-<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="k">lambda</span> <span class="n">v</span><span class="p">:</span> <span class="n">v</span> <span class="ow">in</span> <span class="p">[</span><span class="s">'X'</span><span class="p">,</span> <span class="s">& [...]
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="c1"># Get Axis variables</span>
+<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="k">lambda</span> <span class="n">v</span><span class="p">:</span> <span class="n">v</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">'X'</span><span class="p">,</span> <span class="s1" [...]
<span class="o">>>></span> <span class="c1"># Get variables that don't have an "axis" attribute</span>
<span class="o">>>></span> <span class="n">vs</span> <span class="o">=</span> <span class="n">nc</span><span class="o">.</span><span class="n">get_variables_by_attributes</span><span class="p">(</span><span class="n">axis</span><span class="o">=</span><span class="k">lambda</span> <span class="n">v</span><span class="p">:</span> <span class="n">v</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">)</span>
<span class="o">>>></span> <span class="c1"># Get variables that have a "grid_mapping" attribute</span>
@@ -4974,7 +4980,7 @@ attribute does not exist on the variable. For example,</p>
- <div class="desc inherited"><p>retrievel a netCDF dataset or group attribute.
+ <div class="desc inherited"><p>retrieve a netCDF dataset or group attribute.
Use if you need to get a netCDF attribute with the same
name as one of the reserved python attributes.</p></div>
<div class="source_cont">
@@ -5079,78 +5085,6 @@ name as one of the reserved python attributes.</p></div>
<div class="item">
- <div class="name def" id="netCDF4.MFDataset.set_auto_mask">
- <p>def <span class="ident">set_auto_mask</span>(</p><p>self, True_or_False)</p>
- </div>
-
- <p class="inheritance">
- <strong>Inheritance:</strong>
- <code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_auto_mask">set_auto_mask</a></code>
- </p>
-
-
-
- <div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_auto_mask"><code>set_auto_mask</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
-<a href="#netCDF4.Group"><code>Group</code></a>, as well as for all variables in all its subgroups.</p>
-<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic conversion to masked arrays
-shall be applied for all variables.</p>
-<p><strong><em>Note</em></strong>: Calling this function only affects existing variables. Variables created
-after calling this function will follow the default behaviour.</p></div>
- <div class="source_cont">
-</div>
-
- </div>
-
-
- <div class="item">
- <div class="name def" id="netCDF4.MFDataset.set_auto_maskandscale">
- <p>def <span class="ident">set_auto_maskandscale</span>(</p><p>self, True_or_False)</p>
- </div>
-
- <p class="inheritance">
- <strong>Inheritance:</strong>
- <code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_auto_maskandscale">set_auto_maskandscale</a></code>
- </p>
-
-
-
- <div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_auto_maskandscale"><code>set_auto_maskandscale</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
-<a href="#netCDF4.Group"><code>Group</code></a>, as well as for all variables in all its subgroups.</p>
-<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic conversion to masked arrays
-and variable scaling shall be applied for all variables.</p>
-<p><strong><em>Note</em></strong>: Calling this function only affects existing variables. Variables created
-after calling this function will follow the default behaviour.</p></div>
- <div class="source_cont">
-</div>
-
- </div>
-
-
- <div class="item">
- <div class="name def" id="netCDF4.MFDataset.set_auto_scale">
- <p>def <span class="ident">set_auto_scale</span>(</p><p>self, True_or_False)</p>
- </div>
-
- <p class="inheritance">
- <strong>Inheritance:</strong>
- <code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_auto_scale">set_auto_scale</a></code>
- </p>
-
-
-
- <div class="desc inherited"><p>Call <a href="#netCDF4.Variable.set_auto_scale"><code>set_auto_scale</code></a> for all variables contained in this <a href="#netCDF4.Dataset"><code>Dataset</code></a> or
-<a href="#netCDF4.Group"><code>Group</code></a>, as well as for all variables in all its subgroups.</p>
-<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic variable scaling
-shall be applied for all variables.</p>
-<p><strong><em>Note</em></strong>: Calling this function only affects existing variables. Variables created
-after calling this function will follow the default behaviour.</p></div>
- <div class="source_cont">
-</div>
-
- </div>
-
-
- <div class="item">
<div class="name def" id="netCDF4.MFDataset.set_fill_off">
<p>def <span class="ident">set_fill_off</span>(</p><p>self)</p>
</div>
@@ -5189,7 +5123,7 @@ sure the data is actually written before being read.</p></div>
controlled by the variable's <code>_Fill_Value</code> attribute, but is usually
sufficient to the use the netCDF default <code>_Fill_Value</code> (defined
separately for each variable type). The default behavior of the netCDF
-library correspongs to <code>set_fill_on</code>. Data which are equal to the
+library corresponds to <code>set_fill_on</code>. Data which are equal to the
<code>_Fill_Value</code> indicate that the variable was created, but never written
to.</p></div>
<div class="source_cont">
@@ -5233,7 +5167,8 @@ with the same name as one of the reserved python attributes.</p></div>
<div class="desc inherited"><p>set a netCDF dataset or group string attribute using name,value pair.
Use if you need to ensure that a netCDF attribute is created with type
-<code>NC_STRING</code> if the file format is <code>NETCDF4</code>.</p></div>
+<code>NC_STRING</code> if the file format is <code>NETCDF4</code>.
+Use if you need to set an attribute to an array of variable-length strings.</p></div>
<div class="source_cont">
</div>
@@ -5358,6 +5293,70 @@ Default is an empty list.</p></div>
</div>
+
+ <div class="item">
+ <div class="name def" id="netCDF4.MFDataset.set_auto_mask">
+ <p>def <span class="ident">set_auto_mask</span>(</p><p>self, True_or_False)</p>
+ </div>
+
+ <p class="inheritance">
+ <strong>Inheritance:</strong>
+ <code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_auto_mask">set_auto_mask</a></code>
+ </p>
+
+
+
+ <div class="desc"><p>Call <code>Variable.set_auto_mask</code> for all variables contained in this <code>MFDataset</code>.</p>
+<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic conversion to masked arrays
+shall be applied for all variables.</p></div>
+ <div class="source_cont">
+</div>
+
+ </div>
+
+
+ <div class="item">
+ <div class="name def" id="netCDF4.MFDataset.set_auto_maskandscale">
+ <p>def <span class="ident">set_auto_maskandscale</span>(</p><p>self, True_or_False)</p>
+ </div>
+
+ <p class="inheritance">
+ <strong>Inheritance:</strong>
+ <code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_auto_maskandscale">set_auto_maskandscale</a></code>
+ </p>
+
+
+
+ <div class="desc"><p>Call <code>Variable.set_auto_maskandscale</code> for all variables contained in this
+<code>MFDataset</code>.</p>
+<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic conversion to masked arrays
+and variable scaling shall be applied for all variables.</p></div>
+ <div class="source_cont">
+</div>
+
+ </div>
+
+
+ <div class="item">
+ <div class="name def" id="netCDF4.MFDataset.set_auto_scale">
+ <p>def <span class="ident">set_auto_scale</span>(</p><p>self, True_or_False)</p>
+ </div>
+
+ <p class="inheritance">
+ <strong>Inheritance:</strong>
+ <code><a href="#netCDF4.Dataset">Dataset</a></code>.<code><a href="#netCDF4.Dataset.set_auto_scale">set_auto_scale</a></code>
+ </p>
+
+
+
+ <div class="desc"><p>Call <code>Variable.set_auto_scale</code> for all variables contained in this <code>MFDataset</code>.</p>
+<p><strong><code>True_or_False</code></strong>: Boolean determining if automatic variable scaling
+shall be applied for all variables.</p></div>
+ <div class="source_cont">
+</div>
+
+ </div>
+
</div>
</div>
@@ -5368,24 +5367,24 @@ Default is an empty list.</p></div>
<div class="desc"><p>Class providing an interface to a MFDataset time Variable by imposing a unique common
time unit to all files. </p>
<p>Example usage (See <a href="#netCDF4.MFTime.__init__"><code>__init__</code></a> for more details):</p>
-<div class="codehilite"><pre><span class="o">>>></span> <span class="kn">import</span> <span class="nn">numpy</span>
-<span class="o">>>></span> <span class="n">f1</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s">"mftest_1.nc"</span><span class="p">,</span><span class="s">"w"</span><span class="p">,</span> <span class="n">format</span><span class="o">=</span><span class="s">"NETCDF4_CLASSIC"</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">f2</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s">"mftest_2.nc"</span><span class="p">,</span><span class="s">"w"</span><span class="p">,</span> <span class="n">format</span><span class="o">=</span><span class="s">"NETCDF4_CLASSIC"</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">f1</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s">"time"</span><span class="p">,</span><span class="bp">None</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">f2</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s">"time"</span><span class="p">,</span><span class="bp">None</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">t1</span> <span class="o">=</span> <span class="n">f1</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"time"</span><span class="p">,</span><span class="s">"i"</span><span class="p">,(</span><span class="s">"time"</span><span class="p">,))</span>
-<span class="o">>>></span> <span class="n">t2</span> <span class="o">=</span> <span class="n">f2</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s">"time"</span><span class="p">,</span><span class="s">"i"</span><span class="p">,(</span><span class="s">"time"</span><span class="p">,))</span>
-<span class="o">>>></span> <span class="n">t1</span><span class="o">.</span><span class="n">units</span> <span class="o">=</span> <span class="s">"days since 2000-01-01"</span>
-<span class="o">>>></span> <span class="n">t2</span><span class="o">.</span><span class="n">units</span> <span class="o">=</span> <span class="s">"days since 2000-02-01"</span>
-<span class="o">>>></span> <span class="n">t1</span><span class="o">.</span><span class="n">calendar</span> <span class="o">=</span> <span class="s">"standard"</span>
-<span class="o">>>></span> <span class="n">t2</span><span class="o">.</span><span class="n">calendar</span> <span class="o">=</span> <span class="s">"standard"</span>
+<div class="codehilite"><pre><span></span><span class="o">>>></span> <span class="kn">import</span> <span class="nn">numpy</span>
+<span class="o">>>></span> <span class="n">f1</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s2">"mftest_1.nc"</span><span class="p">,</span><span class="s2">"w"</span><span class="p">,</span> <span class="n">format</span><span class="o">=</span><span class="s2">"NETCDF4_CLASSIC"</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">f2</span> <span class="o">=</span> <span class="n">Dataset</span><span class="p">(</span><span class="s2">"mftest_2.nc"</span><span class="p">,</span><span class="s2">"w"</span><span class="p">,</span> <span class="n">format</span><span class="o">=</span><span class="s2">"NETCDF4_CLASSIC"</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">f1</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s2">"time"</span><span class="p">,</span><span class="bp">None</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">f2</span><span class="o">.</span><span class="n">createDimension</span><span class="p">(</span><span class="s2">"time"</span><span class="p">,</span><span class="bp">None</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">t1</span> <span class="o">=</span> <span class="n">f1</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"time"</span><span class="p">,</span><span class="s2">"i"</span><span class="p">,(</span><span class="s2">"time"</span><span class="p">,))</span>
+<span class="o">>>></span> <span class="n">t2</span> <span class="o">=</span> <span class="n">f2</span><span class="o">.</span><span class="n">createVariable</span><span class="p">(</span><span class="s2">"time"</span><span class="p">,</span><span class="s2">"i"</span><span class="p">,(</span><span class="s2">"time"</span><span class="p">,))</span>
+<span class="o">>>></span> <span class="n">t1</span><span class="o">.</span><span class="n">units</span> <span class="o">=</span> <span class="s2">"days since 2000-01-01"</span>
+<span class="o">>>></span> <span class="n">t2</span><span class="o">.</span><span class="n">units</span> <span class="o">=</span> <span class="s2">"days since 2000-02-01"</span>
+<span class="o">>>></span> <span class="n">t1</span><span class="o">.</span><span class="n">calendar</span> <span class="o">=</span> <span class="s2">"standard"</span>
+<span class="o">>>></span> <span class="n">t2</span><span class="o">.</span><span class="n">calendar</span> <span class="o">=</span> <span class="s2">"standard"</span>
<span class="o">>>></span> <span class="n">t1</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">31</span><span class="p">)</span>
<span class="o">>>></span> <span class="n">t2</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">30</span><span class="p">)</span>
<span class="o">>>></span> <span class="n">f1</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
<span class="o">>>></span> <span class="n">f2</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
<span class="o">>>></span> <span class="c1"># Read the two files in at once, in one Dataset.</span>
-<span class="o">>>></span> <span class="n">f</span> <span class="o">=</span> <span class="n">MFDataset</span><span class="p">(</span><span class="s">"mftest*nc"</span><span class="p">)</span>
-<span class="o">>>></span> <span class="n">t</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s">"time"</span><span class="p">]</span>
+<span class="o">>>></span> <span class="n">f</span> <span class="o">=</span> <span class="n">MFDataset</span><span class="p">(</span><span class="s2">"mftest*nc"</span><span class="p">)</span>
+<span class="o">>>></span> <span class="n">t</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s2">"time"</span><span class="p">]</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">t</span><span class="o">.</span><span class="n">units</span>
<span class="n">days</span> <span class="n">since</span> <span class="mi">2000</span><span class="o">-</span><span class="mo">01</span><span class="o">-</span><span class="mo">01</span>
<span class="o">>>></span> <span class="k">print</span> <span class="n">t</span><span class="p">[</span><span class="mi">32</span><span class="p">]</span> <span class="c1"># The value written in the file, inconsistent with the MF time units.</span>
@@ -5441,6 +5440,20 @@ the units from the master variable.</p></div>
<div class="item">
+ <div class="name def" id="netCDF4.MFTime.set_auto_mask">
+ <p>def <span class="ident">set_auto_mask</span>(</p><p>...)</p>
+ </div>
+
+
+
+
+ <div class="source_cont">
+</div>
+
+ </div>
+
+
+ <div class="item">
<div class="name def" id="netCDF4.MFTime.set_auto_maskandscale">
<p>def <span class="ident">set_auto_maskandscale</span>(</p><p>...)</p>
</div>
@@ -5455,6 +5468,20 @@ the units from the master variable.</p></div>
<div class="item">
+ <div class="name def" id="netCDF4.MFTime.set_auto_scale">
+ <p>def <span class="ident">set_auto_scale</span>(</p><p>...)</p>
+ </div>
+
+
+
+
+ <div class="source_cont">
+</div>
+
+ </div>
+
+
+ <div class="item">
<div class="name def" id="netCDF4.MFTime.typecode">
<p>def <span class="ident">typecode</span>(</p><p>...)</p>
</div>
@@ -5716,7 +5743,7 @@ numpy dtype object, or a string that describes a numpy dtype object.
Supported values, corresponding to <code>str</code> attribute of numpy dtype
objects, include <code>'f4'</code> (32-bit floating point), <code>'f8'</code> (64-bit floating
point), <code>'i4'</code> (32-bit signed integer), <code>'i2'</code> (16-bit signed integer),
-<code>'i8'</code> (64-bit singed integer), <code>'i4'</code> (8-bit singed integer), <code>'i1'</code>
+<code>'i8'</code> (64-bit signed integer), <code>'i4'</code> (8-bit signed integer), <code>'i1'</code>
(8-bit signed integer), <code>'u1'</code> (8-bit unsigned integer), <code>'u2'</code> (16-bit
unsigned integer), <code>'u4'</code> (32-bit unsigned integer), <code>'u8'</code> (64-bit
unsigned integer), or <code>'S1'</code> (single-character string). From
@@ -5904,7 +5931,7 @@ details.</p></div>
- <div class="desc"><p>retrievel a netCDF variable attribute. Use if you need to set a
+ <div class="desc"><p>retrieve a netCDF variable attribute. Use if you need to set a
netCDF attribute with the same name as one of the reserved python
attributes.</p></div>
<div class="source_cont">
@@ -5978,7 +6005,9 @@ for each data type). When data is written to a variable, the masked
array is converted back to a regular numpy array by replacing all the
masked values by the missing_value attribute of the variable (if it
exists). If the variable has no missing_value attribute, the _FillValue
-is used instead.</p>
+is used instead. If the variable has valid_min/valid_max and
+missing_value attributes, data outside the specified range will be
+set to missing_value.</p>
<p>The default value of <code>mask</code> is <code>True</code>
(automatic conversions are performed).</p></div>
<div class="source_cont">
@@ -6008,16 +6037,18 @@ for each data type). When data is written to a variable, the masked
array is converted back to a regular numpy array by replacing all the
masked values by the missing_value attribute of the variable (if it
exists). If the variable has no missing_value attribute, the _FillValue
-is used instead.</p>
+is used instead. If the variable has valid_min/valid_max and
+missing_value attributes, data outside the specified range will be
+set to missing_value.</p>
<p>If <code>maskandscale</code> is set to <code>True</code>, and the variable has a
<code>scale_factor</code> or an <code>add_offset</code> attribute, then data read
from that variable is unpacked using::</p>
-<div class="codehilite"><pre>data = self.scale_factor*data + self.add_offset
+<div class="codehilite"><pre><span></span>data = self.scale_factor*data + self.add_offset
</pre></div>
<p>When data is written to a variable it is packed using::</p>
-<div class="codehilite"><pre>data = (data - self.add_offset)/self.scale_factor
+<div class="codehilite"><pre><span></span>data = (data - self.add_offset)/self.scale_factor
</pre></div>
@@ -6048,12 +6079,12 @@ data using <code>scale_factor</code> and <code>add_offset</code> attributes.</p>
<p>If <code>scale</code> is set to <code>True</code>, and the variable has a
<code>scale_factor</code> or an <code>add_offset</code> attribute, then data read
from that variable is unpacked using::</p>
-<div class="codehilite"><pre>data = self.scale_factor*data + self.add_offset
+<div class="codehilite"><pre><span></span>data = self.scale_factor*data + self.add_offset
</pre></div>
<p>When data is written to a variable it is packed using::</p>
-<div class="codehilite"><pre>data = (data - self.add_offset)/self.scale_factor
+<div class="codehilite"><pre><span></span>data = (data - self.add_offset)/self.scale_factor
</pre></div>
@@ -6115,7 +6146,8 @@ attributes.</p></div>
<div class="desc"><p>set a netCDF variable string attribute using name,value pair.
Use if you need to ensure that a netCDF attribute is created with type
-<code>NC_STRING</code> if the file format is <code>NETCDF4</code>.</p></div>
+<code>NC_STRING</code> if the file format is <code>NETCDF4</code>.
+Use if you need to set an attribute to an array of variable-length strings.</p></div>
<div class="source_cont">
</div>
diff --git a/netCDF4/_netCDF4.c b/netCDF4/_netCDF4.c
index eacc27f..a9a4296 100644
--- a/netCDF4/_netCDF4.c
+++ b/netCDF4/_netCDF4.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.24 */
+/* Generated by Cython 0.25.1 */
#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_24"
+#define CYTHON_ABI "0_25_1"
#include <stddef.h>
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -29,6 +29,11 @@
#ifndef DL_EXPORT
#define DL_EXPORT(t) t
#endif
+#ifndef HAVE_LONG_LONG
+ #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
+ #define HAVE_LONG_LONG
+ #endif
+#endif
#ifndef PY_LONG_LONG
#define PY_LONG_LONG LONG_LONG
#endif
@@ -37,13 +42,110 @@
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
+ #define CYTHON_COMPILING_IN_PYSTON 0
#define CYTHON_COMPILING_IN_CPYTHON 0
+ #undef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 0
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #undef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 1
+ #undef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 0
+ #undef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 0
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
+#elif defined(PYSTON_VERSION)
+ #define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 1
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 0
#define CYTHON_COMPILING_IN_CPYTHON 1
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #elif !defined(CYTHON_USE_ASYNC_SLOTS)
+ #define CYTHON_USE_ASYNC_SLOTS 1
+ #endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
+ #define CYTHON_USE_PYLONG_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #if PY_VERSION_HEX < 0x030300F0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #elif !defined(CYTHON_USE_UNICODE_WRITER)
+ #define CYTHON_USE_UNICODE_WRITER 1
+ #endif
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #ifndef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 1
+ #endif
+ #ifndef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 1
+ #endif
#endif
-#if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
- #define CYTHON_USE_PYLONG_INTERNALS 1
+#if !defined(CYTHON_FAST_PYCCALL)
+#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
@@ -79,24 +181,44 @@
#ifndef Py_TPFLAGS_HAVE_FINALIZE
#define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
+#ifndef METH_FASTCALL
+ #define METH_FASTCALL 0x80
+ typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args,
+ Py_ssize_t nargs, PyObject *kwnames);
+#else
+ #define __Pyx_PyCFunctionFast _PyCFunctionFast
+#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)))
+#else
+#define __Pyx_PyFastCFunction_Check(func) 0
+#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
#define CYTHON_PEP393_ENABLED 1
#define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
0 : _PyUnicode_Ready((PyObject *)(op)))
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
#define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
#define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
#define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
#define CYTHON_PEP393_ENABLED 0
+ #define PyUnicode_1BYTE_KIND 1
+ #define PyUnicode_2BYTE_KIND 2
+ #define PyUnicode_4BYTE_KIND 4
#define __Pyx_PyUnicode_READY(op) (0)
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
#define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
#define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
#define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
@@ -110,6 +232,9 @@
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
#define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
+ #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
+#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
#define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
@@ -118,6 +243,13 @@
#define PyObject_Free(p) PyMem_Free(p)
#define PyObject_Realloc(p) PyMem_Realloc(p)
#endif
+#if CYTHON_COMPILING_IN_PYSTON
+ #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
+#else
+ #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
+#endif
#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
@@ -146,6 +278,7 @@
#define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#if PY_MAJOR_VERSION >= 3
#define PyIntObject PyLongObject
#define PyInt_Type PyLong_Type
@@ -184,18 +317,20 @@
#else
#define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
-#if PY_VERSION_HEX >= 0x030500B1
-#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
-#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
-#elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
-typedef struct {
- unaryfunc am_await;
- unaryfunc am_aiter;
- unaryfunc am_anext;
-} __Pyx_PyAsyncMethodsStruct;
-#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
+#if CYTHON_USE_ASYNC_SLOTS
+ #if PY_VERSION_HEX >= 0x030500B1
+ #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
+ #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
+ #else
+ typedef struct {
+ unaryfunc am_await;
+ unaryfunc am_aiter;
+ unaryfunc am_anext;
+ } __Pyx_PyAsyncMethodsStruct;
+ #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
+ #endif
#else
-#define __Pyx_PyType_AsAsync(obj) NULL
+ #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef CYTHON_RESTRICT
#if defined(__GNUC__)
@@ -235,6 +370,11 @@ static CYTHON_INLINE float __PYX_NAN() {
return value;
}
#endif
+#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
+#define __Pyx_truncl trunc
+#else
+#define __Pyx_truncl truncl
+#endif
#define __PYX_ERR(f_index, lineno, Ln_error) \
@@ -260,7 +400,8 @@ static CYTHON_INLINE float __PYX_NAN() {
#define __PYX_HAVE__netCDF4___netCDF4
#define __PYX_HAVE_API__netCDF4___netCDF4
-#include "string.h"
+#include <string.h>
+#include <stdlib.h>
#include "stdlib.h"
#include "H5public.h"
#include "netcdf.h"
@@ -370,7 +511,7 @@ static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
@@ -501,8 +642,8 @@ struct __pyx_opt_args_7netCDF4_8_netCDF4__strencode;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
-/* "netCDF4/_netCDF4.pyx":1211
- * return 'UNDEFINED'
+/* "netCDF4/_netCDF4.pyx":1241
+ * raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* cdef _set_att(grp, int varid, name, value,\ # <<<<<<<<<<<<<<
* nc_type xtype=-99, force_ncstring=False):
@@ -514,7 +655,7 @@ struct __pyx_opt_args_7netCDF4_8_netCDF4__set_att {
PyObject *force_ncstring;
};
-/* "netCDF4/_netCDF4.pyx":4626
+/* "netCDF4/_netCDF4.pyx":4723
* return xtype
*
* cdef _read_compound(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<<
@@ -526,7 +667,7 @@ struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound {
PyObject *endian;
};
-/* "netCDF4/_netCDF4.pyx":4795
+/* "netCDF4/_netCDF4.pyx":4896
* return xtype, dt
*
* cdef _read_vlen(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<<
@@ -538,7 +679,7 @@ struct __pyx_opt_args_7netCDF4_8_netCDF4__read_vlen {
PyObject *endian;
};
-/* "netCDF4/_netCDF4.pyx":4914
+/* "netCDF4/_netCDF4.pyx":5019
* return xtype, dt
*
* cdef _read_enum(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<<
@@ -550,7 +691,7 @@ struct __pyx_opt_args_7netCDF4_8_netCDF4__read_enum {
PyObject *endian;
};
-/* "netCDF4/_netCDF4.pyx":4950
+/* "netCDF4/_netCDF4.pyx":5055
* return EnumType(group, dt, name, enum_dict, typeid=xtype)
*
* cdef _strencode(pystr,encoding=None): # <<<<<<<<<<<<<<
@@ -565,7 +706,7 @@ struct __pyx_defaults {
PyObject *__pyx_arg_exclude;
};
-/* "netCDF4/_netCDF4.pyx":1555
+/* "netCDF4/_netCDF4.pyx":1590
* __pdoc__ = {}
*
* cdef class Dataset: # <<<<<<<<<<<<<<
@@ -593,7 +734,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_Dataset {
};
-/* "netCDF4/_netCDF4.pyx":2550
+/* "netCDF4/_netCDF4.pyx":2591
*
*
* cdef class Group(Dataset): # <<<<<<<<<<<<<<
@@ -605,7 +746,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_Group {
};
-/* "netCDF4/_netCDF4.pyx":2645
+/* "netCDF4/_netCDF4.pyx":2686
*
*
* cdef class Dimension: # <<<<<<<<<<<<<<
@@ -622,7 +763,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_Dimension {
};
-/* "netCDF4/_netCDF4.pyx":2806
+/* "netCDF4/_netCDF4.pyx":2847
* return False
*
* cdef class Variable: # <<<<<<<<<<<<<<
@@ -652,7 +793,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_Variable {
};
-/* "netCDF4/_netCDF4.pyx":4465
+/* "netCDF4/_netCDF4.pyx":4558
* # Compound datatype support.
*
* cdef class CompoundType: # <<<<<<<<<<<<<<
@@ -667,7 +808,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType {
};
-/* "netCDF4/_netCDF4.pyx":4710
+/* "netCDF4/_netCDF4.pyx":4807
* # VLEN datatype support.
*
* cdef class VLType: # <<<<<<<<<<<<<<
@@ -682,7 +823,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_VLType {
};
-/* "netCDF4/_netCDF4.pyx":4824
+/* "netCDF4/_netCDF4.pyx":4925
* # Enum datatype support.
*
* cdef class EnumType: # <<<<<<<<<<<<<<
@@ -698,7 +839,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4_EnumType {
};
-/* "netCDF4/_netCDF4.pyx":1031
+/* "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()) # <<<<<<<<<<<<<<
@@ -777,7 +918,7 @@ struct __pyx_obj_7netCDF4_8_netCDF4___pyx_scope_struct__genexpr {
#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
/* PyObjectGetAttrStr.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
PyTypeObject* tp = Py_TYPE(obj);
if (likely(tp->tp_getattro))
@@ -798,6 +939,17 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name);
/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);
+/* PyFunctionFastCall.proto */
+#if CYTHON_FAST_PYCALL
+#define __Pyx_PyFunction_FastCall(func, args, nargs)\
+ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
+#else
+#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
+#endif
+#endif
+
/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
@@ -817,6 +969,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif
+/* PyCFunctionFastCall.proto */
+#if CYTHON_FAST_PYCCALL
+static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
+#else
+#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
+#endif
+
/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
@@ -861,7 +1020,7 @@ static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
/* PyThreadStateGet.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign __pyx_tstate = PyThreadState_GET();
#else
@@ -870,7 +1029,7 @@ static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
#endif
/* PyErrFetchRestore.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
@@ -888,7 +1047,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
/* ListAppend.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
PyListObject* L = (PyListObject*) list;
Py_ssize_t len = Py_SIZE(list);
@@ -920,6 +1079,50 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif
+/* ListCompAppend.proto */
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
+ PyListObject* L = (PyListObject*) list;
+ Py_ssize_t len = Py_SIZE(list);
+ if (likely(L->allocated > len)) {
+ Py_INCREF(x);
+ PyList_SET_ITEM(list, len, x);
+ Py_SIZE(list) = len+1;
+ return 0;
+ }
+ return PyList_Append(list, x);
+}
+#else
+#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
+#endif
+
+/* GetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#else
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
+#endif
+
+/* SwapException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#else
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
+#endif
+
+/* SaveResetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
+#else
+#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
+#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
+#endif
+
/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
(__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
@@ -942,33 +1145,14 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
int is_list, int wraparound, int boundscheck);
-/* SaveResetException.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
-#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
-#else
-#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
-#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
-#endif
-
/* PyErrExceptionMatches.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
#endif
-/* GetException.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
-#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
-static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#else
-static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
-#endif
-
/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
@@ -1011,23 +1195,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
#endif
-/* ListCompAppend.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
- PyListObject* L = (PyListObject*) list;
- Py_ssize_t len = Py_SIZE(list);
- if (likely(L->allocated > len)) {
- Py_INCREF(x);
- PyList_SET_ITEM(list, len, x);
- Py_SIZE(list) = len+1;
- return 0;
- }
- return PyList_Append(list, x);
-}
-#else
-#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
-#endif
-
/* KeywordStringCheck.proto */
static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
@@ -1050,14 +1217,16 @@ static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObje
((likely((cfunc)->func)) ?\
(likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\
(likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
- ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) : __Pyx__CallUnboundCMethod0(cfunc, self)))) :\
+ ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\
+ (PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ? (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\
+ __Pyx__CallUnboundCMethod0(cfunc, self))))) :\
__Pyx__CallUnboundCMethod0(cfunc, self))
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
#endif
/* CallableCheck.proto */
-#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_TYPE_SLOTS && PY_MAJOR_VERSION >= 3
#define __Pyx_PyCallable_Check(obj) ((obj)->ob_type->tp_call != NULL)
#else
#define __Pyx_PyCallable_Check(obj) PyCallable_Check(obj)
@@ -1100,7 +1269,7 @@ static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
/* PyObjectSetAttrStr.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
PyTypeObject* tp = Py_TYPE(obj);
@@ -1118,7 +1287,7 @@ static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr
#endif
/* PyIntBinop.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
+#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
@@ -1126,7 +1295,7 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval,
#endif
/* PyIntBinop.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
+#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
@@ -1169,7 +1338,7 @@ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, in
const char *name, int exact);
/* PyIntBinop.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
+#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace)\
@@ -1183,7 +1352,7 @@ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
/* PyFloatBinop.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
+#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace);
#else
#define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace)\
@@ -1330,10 +1499,10 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value);
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
/* CIntFromPy.proto */
-static CYTHON_INLINE nc_type __Pyx_PyInt_As_nc_type(PyObject *);
+static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
/* CIntFromPy.proto */
-static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
+static CYTHON_INLINE nc_type __Pyx_PyInt_As_nc_type(PyObject *);
/* CIntFromPy.proto */
static CYTHON_INLINE ptrdiff_t __Pyx_PyInt_As_ptrdiff_t(PyObject *);
@@ -1341,14 +1510,6 @@ static CYTHON_INLINE ptrdiff_t __Pyx_PyInt_As_ptrdiff_t(PyObject *);
/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
-/* SwapException.proto */
-#if CYTHON_COMPILING_IN_CPYTHON
-#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#else
-static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
-#endif
-
/* CoroutineBase.proto */
typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyObject *);
typedef struct {
@@ -1363,11 +1524,13 @@ typedef struct {
PyObject *yieldfrom;
PyObject *gi_name;
PyObject *gi_qualname;
+ PyObject *gi_modulename;
int resume_label;
char is_running;
} __pyx_CoroutineObject;
-static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject *type, __pyx_coroutine_body_t body,
- PyObject *closure, PyObject *name, PyObject *qualname);
+static __pyx_CoroutineObject *__Pyx__Coroutine_New(
+ PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *closure,
+ PyObject *name, PyObject *qualname, PyObject *module_name);
static int __Pyx_Coroutine_clear(PyObject *self);
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
@@ -1385,8 +1548,8 @@ static int __Pyx_patch_abc(void);
#define __Pyx_Generator_USED
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
-#define __Pyx_Generator_New(body, closure, name, qualname)\
- __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname)
+#define __Pyx_Generator_New(body, closure, name, qualname, module_name)\
+ __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(void);
@@ -1412,6 +1575,8 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
+/* Module declarations from 'cpython.mem' */
+
/* Module declarations from 'libc.string' */
/* Module declarations from 'libc.stdlib' */
@@ -1432,6 +1597,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int, int); /*proto*/
static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *, int, PyObject *); /*proto*/
static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int); /*proto*/
static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_full_format(int); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4_issue485_workaround(int, int, char *); /*proto*/
static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *, int, PyObject *, PyObject *, struct __pyx_opt_args_7netCDF4_8_netCDF4__set_att *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *); /*proto*/
static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *); /*proto*/
@@ -1452,6 +1618,8 @@ int __pyx_module_is_main_netCDF4___netCDF4 = 0;
static PyObject *__pyx_builtin_ImportError;
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;
@@ -1459,10 +1627,10 @@ static PyObject *__pyx_builtin_UnicodeError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_IOError;
static PyObject *__pyx_builtin_IndexError;
+static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_Ellipsis;
static PyObject *__pyx_builtin_sum;
-static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_UnicodeDecodeError;
static const char __pyx_k_[] = "\000";
static const char __pyx_k_1[] = "1";
@@ -1508,14 +1676,14 @@ static const char __pyx_k_u2[] = "u2";
static const char __pyx_k_u4[] = "u4";
static const char __pyx_k_u8[] = "u8";
static const char __pyx_k_ws[] = "ws";
-static const char __pyx_k__14[] = "<";
-static const char __pyx_k__15[] = ">";
-static const char __pyx_k__16[] = "/";
-static const char __pyx_k__19[] = "'";
-static const char __pyx_k__21[] = ", ";
-static const char __pyx_k__22[] = ",";
-static const char __pyx_k__24[] = ",)";
-static const char __pyx_k__25[] = ")";
+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[] = "|";
@@ -1614,7 +1782,7 @@ 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_4[] = "1.2.4";
+static const char __pyx_k_1_2_5[] = "1.2.5";
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";
@@ -1707,6 +1875,7 @@ static const char __pyx_k_path_2[] = "_path";
static const char __pyx_k_path_s[] = "path = %s\n";
static const char __pyx_k_recLen[] = "_recLen";
static const char __pyx_k_recVar[] = "_recVar";
+static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_second[] = "second";
static const char __pyx_k_select[] = "select";
static const char __pyx_k_stride[] = "stride";
@@ -1845,6 +2014,8 @@ static const char __pyx_k_timedelta[] = "timedelta";
static const char __pyx_k_totaltime[] = "totaltime";
static const char __pyx_k_traceback[] = "traceback";
static const char __pyx_k_unlimdims[] = "unlimdims";
+static const char __pyx_k_valid_max[] = "valid_max";
+static const char __pyx_k_valid_min[] = "valid_min";
static const char __pyx_k_variables[] = "variables";
static const char __pyx_k_walk_grps[] = "_walk_grps";
static const char __pyx_k_Group_name[] = "Group.name";
@@ -1877,6 +2048,7 @@ static const char __pyx_k_startswith[] = "startswith";
static const char __pyx_k_time2index[] = "time2index";
static const char __pyx_k_utc_offset[] = "utc_offset";
static const char __pyx_k_ImportError[] = "ImportError";
+static const char __pyx_k_MemoryError[] = "MemoryError";
static const char __pyx_k_NC_DISKLESS[] = "NC_DISKLESS";
static const char __pyx_k_OrderedDict[] = "OrderedDict";
static const char __pyx_k_String_name[] = "String name.";
@@ -1901,6 +2073,7 @@ static const char __pyx_k_patchstring[] = "patchstring";
static const char __pyx_k_releasevers[] = "releasevers";
static const char __pyx_k_string_type[] = ": string type";
static const char __pyx_k_stringtoarr[] = "stringtoarr";
+static const char __pyx_k_valid_range[] = "valid_range";
static const char __pyx_k_variables_s[] = " variables = %s\n";
static const char __pyx_k_Dataset_path[] = "Dataset.path";
static const char __pyx_k_MFTime__time[] = "_MFTime__time";
@@ -1993,6 +2166,7 @@ static const char __pyx_k_CompoundType_dtype[] = "CompoundType.dtype";
static const char __pyx_k_Dataset_data_model[] = "Dataset.data_model";
static const char __pyx_k_Dataset_dimensions[] = "Dataset.dimensions";
static const char __pyx_k_EnumType_enum_dict[] = "EnumType.enum_dict";
+static const char __pyx_k_MFDataset___reduce[] = "MFDataset.__reduce__";
static const char __pyx_k_UnicodeDecodeError[] = "UnicodeDecodeError";
static const char __pyx_k_Variable___getattr[] = "_Variable.__getattr__";
static const char __pyx_k_Variable___getitem[] = "_Variable.__getitem__";
@@ -2002,6 +2176,7 @@ static const char __pyx_k_Dataset_disk_format[] = "Dataset.disk_format";
static const char __pyx_k_Dataset_file_format[] = "Dataset.file_format";
static const char __pyx_k_Dataset_keepweakref[] = "Dataset.keepweakref";
static const char __pyx_k_MFDataset___setattr[] = "MFDataset.__setattr__";
+static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
static const char __pyx_k_Variable_dimensions[] = "Variable.dimensions";
static const char __pyx_k_get_var_chunk_cache[] = "get_var_chunk_cache";
static const char __pyx_k_orthogoral_indexing[] = "__orthogoral_indexing__";
@@ -2013,22 +2188,32 @@ static const char __pyx_k_name_s_numpy_dtype_s[] = ": name = '%s', numpy dtype =
static const char __pyx_k_Dimension_isunlimited[] = "_Dimension.isunlimited";
static const char __pyx_k_len_of_unsized_object[] = "len() of unsized object";
static const char __pyx_k_set_auto_maskandscale[] = "set_auto_maskandscale";
+static const char __pyx_k_Variable_set_auto_mask[] = "_Variable.set_auto_mask";
static const char __pyx_k_name_cannot_be_altered[] = "name cannot be altered";
static const char __pyx_k_size_cannot_be_altered[] = "size cannot be altered";
static const char __pyx_k_unlimited_dimensions_s[] = "unlimited dimensions: %s\n";
static const char __pyx_k_unsupported_time_units[] = "unsupported time units";
static const char __pyx_k_variables_dimensions_s[] = " variables(dimensions): %s\n";
+static const char __pyx_k_MFDataset_set_auto_mask[] = "MFDataset.set_auto_mask";
+static const char __pyx_k_VLType_is_not_picklable[] = "VLType is not picklable";
+static const char __pyx_k_Variable_set_auto_scale[] = "_Variable.set_auto_scale";
static const char __pyx_k_least_significant_digit[] = "least_significant_digit";
static const char __pyx_k_no_since_in_unit_string[] = "no 'since' in unit_string";
static const char __pyx_k_shape_cannot_be_altered[] = "shape cannot be altered";
static const char __pyx_k_unlimited_name_s_size_s[] = " (unlimited): name = '%s', size = %s\n";
+static const char __pyx_k_Dataset_is_not_picklable[] = "Dataset is not picklable";
static const char __pyx_k_MFDataset___getattribute[] = "MFDataset.__getattribute__";
+static const char __pyx_k_MFDataset_set_auto_scale[] = "MFDataset.set_auto_scale";
static const char __pyx_k_needsworkaround_issue485[] = "_needsworkaround_issue485";
static const char __pyx_k_unlimited_dimensions_s_2[] = "unlimited dimensions = %s\n";
+static const char __pyx_k_EnumType_is_not_picklable[] = "EnumType is not picklable";
+static const char __pyx_k_Variable_is_not_picklable[] = "Variable is not picklable";
+static const char __pyx_k_MFDataset_is_not_picklable[] = "MFDataset is not picklable";
static const char __pyx_k_has_nc_inq_format_extended[] = "__has_nc_inq_format_extended__";
static const char __pyx_k_s_not_a_valid_variable_name[] = "%s not a valid variable name";
static const char __pyx_k_dimensions_cannot_be_altered[] = "dimensions cannot be altered";
static const char __pyx_k_s_not_a_valid_dimension_name[] = "%s not a valid dimension name";
+static const char __pyx_k_CompoundType_is_not_picklable[] = "CompoundType is not picklable";
static const char __pyx_k_The_number_of_stored_elements[] = "The number of stored elements.";
static const char __pyx_k_mode_must_be_w_r_a_or_r_got_s[] = "mode must be 'w', 'r', 'a' or 'r+', got '%s'";
static const char __pyx_k_unrecognized_format_requested[] = "unrecognized format requested";
@@ -2045,9 +2230,11 @@ static const char __pyx_k_Always_True_Indicates_to_client[] = "Always `True`. I
static const char __pyx_k_Class_for_reading_multi_file_ne[] = "\nClass for reading multi-file netCDF Datasets, making variables\nspanning multiple files appear as if they were in one file.\nDatasets must be in `NETCDF4_CLASSIC, NETCDF3_CLASSIC, NETCDF3_64BIT_OFFSET\nor NETCDF3_64BIT_DATA` format (`NETCDF4` Datasets won't work).\n\nAdapted from [pycdf](http://pysclint.sourceforge.net/pycdf) by Andre Gosselin.\n\nExample usage (See `netCDF4.MFDataset.__init__` for more details):\n\n ::: [...]
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.createDi [...]
static const char __pyx_k_FillValue_attribute_must_be_set[] = "_FillValue attribute must be set when variable is ";
+static const char __pyx_k_MFDataset_set_auto_maskandscale[] = "MFDataset.set_auto_maskandscale";
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_Variable_object_no_longer_valid[] = "Variable object no longer valid";
-static const char __pyx_k_Version_1_2_4_Introduction_netc[] = "\nVersion 1.2.4\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, a [...]
+static const char __pyx_k_Version_1_2_5_Introduction_netc[] = "\nVersion 1.2.5\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, a [...]
+static const char __pyx_k_Volumes_Drobo_python_netcdf4_py[] = "/Volumes/Drobo/python/netcdf4-python.git/netCDF4/_netCDF4.pyx";
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";
@@ -2062,7 +2249,6 @@ static const char __pyx_k_name_s_numpy_dtype_s_fields_val[] = ": name = '%s', nu
static const char __pyx_k_negative_reference_year_in_time[] = "negative reference year in time units, must be >= 1";
static const char __pyx_k_netcdf_time_variable_is_missing[] = "netcdf time variable is missing a 'units' attribute";
static const char __pyx_k_parent_is_a_reference_to_the_pa[] = "`parent` is a reference to the parent\n `netCDF4.Group` instance. `None` for the root group or `netCDF4.Dataset` instance";
-static const char __pyx_k_private_tmp_netcdf4_python_netC[] = "/private/tmp/netcdf4-python/netCDF4/_netCDF4.pyx";
static const char __pyx_k_s_is_one_of_the_reserved_attrib[] = "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead.";
static const char __pyx_k_same_as_data_model_retained_for[] = "same as `data_model`, retained for backwards compatibility.";
static const char __pyx_k_wrong_data_type_in_object_array[] = "wrong data type in object array: should be %s, got %s";
@@ -2071,7 +2257,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 2500)";
+static const char __pyx_k_Dataset_get_variables_by_attribu[] = "Dataset.get_variables_by_attributes (line 2541)";
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.";
@@ -2134,7 +2320,6 @@ static const char __pyx_k_variable_s_data_type_mismatch_be[] = "variable %s : da
static const char __pyx_k_variable_s_dimensions_mismatch_b[] = "variable %s : dimensions mismatch between master %s (%s) and extension %s (%s)";
static const char __pyx_k_variable_s_rank_mismatch_between[] = "variable %s : rank mismatch between master %s (%s) and extension %s (%s)";
static const char __pyx_k_variable_s_shape_mismatch_betwee[] = "variable %s : shape mismatch between master %s (%s) and extension %s (%s)";
-static const char __pyx_k_vlen_string_array_attributes_not[] = "vlen string array attributes not supported";
static const char __pyx_k_A_numpy_dtype_object_describing_2[] = "A numpy dtype object describing the compound data type.";
static const char __pyx_k_A_numpy_dtype_object_describing_3[] = "A numpy dtype object describing the component type for the VLEN.";
static const char __pyx_k_A_string_describing_the_name_of_2[] = "A string describing the name of the `netCDF4.Dimension` - used when creating a\n `netCDF4.Variable` instance with `netCDF4.Dataset.createVariable`.";
@@ -2149,7 +2334,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_4;
+static PyObject *__pyx_kp_s_1_2_5;
static PyObject *__pyx_kp_s_4_2_1;
static PyObject *__pyx_kp_s_4_4_0;
static PyObject *__pyx_kp_s_4_4_1;
@@ -2168,6 +2353,7 @@ static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_kp_s_Class_for_reading_multi_file_ne;
static PyObject *__pyx_kp_s_Class_providing_an_interface_to;
static PyObject *__pyx_kp_s_CompoundType_dtype;
+static PyObject *__pyx_kp_s_CompoundType_is_not_picklable;
static PyObject *__pyx_kp_s_CompoundType_name;
static PyObject *__pyx_kp_s_Dataset_cmptypes;
static PyObject *__pyx_kp_s_Dataset_data_model;
@@ -2177,6 +2363,7 @@ static PyObject *__pyx_kp_s_Dataset_enumtypes;
static PyObject *__pyx_kp_s_Dataset_file_format;
static PyObject *__pyx_kp_u_Dataset_get_variables_by_attribu;
static PyObject *__pyx_kp_s_Dataset_groups;
+static PyObject *__pyx_kp_s_Dataset_is_not_picklable;
static PyObject *__pyx_kp_s_Dataset_keepweakref;
static PyObject *__pyx_kp_s_Dataset_parent;
static PyObject *__pyx_kp_s_Dataset_path;
@@ -2193,6 +2380,7 @@ static PyObject *__pyx_kp_s_Dimension_object_no_longer_valid;
static PyObject *__pyx_n_s_Ellipsis;
static PyObject *__pyx_kp_s_EnumType_dtype;
static PyObject *__pyx_kp_s_EnumType_enum_dict;
+static PyObject *__pyx_kp_s_EnumType_is_not_picklable;
static PyObject *__pyx_kp_s_EnumType_name;
static PyObject *__pyx_n_s_FillValue;
static PyObject *__pyx_kp_s_FillValue_attribute_must_be_set;
@@ -2207,10 +2395,15 @@ static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_n_s_MFDataset;
static PyObject *__pyx_n_s_MFDataset___getattribute;
static PyObject *__pyx_n_s_MFDataset___init;
+static PyObject *__pyx_n_s_MFDataset___reduce;
static PyObject *__pyx_n_s_MFDataset___repr;
static PyObject *__pyx_n_s_MFDataset___setattr;
static PyObject *__pyx_n_s_MFDataset_close;
+static PyObject *__pyx_kp_s_MFDataset_is_not_picklable;
static PyObject *__pyx_n_s_MFDataset_ncattrs;
+static PyObject *__pyx_n_s_MFDataset_set_auto_mask;
+static PyObject *__pyx_n_s_MFDataset_set_auto_maskandscale;
+static PyObject *__pyx_n_s_MFDataset_set_auto_scale;
static PyObject *__pyx_kp_s_MFNetCDF4_only_works_with_NETCDF;
static PyObject *__pyx_n_s_MFTime;
static PyObject *__pyx_n_s_MFTime___getitem;
@@ -2220,6 +2413,7 @@ static PyObject *__pyx_n_s_MFTime__time;
static PyObject *__pyx_kp_s_MFTime_requires_that_the_same_ti;
static PyObject *__pyx_kp_s_MFTime_requires_that_the_time_va;
static PyObject *__pyx_n_s_MINYEAR;
+static PyObject *__pyx_n_s_MemoryError;
static PyObject *__pyx_n_s_NC_DISKLESS;
static PyObject *__pyx_n_s_NETCDF3;
static PyObject *__pyx_n_s_NETCDF3_64BIT;
@@ -2228,6 +2422,7 @@ static PyObject *__pyx_n_s_NETCDF3_CLASSIC;
static PyObject *__pyx_n_s_NETCDF4;
static PyObject *__pyx_n_s_NETCDF4_CLASSIC;
static PyObject *__pyx_n_s_NUMCHARS;
+static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_n_s_O;
static PyObject *__pyx_n_s_OrderedDict;
static PyObject *__pyx_n_s_RuntimeError;
@@ -2251,6 +2446,7 @@ static PyObject *__pyx_n_s_UnicodeError;
static PyObject *__pyx_kp_s_Unsupported_compound_type_elemen;
static PyObject *__pyx_n_s_V;
static PyObject *__pyx_kp_s_VLType_dtype;
+static PyObject *__pyx_kp_s_VLType_is_not_picklable;
static PyObject *__pyx_kp_s_VLType_name;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_Variable;
@@ -2264,6 +2460,7 @@ static PyObject *__pyx_n_s_Variable__shape;
static PyObject *__pyx_kp_s_Variable_datatype;
static PyObject *__pyx_kp_s_Variable_dimensions;
static PyObject *__pyx_kp_s_Variable_dtype;
+static PyObject *__pyx_kp_s_Variable_is_not_picklable;
static PyObject *__pyx_kp_s_Variable_least_significant_digit;
static PyObject *__pyx_kp_s_Variable_length_strings_are_only;
static PyObject *__pyx_kp_s_Variable_mask;
@@ -2272,10 +2469,13 @@ static PyObject *__pyx_n_s_Variable_ncattrs;
static PyObject *__pyx_kp_s_Variable_ndim;
static PyObject *__pyx_kp_s_Variable_object_no_longer_valid;
static PyObject *__pyx_kp_s_Variable_scale;
+static PyObject *__pyx_n_s_Variable_set_auto_mask;
static PyObject *__pyx_n_s_Variable_set_auto_maskandscale;
+static PyObject *__pyx_n_s_Variable_set_auto_scale;
static PyObject *__pyx_kp_s_Variable_shape;
static PyObject *__pyx_kp_s_Variable_size;
static PyObject *__pyx_n_s_Variable_typecode;
+static PyObject *__pyx_kp_s_Volumes_Drobo_python_netcdf4_py;
static PyObject *__pyx_kp_s_WARNING_Backwards_incompatible;
static PyObject *__pyx_kp_s_WARNING_unsupported_Compound_typ;
static PyObject *__pyx_kp_s_WARNING_unsupported_Enum_type_sk;
@@ -2284,15 +2484,15 @@ static PyObject *__pyx_kp_s_WARNING_variable_s_has_unsupport;
static PyObject *__pyx_kp_s_WARNING_variable_s_has_unsupport_2;
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__16;
-static PyObject *__pyx_kp_s__19;
+static PyObject *__pyx_kp_s__18;
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_kp_s__25;
static PyObject *__pyx_n_s__28;
static PyObject *__pyx_kp_s__36;
static PyObject *__pyx_kp_s__37;
@@ -2645,7 +2845,6 @@ static PyObject *__pyx_n_s_posixpath;
static PyObject *__pyx_n_s_preemption;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_private_atts;
-static PyObject *__pyx_kp_s_private_tmp_netcdf4_python_netC;
static PyObject *__pyx_n_s_prod;
static PyObject *__pyx_n_s_proleptic_gregorian;
static PyObject *__pyx_n_s_proxy;
@@ -2667,6 +2866,7 @@ static PyObject *__pyx_n_s_recdimlen;
static PyObject *__pyx_n_s_recdimname;
static PyObject *__pyx_n_s_recdimname_2;
static PyObject *__pyx_n_s_redef;
+static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_ref_date;
static PyObject *__pyx_n_s_ref_num;
static PyObject *__pyx_n_s_releasevers;
@@ -2787,6 +2987,9 @@ static PyObject *__pyx_n_s_v;
static PyObject *__pyx_n_s_vInst;
static PyObject *__pyx_n_s_vName;
static PyObject *__pyx_n_s_val;
+static PyObject *__pyx_n_s_valid_max;
+static PyObject *__pyx_n_s_valid_min;
+static PyObject *__pyx_n_s_valid_range;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_value_2;
static PyObject *__pyx_n_s_values;
@@ -2809,7 +3012,6 @@ static PyObject *__pyx_n_s_vid;
static PyObject *__pyx_n_s_view;
static PyObject *__pyx_n_s_vlen;
static PyObject *__pyx_kp_s_vlen_data_type_s;
-static PyObject *__pyx_kp_s_vlen_string_array_attributes_not;
static PyObject *__pyx_n_s_vltype;
static PyObject *__pyx_n_s_vltypes;
static PyObject *__pyx_n_s_w;
@@ -2839,34 +3041,35 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx
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_20sync(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_22_redef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_24_enddef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26set_fill_on(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_off(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30createDimension(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_32renameDimension(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_34createCompoundType(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_36createVLType(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_38createEnumType(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_40createVariable(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 [...]
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(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_44createGroup(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_groupname); /* proto */
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46ncattrs(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48setncattr(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_50setncattr_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_52setncatts(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_attdict); /* proto */
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54getncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
-static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_56__delattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_58delncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
-static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60__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_62__getattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64renameAttribute(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_66renameGroup(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_68set_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_70set_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_72set_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_74get_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_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 [...]
+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_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 */
@@ -2981,6 +3184,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_scale(struct _
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_62set_auto_mask(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyArrayObject *__pyx_v_data, PyObject *__pyx_v_start, PyObject *__pyx_v_count, PyObject *__pyx_v_stride); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_count, PyObject *__pyx_v_stride); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_68__reduce__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6_varid___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_6_varid_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6_grpid___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
@@ -3035,6 +3239,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_8_has_lsd_4__del__(struct __pyx
static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_grp, PyObject *__pyx_v_dt, PyObject *__pyx_v_dtype_name, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4__unicode__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_6__reduce__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_8_nc_type___get__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self); /* proto */
static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_8_nc_type_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_5dtype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self); /* proto */
@@ -3046,6 +3251,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4name_4__del__(struct __py
static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_grp, PyObject *__pyx_v_dt, PyObject *__pyx_v_dtype_name, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_6__reduce__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_8_nc_type___get__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self); /* proto */
static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_8_nc_type_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_5dtype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self); /* proto */
@@ -3057,6 +3263,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_4name_4__del__(struct __pyx_obj_7
static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netCDF4_8_netCDF4_EnumType *__pyx_v_self, PyObject *__pyx_v_grp, PyObject *__pyx_v_dt, PyObject *__pyx_v_dtype_name, PyObject *__pyx_v_enum_dict, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_obj_7netCDF4_8_netCDF4_EnumType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_4__unicode__(struct __pyx_obj_7netCDF4_8_netCDF4_EnumType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_6__reduce__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_EnumType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_8_nc_type___get__(struct __pyx_obj_7netCDF4_8_netCDF4_EnumType *__pyx_v_self); /* proto */
static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType_8_nc_type_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_EnumType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_5dtype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_EnumType *__pyx_v_self); /* proto */
@@ -3076,13 +3283,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_units, PyObject *__pyx_v_calendar); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_times, PyObject *__pyx_v_units, PyObject *__pyx_v_calendar); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_nctime, PyObject *__pyx_v_calendar, PyObject *__pyx_v_select); /* proto */
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_25__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_files, PyObject *__pyx_v_check, PyObject *__pyx_v_aggdim, PyObject *__pyx_v_exclude); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_2__setattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8set_auto_maskandscale(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10set_auto_mask(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_12set_auto_scale(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_14close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_16__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_18__reduce__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dimname, CYTHON_UNUSED PyObject *__pyx_v_dim, PyObject *__pyx_v_dimlens, PyObject *__pyx_v_dimtotlen); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_2__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_4isunlimited(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
@@ -3095,7 +3306,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_10__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_12_shape(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_elem); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16set_auto_mask(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_18set_auto_scale(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_elem); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_time, PyObject *__pyx_v_units); /* proto */
static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_elem); /* proto */
static PyObject *__pyx_tp_new_7netCDF4_8_netCDF4_Dataset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
@@ -3133,43 +3346,44 @@ static PyObject *__pyx_int_1582;
static PyObject *__pyx_int_1900;
static PyObject *__pyx_int_3600;
static PyObject *__pyx_int_neg_1;
-static PyObject *__pyx_slice__9;
+static PyObject *__pyx_slice__8;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
-static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_slice__10;
static PyObject *__pyx_slice__11;
static PyObject *__pyx_slice__12;
-static PyObject *__pyx_slice__13;
static PyObject *__pyx_slice__39;
static PyObject *__pyx_slice__40;
-static PyObject *__pyx_slice__45;
static PyObject *__pyx_slice__46;
-static PyObject *__pyx_slice__54;
+static PyObject *__pyx_slice__47;
static PyObject *__pyx_slice__55;
static PyObject *__pyx_slice__56;
static PyObject *__pyx_slice__57;
-static PyObject *__pyx_slice__62;
+static PyObject *__pyx_slice__58;
+static PyObject *__pyx_slice__59;
+static PyObject *__pyx_slice__60;
static PyObject *__pyx_slice__65;
-static PyObject *__pyx_slice__67;
static PyObject *__pyx_slice__68;
-static PyObject *__pyx_slice__69;
-static PyObject *__pyx_slice__73;
+static PyObject *__pyx_slice__70;
+static PyObject *__pyx_slice__71;
+static PyObject *__pyx_slice__72;
static PyObject *__pyx_slice__76;
-static PyObject *__pyx_slice__77;
-static PyObject *__pyx_slice__81;
-static PyObject *__pyx_slice__83;
+static PyObject *__pyx_slice__79;
+static PyObject *__pyx_slice__80;
+static PyObject *__pyx_slice__86;
static PyObject *__pyx_slice__88;
-static PyObject *__pyx_slice__89;
-static PyObject *__pyx_slice__92;
-static PyObject *__pyx_slice__93;
-static PyObject *__pyx_tuple__10;
+static PyObject *__pyx_slice__94;
+static PyObject *__pyx_slice__95;
+static PyObject *__pyx_slice__99;
+static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
-static PyObject *__pyx_tuple__18;
-static PyObject *__pyx_tuple__20;
-static PyObject *__pyx_tuple__23;
+static PyObject *__pyx_tuple__19;
+static PyObject *__pyx_tuple__22;
+static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__29;
@@ -3184,76 +3398,79 @@ static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
-static PyObject *__pyx_tuple__47;
+static PyObject *__pyx_tuple__45;
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__58;
-static PyObject *__pyx_tuple__59;
-static PyObject *__pyx_tuple__60;
+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__66;
-static PyObject *__pyx_tuple__70;
-static PyObject *__pyx_tuple__71;
-static PyObject *__pyx_tuple__72;
+static PyObject *__pyx_tuple__67;
+static PyObject *__pyx_tuple__69;
+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__80;
+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__89;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__91;
-static PyObject *__pyx_tuple__94;
-static PyObject *__pyx_tuple__95;
+static PyObject *__pyx_tuple__92;
+static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__98;
-static PyObject *__pyx_tuple__99;
-static PyObject *__pyx_slice__102;
-static PyObject *__pyx_slice__107;
-static PyObject *__pyx_slice__108;
+static PyObject *__pyx_slice__100;
static PyObject *__pyx_slice__109;
-static PyObject *__pyx_slice__110;
-static PyObject *__pyx_slice__113;
static PyObject *__pyx_slice__114;
static PyObject *__pyx_slice__115;
+static PyObject *__pyx_slice__116;
static PyObject *__pyx_slice__117;
-static PyObject *__pyx_slice__126;
-static PyObject *__pyx_tuple__100;
+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_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__110;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__112;
-static PyObject *__pyx_tuple__116;
+static PyObject *__pyx_tuple__113;
static PyObject *__pyx_tuple__118;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__120;
-static PyObject *__pyx_tuple__121;
-static PyObject *__pyx_tuple__122;
-static PyObject *__pyx_tuple__125;
+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__132;
-static PyObject *__pyx_tuple__134;
+static PyObject *__pyx_tuple__133;
static PyObject *__pyx_tuple__135;
+static PyObject *__pyx_tuple__136;
static PyObject *__pyx_tuple__137;
-static PyObject *__pyx_tuple__139;
-static PyObject *__pyx_tuple__141;
+static PyObject *__pyx_tuple__138;
+static PyObject *__pyx_tuple__140;
+static PyObject *__pyx_tuple__142;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__147;
@@ -3278,15 +3495,21 @@ static PyObject *__pyx_tuple__183;
static PyObject *__pyx_tuple__185;
static PyObject *__pyx_tuple__187;
static PyObject *__pyx_tuple__189;
-static PyObject *__pyx_tuple__190;
-static PyObject *__pyx_codeobj__123;
-static PyObject *__pyx_codeobj__124;
+static PyObject *__pyx_tuple__191;
+static PyObject *__pyx_tuple__193;
+static PyObject *__pyx_tuple__195;
+static PyObject *__pyx_tuple__197;
+static PyObject *__pyx_tuple__199;
+static PyObject *__pyx_tuple__201;
+static PyObject *__pyx_tuple__203;
+static PyObject *__pyx_tuple__205;
+static PyObject *__pyx_tuple__207;
+static PyObject *__pyx_tuple__209;
+static PyObject *__pyx_tuple__210;
static PyObject *__pyx_codeobj__131;
-static PyObject *__pyx_codeobj__133;
-static PyObject *__pyx_codeobj__136;
-static PyObject *__pyx_codeobj__138;
-static PyObject *__pyx_codeobj__140;
-static PyObject *__pyx_codeobj__142;
+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_codeobj__148;
@@ -3310,10 +3533,20 @@ static PyObject *__pyx_codeobj__182;
static PyObject *__pyx_codeobj__184;
static PyObject *__pyx_codeobj__186;
static PyObject *__pyx_codeobj__188;
-static PyObject *__pyx_codeobj__191;
+static PyObject *__pyx_codeobj__190;
+static PyObject *__pyx_codeobj__192;
+static PyObject *__pyx_codeobj__194;
+static PyObject *__pyx_codeobj__196;
+static PyObject *__pyx_codeobj__198;
+static PyObject *__pyx_codeobj__200;
+static PyObject *__pyx_codeobj__202;
+static PyObject *__pyx_codeobj__204;
+static PyObject *__pyx_codeobj__206;
+static PyObject *__pyx_codeobj__208;
+static PyObject *__pyx_codeobj__211;
static PyObject *__pyx_gb_7netCDF4_8_netCDF4_24generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-/* "netCDF4/_netCDF4.pyx":1031
+/* "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()) # <<<<<<<<<<<<<<
@@ -3328,12 +3561,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_22genexpr(CYTHON_UNUSED PyObject *_
__Pyx_RefNannySetupContext("genexpr", 0);
__pyx_cur_scope = (struct __pyx_obj_7netCDF4_8_netCDF4___pyx_scope_struct__genexpr *)__pyx_tp_new_7netCDF4_8_netCDF4___pyx_scope_struct__genexpr(__pyx_ptype_7netCDF4_8_netCDF4___pyx_scope_struct__genexpr, __pyx_empty_tuple, NULL);
if (unlikely(!__pyx_cur_scope)) {
- __Pyx_RefNannyFinishContext();
- return NULL;
+ __pyx_cur_scope = ((struct __pyx_obj_7netCDF4_8_netCDF4___pyx_scope_struct__genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 1033, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
}
- __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); if (unlikely(!gen)) __PYX_ERR(0, 1031, __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;
@@ -3369,17 +3604,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, 1031, __pyx_L1_error)
- __pyx_r = PyDict_New(); if (unlikely(!__pyx_r)) __PYX_ERR(0, 1031, __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, 1031, __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, 1031, __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, 1031, __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);
@@ -3388,7 +3623,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, 1031, __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);
@@ -3399,9 +3634,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, 1031, __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;
/* function exit code */
goto __pyx_L0;
@@ -3419,7 +3655,7 @@ static PyObject *__pyx_gb_7netCDF4_8_netCDF4_24generator(__pyx_CoroutineObject *
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":957
+/* "netCDF4/_netCDF4.pyx":959
* # check for required version of netcdf-4 and hdf5.
*
* def _gethdf5libversion(): # <<<<<<<<<<<<<<
@@ -3456,7 +3692,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4__gethdf5libversion(CYTHON_UNUSED Py
PyObject *__pyx_t_6 = NULL;
__Pyx_RefNannySetupContext("_gethdf5libversion", 0);
- /* "netCDF4/_netCDF4.pyx":958
+ /* "netCDF4/_netCDF4.pyx":960
*
* def _gethdf5libversion():
* majorvers = H5_VERS_MAJOR # <<<<<<<<<<<<<<
@@ -3465,7 +3701,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4__gethdf5libversion(CYTHON_UNUSED Py
*/
__pyx_v_majorvers = H5_VERS_MAJOR;
- /* "netCDF4/_netCDF4.pyx":959
+ /* "netCDF4/_netCDF4.pyx":961
* def _gethdf5libversion():
* majorvers = H5_VERS_MAJOR
* minorvers = H5_VERS_MINOR # <<<<<<<<<<<<<<
@@ -3474,7 +3710,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4__gethdf5libversion(CYTHON_UNUSED Py
*/
__pyx_v_minorvers = H5_VERS_MINOR;
- /* "netCDF4/_netCDF4.pyx":960
+ /* "netCDF4/_netCDF4.pyx":962
* majorvers = H5_VERS_MAJOR
* minorvers = H5_VERS_MINOR
* releasevers = H5_VERS_RELEASE # <<<<<<<<<<<<<<
@@ -3483,30 +3719,30 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4__gethdf5libversion(CYTHON_UNUSED Py
*/
__pyx_v_releasevers = H5_VERS_RELEASE;
- /* "netCDF4/_netCDF4.pyx":961
+ /* "netCDF4/_netCDF4.pyx":963
* minorvers = H5_VERS_MINOR
* releasevers = H5_VERS_RELEASE
* patchstring = H5_VERS_SUBRELEASE.decode('ascii') # <<<<<<<<<<<<<<
* if not patchstring:
* return '%d.%d.%d' % (majorvers,minorvers,releasevers)
*/
- __pyx_t_1 = __Pyx_decode_c_string(H5_VERS_SUBRELEASE, 0, strlen(H5_VERS_SUBRELEASE), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_decode_c_string(H5_VERS_SUBRELEASE, 0, strlen(H5_VERS_SUBRELEASE), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_patchstring = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":962
+ /* "netCDF4/_netCDF4.pyx":964
* releasevers = H5_VERS_RELEASE
* patchstring = H5_VERS_SUBRELEASE.decode('ascii')
* if not patchstring: # <<<<<<<<<<<<<<
* return '%d.%d.%d' % (majorvers,minorvers,releasevers)
* else:
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_patchstring); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 962, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_patchstring); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 964, __pyx_L1_error)
__pyx_t_3 = ((!__pyx_t_2) != 0);
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":963
+ /* "netCDF4/_netCDF4.pyx":965
* patchstring = H5_VERS_SUBRELEASE.decode('ascii')
* if not patchstring:
* return '%d.%d.%d' % (majorvers,minorvers,releasevers) # <<<<<<<<<<<<<<
@@ -3514,13 +3750,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4__gethdf5libversion(CYTHON_UNUSED Py
* return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_majorvers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_majorvers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_minorvers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 963, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_minorvers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 965, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_releasevers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 963, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_releasevers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 965, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 963, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 965, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
@@ -3531,14 +3767,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4__gethdf5libversion(CYTHON_UNUSED Py
__pyx_t_1 = 0;
__pyx_t_4 = 0;
__pyx_t_5 = 0;
- __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_d_d_d, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 963, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_d_d_d, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 965, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":962
+ /* "netCDF4/_netCDF4.pyx":964
* releasevers = H5_VERS_RELEASE
* patchstring = H5_VERS_SUBRELEASE.decode('ascii')
* if not patchstring: # <<<<<<<<<<<<<<
@@ -3547,7 +3783,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4__gethdf5libversion(CYTHON_UNUSED Py
*/
}
- /* "netCDF4/_netCDF4.pyx":965
+ /* "netCDF4/_netCDF4.pyx":967
* return '%d.%d.%d' % (majorvers,minorvers,releasevers)
* else:
* return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring) # <<<<<<<<<<<<<<
@@ -3556,13 +3792,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4__gethdf5libversion(CYTHON_UNUSED Py
*/
/*else*/ {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_majorvers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 965, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_majorvers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_minorvers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 965, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_minorvers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 967, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_releasevers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 965, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_releasevers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
@@ -3576,7 +3812,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4__gethdf5libversion(CYTHON_UNUSED Py
__pyx_t_5 = 0;
__pyx_t_6 = 0;
__pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_d_d_d_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 965, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_d_d_d_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_4;
@@ -3584,7 +3820,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4__gethdf5libversion(CYTHON_UNUSED Py
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":957
+ /* "netCDF4/_netCDF4.pyx":959
* # check for required version of netcdf-4 and hdf5.
*
* def _gethdf5libversion(): # <<<<<<<<<<<<<<
@@ -3607,7 +3843,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4__gethdf5libversion(CYTHON_UNUSED Py
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":967
+/* "netCDF4/_netCDF4.pyx":969
* return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
*
* def getlibversion(): # <<<<<<<<<<<<<<
@@ -3637,7 +3873,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_2getlibversion(CYTHON_UNUSED PyObje
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("getlibversion", 0);
- /* "netCDF4/_netCDF4.pyx":974
+ /* "netCDF4/_netCDF4.pyx":976
* used to build the module, and when it was built.
* """
* return (<char *>nc_inq_libvers()).decode('ascii') # <<<<<<<<<<<<<<
@@ -3646,14 +3882,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_2getlibversion(CYTHON_UNUSED PyObje
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = ((char *)nc_inq_libvers());
- __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":967
+ /* "netCDF4/_netCDF4.pyx":969
* return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
*
* def getlibversion(): # <<<<<<<<<<<<<<
@@ -3672,7 +3908,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_2getlibversion(CYTHON_UNUSED PyObje
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1077
+/* "netCDF4/_netCDF4.pyx":1079
* # internal C functions.
*
* cdef _get_att_names(int grpid, int varid): # <<<<<<<<<<<<<<
@@ -3696,12 +3932,12 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
- Py_ssize_t __pyx_t_9;
+ int __pyx_t_9;
PyObject *__pyx_t_10 = NULL;
int __pyx_t_11;
__Pyx_RefNannySetupContext("_get_att_names", 0);
- /* "netCDF4/_netCDF4.pyx":1081
+ /* "netCDF4/_netCDF4.pyx":1083
* cdef int ierr, numatts, n
* cdef char namstring[NC_MAX_NAME+1]
* if varid == NC_GLOBAL: # <<<<<<<<<<<<<<
@@ -3711,7 +3947,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":1082
+ /* "netCDF4/_netCDF4.pyx":1084
* cdef char namstring[NC_MAX_NAME+1]
* if varid == NC_GLOBAL:
* with nogil: # <<<<<<<<<<<<<<
@@ -3725,7 +3961,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1083
+ /* "netCDF4/_netCDF4.pyx":1085
* if varid == NC_GLOBAL:
* with nogil:
* ierr = nc_inq_natts(grpid, &numatts) # <<<<<<<<<<<<<<
@@ -3735,7 +3971,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":1082
+ /* "netCDF4/_netCDF4.pyx":1084
* cdef char namstring[NC_MAX_NAME+1]
* if varid == NC_GLOBAL:
* with nogil: # <<<<<<<<<<<<<<
@@ -3753,7 +3989,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in
}
}
- /* "netCDF4/_netCDF4.pyx":1081
+ /* "netCDF4/_netCDF4.pyx":1083
* cdef int ierr, numatts, n
* cdef char namstring[NC_MAX_NAME+1]
* if varid == NC_GLOBAL: # <<<<<<<<<<<<<<
@@ -3763,7 +3999,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":1085
+ /* "netCDF4/_netCDF4.pyx":1087
* ierr = nc_inq_natts(grpid, &numatts)
* else:
* with nogil: # <<<<<<<<<<<<<<
@@ -3778,7 +4014,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
* else:
* with nogil:
* ierr = nc_inq_varnatts(grpid, varid, &numatts) # <<<<<<<<<<<<<<
@@ -3788,7 +4024,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":1085
+ /* "netCDF4/_netCDF4.pyx":1087
* ierr = nc_inq_natts(grpid, &numatts)
* else:
* with nogil: # <<<<<<<<<<<<<<
@@ -3808,7 +4044,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":1087
+ /* "netCDF4/_netCDF4.pyx":1089
* with nogil:
* ierr = nc_inq_varnatts(grpid, varid, &numatts)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -3818,7 +4054,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":1088
+ /* "netCDF4/_netCDF4.pyx":1090
* ierr = nc_inq_varnatts(grpid, varid, &numatts)
* if ierr != NC_NOERR:
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -3826,22 +4062,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, 1088, __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, 1090, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1088, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1090, __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, 1088, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1090, __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, 1088, __pyx_L1_error)
+ __PYX_ERR(0, 1090, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1087
+ /* "netCDF4/_netCDF4.pyx":1089
* with nogil:
* ierr = nc_inq_varnatts(grpid, varid, &numatts)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -3850,19 +4086,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in
*/
}
- /* "netCDF4/_netCDF4.pyx":1089
+ /* "netCDF4/_netCDF4.pyx":1091
* if ierr != NC_NOERR:
* raise AttributeError((<char *>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, 1089, __pyx_L1_error)
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1091, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_attslist = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":1090
+ /* "netCDF4/_netCDF4.pyx":1092
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
* attslist = []
* for n from 0 <= n < numatts: # <<<<<<<<<<<<<<
@@ -3872,7 +4108,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":1091
+ /* "netCDF4/_netCDF4.pyx":1093
* attslist = []
* for n from 0 <= n < numatts:
* with nogil: # <<<<<<<<<<<<<<
@@ -3886,7 +4122,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1092
+ /* "netCDF4/_netCDF4.pyx":1094
* for n from 0 <= n < numatts:
* with nogil:
* ierr = nc_inq_attname(grpid, varid, n, namstring) # <<<<<<<<<<<<<<
@@ -3896,7 +4132,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":1091
+ /* "netCDF4/_netCDF4.pyx":1093
* attslist = []
* for n from 0 <= n < numatts:
* with nogil: # <<<<<<<<<<<<<<
@@ -3914,7 +4150,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in
}
}
- /* "netCDF4/_netCDF4.pyx":1093
+ /* "netCDF4/_netCDF4.pyx":1095
* with nogil:
* ierr = nc_inq_attname(grpid, varid, n, namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -3924,7 +4160,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":1094
+ /* "netCDF4/_netCDF4.pyx":1096
* ierr = nc_inq_attname(grpid, varid, n, namstring)
* if ierr != NC_NOERR:
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -3932,22 +4168,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, 1094, __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, 1096, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1094, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1096, __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, 1094, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __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, 1094, __pyx_L1_error)
+ __PYX_ERR(0, 1096, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1093
+ /* "netCDF4/_netCDF4.pyx":1095
* with nogil:
* ierr = nc_inq_attname(grpid, varid, n, namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -3956,25 +4192,25 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in
*/
}
- /* "netCDF4/_netCDF4.pyx":1095
+ /* "netCDF4/_netCDF4.pyx":1097
* if ierr != NC_NOERR:
* raise AttributeError((<char *>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, 1095, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __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, 1095, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1097, __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, 1095, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __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, 1095, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1097, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
__pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -3984,26 +4220,48 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in
__pyx_t_9 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1095, __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;
+ #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, 1097, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #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, 1097, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1097, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_7);
+ 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, 1097, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_7);
- 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, 1095, __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, 1095, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_attslist, __pyx_t_3); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 1097, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
- /* "netCDF4/_netCDF4.pyx":1096
+ /* "netCDF4/_netCDF4.pyx":1098
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
* attslist.append(namstring.decode(default_encoding,unicode_error))
* return attslist # <<<<<<<<<<<<<<
@@ -4015,7 +4273,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":1077
+ /* "netCDF4/_netCDF4.pyx":1079
* # internal C functions.
*
* cdef _get_att_names(int grpid, int varid): # <<<<<<<<<<<<<<
@@ -4040,7 +4298,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int __pyx_v_grpid, in
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1098
+/* "netCDF4/_netCDF4.pyx":1100
* return attslist
*
* cdef _get_att(grp, int varid, name): # <<<<<<<<<<<<<<
@@ -4053,12 +4311,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
int __pyx_v__grpid;
size_t __pyx_v_att_len;
char *__pyx_v_attname;
- char *__pyx_v_stratt;
nc_type __pyx_v_att_type;
PyArrayObject *__pyx_v_value_arr = 0;
PyObject *__pyx_v_bytestr = NULL;
PyObject *__pyx_v_pstring = NULL;
+ char **__pyx_v_values;
+ PyObject *__pyx_v_result = NULL;
PyObject *__pyx_v_type_att = NULL;
+ size_t __pyx_v_j;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -4068,63 +4328,68 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
- Py_ssize_t __pyx_t_8;
- PyObject *__pyx_t_9 = NULL;
- int __pyx_t_10;
- PyObject *__pyx_t_11 = NULL;
- PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ size_t __pyx_t_11;
+ size_t __pyx_t_12;
PyObject *__pyx_t_13 = NULL;
- PyObject *__pyx_t_14 = NULL;
- PyObject *__pyx_t_15 = NULL;
+ int __pyx_t_14;
+ char const *__pyx_t_15;
PyObject *__pyx_t_16 = NULL;
PyObject *__pyx_t_17 = NULL;
PyObject *__pyx_t_18 = NULL;
PyObject *__pyx_t_19 = NULL;
PyObject *__pyx_t_20 = NULL;
PyObject *__pyx_t_21 = NULL;
- PyObject *__pyx_t_22 = NULL;
- PyObject *__pyx_t_23 = NULL;
+ char const *__pyx_t_22;
+ Py_ssize_t __pyx_t_23;
PyObject *__pyx_t_24 = NULL;
PyObject *__pyx_t_25 = NULL;
PyObject *__pyx_t_26 = NULL;
+ PyObject *__pyx_t_27 = NULL;
+ PyObject *__pyx_t_28 = NULL;
+ PyObject *__pyx_t_29 = NULL;
+ PyObject *__pyx_t_30 = NULL;
+ PyObject *__pyx_t_31 = NULL;
__Pyx_RefNannySetupContext("_get_att", 0);
- /* "netCDF4/_netCDF4.pyx":1106
+ /* "netCDF4/_netCDF4.pyx":1107
* 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, 1106, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_bytestr = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1107
+ /* "netCDF4/_netCDF4.pyx":1108
* 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, 1107, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1108, __pyx_L1_error)
__pyx_v_attname = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":1108
+ /* "netCDF4/_netCDF4.pyx":1109
* 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, 1108, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __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, 1108, __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, 1109, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v__grpid = __pyx_t_3;
- /* "netCDF4/_netCDF4.pyx":1109
+ /* "netCDF4/_netCDF4.pyx":1110
* attname = bytestr
* _grpid = grp._grpid
* with nogil: # <<<<<<<<<<<<<<
@@ -4138,7 +4403,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1110
+ /* "netCDF4/_netCDF4.pyx":1111
* _grpid = grp._grpid
* with nogil:
* ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len) # <<<<<<<<<<<<<<
@@ -4148,7 +4413,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":1109
+ /* "netCDF4/_netCDF4.pyx":1110
* attname = bytestr
* _grpid = grp._grpid
* with nogil: # <<<<<<<<<<<<<<
@@ -4166,7 +4431,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
}
}
- /* "netCDF4/_netCDF4.pyx":1111
+ /* "netCDF4/_netCDF4.pyx":1112
* with nogil:
* ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -4176,7 +4441,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":1112
+ /* "netCDF4/_netCDF4.pyx":1113
* ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len)
* if ierr != NC_NOERR:
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -4184,22 +4449,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, 1112, __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, 1113, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1112, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1113, __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, 1112, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __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, 1112, __pyx_L1_error)
+ __PYX_ERR(0, 1113, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1111
+ /* "netCDF4/_netCDF4.pyx":1112
* with nogil:
* ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -4208,7 +4473,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
*/
}
- /* "netCDF4/_netCDF4.pyx":1114
+ /* "netCDF4/_netCDF4.pyx":1115
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # attribute is a character or string ...
* if att_type == NC_CHAR: # <<<<<<<<<<<<<<
@@ -4218,52 +4483,72 @@ 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":1115
+ /* "netCDF4/_netCDF4.pyx":1116
* # 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, <char *>value_arr.data)
*/
- __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1115, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1116, __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, 1115, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1116, __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, 1115, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1116, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_7 = NULL;
- __pyx_t_8 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_3 = 0;
+ 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);
- __pyx_t_8 = 1;
+ __pyx_t_3 = 1;
}
}
- __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1115, __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;
+ #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, 1116, __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
+ #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, 1116, __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, 1116, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_3, __pyx_t_5);
+ __Pyx_INCREF(__pyx_n_s_S1);
+ __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, 1116, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_5);
- __Pyx_INCREF(__pyx_n_s_S1);
- __Pyx_GIVEREF(__pyx_n_s_S1);
- PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_n_s_S1);
- __pyx_t_5 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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, 1115, __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, 1116, __pyx_L1_error)
__pyx_v_value_arr = ((PyArrayObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1116
+ /* "netCDF4/_netCDF4.pyx":1117
* if att_type == NC_CHAR:
* value_arr = numpy.empty(att_len,'S1')
* with nogil: # <<<<<<<<<<<<<<
@@ -4277,7 +4562,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1117
+ /* "netCDF4/_netCDF4.pyx":1118
* value_arr = numpy.empty(att_len,'S1')
* with nogil:
* ierr = nc_get_att_text(_grpid, varid, attname, <char *>value_arr.data) # <<<<<<<<<<<<<<
@@ -4287,7 +4572,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":1116
+ /* "netCDF4/_netCDF4.pyx":1117
* if att_type == NC_CHAR:
* value_arr = numpy.empty(att_len,'S1')
* with nogil: # <<<<<<<<<<<<<<
@@ -4305,7 +4590,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
}
}
- /* "netCDF4/_netCDF4.pyx":1118
+ /* "netCDF4/_netCDF4.pyx":1119
* with nogil:
* ierr = nc_get_att_text(_grpid, varid, attname, <char *>value_arr.data)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -4315,7 +4600,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":1119
+ /* "netCDF4/_netCDF4.pyx":1120
* ierr = nc_get_att_text(_grpid, varid, attname, <char *>value_arr.data)
* if ierr != NC_NOERR:
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -4323,22 +4608,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, 1119, __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, 1120, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1120, __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, 1119, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __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, 1119, __pyx_L1_error)
+ __PYX_ERR(0, 1120, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1118
+ /* "netCDF4/_netCDF4.pyx":1119
* with nogil:
* ierr = nc_get_att_text(_grpid, varid, attname, <char *>value_arr.data)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -4347,46 +4632,46 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
*/
}
- /* "netCDF4/_netCDF4.pyx":1120
+ /* "netCDF4/_netCDF4.pyx":1121
* if ierr != NC_NOERR:
* raise AttributeError((<char *>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_10 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_FillValue, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1120, __pyx_L1_error)
- if (__pyx_t_10) {
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_FillValue, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1121, __pyx_L1_error)
+ if (__pyx_t_9) {
} else {
- __pyx_t_4 = __pyx_t_10;
+ __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, 1120, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1120, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1121, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_4 = __pyx_t_10;
+ __pyx_t_4 = __pyx_t_9;
__pyx_L12_bool_binop_done:;
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":1123
+ /* "netCDF4/_netCDF4.pyx":1124
* # make sure _FillValue for character arrays is a byte on python 3
* # (issue 271).
* pstring = bytes(value_arr) # <<<<<<<<<<<<<<
* else:
* pstring =\
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1123, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_value_arr));
__Pyx_GIVEREF(((PyObject *)__pyx_v_value_arr));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_value_arr));
- __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1123, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1124, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_pstring = __pyx_t_6;
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":1120
+ /* "netCDF4/_netCDF4.pyx":1121
* if ierr != NC_NOERR:
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if name == '_FillValue' and python3: # <<<<<<<<<<<<<<
@@ -4396,7 +4681,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
goto __pyx_L11;
}
- /* "netCDF4/_netCDF4.pyx":1126
+ /* "netCDF4/_netCDF4.pyx":1127
* else:
* pstring =\
* value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','') # <<<<<<<<<<<<<<
@@ -4404,84 +4689,106 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
* elif att_type == NC_STRING:
*/
/*else*/ {
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_tostring); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1126, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_tostring); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_9, function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
}
}
if (__pyx_t_5) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else {
- __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1126, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__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, 1126, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1126, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1127, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_7 = NULL;
- __pyx_t_8 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
+ __pyx_t_3 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_7)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
__Pyx_INCREF(__pyx_t_7);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_9, function);
- __pyx_t_8 = 1;
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ __pyx_t_3 = 1;
}
}
- __pyx_t_11 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1126, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- if (__pyx_t_7) {
- __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_t_5};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1127, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_1, __pyx_t_5};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1127, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1127, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_3, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_3, __pyx_t_5);
+ __pyx_t_1 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_8, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_8, __pyx_t_5);
- __pyx_t_1 = 0;
- __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1126, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_replace); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1126, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1126, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1127, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_v_pstring = __pyx_t_6;
__pyx_t_6 = 0;
}
__pyx_L11:;
- /* "netCDF4/_netCDF4.pyx":1127
+ /* "netCDF4/_netCDF4.pyx":1128
* pstring =\
* value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
* return pstring # <<<<<<<<<<<<<<
* elif att_type == NC_STRING:
- * if att_len == 1:
+ * values = <char**>PyMem_Malloc(sizeof(char*) * att_len)
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_pstring);
__pyx_r = __pyx_v_pstring;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":1114
+ /* "netCDF4/_netCDF4.pyx":1115
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # attribute is a character or string ...
* if att_type == NC_CHAR: # <<<<<<<<<<<<<<
@@ -4490,31 +4797,67 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
*/
break;
- /* "netCDF4/_netCDF4.pyx":1128
+ /* "netCDF4/_netCDF4.pyx":1129
* value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
* return pstring
* elif att_type == NC_STRING: # <<<<<<<<<<<<<<
- * if att_len == 1:
- * with nogil:
+ * values = <char**>PyMem_Malloc(sizeof(char*) * att_len)
+ * if not values:
*/
case NC_STRING:
- /* "netCDF4/_netCDF4.pyx":1129
+ /* "netCDF4/_netCDF4.pyx":1130
* return pstring
* elif att_type == NC_STRING:
- * if att_len == 1: # <<<<<<<<<<<<<<
- * with nogil:
- * ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
+ * values = <char**>PyMem_Malloc(sizeof(char*) * att_len) # <<<<<<<<<<<<<<
+ * if not values:
+ * raise MemoryError()
*/
- __pyx_t_4 = ((__pyx_v_att_len == 1) != 0);
+ __pyx_v_values = ((char **)PyMem_Malloc(((sizeof(char *)) * __pyx_v_att_len)));
+
+ /* "netCDF4/_netCDF4.pyx":1131
+ * elif att_type == NC_STRING:
+ * values = <char**>PyMem_Malloc(sizeof(char*) * att_len)
+ * if not values: # <<<<<<<<<<<<<<
+ * raise MemoryError()
+ * try:
+ */
+ __pyx_t_4 = ((!(__pyx_v_values != 0)) != 0);
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":1130
+ /* "netCDF4/_netCDF4.pyx":1132
+ * values = <char**>PyMem_Malloc(sizeof(char*) * att_len)
+ * if not values:
+ * raise MemoryError() # <<<<<<<<<<<<<<
+ * try:
+ * with nogil:
+ */
+ PyErr_NoMemory(); __PYX_ERR(0, 1132, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":1131
* elif att_type == NC_STRING:
- * if att_len == 1:
+ * values = <char**>PyMem_Malloc(sizeof(char*) * att_len)
+ * if not values: # <<<<<<<<<<<<<<
+ * raise MemoryError()
+ * try:
+ */
+ }
+
+ /* "netCDF4/_netCDF4.pyx":1133
+ * if not values:
+ * raise MemoryError()
+ * try: # <<<<<<<<<<<<<<
+ * with nogil:
+ * ierr = nc_get_att_string(_grpid, varid, attname, values)
+ */
+ /*try:*/ {
+
+ /* "netCDF4/_netCDF4.pyx":1134
+ * raise MemoryError()
+ * try:
* with nogil: # <<<<<<<<<<<<<<
- * ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
- * pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
+ * ierr = nc_get_att_string(_grpid, varid, attname, values)
+ * if ierr != NC_NOERR:
*/
{
#ifdef WITH_THREAD
@@ -4523,142 +4866,352 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1131
- * if att_len == 1:
+ /* "netCDF4/_netCDF4.pyx":1135
+ * try:
* with nogil:
- * ierr = nc_get_att_string(_grpid, varid, attname, &stratt) # <<<<<<<<<<<<<<
- * pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
- * ierr = nc_free_string(1, &stratt) # free memory in netcdf C lib
+ * ierr = nc_get_att_string(_grpid, varid, attname, values) # <<<<<<<<<<<<<<
+ * if ierr != NC_NOERR:
+ * raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
*/
- __pyx_v_ierr = nc_get_att_string(__pyx_v__grpid, __pyx_v_varid, __pyx_v_attname, (&__pyx_v_stratt));
+ __pyx_v_ierr = nc_get_att_string(__pyx_v__grpid, __pyx_v_varid, __pyx_v_attname, __pyx_v_values);
}
- /* "netCDF4/_netCDF4.pyx":1130
- * elif att_type == NC_STRING:
- * if att_len == 1:
+ /* "netCDF4/_netCDF4.pyx":1134
+ * raise MemoryError()
+ * try:
* with nogil: # <<<<<<<<<<<<<<
- * ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
- * pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
+ * ierr = nc_get_att_string(_grpid, varid, attname, values)
+ * if ierr != NC_NOERR:
*/
/*finally:*/ {
/*normal exit:*/{
#ifdef WITH_THREAD
Py_BLOCK_THREADS
#endif
- goto __pyx_L17;
+ goto __pyx_L20;
}
- __pyx_L17:;
+ __pyx_L20:;
}
}
- /* "netCDF4/_netCDF4.pyx":1132
+ /* "netCDF4/_netCDF4.pyx":1136
* with nogil:
- * ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
- * pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','') # <<<<<<<<<<<<<<
- * ierr = nc_free_string(1, &stratt) # free memory in netcdf C lib
- * return pstring
+ * ierr = nc_get_att_string(_grpid, varid, attname, values)
+ * if ierr != NC_NOERR: # <<<<<<<<<<<<<<
+ * raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * try:
*/
- __pyx_t_9 = __Pyx_PyBytes_FromString(__pyx_v_stratt); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1132, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_decode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1132, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __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, 1132, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1132, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = NULL;
- __pyx_t_8 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_11))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
- if (likely(__pyx_t_1)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_11, function);
- __pyx_t_8 = 1;
+ __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
+ if (__pyx_t_4) {
+
+ /* "netCDF4/_netCDF4.pyx":1137
+ * ierr = nc_get_att_string(_grpid, varid, attname, values)
+ * if ierr != NC_NOERR:
+ * raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
+ * try:
+ * result = [values[j].decode(default_encoding,unicode_error).replace('\x00','')
+ */
+ __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, 1137, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1137, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1137, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __PYX_ERR(0, 1137, __pyx_L16_error)
+
+ /* "netCDF4/_netCDF4.pyx":1136
+ * with nogil:
+ * ierr = nc_get_att_string(_grpid, varid, attname, values)
+ * if ierr != NC_NOERR: # <<<<<<<<<<<<<<
+ * raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * try:
+ */
+ }
+
+ /* "netCDF4/_netCDF4.pyx":1138
+ * if ierr != NC_NOERR:
+ * raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * try: # <<<<<<<<<<<<<<
+ * result = [values[j].decode(default_encoding,unicode_error).replace('\x00','')
+ * for j in range(att_len)]
+ */
+ /*try:*/ {
+
+ /* "netCDF4/_netCDF4.pyx":1139
+ * raise AttributeError((<char *>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_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1139, __pyx_L23_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+ /* "netCDF4/_netCDF4.pyx":1140
+ * try:
+ * result = [values[j].decode(default_encoding,unicode_error).replace('\x00','')
+ * for j in range(att_len)] # <<<<<<<<<<<<<<
+ * finally:
+ * ierr = nc_free_string(att_len, values) # free memory in netcdf C lib
+ */
+ __pyx_t_11 = __pyx_v_att_len;
+ for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
+ __pyx_v_j = __pyx_t_12;
+
+ /* "netCDF4/_netCDF4.pyx":1139
+ * raise AttributeError((<char *>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, 1139, __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, 1139, __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, 1139, __pyx_L23_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L23_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = NULL;
+ __pyx_t_3 = 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_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_3 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_10, __pyx_t_1};
+ __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, 1139, __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;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_10, __pyx_t_1};
+ __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, 1139, __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;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_13 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1139, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_3, __pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_3, __pyx_t_1);
+ __pyx_t_10 = 0;
+ __pyx_t_1 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1139, __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, 1139, __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, 1139, __pyx_L23_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1139, __pyx_L23_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
+ __pyx_v_result = ((PyObject*)__pyx_t_6);
+ __pyx_t_6 = 0;
}
- __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- if (__pyx_t_1) {
- __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
+
+ /* "netCDF4/_netCDF4.pyx":1142
+ * for j in range(att_len)]
+ * finally:
+ * ierr = nc_free_string(att_len, values) # free memory in netcdf C lib # <<<<<<<<<<<<<<
+ * finally:
+ * PyMem_Free(values)
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ __pyx_v_ierr = nc_free_string(__pyx_v_att_len, __pyx_v_values);
+ goto __pyx_L24;
+ }
+ /*exception exit:*/{
+ __Pyx_PyThreadState_declare
+ __pyx_L23_error:;
+ __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
+ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
+ __Pyx_XGOTREF(__pyx_t_16);
+ __Pyx_XGOTREF(__pyx_t_17);
+ __Pyx_XGOTREF(__pyx_t_18);
+ __Pyx_XGOTREF(__pyx_t_19);
+ __Pyx_XGOTREF(__pyx_t_20);
+ __Pyx_XGOTREF(__pyx_t_21);
+ __pyx_t_3 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
+ {
+ __pyx_v_ierr = nc_free_string(__pyx_v_att_len, __pyx_v_values);
+ }
+ __Pyx_PyThreadState_assign
+ if (PY_MAJOR_VERSION >= 3) {
+ __Pyx_XGIVEREF(__pyx_t_19);
+ __Pyx_XGIVEREF(__pyx_t_20);
+ __Pyx_XGIVEREF(__pyx_t_21);
+ __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
+ }
+ __Pyx_XGIVEREF(__pyx_t_16);
+ __Pyx_XGIVEREF(__pyx_t_17);
+ __Pyx_XGIVEREF(__pyx_t_18);
+ __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+ __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
+ __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
+ goto __pyx_L16_error;
+ }
+ __pyx_L24:;
}
- __Pyx_GIVEREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_t_5);
- __pyx_t_9 = 0;
- __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_replace); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1132, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_v_pstring = __pyx_t_6;
- __pyx_t_6 = 0;
+ }
- /* "netCDF4/_netCDF4.pyx":1133
- * ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
- * pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
- * ierr = nc_free_string(1, &stratt) # free memory in netcdf C lib # <<<<<<<<<<<<<<
- * return pstring
+ /* "netCDF4/_netCDF4.pyx":1144
+ * ierr = nc_free_string(att_len, values) # free memory in netcdf C lib
+ * finally:
+ * PyMem_Free(values) # <<<<<<<<<<<<<<
+ *
+ * if len(result) == 1:
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+ PyMem_Free(__pyx_v_values);
+ goto __pyx_L17;
+ }
+ /*exception exit:*/{
+ __Pyx_PyThreadState_declare
+ __pyx_L16_error:;
+ __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
+ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
+ __Pyx_XGOTREF(__pyx_t_21);
+ __Pyx_XGOTREF(__pyx_t_20);
+ __Pyx_XGOTREF(__pyx_t_19);
+ __Pyx_XGOTREF(__pyx_t_18);
+ __Pyx_XGOTREF(__pyx_t_17);
+ __Pyx_XGOTREF(__pyx_t_16);
+ __pyx_t_14 = __pyx_lineno; __pyx_t_3 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
+ {
+ PyMem_Free(__pyx_v_values);
+ }
+ __Pyx_PyThreadState_assign
+ if (PY_MAJOR_VERSION >= 3) {
+ __Pyx_XGIVEREF(__pyx_t_18);
+ __Pyx_XGIVEREF(__pyx_t_17);
+ __Pyx_XGIVEREF(__pyx_t_16);
+ __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
+ }
+ __Pyx_XGIVEREF(__pyx_t_21);
+ __Pyx_XGIVEREF(__pyx_t_20);
+ __Pyx_XGIVEREF(__pyx_t_19);
+ __Pyx_ErrRestore(__pyx_t_21, __pyx_t_20, __pyx_t_19);
+ __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0;
+ __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_3; __pyx_filename = __pyx_t_22;
+ goto __pyx_L1_error;
+ }
+ __pyx_L17:;
+ }
+
+ /* "netCDF4/_netCDF4.pyx":1146
+ * PyMem_Free(values)
+ *
+ * if len(result) == 1: # <<<<<<<<<<<<<<
+ * return result[0]
* else:
*/
- __pyx_v_ierr = nc_free_string(1, (&__pyx_v_stratt));
+ __pyx_t_23 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_23 == -1)) __PYX_ERR(0, 1146, __pyx_L1_error)
+ __pyx_t_4 = ((__pyx_t_23 == 1) != 0);
+ if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":1134
- * pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
- * ierr = nc_free_string(1, &stratt) # free memory in netcdf C lib
- * return pstring # <<<<<<<<<<<<<<
+ /* "netCDF4/_netCDF4.pyx":1147
+ *
+ * if len(result) == 1:
+ * return result[0] # <<<<<<<<<<<<<<
* else:
- * raise KeyError('vlen string array attributes not supported')
+ * return result
*/
__Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_pstring);
- __pyx_r = __pyx_v_pstring;
+ __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1147, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":1129
- * return pstring
- * elif att_type == NC_STRING:
- * if att_len == 1: # <<<<<<<<<<<<<<
- * with nogil:
- * ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
+ /* "netCDF4/_netCDF4.pyx":1146
+ * PyMem_Free(values)
+ *
+ * if len(result) == 1: # <<<<<<<<<<<<<<
+ * return result[0]
+ * else:
*/
}
- /* "netCDF4/_netCDF4.pyx":1136
- * return pstring
+ /* "netCDF4/_netCDF4.pyx":1149
+ * return result[0]
* else:
- * raise KeyError('vlen string array attributes not supported') # <<<<<<<<<<<<<<
+ * return result # <<<<<<<<<<<<<<
* else:
* # a regular numeric or compound type.
*/
/*else*/ {
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1136, __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, 1136, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_result);
+ __pyx_r = __pyx_v_result;
+ goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":1128
+ /* "netCDF4/_netCDF4.pyx":1129
* value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
* return pstring
* elif att_type == NC_STRING: # <<<<<<<<<<<<<<
- * if att_len == 1:
- * with nogil:
+ * values = <char**>PyMem_Malloc(sizeof(char*) * att_len)
+ * if not values:
*/
break;
default:
- /* "netCDF4/_netCDF4.pyx":1139
+ /* "netCDF4/_netCDF4.pyx":1152
* else:
* # a regular numeric or compound type.
* if att_type == NC_LONG: # <<<<<<<<<<<<<<
@@ -4668,7 +5221,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":1140
+ /* "netCDF4/_netCDF4.pyx":1153
* # a regular numeric or compound type.
* if att_type == NC_LONG:
* att_type = NC_INT # <<<<<<<<<<<<<<
@@ -4677,7 +5230,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
*/
__pyx_v_att_type = NC_INT;
- /* "netCDF4/_netCDF4.pyx":1139
+ /* "netCDF4/_netCDF4.pyx":1152
* else:
* # a regular numeric or compound type.
* if att_type == NC_LONG: # <<<<<<<<<<<<<<
@@ -4686,7 +5239,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
*/
}
- /* "netCDF4/_netCDF4.pyx":1141
+ /* "netCDF4/_netCDF4.pyx":1154
* if att_type == NC_LONG:
* att_type = NC_INT
* try: # <<<<<<<<<<<<<<
@@ -4696,73 +5249,93 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
- __Pyx_XGOTREF(__pyx_t_12);
- __Pyx_XGOTREF(__pyx_t_13);
- __Pyx_XGOTREF(__pyx_t_14);
+ __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
+ __Pyx_XGOTREF(__pyx_t_16);
+ __Pyx_XGOTREF(__pyx_t_17);
+ __Pyx_XGOTREF(__pyx_t_18);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1142
+ /* "netCDF4/_netCDF4.pyx":1155
* 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_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1142, __pyx_L19_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1155, __pyx_L33_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_att_type, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1142, __pyx_L19_error)
- __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_att_type, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1155, __pyx_L33_error)
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_v_type_att = __pyx_t_11;
- __pyx_t_11 = 0;
+ __pyx_v_type_att = __pyx_t_8;
+ __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":1143
+ /* "netCDF4/_netCDF4.pyx":1156
* 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_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1143, __pyx_L19_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1156, __pyx_L33_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1143, __pyx_L19_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1156, __pyx_L33_error)
+ __Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1143, __pyx_L19_error)
+ __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1156, __pyx_L33_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_5 = NULL;
- __pyx_t_8 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
- if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
- __Pyx_INCREF(__pyx_t_5);
+ __pyx_t_13 = NULL;
+ __pyx_t_3 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_13);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
- __pyx_t_8 = 1;
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_3 = 1;
}
}
- __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1143, __pyx_L19_error)
- __Pyx_GOTREF(__pyx_t_9);
- if (__pyx_t_5) {
- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_6, __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, 1156, __pyx_L33_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __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_13, __pyx_t_6, __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, 1156, __pyx_L33_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L33_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__pyx_t_13) {
+ __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_13); __pyx_t_13 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_3, __pyx_t_6);
+ __Pyx_INCREF(__pyx_v_type_att);
+ __Pyx_GIVEREF(__pyx_v_type_att);
+ PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_3, __pyx_v_type_att);
+ __pyx_t_6 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1156, __pyx_L33_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
- __Pyx_INCREF(__pyx_v_type_att);
- __Pyx_GIVEREF(__pyx_v_type_att);
- PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_type_att);
- __pyx_t_6 = 0;
- __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1143, __pyx_L19_error)
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 1143, __pyx_L19_error)
- __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_11);
- __pyx_t_11 = 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, 1156, __pyx_L33_error)
+ __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_8);
+ __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":1141
+ /* "netCDF4/_netCDF4.pyx":1154
* if att_type == NC_LONG:
* att_type = NC_INT
* try: # <<<<<<<<<<<<<<
@@ -4770,20 +5343,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
* value_arr = numpy.empty(att_len,type_att)
*/
}
- __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
- goto __pyx_L26_try_end;
- __pyx_L19_error:;
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ goto __pyx_L40_try_end;
+ __pyx_L33_error:;
__Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":1144
+ /* "netCDF4/_netCDF4.pyx":1157
* type_att = _nctonptype[att_type] # see if it is a primitive type
* value_arr = numpy.empty(att_len,type_att)
* except KeyError: # <<<<<<<<<<<<<<
@@ -4793,12 +5367,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_11, &__pyx_t_7, &__pyx_t_9) < 0) __PYX_ERR(0, 1144, __pyx_L21_except_error)
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_GOTREF(__pyx_t_9);
+ if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 1157, __pyx_L35_except_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_1);
- /* "netCDF4/_netCDF4.pyx":1146
+ /* "netCDF4/_netCDF4.pyx":1159
* except KeyError:
* # check if it's a compound
* try: # <<<<<<<<<<<<<<
@@ -4808,70 +5382,90 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
- __Pyx_XGOTREF(__pyx_t_15);
- __Pyx_XGOTREF(__pyx_t_16);
- __Pyx_XGOTREF(__pyx_t_17);
+ __Pyx_ExceptionSave(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
+ __Pyx_XGOTREF(__pyx_t_19);
+ __Pyx_XGOTREF(__pyx_t_20);
+ __Pyx_XGOTREF(__pyx_t_21);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1147
+ /* "netCDF4/_netCDF4.pyx":1160
* # 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_6 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_grp, __pyx_v_att_type, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1147, __pyx_L29_error)
+ __pyx_t_6 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_grp, __pyx_v_att_type, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1160, __pyx_L43_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_XDECREF_SET(__pyx_v_type_att, __pyx_t_6);
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":1148
+ /* "netCDF4/_netCDF4.pyx":1161
* 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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1148, __pyx_L29_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L29_error)
- __Pyx_GOTREF(__pyx_t_1);
- __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, 1148, __pyx_L29_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_18 = NULL;
- __pyx_t_8 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
- __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_1);
- if (likely(__pyx_t_18)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
- __Pyx_INCREF(__pyx_t_18);
+ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1161, __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, 1161, __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, 1161, __pyx_L43_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __pyx_t_7 = NULL;
+ __pyx_t_3 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_7);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_1, function);
- __pyx_t_8 = 1;
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ __pyx_t_3 = 1;
}
}
- __pyx_t_19 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1148, __pyx_L29_error)
- __Pyx_GOTREF(__pyx_t_19);
- if (__pyx_t_18) {
- __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_18); __pyx_t_18 = NULL;
+ #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_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1161, __pyx_L43_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ } else
+ #endif
+ #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_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1161, __pyx_L43_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __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, 1161, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_24, 0+__pyx_t_3, __pyx_t_13);
+ __Pyx_INCREF(__pyx_v_type_att);
+ __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_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_24, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1161, __pyx_L43_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
}
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_8, __pyx_t_5);
- __Pyx_INCREF(__pyx_v_type_att);
- __Pyx_GIVEREF(__pyx_v_type_att);
- PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_8, __pyx_v_type_att);
- __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_19, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1148, __pyx_L29_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 1148, __pyx_L29_error)
+ __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, 1161, __pyx_L43_error)
__Pyx_XDECREF_SET(__pyx_v_value_arr, ((PyArrayObject *)__pyx_t_6));
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":1146
+ /* "netCDF4/_netCDF4.pyx":1159
* except KeyError:
* # check if it's a compound
* try: # <<<<<<<<<<<<<<
@@ -4879,19 +5473,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
* value_arr = numpy.empty(att_len,type_att)
*/
}
- __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
- goto __pyx_L36_try_end;
- __pyx_L29_error:;
- __Pyx_PyThreadState_assign
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
+ goto __pyx_L50_try_end;
+ __pyx_L43_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":1149
+ /* "netCDF4/_netCDF4.pyx":1162
* type_att = _read_compound(grp, att_type)
* value_arr = numpy.empty(att_len,type_att)
* except: # <<<<<<<<<<<<<<
@@ -4900,12 +5494,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_6, &__pyx_t_1, &__pyx_t_19) < 0) __PYX_ERR(0, 1149, __pyx_L31_except_error)
+ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_24) < 0) __PYX_ERR(0, 1162, __pyx_L45_except_error)
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_t_19);
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GOTREF(__pyx_t_24);
- /* "netCDF4/_netCDF4.pyx":1151
+ /* "netCDF4/_netCDF4.pyx":1164
* except:
* # check if it's an enum
* try: # <<<<<<<<<<<<<<
@@ -4915,72 +5509,94 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
- __Pyx_XGOTREF(__pyx_t_20);
- __Pyx_XGOTREF(__pyx_t_21);
- __Pyx_XGOTREF(__pyx_t_22);
+ __Pyx_ExceptionSave(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27);
+ __Pyx_XGOTREF(__pyx_t_25);
+ __Pyx_XGOTREF(__pyx_t_26);
+ __Pyx_XGOTREF(__pyx_t_27);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1152
+ /* "netCDF4/_netCDF4.pyx":1165
* # 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_5 = __pyx_f_7netCDF4_8_netCDF4__read_enum(__pyx_v_grp, __pyx_v_att_type, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1152, __pyx_L39_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_XDECREF_SET(__pyx_v_type_att, __pyx_t_5);
- __pyx_t_5 = 0;
+ __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, 1165, __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":1153
+ /* "netCDF4/_netCDF4.pyx":1166
* 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_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1153, __pyx_L39_error)
- __Pyx_GOTREF(__pyx_t_18);
- __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_empty); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1153, __pyx_L39_error)
- __Pyx_GOTREF(__pyx_t_23);
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_18 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1153, __pyx_L39_error)
- __Pyx_GOTREF(__pyx_t_18);
- __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_v_type_att, __pyx_n_s_dtype); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1153, __pyx_L39_error)
- __Pyx_GOTREF(__pyx_t_24);
- __pyx_t_25 = NULL;
- __pyx_t_8 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_23))) {
- __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_23);
- if (likely(__pyx_t_25)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_23);
- __Pyx_INCREF(__pyx_t_25);
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1166, __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, 1166, __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, 1166, __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, 1166, __pyx_L53_error)
+ __Pyx_GOTREF(__pyx_t_29);
+ __pyx_t_30 = NULL;
+ __pyx_t_3 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_28))) {
+ __pyx_t_30 = PyMethod_GET_SELF(__pyx_t_28);
+ if (likely(__pyx_t_30)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_28);
+ __Pyx_INCREF(__pyx_t_30);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_23, function);
- __pyx_t_8 = 1;
+ __Pyx_DECREF_SET(__pyx_t_28, function);
+ __pyx_t_3 = 1;
}
}
- __pyx_t_26 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1153, __pyx_L39_error)
- __Pyx_GOTREF(__pyx_t_26);
- if (__pyx_t_25) {
- __Pyx_GIVEREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_25); __pyx_t_25 = NULL;
+ #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, 1166, __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;
+ __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
+ } else
+ #endif
+ #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, 1166, __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;
+ __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_31 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 1166, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_31, 0+__pyx_t_3, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_29);
+ 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, 1166, __pyx_L53_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0;
}
- __Pyx_GIVEREF(__pyx_t_18);
- PyTuple_SET_ITEM(__pyx_t_26, 0+__pyx_t_8, __pyx_t_18);
- __Pyx_GIVEREF(__pyx_t_24);
- PyTuple_SET_ITEM(__pyx_t_26, 1+__pyx_t_8, __pyx_t_24);
- __pyx_t_18 = 0;
- __pyx_t_24 = 0;
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_23, __pyx_t_26, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1153, __pyx_L39_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
- __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
- if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 1153, __pyx_L39_error)
- __Pyx_XDECREF_SET(__pyx_v_value_arr, ((PyArrayObject *)__pyx_t_5));
- __pyx_t_5 = 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, 1166, __pyx_L53_error)
+ __Pyx_XDECREF_SET(__pyx_v_value_arr, ((PyArrayObject *)__pyx_t_13));
+ __pyx_t_13 = 0;
- /* "netCDF4/_netCDF4.pyx":1151
+ /* "netCDF4/_netCDF4.pyx":1164
* except:
* # check if it's an enum
* try: # <<<<<<<<<<<<<<
@@ -4988,20 +5604,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
* value_arr = numpy.empty(att_len,type_att.dtype)
*/
}
- __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
- __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
- __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
- goto __pyx_L46_try_end;
- __pyx_L39_error:;
- __Pyx_PyThreadState_assign
__Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
__Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0;
- __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-
- /* "netCDF4/_netCDF4.pyx":1154
+ __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
+ goto __pyx_L60_try_end;
+ __pyx_L53_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_30); __pyx_t_30 = 0;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
+ __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0;
+ __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":1167
* type_att = _read_enum(grp, att_type)
* value_arr = numpy.empty(att_len,type_att.dtype)
* except: # <<<<<<<<<<<<<<
@@ -5010,38 +5626,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_5, &__pyx_t_23, &__pyx_t_26) < 0) __PYX_ERR(0, 1154, __pyx_L41_except_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GOTREF(__pyx_t_23);
- __Pyx_GOTREF(__pyx_t_26);
+ if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_28, &__pyx_t_31) < 0) __PYX_ERR(0, 1167, __pyx_L55_except_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_GOTREF(__pyx_t_28);
+ __Pyx_GOTREF(__pyx_t_31);
- /* "netCDF4/_netCDF4.pyx":1155
+ /* "netCDF4/_netCDF4.pyx":1168
* 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_24 = __Pyx_PyBytes_FromString(__pyx_v_attname); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1155, __pyx_L41_except_error)
- __Pyx_GOTREF(__pyx_t_24);
- __pyx_t_18 = __Pyx_PyString_Format(__pyx_kp_s_attribute_s_has_unsupported_data, __pyx_t_24); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1155, __pyx_L41_except_error)
- __Pyx_GOTREF(__pyx_t_18);
- __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
- __pyx_t_24 = PyTuple_New(1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1155, __pyx_L41_except_error)
- __Pyx_GOTREF(__pyx_t_24);
- __Pyx_GIVEREF(__pyx_t_18);
- PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_18);
- __pyx_t_18 = 0;
- __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_24, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1155, __pyx_L41_except_error)
- __Pyx_GOTREF(__pyx_t_18);
- __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
- __Pyx_Raise(__pyx_t_18, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __PYX_ERR(0, 1155, __pyx_L41_except_error)
+ __pyx_t_29 = __Pyx_PyBytes_FromString(__pyx_v_attname); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 1168, __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, 1168, __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, 1168, __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, 1168, __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, 1168, __pyx_L55_except_error)
}
- __pyx_L41_except_error:;
+ __pyx_L55_except_error:;
- /* "netCDF4/_netCDF4.pyx":1151
+ /* "netCDF4/_netCDF4.pyx":1164
* except:
* # check if it's an enum
* try: # <<<<<<<<<<<<<<
@@ -5049,21 +5665,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
* value_arr = numpy.empty(att_len,type_att.dtype)
*/
__Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_20);
- __Pyx_XGIVEREF(__pyx_t_21);
- __Pyx_XGIVEREF(__pyx_t_22);
- __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
- goto __pyx_L31_except_error;
- __pyx_L46_try_end:;
+ __Pyx_XGIVEREF(__pyx_t_25);
+ __Pyx_XGIVEREF(__pyx_t_26);
+ __Pyx_XGIVEREF(__pyx_t_27);
+ __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_26, __pyx_t_27);
+ goto __pyx_L45_except_error;
+ __pyx_L60_try_end:;
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- goto __pyx_L30_exception_handled;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
+ goto __pyx_L44_exception_handled;
}
- __pyx_L31_except_error:;
+ __pyx_L45_except_error:;
- /* "netCDF4/_netCDF4.pyx":1146
+ /* "netCDF4/_netCDF4.pyx":1159
* except KeyError:
* # check if it's a compound
* try: # <<<<<<<<<<<<<<
@@ -5071,28 +5687,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
* value_arr = numpy.empty(att_len,type_att)
*/
__Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_15);
- __Pyx_XGIVEREF(__pyx_t_16);
- __Pyx_XGIVEREF(__pyx_t_17);
- __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
- goto __pyx_L21_except_error;
- __pyx_L30_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_19);
+ __Pyx_XGIVEREF(__pyx_t_20);
+ __Pyx_XGIVEREF(__pyx_t_21);
+ __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
+ goto __pyx_L35_except_error;
+ __pyx_L44_exception_handled:;
__Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_15);
- __Pyx_XGIVEREF(__pyx_t_16);
- __Pyx_XGIVEREF(__pyx_t_17);
- __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
- __pyx_L36_try_end:;
+ __Pyx_XGIVEREF(__pyx_t_19);
+ __Pyx_XGIVEREF(__pyx_t_20);
+ __Pyx_XGIVEREF(__pyx_t_21);
+ __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
+ __pyx_L50_try_end:;
}
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- goto __pyx_L20_exception_handled;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L34_exception_handled;
}
- goto __pyx_L21_except_error;
- __pyx_L21_except_error:;
+ goto __pyx_L35_except_error;
+ __pyx_L35_except_error:;
- /* "netCDF4/_netCDF4.pyx":1141
+ /* "netCDF4/_netCDF4.pyx":1154
* if att_type == NC_LONG:
* att_type = NC_INT
* try: # <<<<<<<<<<<<<<
@@ -5100,21 +5716,21 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
* value_arr = numpy.empty(att_len,type_att)
*/
__Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_12);
- __Pyx_XGIVEREF(__pyx_t_13);
- __Pyx_XGIVEREF(__pyx_t_14);
- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_16);
+ __Pyx_XGIVEREF(__pyx_t_17);
+ __Pyx_XGIVEREF(__pyx_t_18);
+ __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
goto __pyx_L1_error;
- __pyx_L20_exception_handled:;
+ __pyx_L34_exception_handled:;
__Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_12);
- __Pyx_XGIVEREF(__pyx_t_13);
- __Pyx_XGIVEREF(__pyx_t_14);
- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
- __pyx_L26_try_end:;
+ __Pyx_XGIVEREF(__pyx_t_16);
+ __Pyx_XGIVEREF(__pyx_t_17);
+ __Pyx_XGIVEREF(__pyx_t_18);
+ __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+ __pyx_L40_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":1156
+ /* "netCDF4/_netCDF4.pyx":1169
* except:
* raise KeyError('attribute %s has unsupported datatype' % attname)
* with nogil: # <<<<<<<<<<<<<<
@@ -5128,7 +5744,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1157
+ /* "netCDF4/_netCDF4.pyx":1170
* raise KeyError('attribute %s has unsupported datatype' % attname)
* with nogil:
* ierr = nc_get_att(_grpid, varid, attname, value_arr.data) # <<<<<<<<<<<<<<
@@ -5138,7 +5754,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":1156
+ /* "netCDF4/_netCDF4.pyx":1169
* except:
* raise KeyError('attribute %s has unsupported datatype' % attname)
* with nogil: # <<<<<<<<<<<<<<
@@ -5150,13 +5766,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
#ifdef WITH_THREAD
Py_BLOCK_THREADS
#endif
- goto __pyx_L51;
+ goto __pyx_L65;
}
- __pyx_L51:;
+ __pyx_L65:;
}
}
- /* "netCDF4/_netCDF4.pyx":1158
+ /* "netCDF4/_netCDF4.pyx":1171
* with nogil:
* ierr = nc_get_att(_grpid, varid, attname, value_arr.data)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -5166,7 +5782,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":1159
+ /* "netCDF4/_netCDF4.pyx":1172
* ierr = nc_get_att(_grpid, varid, attname, value_arr.data)
* if ierr != NC_NOERR:
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -5174,22 +5790,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_9 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_INCREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_Raise(__pyx_t_9, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __PYX_ERR(0, 1159, __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, 1172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1172, __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, 1172, __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, 1172, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1158
+ /* "netCDF4/_netCDF4.pyx":1171
* with nogil:
* ierr = nc_get_att(_grpid, varid, attname, value_arr.data)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -5198,22 +5814,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
*/
}
- /* "netCDF4/_netCDF4.pyx":1160
+ /* "netCDF4/_netCDF4.pyx":1173
* if ierr != NC_NOERR:
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if value_arr.shape == (): # <<<<<<<<<<<<<<
* # return a scalar for a scalar array
* return value_arr.item()
*/
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1160, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_7 = PyObject_RichCompare(__pyx_t_9, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1160, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1160, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1173, __pyx_L1_error)
+ __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, 1173, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":1162
+ /* "netCDF4/_netCDF4.pyx":1175
* if value_arr.shape == ():
* # return a scalar for a scalar array
* return value_arr.item() # <<<<<<<<<<<<<<
@@ -5221,31 +5837,31 @@ 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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_item); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1162, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_11 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
- __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
- if (likely(__pyx_t_11)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
- __Pyx_INCREF(__pyx_t_11);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_item); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_9, function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
}
}
- if (__pyx_t_11) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1162, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ if (__pyx_t_8) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1175, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
} else {
- __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1162, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1175, __pyx_L1_error)
}
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_r = __pyx_t_7;
- __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":1160
+ /* "netCDF4/_netCDF4.pyx":1173
* if ierr != NC_NOERR:
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if value_arr.shape == (): # <<<<<<<<<<<<<<
@@ -5254,7 +5870,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
*/
}
- /* "netCDF4/_netCDF4.pyx":1163
+ /* "netCDF4/_netCDF4.pyx":1176
* # return a scalar for a scalar array
* return value_arr.item()
* elif att_len == 1: # <<<<<<<<<<<<<<
@@ -5264,7 +5880,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":1165
+ /* "netCDF4/_netCDF4.pyx":1178
* elif att_len == 1:
* # return a scalar for a single element array
* return value_arr[0] # <<<<<<<<<<<<<<
@@ -5272,13 +5888,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
* return value_arr
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_value_arr), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1165, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_r = __pyx_t_7;
- __pyx_t_7 = 0;
+ __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, 1178, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":1163
+ /* "netCDF4/_netCDF4.pyx":1176
* # return a scalar for a scalar array
* return value_arr.item()
* elif att_len == 1: # <<<<<<<<<<<<<<
@@ -5287,7 +5903,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
*/
}
- /* "netCDF4/_netCDF4.pyx":1167
+ /* "netCDF4/_netCDF4.pyx":1180
* return value_arr[0]
* else:
* return value_arr # <<<<<<<<<<<<<<
@@ -5303,7 +5919,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
break;
}
- /* "netCDF4/_netCDF4.pyx":1098
+ /* "netCDF4/_netCDF4.pyx":1100
* return attslist
*
* cdef _get_att(grp, int varid, name): # <<<<<<<<<<<<<<
@@ -5317,27 +5933,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
- __Pyx_XDECREF(__pyx_t_9);
- __Pyx_XDECREF(__pyx_t_11);
- __Pyx_XDECREF(__pyx_t_18);
- __Pyx_XDECREF(__pyx_t_19);
- __Pyx_XDECREF(__pyx_t_23);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_13);
__Pyx_XDECREF(__pyx_t_24);
- __Pyx_XDECREF(__pyx_t_25);
- __Pyx_XDECREF(__pyx_t_26);
+ __Pyx_XDECREF(__pyx_t_28);
+ __Pyx_XDECREF(__pyx_t_29);
+ __Pyx_XDECREF(__pyx_t_30);
+ __Pyx_XDECREF(__pyx_t_31);
__Pyx_AddTraceback("netCDF4._netCDF4._get_att", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_value_arr);
__Pyx_XDECREF(__pyx_v_bytestr);
__Pyx_XDECREF(__pyx_v_pstring);
+ __Pyx_XDECREF(__pyx_v_result);
__Pyx_XDECREF(__pyx_v_type_att);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1169
+/* "netCDF4/_netCDF4.pyx":1182
* return value_arr
*
* def _set_default_format(object format='NETCDF4'): # <<<<<<<<<<<<<<
@@ -5374,7 +5991,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, 1169, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_set_default_format") < 0)) __PYX_ERR(0, 1182, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -5387,7 +6004,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, 1169, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_set_default_format", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1182, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4._set_default_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -5410,34 +6027,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":1171
+ /* "netCDF4/_netCDF4.pyx":1184
* 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, 1171, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_format_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __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, 1171, __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, 1184, __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":1172
+ /* "netCDF4/_netCDF4.pyx":1185
* # 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__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __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, 1172, __pyx_L1_error)
+ __PYX_ERR(0, 1185, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1171
+ /* "netCDF4/_netCDF4.pyx":1184
* def _set_default_format(object format='NETCDF4'):
* # Private function to set the netCDF file format
* if format not in _format_dict: # <<<<<<<<<<<<<<
@@ -5446,23 +6063,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_4_set_default_format(CYTHON_UNUSED
*/
}
- /* "netCDF4/_netCDF4.pyx":1173
+ /* "netCDF4/_netCDF4.pyx":1186
* 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, 1173, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_format_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __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, 1173, __pyx_L1_error)
+ __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1186, __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, 1173, __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, 1186, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
nc_set_default_format(__pyx_t_5, NULL);
- /* "netCDF4/_netCDF4.pyx":1169
+ /* "netCDF4/_netCDF4.pyx":1182
* return value_arr
*
* def _set_default_format(object format='NETCDF4'): # <<<<<<<<<<<<<<
@@ -5484,7 +6101,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_4_set_default_format(CYTHON_UNUSED
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1175
+/* "netCDF4/_netCDF4.pyx":1188
* nc_set_default_format(_format_dict[format], NULL)
*
* cdef _get_format(int grpid): # <<<<<<<<<<<<<<
@@ -5504,7 +6121,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":1178
+ /* "netCDF4/_netCDF4.pyx":1191
* # Private function to get the netCDF file format
* cdef int ierr, formatp
* with nogil: # <<<<<<<<<<<<<<
@@ -5518,7 +6135,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1179
+ /* "netCDF4/_netCDF4.pyx":1192
* cdef int ierr, formatp
* with nogil:
* ierr = nc_inq_format(grpid, &formatp) # <<<<<<<<<<<<<<
@@ -5528,7 +6145,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":1178
+ /* "netCDF4/_netCDF4.pyx":1191
* # Private function to get the netCDF file format
* cdef int ierr, formatp
* with nogil: # <<<<<<<<<<<<<<
@@ -5546,7 +6163,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) {
}
}
- /* "netCDF4/_netCDF4.pyx":1180
+ /* "netCDF4/_netCDF4.pyx":1193
* with nogil:
* ierr = nc_inq_format(grpid, &formatp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -5556,7 +6173,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":1181
+ /* "netCDF4/_netCDF4.pyx":1194
* ierr = nc_inq_format(grpid, &formatp)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -5564,22 +6181,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, 1181, __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, 1194, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1181, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1194, __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, 1181, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1194, __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, 1181, __pyx_L1_error)
+ __PYX_ERR(0, 1194, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1180
+ /* "netCDF4/_netCDF4.pyx":1193
* with nogil:
* ierr = nc_inq_format(grpid, &formatp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -5588,37 +6205,37 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1182
+ /* "netCDF4/_netCDF4.pyx":1195
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 1182, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_formatp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __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, 1182, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_reverse_format_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1195, __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, 1182, __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, 1195, __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":1183
+ /* "netCDF4/_netCDF4.pyx":1196
* raise RuntimeError((<char *>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__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1196, __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, 1183, __pyx_L1_error)
+ __PYX_ERR(0, 1196, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1182
+ /* "netCDF4/_netCDF4.pyx":1195
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if formatp not in _reverse_format_dict: # <<<<<<<<<<<<<<
@@ -5627,7 +6244,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1184
+ /* "netCDF4/_netCDF4.pyx":1197
* if formatp not in _reverse_format_dict:
* raise ValueError('format not supported by python interface')
* return _reverse_format_dict[formatp] # <<<<<<<<<<<<<<
@@ -5635,16 +6252,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, 1184, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_reverse_format_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __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, 1184, __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, 1197, __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":1175
+ /* "netCDF4/_netCDF4.pyx":1188
* nc_set_default_format(_format_dict[format], NULL)
*
* cdef _get_format(int grpid): # <<<<<<<<<<<<<<
@@ -5664,7 +6281,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int __pyx_v_grpid) {
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1186
+/* "netCDF4/_netCDF4.pyx":1199
* return _reverse_format_dict[formatp]
*
* cdef _get_full_format(int grpid): # <<<<<<<<<<<<<<
@@ -5677,19 +6294,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_full_format(CYTHON_UNUSED int _
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_get_full_format", 0);
- /* "netCDF4/_netCDF4.pyx":1209
+ /* "netCDF4/_netCDF4.pyx":1222
* return 'UNDEFINED'
* ELSE:
* return 'UNDEFINED' # <<<<<<<<<<<<<<
*
- * cdef _set_att(grp, int varid, name, value,\
+ * cdef issue485_workaround(int grpid, int varid, char* attname):
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_n_s_UNDEFINED);
__pyx_r = __pyx_n_s_UNDEFINED;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":1186
+ /* "netCDF4/_netCDF4.pyx":1199
* return _reverse_format_dict[formatp]
*
* cdef _get_full_format(int grpid): # <<<<<<<<<<<<<<
@@ -5704,9 +6321,173 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_full_format(CYTHON_UNUSED int _
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1211
+/* "netCDF4/_netCDF4.pyx":1224
+ * return 'UNDEFINED'
+ *
+ * cdef issue485_workaround(int grpid, int varid, char* attname): # <<<<<<<<<<<<<<
+ * # check to see if attribute already exists
+ * # and is NC_CHAR, if so delete it and re-create it
+ */
+
+static PyObject *__pyx_f_7netCDF4_8_netCDF4_issue485_workaround(int __pyx_v_grpid, int __pyx_v_varid, char *__pyx_v_attname) {
+ nc_type __pyx_v_att_type;
+ size_t __pyx_v_att_len;
+ int __pyx_v_ierr;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ char *__pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("issue485_workaround", 0);
+
+ /* "netCDF4/_netCDF4.pyx":1233
+ * 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, 1233, __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, 1233, __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":1234
+ *
+ * if not _needsworkaround_issue485:
+ * return # <<<<<<<<<<<<<<
+ * ierr = nc_inq_att(grpid, varid, attname, &att_type, &att_len)
+ * if ierr == NC_NOERR and att_type == NC_CHAR:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+ /* "netCDF4/_netCDF4.pyx":1233
+ * cdef size_t att_len
+ *
+ * if not _needsworkaround_issue485: # <<<<<<<<<<<<<<
+ * return
+ * ierr = nc_inq_att(grpid, varid, attname, &att_type, &att_len)
+ */
+ }
+
+ /* "netCDF4/_netCDF4.pyx":1235
+ * if not _needsworkaround_issue485:
+ * return
+ * 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)
+ */
+ __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":1236
+ * return
+ * 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)
+ * if ierr != NC_NOERR:
+ */
+ __pyx_t_2 = ((__pyx_v_ierr == NC_NOERR) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_3 = __pyx_t_2;
+ goto __pyx_L5_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_att_type == NC_CHAR) != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L5_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "netCDF4/_netCDF4.pyx":1237
+ * 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) # <<<<<<<<<<<<<<
+ * if ierr != NC_NOERR:
+ * raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+ __pyx_v_ierr = nc_del_att(__pyx_v_grpid, __pyx_v_varid, __pyx_v_attname);
+
+ /* "netCDF4/_netCDF4.pyx":1238
+ * if ierr == NC_NOERR and att_type == NC_CHAR:
+ * ierr = nc_del_att(grpid, varid, attname)
+ * if ierr != NC_NOERR: # <<<<<<<<<<<<<<
+ * raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+ if (__pyx_t_3) {
+
+ /* "netCDF4/_netCDF4.pyx":1239
+ * ierr = nc_del_att(grpid, varid, attname)
+ * if ierr != NC_NOERR:
+ * raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
+ *
+ * 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, 1239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1239, __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, 1239, __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, 1239, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":1238
+ * if ierr == NC_NOERR and att_type == NC_CHAR:
+ * ierr = nc_del_att(grpid, varid, attname)
+ * if ierr != NC_NOERR: # <<<<<<<<<<<<<<
+ * raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *
+ */
+ }
+
+ /* "netCDF4/_netCDF4.pyx":1236
+ * return
+ * 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)
+ * if ierr != NC_NOERR:
+ */
+ }
+
+ /* "netCDF4/_netCDF4.pyx":1224
* return 'UNDEFINED'
*
+ * cdef issue485_workaround(int grpid, int varid, char* attname): # <<<<<<<<<<<<<<
+ * # check to see if attribute already exists
+ * # and is NC_CHAR, if so delete it and re-create it
+ */
+
+ /* 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_5);
+ __Pyx_AddTraceback("netCDF4._netCDF4.issue485_workaround", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":1241
+ * raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *
* cdef _set_att(grp, int varid, name, value,\ # <<<<<<<<<<<<<<
* nc_type xtype=-99, force_ncstring=False):
* # Private function to set an attribute name/value pair
@@ -5715,27 +6496,30 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_full_format(CYTHON_UNUSED int _
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":1212
+ /* "netCDF4/_netCDF4.pyx":1242
*
* cdef _set_att(grp, int varid, name, value,\
* nc_type xtype=-99, force_ncstring=False): # <<<<<<<<<<<<<<
* # Private function to set an attribute name/value pair
- * cdef int i, ierr, lenarr, n
+ * cdef int ierr, lenarr
*/
PyObject *__pyx_v_force_ncstring = ((PyObject *)Py_False);
int __pyx_v_ierr;
int __pyx_v_lenarr;
- size_t __pyx_v_att_len;
- nc_type __pyx_v_att_type;
char *__pyx_v_attname;
char *__pyx_v_datstring;
+ char **__pyx_v_string_ptrs;
PyArrayObject *__pyx_v_value_arr = 0;
PyObject *__pyx_v_bytestr = NULL;
PyObject *__pyx_v_fmt = NULL;
PyObject *__pyx_v_is_netcdf3 = NULL;
+ PyObject *__pyx_v_N = NULL;
+ PyObject *__pyx_v_strings = NULL;
+ PyObject *__pyx_v_j = NULL;
PyObject *__pyx_v_dats = NULL;
PyObject *__pyx_v_value_arr1 = NULL;
CYTHON_UNUSED PyObject *__pyx_v_dats_ascii = NULL;
+ PyObject *__pyx_v_s = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
@@ -5747,11 +6531,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int
int __pyx_t_7;
int __pyx_t_8;
int __pyx_t_9;
- Py_ssize_t __pyx_t_10;
- PyObject *__pyx_t_11 = NULL;
- PyObject *__pyx_t_12 = NULL;
- PyObject *__pyx_t_13 = NULL;
- nc_type __pyx_t_14;
+ size_t __pyx_t_10;
+ Py_ssize_t __pyx_t_11;
+ PyObject *(*__pyx_t_12)(PyObject *);
+ Py_ssize_t __pyx_t_13;
+ int __pyx_t_14;
+ char const *__pyx_t_15;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ PyObject *__pyx_t_19 = NULL;
+ PyObject *__pyx_t_20 = NULL;
+ PyObject *__pyx_t_21 = NULL;
+ nc_type __pyx_t_22;
__Pyx_RefNannySetupContext("_set_att", 0);
if (__pyx_optional_args) {
if (__pyx_optional_args->__pyx_n > 0) {
@@ -5762,42 +6554,42 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int
}
}
- /* "netCDF4/_netCDF4.pyx":1220
- * cdef char *datstring
+ /* "netCDF4/_netCDF4.pyx":1249
+ * 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, 1220, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1249, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_bytestr = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1221
+ /* "netCDF4/_netCDF4.pyx":1250
* 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, 1221, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L1_error)
__pyx_v_attname = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":1223
+ /* "netCDF4/_netCDF4.pyx":1252
* 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, 1223, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1252, __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, 1223, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1252, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -5807,53 +6599,71 @@ 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, 1223, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1223, __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, 1223, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ #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, 1252, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 1252, __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, 1252, __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, 1252, __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, 1223, __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, 1252, __pyx_L1_error)
__pyx_v_value_arr = ((PyArrayObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1226
+ /* "netCDF4/_netCDF4.pyx":1255
* # 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, 1226, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __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, 1226, __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, 1255, __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, 1226, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_format(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_fmt = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1227
+ /* "netCDF4/_netCDF4.pyx":1256
* # 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, 1227, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fmt, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1256, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1227, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1256, __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, 1227, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1256, __pyx_L1_error)
if (!__pyx_t_7) {
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else {
@@ -5862,7 +6672,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, 1227, __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, 1256, __pyx_L1_error)
__Pyx_INCREF(__pyx_t_5);
__pyx_t_1 = __pyx_t_5;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
@@ -5870,31 +6680,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":1228
+ /* "netCDF4/_netCDF4.pyx":1257
* 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, 1228, __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, 1257, __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, 1228, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1257, __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__9, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1228, __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, 1257, __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, 1228, __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, 1257, __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, 1228, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __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, 1228, __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, 1257, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_9 = (__pyx_t_8 != 0);
if (!__pyx_t_9) {
@@ -5903,18 +6713,18 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int
goto __pyx_L6_bool_binop_done;
}
- /* "netCDF4/_netCDF4.pyx":1229
+ /* "netCDF4/_netCDF4.pyx":1258
* 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, 1229, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_is_netcdf3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1258, __pyx_L1_error)
__pyx_t_7 = __pyx_t_9;
__pyx_L6_bool_binop_done:;
- /* "netCDF4/_netCDF4.pyx":1228
+ /* "netCDF4/_netCDF4.pyx":1257
* 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\ # <<<<<<<<<<<<<<
@@ -5923,23 +6733,23 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int
*/
if (__pyx_t_7) {
- /* "netCDF4/_netCDF4.pyx":1230
+ /* "netCDF4/_netCDF4.pyx":1259
* 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, 1230, __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, 1259, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1230, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1259, __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, 1230, __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, 1259, __pyx_L1_error)
__Pyx_DECREF_SET(__pyx_v_value_arr, ((PyArrayObject *)__pyx_t_5));
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":1228
+ /* "netCDF4/_netCDF4.pyx":1257
* 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\ # <<<<<<<<<<<<<<
@@ -5948,588 +6758,872 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int
*/
}
- /* "netCDF4/_netCDF4.pyx":1234
+ /* "netCDF4/_netCDF4.pyx":1263
* # if array contains unicode strings, and data model is NETCDF4,
- * # write as a string. string arrays are concatenated into a single string.
+ * # write as a string.
* if value_arr.dtype.char in ['S','U']: # <<<<<<<<<<<<<<
- * if not value_arr.shape:
- * dats = _strencode(value_arr.item())
+ * 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, 1234, __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, 1263, __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, 1234, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_char); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1263, __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, 1234, __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, 1263, __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, 1234, __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, 1263, __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":1235
- * # write as a string. string arrays are concatenated into a single string.
+ /* "netCDF4/_netCDF4.pyx":1264
+ * # write as a string.
* if value_arr.dtype.char in ['S','U']:
- * if not value_arr.shape: # <<<<<<<<<<<<<<
- * dats = _strencode(value_arr.item())
- * else:
+ * if not is_netcdf3 and force_ncstring and value_arr.size > 1: # <<<<<<<<<<<<<<
+ * N = value_arr.size
+ * string_ptrs = <char**>PyMem_Malloc(N * sizeof(char*))
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1235, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_is_netcdf3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1264, __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, 1264, __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, 1264, __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, 1235, __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, 1264, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_7 = ((!__pyx_t_9) != 0);
- if (__pyx_t_7) {
-
- /* "netCDF4/_netCDF4.pyx":1236
- * if value_arr.dtype.char in ['S','U']:
- * if not value_arr.shape:
- * dats = _strencode(value_arr.item()) # <<<<<<<<<<<<<<
- * else:
- * value_arr1 = value_arr.ravel()
- */
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_item); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
- if (likely(__pyx_t_4)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_4);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_5, function);
- }
- }
- if (__pyx_t_4) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1236, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- } else {
- __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1236, __pyx_L1_error)
- }
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_dats = __pyx_t_5;
- __pyx_t_5 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1264, __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":1235
- * # write as a string. string arrays are concatenated into a single string.
+ /* "netCDF4/_netCDF4.pyx":1265
* if value_arr.dtype.char in ['S','U']:
- * if not value_arr.shape: # <<<<<<<<<<<<<<
- * dats = _strencode(value_arr.item())
- * else:
- */
- goto __pyx_L12;
- }
-
- /* "netCDF4/_netCDF4.pyx":1238
- * dats = _strencode(value_arr.item())
- * else:
- * value_arr1 = value_arr.ravel() # <<<<<<<<<<<<<<
- * dats = _strencode(''.join(value_arr1.tolist()))
- * lenarr = len(dats)
+ * if not is_netcdf3 and force_ncstring and value_arr.size > 1:
+ * N = value_arr.size # <<<<<<<<<<<<<<
+ * string_ptrs = <char**>PyMem_Malloc(N * sizeof(char*))
+ * if not string_ptrs:
*/
- /*else*/ {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_ravel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
- if (likely(__pyx_t_4)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
- __Pyx_INCREF(__pyx_t_4);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_1, function);
- }
- }
- if (__pyx_t_4) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1238, __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, 1238, __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, 1265, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_value_arr1 = __pyx_t_5;
+ __pyx_v_N = __pyx_t_5;
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":1239
- * else:
- * value_arr1 = value_arr.ravel()
- * dats = _strencode(''.join(value_arr1.tolist())) # <<<<<<<<<<<<<<
- * lenarr = len(dats)
- * datstring = dats
+ /* "netCDF4/_netCDF4.pyx":1266
+ * if not is_netcdf3 and force_ncstring and value_arr.size > 1:
+ * N = value_arr.size
+ * string_ptrs = <char**>PyMem_Malloc(N * sizeof(char*)) # <<<<<<<<<<<<<<
+ * if not string_ptrs:
+ * raise MemoryError()
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value_arr1, __pyx_n_s_tolist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1239, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
- if (likely(__pyx_t_4)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
- __Pyx_INCREF(__pyx_t_4);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_1, function);
- }
- }
- if (__pyx_t_4) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1239, __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, 1239, __pyx_L1_error)
- }
+ __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(char *))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1266, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1239, __pyx_L1_error)
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_N, __pyx_t_5); 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_5 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1239, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1266, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_dats = __pyx_t_5;
- __pyx_t_5 = 0;
- }
- __pyx_L12:;
-
- /* "netCDF4/_netCDF4.pyx":1240
- * value_arr1 = value_arr.ravel()
- * dats = _strencode(''.join(value_arr1.tolist()))
- * lenarr = len(dats) # <<<<<<<<<<<<<<
- * datstring = dats
- * if lenarr == 0:
- */
- __pyx_t_10 = PyObject_Length(__pyx_v_dats); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1240, __pyx_L1_error)
- __pyx_v_lenarr = __pyx_t_10;
-
- /* "netCDF4/_netCDF4.pyx":1241
- * 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, 1241, __pyx_L1_error)
- __pyx_v_datstring = __pyx_t_2;
-
- /* "netCDF4/_netCDF4.pyx":1242
- * lenarr = len(dats)
- * datstring = dats
- * if lenarr == 0: # <<<<<<<<<<<<<<
- * # write null byte
- * lenarr=1; datstring = '\x00'
- */
- __pyx_t_7 = ((__pyx_v_lenarr == 0) != 0);
- if (__pyx_t_7) {
+ __pyx_v_string_ptrs = ((char **)PyMem_Malloc(__pyx_t_10));
- /* "netCDF4/_netCDF4.pyx":1244
- * if lenarr == 0:
- * # write null byte
- * lenarr=1; datstring = '\x00' # <<<<<<<<<<<<<<
- * if (force_ncstring or value_arr.dtype.char == 'U') and not is_netcdf3:
- * # check to see if attribute already exists
+ /* "netCDF4/_netCDF4.pyx":1267
+ * N = value_arr.size
+ * string_ptrs = <char**>PyMem_Malloc(N * sizeof(char*))
+ * if not string_ptrs: # <<<<<<<<<<<<<<
+ * raise MemoryError()
+ * try:
*/
- __pyx_v_lenarr = 1;
- __pyx_v_datstring = ((char *)"\000");
+ __pyx_t_9 = ((!(__pyx_v_string_ptrs != 0)) != 0);
+ if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":1242
- * lenarr = len(dats)
- * datstring = dats
- * if lenarr == 0: # <<<<<<<<<<<<<<
- * # write null byte
- * lenarr=1; datstring = '\x00'
+ /* "netCDF4/_netCDF4.pyx":1268
+ * string_ptrs = <char**>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, 1268, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1245
- * # write null byte
- * lenarr=1; datstring = '\x00'
- * if (force_ncstring or value_arr.dtype.char == 'U') and not is_netcdf3: # <<<<<<<<<<<<<<
- * # check to see if attribute already exists
- * # and is NC_CHAR, if so delete it and re-create it
+ /* "netCDF4/_netCDF4.pyx":1267
+ * N = value_arr.size
+ * string_ptrs = <char**>PyMem_Malloc(N * sizeof(char*))
+ * if not string_ptrs: # <<<<<<<<<<<<<<
+ * raise MemoryError()
+ * try:
*/
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_force_ncstring); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1245, __pyx_L1_error)
- if (!__pyx_t_9) {
- } else {
- goto __pyx_L16_next_and;
- }
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1245, __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, 1245, __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_U, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1245, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__pyx_t_9) {
- } else {
- __pyx_t_7 = __pyx_t_9;
- goto __pyx_L15_bool_binop_done;
- }
- __pyx_L16_next_and:;
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_is_netcdf3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1245, __pyx_L1_error)
- __pyx_t_8 = ((!__pyx_t_9) != 0);
- __pyx_t_7 = __pyx_t_8;
- __pyx_L15_bool_binop_done:;
- if (__pyx_t_7) {
+ }
- /* "netCDF4/_netCDF4.pyx":1251
- * # with commit 473259b7728120bb281c52359b1af50cca2fcb72,
- * # which was included in 4.4.0-RC5.
- * if _needsworkaround_issue485: # <<<<<<<<<<<<<<
- * ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
- * if ierr == NC_NOERR and att_type == NC_CHAR:
+ /* "netCDF4/_netCDF4.pyx":1269
+ * if not string_ptrs:
+ * raise MemoryError()
+ * try: # <<<<<<<<<<<<<<
+ * strings = [_strencode(s) for s in value_arr.flat]
+ * for j in range(N):
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_needsworkaround_issue485); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1251, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__pyx_t_7) {
+ /*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1252
- * # which was included in 4.4.0-RC5.
- * if _needsworkaround_issue485:
- * ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len) # <<<<<<<<<<<<<<
- * if ierr == NC_NOERR and att_type == NC_CHAR:
- * ierr = nc_del_att(grp._grpid, varid, attname)
+ /* "netCDF4/_netCDF4.pyx":1270
+ * 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 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1270, __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, 1252, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_ierr = nc_inq_att(__pyx_t_6, __pyx_v_varid, __pyx_v_attname, (&__pyx_v_att_type), (&__pyx_v_att_len));
-
- /* "netCDF4/_netCDF4.pyx":1253
- * if _needsworkaround_issue485:
- * ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
- * if ierr == NC_NOERR and att_type == NC_CHAR: # <<<<<<<<<<<<<<
- * ierr = nc_del_att(grp._grpid, varid, attname)
- * if ierr != NC_NOERR:
- */
- __pyx_t_8 = ((__pyx_v_ierr == NC_NOERR) != 0);
- if (__pyx_t_8) {
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_flat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1270, __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_7 = __pyx_t_8;
- goto __pyx_L20_bool_binop_done;
+ __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1270, __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, 1270, __pyx_L18_error)
}
- __pyx_t_8 = ((__pyx_v_att_type == NC_CHAR) != 0);
- __pyx_t_7 = __pyx_t_8;
- __pyx_L20_bool_binop_done:;
- if (__pyx_t_7) {
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_12)) {
+ 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, 1270, __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, 1270, __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, 1270, __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, 1270, __pyx_L18_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ }
+ } else {
+ __pyx_t_5 = __pyx_t_12(__pyx_t_4);
+ if (unlikely(!__pyx_t_5)) {
+ 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, 1270, __pyx_L18_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ }
+ __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, 1270, __pyx_L18_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1270, __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":1254
- * ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
- * if ierr == NC_NOERR and att_type == NC_CHAR:
- * ierr = nc_del_att(grp._grpid, varid, attname) # <<<<<<<<<<<<<<
- * if ierr != NC_NOERR:
- * raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ /* "netCDF4/_netCDF4.pyx":1271
+ * 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 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __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, 1271, __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, 1271, __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, 1254, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_ierr = nc_del_att(__pyx_t_6, __pyx_v_varid, __pyx_v_attname);
+ __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1271, __pyx_L18_error)
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_12)) {
+ 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, 1271, __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, 1271, __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, 1271, __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, 1271, __pyx_L18_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_12(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ 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)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_4);
+ __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":1255
- * if ierr == NC_NOERR and att_type == NC_CHAR:
- * ierr = nc_del_att(grp._grpid, varid, attname)
- * if ierr != NC_NOERR: # <<<<<<<<<<<<<<
- * raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- * # try to convert to ascii string, write as NC_CHAR
+ /* "netCDF4/_netCDF4.pyx":1272
+ * 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_7 = ((__pyx_v_ierr != NC_NOERR) != 0);
- if (__pyx_t_7) {
-
- /* "netCDF4/_netCDF4.pyx":1256
- * ierr = nc_del_att(grp._grpid, varid, attname)
- * if ierr != NC_NOERR:
- * raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
- * # try to convert to ascii string, write as NC_CHAR
- * # else it's a unicode string, write as NC_STRING (if NETCDF4)
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_strings, __pyx_v_j); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __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, 1272, __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":1273
+ * 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, 1273, __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, 1273, __pyx_L18_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":1272
+ * 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_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, 1256, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1256, __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, 1256, __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, 1256, __pyx_L1_error)
+ }
- /* "netCDF4/_netCDF4.pyx":1255
- * if ierr == NC_NOERR and att_type == NC_CHAR:
- * ierr = nc_del_att(grp._grpid, varid, attname)
- * if ierr != NC_NOERR: # <<<<<<<<<<<<<<
- * raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- * # try to convert to ascii string, write as NC_CHAR
+ /* "netCDF4/_netCDF4.pyx":1274
+ * 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, 1274, __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, 1274, __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, 1274, __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":1253
- * if _needsworkaround_issue485:
- * ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
- * if ierr == NC_NOERR and att_type == NC_CHAR: # <<<<<<<<<<<<<<
- * ierr = nc_del_att(grp._grpid, varid, attname)
- * if ierr != NC_NOERR:
+ /* "netCDF4/_netCDF4.pyx":1271
+ * 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1251
- * # with commit 473259b7728120bb281c52359b1af50cca2fcb72,
- * # which was included in 4.4.0-RC5.
- * if _needsworkaround_issue485: # <<<<<<<<<<<<<<
- * ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
- * if ierr == NC_NOERR and att_type == NC_CHAR:
+ /* "netCDF4/_netCDF4.pyx":1275
+ * 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, 1275, __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, 1275, __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, 1275, __pyx_L18_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1259
- * # try to convert to ascii string, write as NC_CHAR
- * # 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
+ /* "netCDF4/_netCDF4.pyx":1276
+ * 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_PyThreadState_declare
- __Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
- __Pyx_XGOTREF(__pyx_t_11);
- __Pyx_XGOTREF(__pyx_t_12);
- __Pyx_XGOTREF(__pyx_t_13);
- /*try:*/ {
+ __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_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_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, 1276, __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":1260
- * # 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)
+ /* "netCDF4/_netCDF4.pyx":1278
+ * ierr = nc_put_att_string(grp._grpid, varid, attname, N, string_ptrs)
+ * finally:
+ * PyMem_Free(string_ptrs) # <<<<<<<<<<<<<<
+ * else:
+ * if not value_arr.shape:
*/
- __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_force_ncstring); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1260, __pyx_L23_error)
- if (__pyx_t_7) {
- __Pyx_Raise(__pyx_builtin_UnicodeError, 0, 0, 0);
- __PYX_ERR(0, 1260, __pyx_L23_error)
+ /*finally:*/ {
+ /*normal exit:*/{
+ PyMem_Free(__pyx_v_string_ptrs);
+ goto __pyx_L19;
+ }
+ /*exception exit:*/{
+ __Pyx_PyThreadState_declare
+ __pyx_L18_error:;
+ __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
+ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
+ __Pyx_XGOTREF(__pyx_t_16);
+ __Pyx_XGOTREF(__pyx_t_17);
+ __Pyx_XGOTREF(__pyx_t_18);
+ __Pyx_XGOTREF(__pyx_t_19);
+ __Pyx_XGOTREF(__pyx_t_20);
+ __Pyx_XGOTREF(__pyx_t_21);
+ __pyx_t_6 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
+ {
+ PyMem_Free(__pyx_v_string_ptrs);
+ }
+ __Pyx_PyThreadState_assign
+ if (PY_MAJOR_VERSION >= 3) {
+ __Pyx_XGIVEREF(__pyx_t_19);
+ __Pyx_XGIVEREF(__pyx_t_20);
+ __Pyx_XGIVEREF(__pyx_t_21);
+ __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
}
+ __Pyx_XGIVEREF(__pyx_t_16);
+ __Pyx_XGIVEREF(__pyx_t_17);
+ __Pyx_XGIVEREF(__pyx_t_18);
+ __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+ __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
+ __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
+ goto __pyx_L1_error;
+ }
+ __pyx_L19:;
+ }
- /* "netCDF4/_netCDF4.pyx":1261
- * 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:
+ /* "netCDF4/_netCDF4.pyx":1264
+ * # 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 = <char**>PyMem_Malloc(N * sizeof(char*))
*/
- __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_to_ascii); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1261, __pyx_L23_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
- if (likely(__pyx_t_4)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_4);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_5, function);
- }
- }
- if (!__pyx_t_4) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_dats); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1261, __pyx_L23_error)
- __Pyx_GOTREF(__pyx_t_1);
- } else {
- __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1261, __pyx_L23_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_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_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1261, __pyx_L23_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- }
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_v_dats_ascii = __pyx_t_1;
- __pyx_t_1 = 0;
+ goto __pyx_L12;
+ }
- /* "netCDF4/_netCDF4.pyx":1262
- * 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:
- * ierr = nc_put_att_string(grp._grpid, varid, attname, 1, &datstring)
+ /* "netCDF4/_netCDF4.pyx":1280
+ * PyMem_Free(string_ptrs)
+ * else:
+ * if not value_arr.shape: # <<<<<<<<<<<<<<
+ * dats = _strencode(value_arr.item())
+ * else:
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1262, __pyx_L23_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, 1262, __pyx_L23_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_ierr = nc_put_att_text(__pyx_t_6, __pyx_v_varid, __pyx_v_attname, __pyx_v_lenarr, __pyx_v_datstring);
+ /*else*/ {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __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, 1280, __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":1259
- * # try to convert to ascii string, write as NC_CHAR
- * # 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
+ /* "netCDF4/_netCDF4.pyx":1281
+ * 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, 1281, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
}
- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
- __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
- goto __pyx_L30_try_end;
- __pyx_L23_error:;
- __Pyx_PyThreadState_assign
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __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, 1281, __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, 1281, __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":1263
- * 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: # <<<<<<<<<<<<<<
- * ierr = nc_put_att_string(grp._grpid, varid, attname, 1, &datstring)
+ /* "netCDF4/_netCDF4.pyx":1280
+ * PyMem_Free(string_ptrs)
* else:
+ * if not value_arr.shape: # <<<<<<<<<<<<<<
+ * dats = _strencode(value_arr.item())
+ * else:
*/
- __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeError);
- if (__pyx_t_6) {
- __Pyx_AddTraceback("netCDF4._netCDF4._set_att", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(0, 1263, __pyx_L25_except_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GOTREF(__pyx_t_3);
+ goto __pyx_L27;
+ }
- /* "netCDF4/_netCDF4.pyx":1264
- * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
- * except UnicodeError:
- * ierr = nc_put_att_string(grp._grpid, varid, attname, 1, &datstring) # <<<<<<<<<<<<<<
- * else:
- * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
+ /* "netCDF4/_netCDF4.pyx":1283
+ * dats = _strencode(value_arr.item())
+ * else:
+ * value_arr1 = value_arr.ravel() # <<<<<<<<<<<<<<
+ * dats = _strencode(''.join(value_arr1.tolist()))
+ * lenarr = len(dats)
*/
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1264, __pyx_L25_except_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1264, __pyx_L25_except_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_ierr = nc_put_att_string(__pyx_t_6, __pyx_v_varid, __pyx_v_attname, 1, (&__pyx_v_datstring));
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ /*else*/ {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_ravel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1283, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- goto __pyx_L24_exception_handled;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1283, __pyx_L1_error)
}
- goto __pyx_L25_except_error;
- __pyx_L25_except_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":1259
- * # try to convert to ascii string, write as NC_CHAR
- * # 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
+ /* "netCDF4/_netCDF4.pyx":1284
+ * else:
+ * value_arr1 = value_arr.ravel()
+ * dats = _strencode(''.join(value_arr1.tolist())) # <<<<<<<<<<<<<<
+ * lenarr = len(dats)
+ * datstring = dats
*/
- __Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_11);
- __Pyx_XGIVEREF(__pyx_t_12);
- __Pyx_XGIVEREF(__pyx_t_13);
- __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
- goto __pyx_L1_error;
- __pyx_L24_exception_handled:;
- __Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_11);
- __Pyx_XGIVEREF(__pyx_t_12);
- __Pyx_XGIVEREF(__pyx_t_13);
- __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
- __pyx_L30_try_end:;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value_arr1, __pyx_n_s_tolist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1284, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ 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_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_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, 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, 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;
}
+ __pyx_L27:;
- /* "netCDF4/_netCDF4.pyx":1245
- * # write null byte
- * lenarr=1; datstring = '\x00'
- * if (force_ncstring or value_arr.dtype.char == 'U') and not is_netcdf3: # <<<<<<<<<<<<<<
- * # check to see if attribute already exists
- * # and is NC_CHAR, if so delete it and re-create it
+ /* "netCDF4/_netCDF4.pyx":1285
+ * value_arr1 = value_arr.ravel()
+ * dats = _strencode(''.join(value_arr1.tolist()))
+ * lenarr = len(dats) # <<<<<<<<<<<<<<
+ * datstring = dats
+ * if lenarr == 0:
*/
- goto __pyx_L14;
- }
+ __pyx_t_11 = PyObject_Length(__pyx_v_dats); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 1285, __pyx_L1_error)
+ __pyx_v_lenarr = __pyx_t_11;
- /* "netCDF4/_netCDF4.pyx":1266
- * ierr = nc_put_att_string(grp._grpid, varid, attname, 1, &datstring)
- * else:
- * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring) # <<<<<<<<<<<<<<
- * if ierr != NC_NOERR:
- * raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ /* "netCDF4/_netCDF4.pyx":1286
+ * dats = _strencode(''.join(value_arr1.tolist()))
+ * lenarr = len(dats)
+ * datstring = dats # <<<<<<<<<<<<<<
+ * if lenarr == 0:
+ * # write null byte
*/
- /*else*/ {
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1266, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_v_ierr = nc_put_att_text(__pyx_t_6, __pyx_v_varid, __pyx_v_attname, __pyx_v_lenarr, __pyx_v_datstring);
- }
- __pyx_L14:;
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_dats); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1286, __pyx_L1_error)
+ __pyx_v_datstring = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":1267
- * else:
- * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
- * if ierr != NC_NOERR: # <<<<<<<<<<<<<<
- * raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
- * # a 'regular' array type ('f4','i4','f8' etc)
+ /* "netCDF4/_netCDF4.pyx":1287
+ * lenarr = len(dats)
+ * datstring = dats
+ * if lenarr == 0: # <<<<<<<<<<<<<<
+ * # write null byte
+ * lenarr=1; datstring = '\x00'
*/
- __pyx_t_7 = ((__pyx_v_ierr != NC_NOERR) != 0);
- if (__pyx_t_7) {
+ __pyx_t_8 = ((__pyx_v_lenarr == 0) != 0);
+ if (__pyx_t_8) {
- /* "netCDF4/_netCDF4.pyx":1268
- * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
- * if ierr != NC_NOERR:
- * raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
- * # a 'regular' array type ('f4','i4','f8' etc)
- * else:
+ /* "netCDF4/_netCDF4.pyx":1289
+ * if lenarr == 0:
+ * # 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
*/
- __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, 1268, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1268, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1268, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 1268, __pyx_L1_error)
+ __pyx_v_lenarr = 1;
+ __pyx_v_datstring = ((char *)"\000");
- /* "netCDF4/_netCDF4.pyx":1267
- * else:
- * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
+ /* "netCDF4/_netCDF4.pyx":1287
+ * lenarr = len(dats)
+ * datstring = dats
+ * if lenarr == 0: # <<<<<<<<<<<<<<
+ * # write null byte
+ * lenarr=1; datstring = '\x00'
+ */
+ }
+
+ /* "netCDF4/_netCDF4.pyx":1290
+ * # 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, 1290, __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, 1290, __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, 1290, __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, 1290, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_9) {
+ } else {
+ __pyx_t_8 = __pyx_t_9;
+ 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, 1290, __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":1293
+ * # try to convert to ascii string, write as NC_CHAR
+ * # 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
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
+ __Pyx_XGOTREF(__pyx_t_21);
+ __Pyx_XGOTREF(__pyx_t_20);
+ __Pyx_XGOTREF(__pyx_t_19);
+ /*try:*/ {
+
+ /* "netCDF4/_netCDF4.pyx":1294
+ * # 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, 1294, __pyx_L33_error)
+ if (__pyx_t_8) {
+ __Pyx_Raise(__pyx_builtin_UnicodeError, 0, 0, 0);
+ __PYX_ERR(0, 1294, __pyx_L33_error)
+ }
+
+ /* "netCDF4/_netCDF4.pyx":1295
+ * 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, 1295, __pyx_L33_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_dats); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __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, 1295, __pyx_L33_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 1295, __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, 1295, __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, 1295, __pyx_L33_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_dats_ascii = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":1296
+ * 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, 1296, __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, 1296, __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":1293
+ * # try to convert to ascii string, write as NC_CHAR
+ * # 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
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
+ __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
+ goto __pyx_L40_try_end;
+ __pyx_L33_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":1297
+ * 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)
+ * ierr = nc_put_att_string(grp._grpid, varid, attname, 1, &datstring)
+ */
+ __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, 1297, __pyx_L35_except_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_3);
+
+ /* "netCDF4/_netCDF4.pyx":1298
+ * 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, 1298, __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, 1298, __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, 1298, __pyx_L35_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":1299
+ * 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, 1299, __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_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;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L34_exception_handled;
+ }
+ goto __pyx_L35_except_error;
+ __pyx_L35_except_error:;
+
+ /* "netCDF4/_netCDF4.pyx":1293
+ * # try to convert to ascii string, write as NC_CHAR
+ * # 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
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_21);
+ __Pyx_XGIVEREF(__pyx_t_20);
+ __Pyx_XGIVEREF(__pyx_t_19);
+ __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19);
+ goto __pyx_L1_error;
+ __pyx_L34_exception_handled:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_21);
+ __Pyx_XGIVEREF(__pyx_t_20);
+ __Pyx_XGIVEREF(__pyx_t_19);
+ __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19);
+ __pyx_L40_try_end:;
+ }
+
+ /* "netCDF4/_netCDF4.pyx":1290
+ * # 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)
+ */
+ goto __pyx_L29;
+ }
+
+ /* "netCDF4/_netCDF4.pyx":1301
+ * ierr = nc_put_att_string(grp._grpid, varid, attname, 1, &datstring)
+ * else:
+ * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring) # <<<<<<<<<<<<<<
+ * if ierr != NC_NOERR:
+ * raise AttributeError((<char *>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, 1301, __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, 1301, __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);
+ }
+ __pyx_L29:;
+ }
+ __pyx_L12:;
+
+ /* "netCDF4/_netCDF4.pyx":1302
+ * else:
+ * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
+ * if ierr != NC_NOERR: # <<<<<<<<<<<<<<
+ * raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * # a 'regular' array type ('f4','i4','f8' etc)
+ */
+ __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0);
+ if (__pyx_t_8) {
+
+ /* "netCDF4/_netCDF4.pyx":1303
+ * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
+ * if ierr != NC_NOERR:
+ * raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
+ * # a 'regular' array type ('f4','i4','f8' etc)
+ * 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, 1303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1303, __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, 1303, __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, 1303, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":1302
+ * else:
+ * ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # a 'regular' array type ('f4','i4','f8' etc)
*/
}
- /* "netCDF4/_netCDF4.pyx":1234
+ /* "netCDF4/_netCDF4.pyx":1263
* # if array contains unicode strings, and data model is NETCDF4,
- * # write as a string. string arrays are concatenated into a single string.
+ * # write as a string.
* if value_arr.dtype.char in ['S','U']: # <<<<<<<<<<<<<<
- * if not value_arr.shape:
- * dats = _strencode(value_arr.item())
+ * if not is_netcdf3 and force_ncstring and value_arr.size > 1:
+ * N = value_arr.size
*/
goto __pyx_L9;
}
- /* "netCDF4/_netCDF4.pyx":1271
+ /* "netCDF4/_netCDF4.pyx":1306
* # a 'regular' array type ('f4','i4','f8' etc)
* else:
* if value_arr.dtype.kind == 'V': # compound attribute. # <<<<<<<<<<<<<<
@@ -6537,97 +7631,97 @@ 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, 1271, __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, 1306, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1271, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_kind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_V, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1271, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (__pyx_t_7) {
+ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_V, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1306, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_8) {
- /* "netCDF4/_netCDF4.pyx":1272
+ /* "netCDF4/_netCDF4.pyx":1307
* 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_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__find_cmptype(__pyx_v_grp, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1272, __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, 1307, __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, 1307, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_14 = __Pyx_PyInt_As_nc_type(__pyx_t_3); if (unlikely((__pyx_t_14 == (nc_type)-1) && PyErr_Occurred())) __PYX_ERR(0, 1272, __pyx_L1_error)
+ __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, 1307, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_v_xtype = __pyx_t_14;
+ __pyx_v_xtype = __pyx_t_22;
- /* "netCDF4/_netCDF4.pyx":1271
+ /* "netCDF4/_netCDF4.pyx":1306
* # a 'regular' array type ('f4','i4','f8' etc)
* 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:
*/
- goto __pyx_L35;
+ goto __pyx_L45;
}
- /* "netCDF4/_netCDF4.pyx":1273
+ /* "netCDF4/_netCDF4.pyx":1308
* 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, 1273, __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, 1308, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1273, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1308, __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_5, 1, 0, NULL, NULL, &__pyx_slice__11, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1273, __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, 1308, __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, 1273, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_5, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1273, __pyx_L1_error)
+ __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, 1308, __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, 1308, __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_7 != 0);
- if (__pyx_t_8) {
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_7 = (__pyx_t_8 != 0);
+ if (__pyx_t_7) {
- /* "netCDF4/_netCDF4.pyx":1274
+ /* "netCDF4/_netCDF4.pyx":1309
* 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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1274, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1274, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1309, __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, 1309, __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, 1274, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __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__12, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1274, __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, 1309, __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, 1274, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
- __pyx_t_5 = 0;
+ __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, 1274, __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, 1309, __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, 1274, __pyx_L1_error)
+ __PYX_ERR(0, 1309, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1273
+ /* "netCDF4/_netCDF4.pyx":1308
* if value_arr.dtype.kind == 'V': # compound attribute.
* xtype = _find_cmptype(grp,value_arr.dtype)
* elif value_arr.dtype.str[1:] not in _supportedtypes: # <<<<<<<<<<<<<<
@@ -6636,42 +7730,42 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int
*/
}
- /* "netCDF4/_netCDF4.pyx":1275
+ /* "netCDF4/_netCDF4.pyx":1310
* 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:]]
* lenarr = PyArray_SIZE(value_arr)
*/
- __pyx_t_8 = ((__pyx_v_xtype == -99L) != 0);
- if (__pyx_t_8) {
+ __pyx_t_7 = ((__pyx_v_xtype == -99L) != 0);
+ if (__pyx_t_7) {
- /* "netCDF4/_netCDF4.pyx":1276
+ /* "netCDF4/_netCDF4.pyx":1311
* 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, 1276, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1311, __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, 1276, __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, 1311, __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, 1276, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __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_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__13, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __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, 1311, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1276, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
+ __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, 1311, __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_14 = __Pyx_PyInt_As_nc_type(__pyx_t_5); if (unlikely((__pyx_t_14 == (nc_type)-1) && PyErr_Occurred())) __PYX_ERR(0, 1276, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_v_xtype = __pyx_t_14;
+ __pyx_t_22 = __Pyx_PyInt_As_nc_type(__pyx_t_4); if (unlikely((__pyx_t_22 == ((nc_type)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1311, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_xtype = __pyx_t_22;
- /* "netCDF4/_netCDF4.pyx":1275
+ /* "netCDF4/_netCDF4.pyx":1310
* 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. # <<<<<<<<<<<<<<
@@ -6679,9 +7773,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int
* lenarr = PyArray_SIZE(value_arr)
*/
}
- __pyx_L35:;
+ __pyx_L45:;
- /* "netCDF4/_netCDF4.pyx":1277
+ /* "netCDF4/_netCDF4.pyx":1312
* elif xtype == -99: # if xtype is not passed in as kwarg.
* xtype = _nptonctype[value_arr.dtype.str[1:]]
* lenarr = PyArray_SIZE(value_arr) # <<<<<<<<<<<<<<
@@ -6690,30 +7784,30 @@ 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":1278
+ /* "netCDF4/_netCDF4.pyx":1313
* 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((<char *>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, 1278, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1278, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_v_ierr = nc_put_att(__pyx_t_6, __pyx_v_varid, __pyx_v_attname, __pyx_v_xtype, __pyx_v_lenarr, __pyx_v_value_arr->data);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1313, __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, 1313, __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":1279
+ /* "netCDF4/_netCDF4.pyx":1314
* lenarr = PyArray_SIZE(value_arr)
* ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
*/
- __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0);
- if (__pyx_t_8) {
+ __pyx_t_7 = ((__pyx_v_ierr != NC_NOERR) != 0);
+ if (__pyx_t_7) {
- /* "netCDF4/_netCDF4.pyx":1280
+ /* "netCDF4/_netCDF4.pyx":1315
* ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data)
* if ierr != NC_NOERR:
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -6721,22 +7815,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_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, 1280, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __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, 1315, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(__pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1280, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
+ __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, 1315, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__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, 1280, __pyx_L1_error)
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(0, 1315, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1279
+ /* "netCDF4/_netCDF4.pyx":1314
* lenarr = PyArray_SIZE(value_arr)
* ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -6747,8 +7841,8 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int
}
__pyx_L9:;
- /* "netCDF4/_netCDF4.pyx":1211
- * return 'UNDEFINED'
+ /* "netCDF4/_netCDF4.pyx":1241
+ * raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* cdef _set_att(grp, int varid, name, value,\ # <<<<<<<<<<<<<<
* nc_type xtype=-99, force_ncstring=False):
@@ -6770,15 +7864,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *__pyx_v_grp, int
__Pyx_XDECREF(__pyx_v_bytestr);
__Pyx_XDECREF(__pyx_v_fmt);
__Pyx_XDECREF(__pyx_v_is_netcdf3);
+ __Pyx_XDECREF(__pyx_v_N);
+ __Pyx_XDECREF(__pyx_v_strings);
+ __Pyx_XDECREF(__pyx_v_j);
__Pyx_XDECREF(__pyx_v_dats);
__Pyx_XDECREF(__pyx_v_value_arr1);
__Pyx_XDECREF(__pyx_v_dats_ascii);
+ __Pyx_XDECREF(__pyx_v_s);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1282
+/* "netCDF4/_netCDF4.pyx":1317
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* cdef _get_types(group): # <<<<<<<<<<<<<<
@@ -6813,29 +7911,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
- Py_ssize_t __pyx_t_9;
+ int __pyx_t_9;
PyObject *__pyx_t_10 = NULL;
PyObject *__pyx_t_11 = NULL;
PyObject *__pyx_t_12 = NULL;
PyObject *__pyx_t_13 = NULL;
- int __pyx_t_14;
- PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_14 = NULL;
__Pyx_RefNannySetupContext("_get_types", 0);
- /* "netCDF4/_netCDF4.pyx":1290
+ /* "netCDF4/_netCDF4.pyx":1325
* 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, 1290, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1325, __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, 1290, __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, 1325, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v__grpid = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":1292
+ /* "netCDF4/_netCDF4.pyx":1327
* _grpid = group._grpid
* # get the number of user defined types in this group.
* with nogil: # <<<<<<<<<<<<<<
@@ -6849,7 +7946,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1293
+ /* "netCDF4/_netCDF4.pyx":1328
* # get the number of user defined types in this group.
* with nogil:
* ierr = nc_inq_typeids(_grpid, &ntypes, NULL) # <<<<<<<<<<<<<<
@@ -6859,7 +7956,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":1292
+ /* "netCDF4/_netCDF4.pyx":1327
* _grpid = group._grpid
* # get the number of user defined types in this group.
* with nogil: # <<<<<<<<<<<<<<
@@ -6877,7 +7974,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
}
}
- /* "netCDF4/_netCDF4.pyx":1294
+ /* "netCDF4/_netCDF4.pyx":1329
* with nogil:
* ierr = nc_inq_typeids(_grpid, &ntypes, NULL)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -6887,7 +7984,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":1295
+ /* "netCDF4/_netCDF4.pyx":1330
* ierr = nc_inq_typeids(_grpid, &ntypes, NULL)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -6895,22 +7992,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
* typeids = <nc_type *>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, 1295, __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, 1330, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1295, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1330, __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, 1295, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __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, 1295, __pyx_L1_error)
+ __PYX_ERR(0, 1330, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1294
+ /* "netCDF4/_netCDF4.pyx":1329
* with nogil:
* ierr = nc_inq_typeids(_grpid, &ntypes, NULL)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -6919,7 +8016,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
*/
}
- /* "netCDF4/_netCDF4.pyx":1296
+ /* "netCDF4/_netCDF4.pyx":1331
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if ntypes > 0: # <<<<<<<<<<<<<<
@@ -6929,7 +8026,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":1297
+ /* "netCDF4/_netCDF4.pyx":1332
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if ntypes > 0:
* typeids = <nc_type *>malloc(sizeof(nc_type) * ntypes) # <<<<<<<<<<<<<<
@@ -6938,7 +8035,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":1298
+ /* "netCDF4/_netCDF4.pyx":1333
* if ntypes > 0:
* typeids = <nc_type *>malloc(sizeof(nc_type) * ntypes)
* with nogil: # <<<<<<<<<<<<<<
@@ -6952,7 +8049,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1299
+ /* "netCDF4/_netCDF4.pyx":1334
* typeids = <nc_type *>malloc(sizeof(nc_type) * ntypes)
* with nogil:
* ierr = nc_inq_typeids(_grpid, &ntypes, typeids) # <<<<<<<<<<<<<<
@@ -6962,7 +8059,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":1298
+ /* "netCDF4/_netCDF4.pyx":1333
* if ntypes > 0:
* typeids = <nc_type *>malloc(sizeof(nc_type) * ntypes)
* with nogil: # <<<<<<<<<<<<<<
@@ -6980,7 +8077,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
}
}
- /* "netCDF4/_netCDF4.pyx":1300
+ /* "netCDF4/_netCDF4.pyx":1335
* with nogil:
* ierr = nc_inq_typeids(_grpid, &ntypes, typeids)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -6990,7 +8087,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":1301
+ /* "netCDF4/_netCDF4.pyx":1336
* ierr = nc_inq_typeids(_grpid, &ntypes, typeids)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -6998,22 +8095,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, 1301, __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, 1336, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1301, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1336, __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, 1301, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __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, 1301, __pyx_L1_error)
+ __PYX_ERR(0, 1336, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1300
+ /* "netCDF4/_netCDF4.pyx":1335
* with nogil:
* ierr = nc_inq_typeids(_grpid, &ntypes, typeids)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -7022,7 +8119,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
*/
}
- /* "netCDF4/_netCDF4.pyx":1296
+ /* "netCDF4/_netCDF4.pyx":1331
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if ntypes > 0: # <<<<<<<<<<<<<<
@@ -7031,17 +8128,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
*/
}
- /* "netCDF4/_netCDF4.pyx":1303
+ /* "netCDF4/_netCDF4.pyx":1338
* raise RuntimeError((<char *>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, 1303, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1338, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -7051,27 +8148,27 @@ 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, 1303, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __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, 1303, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __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":1304
+ /* "netCDF4/_netCDF4.pyx":1339
* # 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, 1304, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1339, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -7081,27 +8178,27 @@ 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, 1304, __pyx_L1_error)
+ __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_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, 1304, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); 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_v_vltypes = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1305
+ /* "netCDF4/_netCDF4.pyx":1340
* 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, 1305, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1340, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -7111,17 +8208,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, 1305, __pyx_L1_error)
+ __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_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, 1305, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1340, __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":1306
+ /* "netCDF4/_netCDF4.pyx":1341
* vltypes = OrderedDict()
* enumtypes = OrderedDict()
* if ntypes > 0: # <<<<<<<<<<<<<<
@@ -7131,7 +8228,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":1307
+ /* "netCDF4/_netCDF4.pyx":1342
* enumtypes = OrderedDict()
* if ntypes > 0:
* for n from 0 <= n < ntypes: # <<<<<<<<<<<<<<
@@ -7141,7 +8238,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":1308
+ /* "netCDF4/_netCDF4.pyx":1343
* if ntypes > 0:
* for n from 0 <= n < ntypes:
* xtype = typeids[n] # <<<<<<<<<<<<<<
@@ -7150,7 +8247,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":1309
+ /* "netCDF4/_netCDF4.pyx":1344
* for n from 0 <= n < ntypes:
* xtype = typeids[n]
* with nogil: # <<<<<<<<<<<<<<
@@ -7164,7 +8261,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1310
+ /* "netCDF4/_netCDF4.pyx":1345
* xtype = typeids[n]
* with nogil:
* ierr = nc_inq_user_type(_grpid, xtype, namstring, # <<<<<<<<<<<<<<
@@ -7174,7 +8271,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":1309
+ /* "netCDF4/_netCDF4.pyx":1344
* for n from 0 <= n < ntypes:
* xtype = typeids[n]
* with nogil: # <<<<<<<<<<<<<<
@@ -7192,7 +8289,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
}
}
- /* "netCDF4/_netCDF4.pyx":1312
+ /* "netCDF4/_netCDF4.pyx":1347
* ierr = nc_inq_user_type(_grpid, xtype, namstring,
* NULL,NULL,NULL,&classp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -7202,7 +8299,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":1313
+ /* "netCDF4/_netCDF4.pyx":1348
* NULL,NULL,NULL,&classp)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -7210,22 +8307,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, 1313, __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, 1348, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1313, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1348, __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, 1313, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1348, __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, 1313, __pyx_L1_error)
+ __PYX_ERR(0, 1348, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1312
+ /* "netCDF4/_netCDF4.pyx":1347
* ierr = nc_inq_user_type(_grpid, xtype, namstring,
* NULL,NULL,NULL,&classp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -7234,7 +8331,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
*/
}
- /* "netCDF4/_netCDF4.pyx":1314
+ /* "netCDF4/_netCDF4.pyx":1349
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if classp == NC_COMPOUND: # a compound # <<<<<<<<<<<<<<
@@ -7244,25 +8341,25 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
switch (__pyx_v_classp) {
case NC_COMPOUND:
- /* "netCDF4/_netCDF4.pyx":1315
+ /* "netCDF4/_netCDF4.pyx":1350
* raise RuntimeError((<char *>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, 1315, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1350, __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, 1315, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1350, __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, 1315, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1350, __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, 1315, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1350, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
__pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -7272,25 +8369,47 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__pyx_t_9 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1315, __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;
+ #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, 1350, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #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, 1350, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1350, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_7);
+ 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, 1350, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_7);
- 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, 1315, __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;
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1318
+ /* "netCDF4/_netCDF4.pyx":1353
* # read the compound type info from the file,
* # create a CompoundType instance from it.
* try: # <<<<<<<<<<<<<<
@@ -7306,19 +8425,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__Pyx_XGOTREF(__pyx_t_13);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1319
+ /* "netCDF4/_netCDF4.pyx":1354
* # 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, 1319, __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, 1354, __pyx_L21_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XDECREF_SET(__pyx_v_cmptype, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1318
+ /* "netCDF4/_netCDF4.pyx":1353
* # read the compound type info from the file,
* # create a CompoundType instance from it.
* try: # <<<<<<<<<<<<<<
@@ -7339,22 +8458,22 @@ 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":1320
+ /* "netCDF4/_netCDF4.pyx":1355
* try:
* cmptype = _read_compound(group, xtype)
* except KeyError: # <<<<<<<<<<<<<<
* msg='WARNING: unsupported Compound type, skipping...'
* warnings.warn(msg)
*/
- __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
- if (__pyx_t_14) {
+ __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, 1320, __pyx_L23_except_error)
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_10) < 0) __PYX_ERR(0, 1355, __pyx_L23_except_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_10);
- /* "netCDF4/_netCDF4.pyx":1321
+ /* "netCDF4/_netCDF4.pyx":1356
* cmptype = _read_compound(group, xtype)
* except KeyError:
* msg='WARNING: unsupported Compound type, skipping...' # <<<<<<<<<<<<<<
@@ -7364,20 +8483,20 @@ 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":1322
+ /* "netCDF4/_netCDF4.pyx":1357
* 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, 1322, __pyx_L23_except_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1357, __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, 1322, __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, 1357, __pyx_L23_except_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
@@ -7387,23 +8506,41 @@ 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, 1322, __pyx_L23_except_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1357, __pyx_L23_except_error)
__Pyx_GOTREF(__pyx_t_7);
} else {
- __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1322, __pyx_L23_except_error)
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_5); __pyx_t_5 = NULL;
- __Pyx_INCREF(__pyx_v_msg);
- __Pyx_GIVEREF(__pyx_v_msg);
- PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_msg);
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1322, __pyx_L23_except_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ #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, 1357, __pyx_L23_except_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #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, 1357, __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, 1357, __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, 1357, __pyx_L23_except_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":1323
+ /* "netCDF4/_netCDF4.pyx":1358
* msg='WARNING: unsupported Compound type, skipping...'
* warnings.warn(msg)
* continue # <<<<<<<<<<<<<<
@@ -7420,7 +8557,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":1318
+ /* "netCDF4/_netCDF4.pyx":1353
* # read the compound type info from the file,
* # create a CompoundType instance from it.
* try: # <<<<<<<<<<<<<<
@@ -7443,16 +8580,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__pyx_L28_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":1324
+ /* "netCDF4/_netCDF4.pyx":1359
* 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, 1324, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_cmptypes, __pyx_v_name, __pyx_v_cmptype) < 0)) __PYX_ERR(0, 1359, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1314
+ /* "netCDF4/_netCDF4.pyx":1349
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if classp == NC_COMPOUND: # a compound # <<<<<<<<<<<<<<
@@ -7461,7 +8598,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
*/
break;
- /* "netCDF4/_netCDF4.pyx":1325
+ /* "netCDF4/_netCDF4.pyx":1360
* continue
* cmptypes[name] = cmptype
* elif classp == NC_VLEN: # a vlen # <<<<<<<<<<<<<<
@@ -7470,25 +8607,25 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
*/
case NC_VLEN:
- /* "netCDF4/_netCDF4.pyx":1326
+ /* "netCDF4/_netCDF4.pyx":1361
* 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, 1326, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1361, __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, 1326, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1361, __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, 1326, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1361, __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, 1326, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
__pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -7498,25 +8635,47 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__pyx_t_9 = 1;
}
}
- __pyx_t_15 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1326, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- if (__pyx_t_8) {
- __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ #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, 1361, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #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, 1361, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1361, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_9, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7);
+ 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, 1361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
}
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_9, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_15, 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_15, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1326, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_10);
__pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":1329
+ /* "netCDF4/_netCDF4.pyx":1364
* # read the VLEN type info from the file,
* # create a VLType instance from it.
* try: # <<<<<<<<<<<<<<
@@ -7532,19 +8691,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__Pyx_XGOTREF(__pyx_t_11);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1330
+ /* "netCDF4/_netCDF4.pyx":1365
* # 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, 1330, __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, 1365, __pyx_L31_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_XDECREF_SET(__pyx_v_vltype, __pyx_t_10);
__pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":1329
+ /* "netCDF4/_netCDF4.pyx":1364
* # read the VLEN type info from the file,
* # create a VLType instance from it.
* try: # <<<<<<<<<<<<<<
@@ -7562,26 +8721,26 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":1331
+ /* "netCDF4/_netCDF4.pyx":1366
* try:
* vltype = _read_vlen(group, xtype)
* except KeyError: # <<<<<<<<<<<<<<
* msg='WARNING: unsupported VLEN type, skipping...'
* warnings.warn(msg)
*/
- __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
- if (__pyx_t_14) {
+ __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_15) < 0) __PYX_ERR(0, 1331, __pyx_L33_except_error)
+ if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_1, &__pyx_t_14) < 0) __PYX_ERR(0, 1366, __pyx_L33_except_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_GOTREF(__pyx_t_14);
- /* "netCDF4/_netCDF4.pyx":1332
+ /* "netCDF4/_netCDF4.pyx":1367
* vltype = _read_vlen(group, xtype)
* except KeyError:
* msg='WARNING: unsupported VLEN type, skipping...' # <<<<<<<<<<<<<<
@@ -7591,20 +8750,20 @@ 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":1333
+ /* "netCDF4/_netCDF4.pyx":1368
* 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, 1333, __pyx_L33_except_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1368, __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, 1333, __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, 1368, __pyx_L33_except_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
@@ -7614,23 +8773,41 @@ 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, 1333, __pyx_L33_except_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1368, __pyx_L33_except_error)
__Pyx_GOTREF(__pyx_t_7);
} else {
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1333, __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, 1333, __pyx_L33_except_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ #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, 1368, __pyx_L33_except_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #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, 1368, __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, 1368, __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, 1368, __pyx_L33_except_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":1334
+ /* "netCDF4/_netCDF4.pyx":1369
* msg='WARNING: unsupported VLEN type, skipping...'
* warnings.warn(msg)
* continue # <<<<<<<<<<<<<<
@@ -7641,13 +8818,13 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__pyx_L40_except_continue:;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
goto __pyx_L37_try_continue;
}
goto __pyx_L33_except_error;
__pyx_L33_except_error:;
- /* "netCDF4/_netCDF4.pyx":1329
+ /* "netCDF4/_netCDF4.pyx":1364
* # read the VLEN type info from the file,
* # create a VLType instance from it.
* try: # <<<<<<<<<<<<<<
@@ -7670,16 +8847,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__pyx_L38_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":1335
+ /* "netCDF4/_netCDF4.pyx":1370
* 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, 1335, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_vltypes, __pyx_v_name, __pyx_v_vltype) < 0)) __PYX_ERR(0, 1370, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1325
+ /* "netCDF4/_netCDF4.pyx":1360
* continue
* cmptypes[name] = cmptype
* elif classp == NC_VLEN: # a vlen # <<<<<<<<<<<<<<
@@ -7688,7 +8865,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
*/
break;
- /* "netCDF4/_netCDF4.pyx":1336
+ /* "netCDF4/_netCDF4.pyx":1371
* continue
* vltypes[name] = vltype
* elif classp == NC_ENUM: # an enum type # <<<<<<<<<<<<<<
@@ -7697,25 +8874,25 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
*/
case NC_ENUM:
- /* "netCDF4/_netCDF4.pyx":1337
+ /* "netCDF4/_netCDF4.pyx":1372
* 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, 1337, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __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, 1337, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1372, __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, 1337, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __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, 1337, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1372, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
__pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
@@ -7725,25 +8902,47 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__pyx_t_9 = 1;
}
}
- __pyx_t_5 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1337, __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;
+ #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, 1372, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #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, 1372, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1372, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_9, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_7);
+ 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, 1372, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_9, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_9, __pyx_t_7);
- __pyx_t_1 = 0;
- __pyx_t_7 = 0;
- __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1337, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_15);
- __pyx_t_15 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_14);
+ __pyx_t_14 = 0;
- /* "netCDF4/_netCDF4.pyx":1340
+ /* "netCDF4/_netCDF4.pyx":1375
* # read the Enum type info from the file,
* # create a EnumType instance from it.
* try: # <<<<<<<<<<<<<<
@@ -7759,19 +8958,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__Pyx_XGOTREF(__pyx_t_13);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1341
+ /* "netCDF4/_netCDF4.pyx":1376
* # create a EnumType instance from it.
* try:
* enumtype = _read_enum(group, xtype) # <<<<<<<<<<<<<<
* except KeyError:
* msg='WARNING: unsupported Enum type, skipping...'
*/
- __pyx_t_15 = __pyx_f_7netCDF4_8_netCDF4__read_enum(__pyx_v_group, __pyx_v_xtype, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1341, __pyx_L41_error)
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_XDECREF_SET(__pyx_v_enumtype, __pyx_t_15);
- __pyx_t_15 = 0;
+ __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, 1376, __pyx_L41_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_XDECREF_SET(__pyx_v_enumtype, __pyx_t_14);
+ __pyx_t_14 = 0;
- /* "netCDF4/_netCDF4.pyx":1340
+ /* "netCDF4/_netCDF4.pyx":1375
* # read the Enum type info from the file,
* # create a EnumType instance from it.
* try: # <<<<<<<<<<<<<<
@@ -7791,24 +8990,24 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
- /* "netCDF4/_netCDF4.pyx":1342
+ /* "netCDF4/_netCDF4.pyx":1377
* try:
* enumtype = _read_enum(group, xtype)
* except KeyError: # <<<<<<<<<<<<<<
* msg='WARNING: unsupported Enum type, skipping...'
* warnings.warn(msg)
*/
- __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
- if (__pyx_t_14) {
+ __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_15, &__pyx_t_10, &__pyx_t_5) < 0) __PYX_ERR(0, 1342, __pyx_L43_except_error)
- __Pyx_GOTREF(__pyx_t_15);
+ if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_10, &__pyx_t_5) < 0) __PYX_ERR(0, 1377, __pyx_L43_except_error)
+ __Pyx_GOTREF(__pyx_t_14);
__Pyx_GOTREF(__pyx_t_10);
__Pyx_GOTREF(__pyx_t_5);
- /* "netCDF4/_netCDF4.pyx":1343
+ /* "netCDF4/_netCDF4.pyx":1378
* enumtype = _read_enum(group, xtype)
* except KeyError:
* msg='WARNING: unsupported Enum type, skipping...' # <<<<<<<<<<<<<<
@@ -7818,20 +9017,20 @@ 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":1344
+ /* "netCDF4/_netCDF4.pyx":1379
* 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, 1344, __pyx_L43_except_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1379, __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, 1344, __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, 1379, __pyx_L43_except_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
@@ -7841,23 +9040,41 @@ 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, 1344, __pyx_L43_except_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1379, __pyx_L43_except_error)
__Pyx_GOTREF(__pyx_t_7);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1344, __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, 1344, __pyx_L43_except_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 1379, __pyx_L43_except_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #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, 1379, __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, 1379, __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, 1379, __pyx_L43_except_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":1345
+ /* "netCDF4/_netCDF4.pyx":1380
* msg='WARNING: unsupported Enum type, skipping...'
* warnings.warn(msg)
* continue # <<<<<<<<<<<<<<
@@ -7866,7 +9083,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
*/
goto __pyx_L50_except_continue;
__pyx_L50_except_continue:;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
goto __pyx_L47_try_continue;
@@ -7874,7 +9091,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":1340
+ /* "netCDF4/_netCDF4.pyx":1375
* # read the Enum type info from the file,
* # create a EnumType instance from it.
* try: # <<<<<<<<<<<<<<
@@ -7897,16 +9114,16 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__pyx_L48_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":1346
+ /* "netCDF4/_netCDF4.pyx":1381
* 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, 1346, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_enumtypes, __pyx_v_name, __pyx_v_enumtype) < 0)) __PYX_ERR(0, 1381, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1336
+ /* "netCDF4/_netCDF4.pyx":1371
* continue
* vltypes[name] = vltype
* elif classp == NC_ENUM: # an enum type # <<<<<<<<<<<<<<
@@ -7919,7 +9136,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__pyx_L13_continue:;
}
- /* "netCDF4/_netCDF4.pyx":1347
+ /* "netCDF4/_netCDF4.pyx":1382
* continue
* enumtypes[name] = enumtype
* free(typeids) # <<<<<<<<<<<<<<
@@ -7928,7 +9145,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
*/
free(__pyx_v_typeids);
- /* "netCDF4/_netCDF4.pyx":1306
+ /* "netCDF4/_netCDF4.pyx":1341
* vltypes = OrderedDict()
* enumtypes = OrderedDict()
* if ntypes > 0: # <<<<<<<<<<<<<<
@@ -7937,7 +9154,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
*/
}
- /* "netCDF4/_netCDF4.pyx":1348
+ /* "netCDF4/_netCDF4.pyx":1383
* enumtypes[name] = enumtype
* free(typeids)
* return cmptypes, vltypes, enumtypes # <<<<<<<<<<<<<<
@@ -7945,7 +9162,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, 1348, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1383, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_v_cmptypes);
__Pyx_GIVEREF(__pyx_v_cmptypes);
@@ -7960,7 +9177,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":1282
+ /* "netCDF4/_netCDF4.pyx":1317
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* cdef _get_types(group): # <<<<<<<<<<<<<<
@@ -7976,7 +9193,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_10);
- __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_14);
__Pyx_AddTraceback("netCDF4._netCDF4._get_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
@@ -7993,7 +9210,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group)
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1350
+/* "netCDF4/_netCDF4.pyx":1385
* return cmptypes, vltypes, enumtypes
*
* cdef _get_dims(group): # <<<<<<<<<<<<<<
@@ -8020,24 +9237,24 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
- Py_ssize_t __pyx_t_9;
+ int __pyx_t_9;
PyObject *__pyx_t_10 = NULL;
__Pyx_RefNannySetupContext("_get_dims", 0);
- /* "netCDF4/_netCDF4.pyx":1357
+ /* "netCDF4/_netCDF4.pyx":1392
* 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, 1357, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1392, __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, 1357, __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, 1392, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v__grpid = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":1358
+ /* "netCDF4/_netCDF4.pyx":1393
* # get number of dimensions in this Group.
* _grpid = group._grpid
* with nogil: # <<<<<<<<<<<<<<
@@ -8051,7 +9268,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1359
+ /* "netCDF4/_netCDF4.pyx":1394
* _grpid = group._grpid
* with nogil:
* ierr = nc_inq_ndims(_grpid, &numdims) # <<<<<<<<<<<<<<
@@ -8061,7 +9278,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":1358
+ /* "netCDF4/_netCDF4.pyx":1393
* # get number of dimensions in this Group.
* _grpid = group._grpid
* with nogil: # <<<<<<<<<<<<<<
@@ -8079,7 +9296,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
}
}
- /* "netCDF4/_netCDF4.pyx":1360
+ /* "netCDF4/_netCDF4.pyx":1395
* with nogil:
* ierr = nc_inq_ndims(_grpid, &numdims)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -8089,7 +9306,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":1361
+ /* "netCDF4/_netCDF4.pyx":1396
* ierr = nc_inq_ndims(_grpid, &numdims)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -8097,22 +9314,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, 1361, __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, 1396, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1361, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1396, __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, 1361, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1396, __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, 1361, __pyx_L1_error)
+ __PYX_ERR(0, 1396, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1360
+ /* "netCDF4/_netCDF4.pyx":1395
* with nogil:
* ierr = nc_inq_ndims(_grpid, &numdims)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -8121,17 +9338,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1363
+ /* "netCDF4/_netCDF4.pyx":1398
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # create empty dictionary for dimensions.
* dimensions = OrderedDict() # <<<<<<<<<<<<<<
* if numdims > 0:
* dimids = <int *>malloc(sizeof(int) * numdims)
*/
- __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1363, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1398, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -8141,17 +9358,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, 1363, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __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, 1363, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __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":1364
+ /* "netCDF4/_netCDF4.pyx":1399
* # create empty dictionary for dimensions.
* dimensions = OrderedDict()
* if numdims > 0: # <<<<<<<<<<<<<<
@@ -8161,7 +9378,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":1365
+ /* "netCDF4/_netCDF4.pyx":1400
* dimensions = OrderedDict()
* if numdims > 0:
* dimids = <int *>malloc(sizeof(int) * numdims) # <<<<<<<<<<<<<<
@@ -8170,20 +9387,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":1366
+ /* "netCDF4/_netCDF4.pyx":1401
* if numdims > 0:
* dimids = <int *>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, 1366, __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, 1401, __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, 1366, __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, 1401, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":1367
+ /* "netCDF4/_netCDF4.pyx":1402
* dimids = <int *>malloc(sizeof(int) * numdims)
* if group.data_model == 'NETCDF4':
* with nogil: # <<<<<<<<<<<<<<
@@ -8197,7 +9414,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1368
+ /* "netCDF4/_netCDF4.pyx":1403
* if group.data_model == 'NETCDF4':
* with nogil:
* ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0) # <<<<<<<<<<<<<<
@@ -8207,7 +9424,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":1367
+ /* "netCDF4/_netCDF4.pyx":1402
* dimids = <int *>malloc(sizeof(int) * numdims)
* if group.data_model == 'NETCDF4':
* with nogil: # <<<<<<<<<<<<<<
@@ -8225,7 +9442,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
}
}
- /* "netCDF4/_netCDF4.pyx":1369
+ /* "netCDF4/_netCDF4.pyx":1404
* with nogil:
* ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -8235,7 +9452,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":1370
+ /* "netCDF4/_netCDF4.pyx":1405
* ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -8243,22 +9460,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, 1370, __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, 1405, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1370, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1405, __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, 1370, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __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, 1370, __pyx_L1_error)
+ __PYX_ERR(0, 1405, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1369
+ /* "netCDF4/_netCDF4.pyx":1404
* with nogil:
* ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -8267,7 +9484,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1366
+ /* "netCDF4/_netCDF4.pyx":1401
* if numdims > 0:
* dimids = <int *>malloc(sizeof(int) * numdims)
* if group.data_model == 'NETCDF4': # <<<<<<<<<<<<<<
@@ -8277,7 +9494,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
goto __pyx_L8;
}
- /* "netCDF4/_netCDF4.pyx":1372
+ /* "netCDF4/_netCDF4.pyx":1407
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* else:
* for n from 0 <= n < numdims: # <<<<<<<<<<<<<<
@@ -8288,7 +9505,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":1373
+ /* "netCDF4/_netCDF4.pyx":1408
* else:
* for n from 0 <= n < numdims:
* dimids[n] = n # <<<<<<<<<<<<<<
@@ -8300,7 +9517,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
}
__pyx_L8:;
- /* "netCDF4/_netCDF4.pyx":1374
+ /* "netCDF4/_netCDF4.pyx":1409
* for n from 0 <= n < numdims:
* dimids[n] = n
* for n from 0 <= n < numdims: # <<<<<<<<<<<<<<
@@ -8310,7 +9527,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":1375
+ /* "netCDF4/_netCDF4.pyx":1410
* dimids[n] = n
* for n from 0 <= n < numdims:
* with nogil: # <<<<<<<<<<<<<<
@@ -8324,7 +9541,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1376
+ /* "netCDF4/_netCDF4.pyx":1411
* for n from 0 <= n < numdims:
* with nogil:
* ierr = nc_inq_dimname(_grpid, dimids[n], namstring) # <<<<<<<<<<<<<<
@@ -8334,7 +9551,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":1375
+ /* "netCDF4/_netCDF4.pyx":1410
* dimids[n] = n
* for n from 0 <= n < numdims:
* with nogil: # <<<<<<<<<<<<<<
@@ -8352,7 +9569,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
}
}
- /* "netCDF4/_netCDF4.pyx":1377
+ /* "netCDF4/_netCDF4.pyx":1412
* with nogil:
* ierr = nc_inq_dimname(_grpid, dimids[n], namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -8362,7 +9579,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":1378
+ /* "netCDF4/_netCDF4.pyx":1413
* ierr = nc_inq_dimname(_grpid, dimids[n], namstring)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -8370,22 +9587,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, 1378, __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, 1413, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1378, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1413, __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, 1378, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __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, 1378, __pyx_L1_error)
+ __PYX_ERR(0, 1413, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1377
+ /* "netCDF4/_netCDF4.pyx":1412
* with nogil:
* ierr = nc_inq_dimname(_grpid, dimids[n], namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -8394,25 +9611,25 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1379
+ /* "netCDF4/_netCDF4.pyx":1414
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 1379, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1414, __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, 1379, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1414, __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, 1379, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1414, __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, 1379, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1414, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
__pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -8422,32 +9639,54 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
__pyx_t_9 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1379, __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;
+ #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, 1414, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #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, 1414, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1414, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_7);
+ 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, 1414, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_7);
- 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, 1379, __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;
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1380
+ /* "netCDF4/_netCDF4.pyx":1415
* raise RuntimeError((<char *>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, 1380, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_group);
__Pyx_GIVEREF(__pyx_v_group);
@@ -8455,21 +9694,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, 1380, __pyx_L1_error)
+ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1415, __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, 1380, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyInt_From_int((__pyx_v_dimids[__pyx_v_n])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1415, __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, 1380, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_id, __pyx_t_10) < 0) __PYX_ERR(0, 1415, __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, 1380, __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, 1415, __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, 1380, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_dimensions, __pyx_v_name, __pyx_t_10) < 0)) __PYX_ERR(0, 1415, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
- /* "netCDF4/_netCDF4.pyx":1381
+ /* "netCDF4/_netCDF4.pyx":1416
* name = namstring.decode(default_encoding,unicode_error)
* dimensions[name] = Dimension(group, name, id=dimids[n])
* free(dimids) # <<<<<<<<<<<<<<
@@ -8478,7 +9717,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
*/
free(__pyx_v_dimids);
- /* "netCDF4/_netCDF4.pyx":1364
+ /* "netCDF4/_netCDF4.pyx":1399
* # create empty dictionary for dimensions.
* dimensions = OrderedDict()
* if numdims > 0: # <<<<<<<<<<<<<<
@@ -8487,7 +9726,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1382
+ /* "netCDF4/_netCDF4.pyx":1417
* dimensions[name] = Dimension(group, name, id=dimids[n])
* free(dimids)
* return dimensions # <<<<<<<<<<<<<<
@@ -8499,7 +9738,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":1350
+ /* "netCDF4/_netCDF4.pyx":1385
* return cmptypes, vltypes, enumtypes
*
* cdef _get_dims(group): # <<<<<<<<<<<<<<
@@ -8525,7 +9764,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1384
+/* "netCDF4/_netCDF4.pyx":1419
* return dimensions
*
* cdef _get_grps(group): # <<<<<<<<<<<<<<
@@ -8552,24 +9791,24 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
- Py_ssize_t __pyx_t_9;
+ int __pyx_t_9;
PyObject *__pyx_t_10 = NULL;
__Pyx_RefNannySetupContext("_get_grps", 0);
- /* "netCDF4/_netCDF4.pyx":1391
+ /* "netCDF4/_netCDF4.pyx":1426
* 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, 1391, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __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, 1391, __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, 1426, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v__grpid = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":1392
+ /* "netCDF4/_netCDF4.pyx":1427
* # get number of groups in this Group.
* _grpid = group._grpid
* with nogil: # <<<<<<<<<<<<<<
@@ -8583,7 +9822,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1393
+ /* "netCDF4/_netCDF4.pyx":1428
* _grpid = group._grpid
* with nogil:
* ierr = nc_inq_grps(_grpid, &numgrps, NULL) # <<<<<<<<<<<<<<
@@ -8593,7 +9832,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":1392
+ /* "netCDF4/_netCDF4.pyx":1427
* # get number of groups in this Group.
* _grpid = group._grpid
* with nogil: # <<<<<<<<<<<<<<
@@ -8611,7 +9850,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
}
}
- /* "netCDF4/_netCDF4.pyx":1394
+ /* "netCDF4/_netCDF4.pyx":1429
* with nogil:
* ierr = nc_inq_grps(_grpid, &numgrps, NULL)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -8621,7 +9860,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":1395
+ /* "netCDF4/_netCDF4.pyx":1430
* ierr = nc_inq_grps(_grpid, &numgrps, NULL)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -8629,22 +9868,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, 1395, __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, 1430, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1395, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1430, __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, 1395, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1430, __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, 1395, __pyx_L1_error)
+ __PYX_ERR(0, 1430, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1394
+ /* "netCDF4/_netCDF4.pyx":1429
* with nogil:
* ierr = nc_inq_grps(_grpid, &numgrps, NULL)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -8653,17 +9892,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1397
+ /* "netCDF4/_netCDF4.pyx":1432
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # create dictionary containing `netCDF4.Group` instances for groups in this group
* groups = OrderedDict() # <<<<<<<<<<<<<<
* if numgrps > 0:
* grpids = <int *>malloc(sizeof(int) * numgrps)
*/
- __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1397, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1432, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -8673,17 +9912,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, 1397, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1432, __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, 1397, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1432, __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":1398
+ /* "netCDF4/_netCDF4.pyx":1433
* # create dictionary containing `netCDF4.Group` instances for groups in this group
* groups = OrderedDict()
* if numgrps > 0: # <<<<<<<<<<<<<<
@@ -8693,7 +9932,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":1399
+ /* "netCDF4/_netCDF4.pyx":1434
* groups = OrderedDict()
* if numgrps > 0:
* grpids = <int *>malloc(sizeof(int) * numgrps) # <<<<<<<<<<<<<<
@@ -8702,7 +9941,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":1400
+ /* "netCDF4/_netCDF4.pyx":1435
* if numgrps > 0:
* grpids = <int *>malloc(sizeof(int) * numgrps)
* with nogil: # <<<<<<<<<<<<<<
@@ -8716,7 +9955,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1401
+ /* "netCDF4/_netCDF4.pyx":1436
* grpids = <int *>malloc(sizeof(int) * numgrps)
* with nogil:
* ierr = nc_inq_grps(_grpid, NULL, grpids) # <<<<<<<<<<<<<<
@@ -8726,7 +9965,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":1400
+ /* "netCDF4/_netCDF4.pyx":1435
* if numgrps > 0:
* grpids = <int *>malloc(sizeof(int) * numgrps)
* with nogil: # <<<<<<<<<<<<<<
@@ -8744,7 +9983,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
}
}
- /* "netCDF4/_netCDF4.pyx":1402
+ /* "netCDF4/_netCDF4.pyx":1437
* with nogil:
* ierr = nc_inq_grps(_grpid, NULL, grpids)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -8754,7 +9993,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":1403
+ /* "netCDF4/_netCDF4.pyx":1438
* ierr = nc_inq_grps(_grpid, NULL, grpids)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -8762,22 +10001,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, 1403, __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, 1438, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1403, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1438, __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, 1403, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __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, 1403, __pyx_L1_error)
+ __PYX_ERR(0, 1438, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1402
+ /* "netCDF4/_netCDF4.pyx":1437
* with nogil:
* ierr = nc_inq_grps(_grpid, NULL, grpids)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -8786,7 +10025,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1404
+ /* "netCDF4/_netCDF4.pyx":1439
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* for n from 0 <= n < numgrps: # <<<<<<<<<<<<<<
@@ -8796,7 +10035,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":1405
+ /* "netCDF4/_netCDF4.pyx":1440
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* for n from 0 <= n < numgrps:
* with nogil: # <<<<<<<<<<<<<<
@@ -8810,7 +10049,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1406
+ /* "netCDF4/_netCDF4.pyx":1441
* for n from 0 <= n < numgrps:
* with nogil:
* ierr = nc_inq_grpname(grpids[n], namstring) # <<<<<<<<<<<<<<
@@ -8820,7 +10059,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":1405
+ /* "netCDF4/_netCDF4.pyx":1440
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* for n from 0 <= n < numgrps:
* with nogil: # <<<<<<<<<<<<<<
@@ -8838,7 +10077,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
}
}
- /* "netCDF4/_netCDF4.pyx":1407
+ /* "netCDF4/_netCDF4.pyx":1442
* with nogil:
* ierr = nc_inq_grpname(grpids[n], namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -8848,7 +10087,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":1408
+ /* "netCDF4/_netCDF4.pyx":1443
* ierr = nc_inq_grpname(grpids[n], namstring)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -8856,22 +10095,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, 1408, __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, 1443, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1408, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1443, __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, 1408, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1443, __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, 1408, __pyx_L1_error)
+ __PYX_ERR(0, 1443, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1407
+ /* "netCDF4/_netCDF4.pyx":1442
* with nogil:
* ierr = nc_inq_grpname(grpids[n], namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -8880,25 +10119,25 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1409
+ /* "netCDF4/_netCDF4.pyx":1444
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 1409, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1444, __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, 1409, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1444, __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, 1409, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1444, __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, 1409, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1444, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
__pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -8908,32 +10147,54 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
__pyx_t_9 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1409, __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;
+ #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, 1444, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #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, 1444, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1444, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_7);
+ 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, 1444, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_7);
- 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, 1409, __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;
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1410
+ /* "netCDF4/_netCDF4.pyx":1445
* raise RuntimeError((<char *>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, 1410, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_group);
__Pyx_GIVEREF(__pyx_v_group);
@@ -8941,21 +10202,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, 1410, __pyx_L1_error)
+ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1445, __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, 1410, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyInt_From_int((__pyx_v_grpids[__pyx_v_n])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1445, __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, 1410, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_id, __pyx_t_10) < 0) __PYX_ERR(0, 1445, __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, 1410, __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, 1445, __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, 1410, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_groups, __pyx_v_name, __pyx_t_10) < 0)) __PYX_ERR(0, 1445, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
- /* "netCDF4/_netCDF4.pyx":1411
+ /* "netCDF4/_netCDF4.pyx":1446
* name = namstring.decode(default_encoding,unicode_error)
* groups[name] = Group(group, name, id=grpids[n])
* free(grpids) # <<<<<<<<<<<<<<
@@ -8964,7 +10225,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
*/
free(__pyx_v_grpids);
- /* "netCDF4/_netCDF4.pyx":1398
+ /* "netCDF4/_netCDF4.pyx":1433
* # create dictionary containing `netCDF4.Group` instances for groups in this group
* groups = OrderedDict()
* if numgrps > 0: # <<<<<<<<<<<<<<
@@ -8973,7 +10234,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1412
+ /* "netCDF4/_netCDF4.pyx":1447
* groups[name] = Group(group, name, id=grpids[n])
* free(grpids)
* return groups # <<<<<<<<<<<<<<
@@ -8985,7 +10246,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":1384
+ /* "netCDF4/_netCDF4.pyx":1419
* return dimensions
*
* cdef _get_grps(group): # <<<<<<<<<<<<<<
@@ -9011,7 +10272,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1414
+/* "netCDF4/_netCDF4.pyx":1449
* return groups
*
* cdef _get_vars(group): # <<<<<<<<<<<<<<
@@ -9054,42 +10315,42 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
- Py_ssize_t __pyx_t_9;
+ int __pyx_t_9;
PyObject *__pyx_t_10 = NULL;
PyObject *__pyx_t_11 = NULL;
PyObject *__pyx_t_12 = NULL;
PyObject *__pyx_t_13 = NULL;
int __pyx_t_14;
- int __pyx_t_15;
+ PyObject *__pyx_t_15 = NULL;
PyObject *__pyx_t_16 = NULL;
PyObject *__pyx_t_17 = NULL;
- PyObject *__pyx_t_18 = NULL;
- struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound __pyx_t_19;
+ struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound __pyx_t_18;
+ PyObject *__pyx_t_19 = NULL;
PyObject *__pyx_t_20 = NULL;
PyObject *__pyx_t_21 = NULL;
PyObject *__pyx_t_22 = NULL;
- PyObject *__pyx_t_23 = NULL;
- struct __pyx_opt_args_7netCDF4_8_netCDF4__read_vlen __pyx_t_24;
- struct __pyx_opt_args_7netCDF4_8_netCDF4__read_enum __pyx_t_25;
+ struct __pyx_opt_args_7netCDF4_8_netCDF4__read_vlen __pyx_t_23;
+ struct __pyx_opt_args_7netCDF4_8_netCDF4__read_enum __pyx_t_24;
+ Py_ssize_t __pyx_t_25;
PyObject *(*__pyx_t_26)(PyObject *);
PyObject *(*__pyx_t_27)(PyObject *);
int __pyx_t_28;
__Pyx_RefNannySetupContext("_get_vars", 0);
- /* "netCDF4/_netCDF4.pyx":1424
+ /* "netCDF4/_netCDF4.pyx":1459
* 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, 1424, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1459, __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, 1424, __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, 1459, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v__grpid = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":1425
+ /* "netCDF4/_netCDF4.pyx":1460
* # get number of variables in this Group.
* _grpid = group._grpid
* with nogil: # <<<<<<<<<<<<<<
@@ -9103,7 +10364,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1426
+ /* "netCDF4/_netCDF4.pyx":1461
* _grpid = group._grpid
* with nogil:
* ierr = nc_inq_nvars(_grpid, &numvars) # <<<<<<<<<<<<<<
@@ -9113,7 +10374,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":1425
+ /* "netCDF4/_netCDF4.pyx":1460
* # get number of variables in this Group.
* _grpid = group._grpid
* with nogil: # <<<<<<<<<<<<<<
@@ -9131,7 +10392,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
}
}
- /* "netCDF4/_netCDF4.pyx":1427
+ /* "netCDF4/_netCDF4.pyx":1462
* with nogil:
* ierr = nc_inq_nvars(_grpid, &numvars)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -9141,7 +10402,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":1428
+ /* "netCDF4/_netCDF4.pyx":1463
* ierr = nc_inq_nvars(_grpid, &numvars)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -9149,22 +10410,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, 1428, __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, 1463, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1428, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1463, __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, 1428, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1463, __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, 1428, __pyx_L1_error)
+ __PYX_ERR(0, 1463, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1427
+ /* "netCDF4/_netCDF4.pyx":1462
* with nogil:
* ierr = nc_inq_nvars(_grpid, &numvars)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -9173,17 +10434,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1430
+ /* "netCDF4/_netCDF4.pyx":1465
* raise RuntimeError((<char *>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, 1430, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1465, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -9193,17 +10454,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, 1430, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __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, 1430, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __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":1431
+ /* "netCDF4/_netCDF4.pyx":1466
* # create empty dictionary for variables.
* variables = OrderedDict()
* if numvars > 0: # <<<<<<<<<<<<<<
@@ -9213,7 +10474,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":1433
+ /* "netCDF4/_netCDF4.pyx":1468
* if numvars > 0:
* # get variable ids.
* varids = <int *>malloc(sizeof(int) * numvars) # <<<<<<<<<<<<<<
@@ -9222,20 +10483,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":1434
+ /* "netCDF4/_netCDF4.pyx":1469
* # get variable ids.
* varids = <int *>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, 1434, __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, 1469, __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, 1434, __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, 1469, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":1435
+ /* "netCDF4/_netCDF4.pyx":1470
* varids = <int *>malloc(sizeof(int) * numvars)
* if group.data_model == 'NETCDF4':
* with nogil: # <<<<<<<<<<<<<<
@@ -9249,7 +10510,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1436
+ /* "netCDF4/_netCDF4.pyx":1471
* if group.data_model == 'NETCDF4':
* with nogil:
* ierr = nc_inq_varids(_grpid, &numvars, varids) # <<<<<<<<<<<<<<
@@ -9259,7 +10520,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":1435
+ /* "netCDF4/_netCDF4.pyx":1470
* varids = <int *>malloc(sizeof(int) * numvars)
* if group.data_model == 'NETCDF4':
* with nogil: # <<<<<<<<<<<<<<
@@ -9277,7 +10538,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
}
}
- /* "netCDF4/_netCDF4.pyx":1437
+ /* "netCDF4/_netCDF4.pyx":1472
* with nogil:
* ierr = nc_inq_varids(_grpid, &numvars, varids)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -9287,7 +10548,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":1438
+ /* "netCDF4/_netCDF4.pyx":1473
* ierr = nc_inq_varids(_grpid, &numvars, varids)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -9295,22 +10556,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, 1438, __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, 1473, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1438, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1473, __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, 1438, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __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, 1438, __pyx_L1_error)
+ __PYX_ERR(0, 1473, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1437
+ /* "netCDF4/_netCDF4.pyx":1472
* with nogil:
* ierr = nc_inq_varids(_grpid, &numvars, varids)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -9319,7 +10580,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1434
+ /* "netCDF4/_netCDF4.pyx":1469
* # get variable ids.
* varids = <int *>malloc(sizeof(int) * numvars)
* if group.data_model == 'NETCDF4': # <<<<<<<<<<<<<<
@@ -9329,7 +10590,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
goto __pyx_L8;
}
- /* "netCDF4/_netCDF4.pyx":1440
+ /* "netCDF4/_netCDF4.pyx":1475
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* else:
* for n from 0 <= n < numvars: # <<<<<<<<<<<<<<
@@ -9340,7 +10601,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":1441
+ /* "netCDF4/_netCDF4.pyx":1476
* else:
* for n from 0 <= n < numvars:
* varids[n] = n # <<<<<<<<<<<<<<
@@ -9352,7 +10613,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
}
__pyx_L8:;
- /* "netCDF4/_netCDF4.pyx":1443
+ /* "netCDF4/_netCDF4.pyx":1478
* varids[n] = n
* # loop over variables.
* for n from 0 <= n < numvars: # <<<<<<<<<<<<<<
@@ -9362,7 +10623,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":1444
+ /* "netCDF4/_netCDF4.pyx":1479
* # loop over variables.
* for n from 0 <= n < numvars:
* varid = varids[n] # <<<<<<<<<<<<<<
@@ -9371,7 +10632,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":1446
+ /* "netCDF4/_netCDF4.pyx":1481
* varid = varids[n]
* # get variable name.
* with nogil: # <<<<<<<<<<<<<<
@@ -9385,7 +10646,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1447
+ /* "netCDF4/_netCDF4.pyx":1482
* # get variable name.
* with nogil:
* ierr = nc_inq_varname(_grpid, varid, namstring) # <<<<<<<<<<<<<<
@@ -9395,7 +10656,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":1446
+ /* "netCDF4/_netCDF4.pyx":1481
* varid = varids[n]
* # get variable name.
* with nogil: # <<<<<<<<<<<<<<
@@ -9413,7 +10674,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
}
}
- /* "netCDF4/_netCDF4.pyx":1448
+ /* "netCDF4/_netCDF4.pyx":1483
* with nogil:
* ierr = nc_inq_varname(_grpid, varid, namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -9423,7 +10684,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":1449
+ /* "netCDF4/_netCDF4.pyx":1484
* ierr = nc_inq_varname(_grpid, varid, namstring)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -9431,22 +10692,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, 1449, __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, 1484, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1449, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1484, __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, 1449, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __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, 1449, __pyx_L1_error)
+ __PYX_ERR(0, 1484, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1448
+ /* "netCDF4/_netCDF4.pyx":1483
* with nogil:
* ierr = nc_inq_varname(_grpid, varid, namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -9455,25 +10716,25 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1450
+ /* "netCDF4/_netCDF4.pyx":1485
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* name = namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<<
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*/
- __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1450, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1485, __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, 1450, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1485, __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, 1450, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1485, __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, 1450, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1485, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
__pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -9483,25 +10744,47 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
__pyx_t_9 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1450, __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;
+ #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, 1485, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #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, 1485, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1485, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_7);
+ 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, 1485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_7);
- 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, 1450, __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;
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1451
+ /* "netCDF4/_netCDF4.pyx":1486
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* name = namstring.decode(default_encoding,unicode_error)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -9511,7 +10794,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":1452
+ /* "netCDF4/_netCDF4.pyx":1487
* name = namstring.decode(default_encoding,unicode_error)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -9519,22 +10802,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, 1452, __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_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1452, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1487, __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, 1452, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1487, __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, 1452, __pyx_L1_error)
+ __PYX_ERR(0, 1487, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1451
+ /* "netCDF4/_netCDF4.pyx":1486
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* name = namstring.decode(default_encoding,unicode_error)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -9543,7 +10826,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1454
+ /* "netCDF4/_netCDF4.pyx":1489
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # get variable type.
* with nogil: # <<<<<<<<<<<<<<
@@ -9557,7 +10840,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1455
+ /* "netCDF4/_netCDF4.pyx":1490
* # get variable type.
* with nogil:
* ierr = nc_inq_vartype(_grpid, varid, &xtype) # <<<<<<<<<<<<<<
@@ -9567,7 +10850,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":1454
+ /* "netCDF4/_netCDF4.pyx":1489
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # get variable type.
* with nogil: # <<<<<<<<<<<<<<
@@ -9585,7 +10868,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
}
}
- /* "netCDF4/_netCDF4.pyx":1456
+ /* "netCDF4/_netCDF4.pyx":1491
* with nogil:
* ierr = nc_inq_vartype(_grpid, varid, &xtype)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -9595,7 +10878,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":1457
+ /* "netCDF4/_netCDF4.pyx":1492
* ierr = nc_inq_vartype(_grpid, varid, &xtype)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -9603,22 +10886,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, 1457, __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, 1492, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1457, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1492, __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, 1457, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1492, __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, 1457, __pyx_L1_error)
+ __PYX_ERR(0, 1492, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1456
+ /* "netCDF4/_netCDF4.pyx":1491
* with nogil:
* ierr = nc_inq_vartype(_grpid, varid, &xtype)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -9627,7 +10910,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1459
+ /* "netCDF4/_netCDF4.pyx":1494
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # get endian-ness of variable.
* endianness = None # <<<<<<<<<<<<<<
@@ -9637,7 +10920,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":1460
+ /* "netCDF4/_netCDF4.pyx":1495
* # get endian-ness of variable.
* endianness = None
* with nogil: # <<<<<<<<<<<<<<
@@ -9651,7 +10934,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1461
+ /* "netCDF4/_netCDF4.pyx":1496
* endianness = None
* with nogil:
* ierr = nc_inq_var_endian(_grpid, varid, &iendian) # <<<<<<<<<<<<<<
@@ -9661,7 +10944,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":1460
+ /* "netCDF4/_netCDF4.pyx":1495
* # get endian-ness of variable.
* endianness = None
* with nogil: # <<<<<<<<<<<<<<
@@ -9679,7 +10962,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
}
}
- /* "netCDF4/_netCDF4.pyx":1462
+ /* "netCDF4/_netCDF4.pyx":1497
* with nogil:
* ierr = nc_inq_var_endian(_grpid, varid, &iendian)
* if ierr == NC_NOERR: # <<<<<<<<<<<<<<
@@ -9689,7 +10972,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":1463
+ /* "netCDF4/_netCDF4.pyx":1498
* ierr = nc_inq_var_endian(_grpid, varid, &iendian)
* if ierr == NC_NOERR:
* if iendian == NC_ENDIAN_LITTLE: # <<<<<<<<<<<<<<
@@ -9699,17 +10982,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
switch (__pyx_v_iendian) {
case NC_ENDIAN_LITTLE:
- /* "netCDF4/_netCDF4.pyx":1464
+ /* "netCDF4/_netCDF4.pyx":1499
* if ierr == NC_NOERR:
* if iendian == NC_ENDIAN_LITTLE:
* endianness = '<' # <<<<<<<<<<<<<<
* elif iendian == NC_ENDIAN_BIG:
* endianness = '>'
*/
- __Pyx_INCREF(__pyx_kp_s__14);
- __Pyx_DECREF_SET(__pyx_v_endianness, __pyx_kp_s__14);
+ __Pyx_INCREF(__pyx_kp_s__13);
+ __Pyx_DECREF_SET(__pyx_v_endianness, __pyx_kp_s__13);
- /* "netCDF4/_netCDF4.pyx":1463
+ /* "netCDF4/_netCDF4.pyx":1498
* ierr = nc_inq_var_endian(_grpid, varid, &iendian)
* if ierr == NC_NOERR:
* if iendian == NC_ENDIAN_LITTLE: # <<<<<<<<<<<<<<
@@ -9718,7 +11001,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
break;
- /* "netCDF4/_netCDF4.pyx":1465
+ /* "netCDF4/_netCDF4.pyx":1500
* if iendian == NC_ENDIAN_LITTLE:
* endianness = '<'
* elif iendian == NC_ENDIAN_BIG: # <<<<<<<<<<<<<<
@@ -9727,17 +11010,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
case NC_ENDIAN_BIG:
- /* "netCDF4/_netCDF4.pyx":1466
+ /* "netCDF4/_netCDF4.pyx":1501
* endianness = '<'
* elif iendian == NC_ENDIAN_BIG:
* endianness = '>' # <<<<<<<<<<<<<<
* # check to see if it is a supported user-defined type.
* try:
*/
- __Pyx_INCREF(__pyx_kp_s__15);
- __Pyx_DECREF_SET(__pyx_v_endianness, __pyx_kp_s__15);
+ __Pyx_INCREF(__pyx_kp_s__14);
+ __Pyx_DECREF_SET(__pyx_v_endianness, __pyx_kp_s__14);
- /* "netCDF4/_netCDF4.pyx":1465
+ /* "netCDF4/_netCDF4.pyx":1500
* if iendian == NC_ENDIAN_LITTLE:
* endianness = '<'
* elif iendian == NC_ENDIAN_BIG: # <<<<<<<<<<<<<<
@@ -9748,7 +11031,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
default: break;
}
- /* "netCDF4/_netCDF4.pyx":1462
+ /* "netCDF4/_netCDF4.pyx":1497
* with nogil:
* ierr = nc_inq_var_endian(_grpid, varid, &iendian)
* if ierr == NC_NOERR: # <<<<<<<<<<<<<<
@@ -9757,7 +11040,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1468
+ /* "netCDF4/_netCDF4.pyx":1503
* endianness = '>'
* # check to see if it is a supported user-defined type.
* try: # <<<<<<<<<<<<<<
@@ -9773,22 +11056,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
__Pyx_XGOTREF(__pyx_t_13);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1469
+ /* "netCDF4/_netCDF4.pyx":1504
* # 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, 1469, __pyx_L36_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1504, __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, 1469, __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, 1504, __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":1470
+ /* "netCDF4/_netCDF4.pyx":1505
* try:
* datatype = _nctonptype[xtype]
* if endianness is not None: # <<<<<<<<<<<<<<
@@ -9799,19 +11082,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":1471
+ /* "netCDF4/_netCDF4.pyx":1506
* 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, 1471, __pyx_L36_error)
+ __pyx_t_6 = PyNumber_Add(__pyx_v_endianness, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1506, __pyx_L36_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_6);
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":1470
+ /* "netCDF4/_netCDF4.pyx":1505
* try:
* datatype = _nctonptype[xtype]
* if endianness is not None: # <<<<<<<<<<<<<<
@@ -9820,7 +11103,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1468
+ /* "netCDF4/_netCDF4.pyx":1503
* endianness = '>'
* # check to see if it is a supported user-defined type.
* try: # <<<<<<<<<<<<<<
@@ -9841,22 +11124,22 @@ 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":1472
+ /* "netCDF4/_netCDF4.pyx":1507
* if endianness is not None:
* datatype = endianness + datatype
* except KeyError: # <<<<<<<<<<<<<<
* if xtype == NC_STRING:
* datatype = str
*/
- __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
- if (__pyx_t_15) {
+ __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, 1472, __pyx_L38_except_error)
+ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_10) < 0) __PYX_ERR(0, 1507, __pyx_L38_except_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_10);
- /* "netCDF4/_netCDF4.pyx":1473
+ /* "netCDF4/_netCDF4.pyx":1508
* datatype = endianness + datatype
* except KeyError:
* if xtype == NC_STRING: # <<<<<<<<<<<<<<
@@ -9866,7 +11149,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":1474
+ /* "netCDF4/_netCDF4.pyx":1509
* except KeyError:
* if xtype == NC_STRING:
* datatype = str # <<<<<<<<<<<<<<
@@ -9876,7 +11159,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":1473
+ /* "netCDF4/_netCDF4.pyx":1508
* datatype = endianness + datatype
* except KeyError:
* if xtype == NC_STRING: # <<<<<<<<<<<<<<
@@ -9886,7 +11169,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
goto __pyx_L47;
}
- /* "netCDF4/_netCDF4.pyx":1476
+ /* "netCDF4/_netCDF4.pyx":1511
* datatype = str
* else:
* with nogil: # <<<<<<<<<<<<<<
@@ -9901,7 +11184,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1477
+ /* "netCDF4/_netCDF4.pyx":1512
* else:
* with nogil:
* ierr = nc_inq_user_type(_grpid, xtype, namstring_cmp, # <<<<<<<<<<<<<<
@@ -9911,7 +11194,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":1476
+ /* "netCDF4/_netCDF4.pyx":1511
* datatype = str
* else:
* with nogil: # <<<<<<<<<<<<<<
@@ -9929,7 +11212,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
}
}
- /* "netCDF4/_netCDF4.pyx":1479
+ /* "netCDF4/_netCDF4.pyx":1514
* ierr = nc_inq_user_type(_grpid, xtype, namstring_cmp,
* NULL, NULL, NULL, &classp)
* if classp == NC_COMPOUND: # a compound type # <<<<<<<<<<<<<<
@@ -9939,7 +11222,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
switch (__pyx_v_classp) {
case NC_COMPOUND:
- /* "netCDF4/_netCDF4.pyx":1481
+ /* "netCDF4/_netCDF4.pyx":1516
* if classp == NC_COMPOUND: # a compound type
* # create CompoundType instance describing this compound type.
* try: # <<<<<<<<<<<<<<
@@ -9949,27 +11232,27 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
+ __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
+ __Pyx_XGOTREF(__pyx_t_15);
__Pyx_XGOTREF(__pyx_t_16);
__Pyx_XGOTREF(__pyx_t_17);
- __Pyx_XGOTREF(__pyx_t_18);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1482
+ /* "netCDF4/_netCDF4.pyx":1517
* # create CompoundType instance describing this compound type.
* try:
* datatype = _read_compound(group, xtype, endian=endianness) # <<<<<<<<<<<<<<
* except KeyError:
* msg="WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
*/
- __pyx_t_19.__pyx_n = 1;
- __pyx_t_19.endian = __pyx_v_endianness;
- __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_group, __pyx_v_xtype, &__pyx_t_19); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1482, __pyx_L53_error)
+ __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, 1517, __pyx_L53_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":1481
+ /* "netCDF4/_netCDF4.pyx":1516
* if classp == NC_COMPOUND: # a compound type
* # create CompoundType instance describing this compound type.
* try: # <<<<<<<<<<<<<<
@@ -9977,9 +11260,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
* except KeyError:
*/
}
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
__Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
goto __pyx_L60_try_end;
__pyx_L53_error:;
__Pyx_PyThreadState_assign
@@ -9987,73 +11270,91 @@ 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":1483
+ /* "netCDF4/_netCDF4.pyx":1518
* try:
* datatype = _read_compound(group, xtype, endian=endianness)
* except KeyError: # <<<<<<<<<<<<<<
* msg="WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
* warnings.warn(msg)
*/
- __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
- if (__pyx_t_15) {
+ __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, 1483, __pyx_L55_except_error)
+ if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 1518, __pyx_L55_except_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GOTREF(__pyx_t_8);
- /* "netCDF4/_netCDF4.pyx":1484
+ /* "netCDF4/_netCDF4.pyx":1519
* 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_20 = __Pyx_PyString_Format(__pyx_kp_s_WARNING_variable_s_has_unsupport, __pyx_v_name); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1484, __pyx_L55_except_error)
- __Pyx_GOTREF(__pyx_t_20);
- __Pyx_XDECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_20));
- __pyx_t_20 = 0;
+ __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, 1519, __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":1485
+ /* "netCDF4/_netCDF4.pyx":1520
* 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_21 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1485, __pyx_L55_except_error)
+ __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1520, __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, 1520, __pyx_L55_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, 1485, __pyx_L55_except_error)
- __Pyx_GOTREF(__pyx_t_22);
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
- __pyx_t_21 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_22))) {
- __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_22);
- if (likely(__pyx_t_21)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22);
- __Pyx_INCREF(__pyx_t_21);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __pyx_t_20 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_21))) {
+ __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_21);
+ if (likely(__pyx_t_20)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_21);
+ __Pyx_INCREF(__pyx_t_20);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_22, function);
+ __Pyx_DECREF_SET(__pyx_t_21, function);
}
}
- if (!__pyx_t_21) {
- __pyx_t_20 = __Pyx_PyObject_CallOneArg(__pyx_t_22, __pyx_v_msg); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1485, __pyx_L55_except_error)
- __Pyx_GOTREF(__pyx_t_20);
+ if (!__pyx_t_20) {
+ __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_t_21, __pyx_v_msg); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1520, __pyx_L55_except_error)
+ __Pyx_GOTREF(__pyx_t_19);
} else {
- __pyx_t_23 = PyTuple_New(1+1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1485, __pyx_L55_except_error)
- __Pyx_GOTREF(__pyx_t_23);
- __Pyx_GIVEREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_21); __pyx_t_21 = NULL;
- __Pyx_INCREF(__pyx_v_msg);
- __Pyx_GIVEREF(__pyx_v_msg);
- PyTuple_SET_ITEM(__pyx_t_23, 0+1, __pyx_v_msg);
- __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_23, NULL); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1485, __pyx_L55_except_error)
- __Pyx_GOTREF(__pyx_t_20);
- __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
+ #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, 1520, __pyx_L55_except_error)
+ __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __Pyx_GOTREF(__pyx_t_19);
+ } else
+ #endif
+ #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, 1520, __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, 1520, __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, 1520, __pyx_L55_except_error)
+ __Pyx_GOTREF(__pyx_t_19);
+ __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- /* "netCDF4/_netCDF4.pyx":1486
+ /* "netCDF4/_netCDF4.pyx":1521
* msg="WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
* warnings.warn(msg)
* continue # <<<<<<<<<<<<<<
@@ -10070,7 +11371,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":1481
+ /* "netCDF4/_netCDF4.pyx":1516
* if classp == NC_COMPOUND: # a compound type
* # create CompoundType instance describing this compound type.
* try: # <<<<<<<<<<<<<<
@@ -10078,22 +11379,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
* except KeyError:
*/
__Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_15);
__Pyx_XGIVEREF(__pyx_t_16);
__Pyx_XGIVEREF(__pyx_t_17);
- __Pyx_XGIVEREF(__pyx_t_18);
- __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+ __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
goto __pyx_L38_except_error;
__pyx_L59_try_continue:;
__Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_15);
__Pyx_XGIVEREF(__pyx_t_16);
__Pyx_XGIVEREF(__pyx_t_17);
- __Pyx_XGIVEREF(__pyx_t_18);
- __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+ __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
goto __pyx_L46_except_continue;
__pyx_L60_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":1479
+ /* "netCDF4/_netCDF4.pyx":1514
* ierr = nc_inq_user_type(_grpid, xtype, namstring_cmp,
* NULL, NULL, NULL, &classp)
* if classp == NC_COMPOUND: # a compound type # <<<<<<<<<<<<<<
@@ -10102,7 +11403,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
break;
- /* "netCDF4/_netCDF4.pyx":1487
+ /* "netCDF4/_netCDF4.pyx":1522
* warnings.warn(msg)
* continue
* elif classp == NC_VLEN: # a compound type # <<<<<<<<<<<<<<
@@ -10111,7 +11412,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
case NC_VLEN:
- /* "netCDF4/_netCDF4.pyx":1489
+ /* "netCDF4/_netCDF4.pyx":1524
* elif classp == NC_VLEN: # a compound type
* # create VLType instance describing this compound type.
* try: # <<<<<<<<<<<<<<
@@ -10121,27 +11422,27 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
- __Pyx_XGOTREF(__pyx_t_18);
+ __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
__Pyx_XGOTREF(__pyx_t_17);
__Pyx_XGOTREF(__pyx_t_16);
+ __Pyx_XGOTREF(__pyx_t_15);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1490
+ /* "netCDF4/_netCDF4.pyx":1525
* # create VLType instance describing this compound type.
* try:
* datatype = _read_vlen(group, xtype, endian=endianness) # <<<<<<<<<<<<<<
* except KeyError:
* msg="WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
*/
- __pyx_t_24.__pyx_n = 1;
- __pyx_t_24.endian = __pyx_v_endianness;
- __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__read_vlen(__pyx_v_group, __pyx_v_xtype, &__pyx_t_24); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1490, __pyx_L63_error)
+ __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, 1525, __pyx_L63_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_8);
__pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":1489
+ /* "netCDF4/_netCDF4.pyx":1524
* elif classp == NC_VLEN: # a compound type
* # create VLType instance describing this compound type.
* try: # <<<<<<<<<<<<<<
@@ -10149,87 +11450,105 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
* except KeyError:
*/
}
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
__Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
__Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
goto __pyx_L70_try_end;
__pyx_L63_error:;
__Pyx_PyThreadState_assign
- __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
- __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
- __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
__Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
+ __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
+ __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":1491
+ /* "netCDF4/_netCDF4.pyx":1526
* try:
* datatype = _read_vlen(group, xtype, endian=endianness)
* except KeyError: # <<<<<<<<<<<<<<
* msg="WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
* warnings.warn(msg)
*/
- __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
- if (__pyx_t_15) {
+ __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, 1491, __pyx_L65_except_error)
+ if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 1526, __pyx_L65_except_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GOTREF(__pyx_t_7);
- /* "netCDF4/_netCDF4.pyx":1492
+ /* "netCDF4/_netCDF4.pyx":1527
* 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_20 = __Pyx_PyString_Format(__pyx_kp_s_WARNING_variable_s_has_unsupport_2, __pyx_v_name); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1492, __pyx_L65_except_error)
- __Pyx_GOTREF(__pyx_t_20);
- __Pyx_XDECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_20));
- __pyx_t_20 = 0;
+ __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, 1527, __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":1493
+ /* "netCDF4/_netCDF4.pyx":1528
* except KeyError:
* msg="WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
* warnings.warn(msg) # <<<<<<<<<<<<<<
* continue
* elif classp == NC_ENUM:
*/
- __pyx_t_22 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1493, __pyx_L65_except_error)
+ __pyx_t_21 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1528, __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, 1528, __pyx_L65_except_error)
__Pyx_GOTREF(__pyx_t_22);
- __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_warn); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1493, __pyx_L65_except_error)
- __Pyx_GOTREF(__pyx_t_23);
- __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
- __pyx_t_22 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_23))) {
- __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_23);
- if (likely(__pyx_t_22)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_23);
- __Pyx_INCREF(__pyx_t_22);
+ __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+ __pyx_t_21 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_22))) {
+ __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_22);
+ if (likely(__pyx_t_21)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22);
+ __Pyx_INCREF(__pyx_t_21);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_23, function);
+ __Pyx_DECREF_SET(__pyx_t_22, function);
}
}
- if (!__pyx_t_22) {
- __pyx_t_20 = __Pyx_PyObject_CallOneArg(__pyx_t_23, __pyx_v_msg); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1493, __pyx_L65_except_error)
- __Pyx_GOTREF(__pyx_t_20);
+ if (!__pyx_t_21) {
+ __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_t_22, __pyx_v_msg); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1528, __pyx_L65_except_error)
+ __Pyx_GOTREF(__pyx_t_19);
} else {
- __pyx_t_21 = PyTuple_New(1+1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1493, __pyx_L65_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_20 = __Pyx_PyObject_Call(__pyx_t_23, __pyx_t_21, NULL); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1493, __pyx_L65_except_error)
- __Pyx_GOTREF(__pyx_t_20);
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+ #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, 1528, __pyx_L65_except_error)
+ __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
+ __Pyx_GOTREF(__pyx_t_19);
+ } else
+ #endif
+ #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, 1528, __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, 1528, __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, 1528, __pyx_L65_except_error)
+ __Pyx_GOTREF(__pyx_t_19);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- /* "netCDF4/_netCDF4.pyx":1494
+ /* "netCDF4/_netCDF4.pyx":1529
* msg="WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
* warnings.warn(msg)
* continue # <<<<<<<<<<<<<<
@@ -10246,7 +11565,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":1489
+ /* "netCDF4/_netCDF4.pyx":1524
* elif classp == NC_VLEN: # a compound type
* # create VLType instance describing this compound type.
* try: # <<<<<<<<<<<<<<
@@ -10254,22 +11573,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
* except KeyError:
*/
__Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_18);
__Pyx_XGIVEREF(__pyx_t_17);
__Pyx_XGIVEREF(__pyx_t_16);
- __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
goto __pyx_L38_except_error;
__pyx_L69_try_continue:;
__Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_18);
__Pyx_XGIVEREF(__pyx_t_17);
__Pyx_XGIVEREF(__pyx_t_16);
- __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
goto __pyx_L46_except_continue;
__pyx_L70_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":1487
+ /* "netCDF4/_netCDF4.pyx":1522
* warnings.warn(msg)
* continue
* elif classp == NC_VLEN: # a compound type # <<<<<<<<<<<<<<
@@ -10278,7 +11597,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
break;
- /* "netCDF4/_netCDF4.pyx":1495
+ /* "netCDF4/_netCDF4.pyx":1530
* warnings.warn(msg)
* continue
* elif classp == NC_ENUM: # <<<<<<<<<<<<<<
@@ -10287,7 +11606,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
case NC_ENUM:
- /* "netCDF4/_netCDF4.pyx":1497
+ /* "netCDF4/_netCDF4.pyx":1532
* elif classp == NC_ENUM:
* # create EnumType instance describing this compound type.
* try: # <<<<<<<<<<<<<<
@@ -10297,27 +11616,27 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
+ __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
+ __Pyx_XGOTREF(__pyx_t_15);
__Pyx_XGOTREF(__pyx_t_16);
__Pyx_XGOTREF(__pyx_t_17);
- __Pyx_XGOTREF(__pyx_t_18);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1498
+ /* "netCDF4/_netCDF4.pyx":1533
* # create EnumType instance describing this compound type.
* try:
* datatype = _read_enum(group, xtype, endian=endianness) # <<<<<<<<<<<<<<
* except KeyError:
* msg="WARNING: variable '%s' has unsupported Enum datatype, skipping .." % name
*/
- __pyx_t_25.__pyx_n = 1;
- __pyx_t_25.endian = __pyx_v_endianness;
- __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__read_enum(__pyx_v_group, __pyx_v_xtype, &__pyx_t_25); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1498, __pyx_L73_error)
+ __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, 1533, __pyx_L73_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":1497
+ /* "netCDF4/_netCDF4.pyx":1532
* elif classp == NC_ENUM:
* # create EnumType instance describing this compound type.
* try: # <<<<<<<<<<<<<<
@@ -10325,87 +11644,105 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
* except KeyError:
*/
}
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
__Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
goto __pyx_L80_try_end;
__pyx_L73_error:;
__Pyx_PyThreadState_assign
- __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
__Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
- __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
__Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
+ __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":1499
+ /* "netCDF4/_netCDF4.pyx":1534
* try:
* datatype = _read_enum(group, xtype, endian=endianness)
* except KeyError: # <<<<<<<<<<<<<<
* msg="WARNING: variable '%s' has unsupported Enum datatype, skipping .." % name
* warnings.warn(msg)
*/
- __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
- if (__pyx_t_15) {
+ __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, 1499, __pyx_L75_except_error)
+ if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 1534, __pyx_L75_except_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GOTREF(__pyx_t_8);
- /* "netCDF4/_netCDF4.pyx":1500
+ /* "netCDF4/_netCDF4.pyx":1535
* 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_20 = __Pyx_PyString_Format(__pyx_kp_s_WARNING_variable_s_has_unsupport_3, __pyx_v_name); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1500, __pyx_L75_except_error)
- __Pyx_GOTREF(__pyx_t_20);
- __Pyx_XDECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_20));
- __pyx_t_20 = 0;
+ __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, 1535, __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":1501
+ /* "netCDF4/_netCDF4.pyx":1536
* except KeyError:
* msg="WARNING: variable '%s' has unsupported Enum datatype, skipping .." % name
* warnings.warn(msg) # <<<<<<<<<<<<<<
* continue
* else:
*/
- __pyx_t_23 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1501, __pyx_L75_except_error)
- __Pyx_GOTREF(__pyx_t_23);
- __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_warn); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1501, __pyx_L75_except_error)
- __Pyx_GOTREF(__pyx_t_21);
- __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
- __pyx_t_23 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_21))) {
- __pyx_t_23 = PyMethod_GET_SELF(__pyx_t_21);
- if (likely(__pyx_t_23)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_21);
- __Pyx_INCREF(__pyx_t_23);
+ __pyx_t_22 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1536, __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, 1536, __pyx_L75_except_error)
+ __Pyx_GOTREF(__pyx_t_20);
+ __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
+ __pyx_t_22 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_20))) {
+ __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_20);
+ if (likely(__pyx_t_22)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_20);
+ __Pyx_INCREF(__pyx_t_22);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_21, function);
+ __Pyx_DECREF_SET(__pyx_t_20, function);
}
}
- if (!__pyx_t_23) {
- __pyx_t_20 = __Pyx_PyObject_CallOneArg(__pyx_t_21, __pyx_v_msg); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1501, __pyx_L75_except_error)
- __Pyx_GOTREF(__pyx_t_20);
+ if (!__pyx_t_22) {
+ __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_t_20, __pyx_v_msg); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1536, __pyx_L75_except_error)
+ __Pyx_GOTREF(__pyx_t_19);
} else {
- __pyx_t_22 = PyTuple_New(1+1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1501, __pyx_L75_except_error)
- __Pyx_GOTREF(__pyx_t_22);
- __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_23); __pyx_t_23 = NULL;
- __Pyx_INCREF(__pyx_v_msg);
- __Pyx_GIVEREF(__pyx_v_msg);
- PyTuple_SET_ITEM(__pyx_t_22, 0+1, __pyx_v_msg);
- __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_t_22, NULL); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1501, __pyx_L75_except_error)
- __Pyx_GOTREF(__pyx_t_20);
- __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
+ #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, 1536, __pyx_L75_except_error)
+ __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
+ __Pyx_GOTREF(__pyx_t_19);
+ } else
+ #endif
+ #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, 1536, __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, 1536, __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, 1536, __pyx_L75_except_error)
+ __Pyx_GOTREF(__pyx_t_19);
+ __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
__Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- /* "netCDF4/_netCDF4.pyx":1502
+ /* "netCDF4/_netCDF4.pyx":1537
* msg="WARNING: variable '%s' has unsupported Enum datatype, skipping .." % name
* warnings.warn(msg)
* continue # <<<<<<<<<<<<<<
@@ -10422,7 +11759,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":1497
+ /* "netCDF4/_netCDF4.pyx":1532
* elif classp == NC_ENUM:
* # create EnumType instance describing this compound type.
* try: # <<<<<<<<<<<<<<
@@ -10430,22 +11767,22 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
* except KeyError:
*/
__Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_15);
__Pyx_XGIVEREF(__pyx_t_16);
__Pyx_XGIVEREF(__pyx_t_17);
- __Pyx_XGIVEREF(__pyx_t_18);
- __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+ __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
goto __pyx_L38_except_error;
__pyx_L79_try_continue:;
__Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_15);
__Pyx_XGIVEREF(__pyx_t_16);
__Pyx_XGIVEREF(__pyx_t_17);
- __Pyx_XGIVEREF(__pyx_t_18);
- __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+ __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
goto __pyx_L46_except_continue;
__pyx_L80_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":1495
+ /* "netCDF4/_netCDF4.pyx":1530
* warnings.warn(msg)
* continue
* elif classp == NC_ENUM: # <<<<<<<<<<<<<<
@@ -10455,32 +11792,32 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
break;
default:
- /* "netCDF4/_netCDF4.pyx":1504
+ /* "netCDF4/_netCDF4.pyx":1539
* 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, 1504, __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, 1539, __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":1505
+ /* "netCDF4/_netCDF4.pyx":1540
* 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, 1505, __pyx_L38_except_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1540, __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, 1505, __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, 1540, __pyx_L38_except_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -10490,23 +11827,41 @@ 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, 1505, __pyx_L38_except_error)
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_msg); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1540, __pyx_L38_except_error)
__Pyx_GOTREF(__pyx_t_8);
} else {
- __pyx_t_20 = PyTuple_New(1+1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1505, __pyx_L38_except_error)
- __Pyx_GOTREF(__pyx_t_20);
- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_5); __pyx_t_5 = NULL;
- __Pyx_INCREF(__pyx_v_msg);
- __Pyx_GIVEREF(__pyx_v_msg);
- PyTuple_SET_ITEM(__pyx_t_20, 0+1, __pyx_v_msg);
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_20, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1505, __pyx_L38_except_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ #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, 1540, __pyx_L38_except_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else
+ #endif
+ #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, 1540, __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, 1540, __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, 1540, __pyx_L38_except_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":1506
+ /* "netCDF4/_netCDF4.pyx":1541
* msg="WARNING: variable '%s' has unsupported datatype, skipping .." % name
* warnings.warn(msg)
* continue # <<<<<<<<<<<<<<
@@ -10531,7 +11886,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":1468
+ /* "netCDF4/_netCDF4.pyx":1503
* endianness = '>'
* # check to see if it is a supported user-defined type.
* try: # <<<<<<<<<<<<<<
@@ -10560,7 +11915,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
__pyx_L43_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":1508
+ /* "netCDF4/_netCDF4.pyx":1543
* continue
* # get number of dimensions.
* with nogil: # <<<<<<<<<<<<<<
@@ -10574,7 +11929,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1509
+ /* "netCDF4/_netCDF4.pyx":1544
* # get number of dimensions.
* with nogil:
* ierr = nc_inq_varndims(_grpid, varid, &numdims) # <<<<<<<<<<<<<<
@@ -10584,7 +11939,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":1508
+ /* "netCDF4/_netCDF4.pyx":1543
* continue
* # get number of dimensions.
* with nogil: # <<<<<<<<<<<<<<
@@ -10602,7 +11957,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
}
}
- /* "netCDF4/_netCDF4.pyx":1510
+ /* "netCDF4/_netCDF4.pyx":1545
* with nogil:
* ierr = nc_inq_varndims(_grpid, varid, &numdims)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -10612,7 +11967,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":1511
+ /* "netCDF4/_netCDF4.pyx":1546
* ierr = nc_inq_varndims(_grpid, varid, &numdims)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -10620,22 +11975,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, 1511, __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, 1546, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1511, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1546, __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, 1511, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1546, __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, 1511, __pyx_L1_error)
+ __PYX_ERR(0, 1546, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1510
+ /* "netCDF4/_netCDF4.pyx":1545
* with nogil:
* ierr = nc_inq_varndims(_grpid, varid, &numdims)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -10644,7 +11999,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1512
+ /* "netCDF4/_netCDF4.pyx":1547
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* dimids = <int *>malloc(sizeof(int) * numdims) # <<<<<<<<<<<<<<
@@ -10653,7 +12008,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":1514
+ /* "netCDF4/_netCDF4.pyx":1549
* dimids = <int *>malloc(sizeof(int) * numdims)
* # get dimension ids.
* with nogil: # <<<<<<<<<<<<<<
@@ -10667,7 +12022,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":1515
+ /* "netCDF4/_netCDF4.pyx":1550
* # get dimension ids.
* with nogil:
* ierr = nc_inq_vardimid(_grpid, varid, dimids) # <<<<<<<<<<<<<<
@@ -10677,7 +12032,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":1514
+ /* "netCDF4/_netCDF4.pyx":1549
* dimids = <int *>malloc(sizeof(int) * numdims)
* # get dimension ids.
* with nogil: # <<<<<<<<<<<<<<
@@ -10695,7 +12050,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
}
}
- /* "netCDF4/_netCDF4.pyx":1516
+ /* "netCDF4/_netCDF4.pyx":1551
* with nogil:
* ierr = nc_inq_vardimid(_grpid, varid, dimids)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -10705,7 +12060,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":1517
+ /* "netCDF4/_netCDF4.pyx":1552
* ierr = nc_inq_vardimid(_grpid, varid, dimids)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -10713,22 +12068,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, 1517, __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, 1552, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __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, 1517, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1552, __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, 1517, __pyx_L1_error)
+ __PYX_ERR(0, 1552, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1516
+ /* "netCDF4/_netCDF4.pyx":1551
* with nogil:
* ierr = nc_inq_vardimid(_grpid, varid, dimids)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -10737,29 +12092,29 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1523
+ /* "netCDF4/_netCDF4.pyx":1558
* # 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, 1523, __pyx_L1_error)
+ __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1558, __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":1524
+ /* "netCDF4/_netCDF4.pyx":1559
* # use the 'foo' dimension from the parent?
* dimensions = []
* for nn from 0 <= nn < numdims: # <<<<<<<<<<<<<<
* grp = group
* found = False
*/
- __pyx_t_15 = __pyx_v_numdims;
- for (__pyx_v_nn = 0; __pyx_v_nn < __pyx_t_15; __pyx_v_nn++) {
+ __pyx_t_9 = __pyx_v_numdims;
+ for (__pyx_v_nn = 0; __pyx_v_nn < __pyx_t_9; __pyx_v_nn++) {
- /* "netCDF4/_netCDF4.pyx":1525
+ /* "netCDF4/_netCDF4.pyx":1560
* dimensions = []
* for nn from 0 <= nn < numdims:
* grp = group # <<<<<<<<<<<<<<
@@ -10769,7 +12124,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":1526
+ /* "netCDF4/_netCDF4.pyx":1561
* for nn from 0 <= nn < numdims:
* grp = group
* found = False # <<<<<<<<<<<<<<
@@ -10778,7 +12133,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
__pyx_v_found = 0;
- /* "netCDF4/_netCDF4.pyx":1527
+ /* "netCDF4/_netCDF4.pyx":1562
* grp = group
* found = False
* while not found: # <<<<<<<<<<<<<<
@@ -10789,20 +12144,20 @@ 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":1528
+ /* "netCDF4/_netCDF4.pyx":1563
* 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, 1528, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1563, __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, 1528, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1563, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -10812,38 +12167,38 @@ 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, 1528, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1563, __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, 1528, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1563, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) {
- __pyx_t_6 = __pyx_t_10; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
+ __pyx_t_6 = __pyx_t_10; __Pyx_INCREF(__pyx_t_6); __pyx_t_25 = 0;
__pyx_t_26 = NULL;
} else {
- __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1528, __pyx_L1_error)
+ __pyx_t_25 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1563, __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, 1528, __pyx_L1_error)
+ __pyx_t_26 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1563, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
for (;;) {
if (likely(!__pyx_t_26)) {
if (likely(PyList_CheckExact(__pyx_t_6))) {
- if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_10 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_10); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1528, __pyx_L1_error)
+ 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, 1563, __pyx_L1_error)
#else
- __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1528, __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, 1563, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
#endif
} else {
- if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_10); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1528, __pyx_L1_error)
+ 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, 1563, __pyx_L1_error)
#else
- __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1528, __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, 1563, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
#endif
}
@@ -10853,7 +12208,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, 1528, __pyx_L1_error)
+ else __PYX_ERR(0, 1563, __pyx_L1_error)
}
break;
}
@@ -10861,7 +12216,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
}
if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) {
PyObject* sequence = __pyx_t_10;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -10869,9 +12224,9 @@ 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, 1528, __pyx_L1_error)
+ __PYX_ERR(0, 1563, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
@@ -10882,15 +12237,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, 1528, __pyx_L1_error)
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1563, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1528, __pyx_L1_error)
+ __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1563, __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, 1528, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1563, __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;
@@ -10898,7 +12253,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, 1528, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_27(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1563, __pyx_L1_error)
__pyx_t_27 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L102_unpacking_done;
@@ -10906,7 +12261,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, 1528, __pyx_L1_error)
+ __PYX_ERR(0, 1563, __pyx_L1_error)
__pyx_L102_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
@@ -10914,34 +12269,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":1529
+ /* "netCDF4/_netCDF4.pyx":1564
* 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, 1529, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_dimid); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1564, __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, 1529, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyInt_From_int((__pyx_v_dimids[__pyx_v_nn])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1564, __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, 1529, __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, 1564, __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, 1529, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1564, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_14) {
- /* "netCDF4/_netCDF4.pyx":1530
+ /* "netCDF4/_netCDF4.pyx":1565
* 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, 1530, __pyx_L1_error)
+ __pyx_t_28 = __Pyx_PyList_Append(__pyx_v_dimensions, __pyx_v_key); if (unlikely(__pyx_t_28 == -1)) __PYX_ERR(0, 1565, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1531
+ /* "netCDF4/_netCDF4.pyx":1566
* if value._dimid == dimids[nn]:
* dimensions.append(key)
* found = True # <<<<<<<<<<<<<<
@@ -10950,7 +12305,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
__pyx_v_found = 1;
- /* "netCDF4/_netCDF4.pyx":1532
+ /* "netCDF4/_netCDF4.pyx":1567
* dimensions.append(key)
* found = True
* break # <<<<<<<<<<<<<<
@@ -10959,7 +12314,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
goto __pyx_L100_break;
- /* "netCDF4/_netCDF4.pyx":1529
+ /* "netCDF4/_netCDF4.pyx":1564
* while not found:
* for key, value in grp.dimensions.items():
* if value._dimid == dimids[nn]: # <<<<<<<<<<<<<<
@@ -10968,7 +12323,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1528
+ /* "netCDF4/_netCDF4.pyx":1563
* found = False
* while not found:
* for key, value in grp.dimensions.items(): # <<<<<<<<<<<<<<
@@ -10979,21 +12334,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":1533
+ /* "netCDF4/_netCDF4.pyx":1568
* 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, 1533, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_parent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1568, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF_SET(__pyx_v_grp, __pyx_t_6);
__pyx_t_6 = 0;
}
}
- /* "netCDF4/_netCDF4.pyx":1534
+ /* "netCDF4/_netCDF4.pyx":1569
* break
* grp = grp.parent
* free(dimids) # <<<<<<<<<<<<<<
@@ -11002,24 +12357,24 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
free(__pyx_v_dimids);
- /* "netCDF4/_netCDF4.pyx":1536
+ /* "netCDF4/_netCDF4.pyx":1571
* 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__15, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1536, __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, 1571, __pyx_L1_error)
if (__pyx_t_14) {
- /* "netCDF4/_netCDF4.pyx":1537
+ /* "netCDF4/_netCDF4.pyx":1572
* # 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, 1537, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1572, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_group);
__Pyx_GIVEREF(__pyx_v_group);
@@ -11033,21 +12388,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, 1537, __pyx_L1_error)
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1572, __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, 1537, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1572, __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, 1537, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_8) < 0) __PYX_ERR(0, 1572, __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, 1537, __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, 1537, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_endian, __pyx_n_s_big) < 0) __PYX_ERR(0, 1572, __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, 1572, __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, 1537, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_8) < 0)) __PYX_ERR(0, 1572, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":1536
+ /* "netCDF4/_netCDF4.pyx":1571
* free(dimids)
* # create new variable instance.
* if endianness == '>': # <<<<<<<<<<<<<<
@@ -11057,24 +12412,24 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
goto __pyx_L104;
}
- /* "netCDF4/_netCDF4.pyx":1538
+ /* "netCDF4/_netCDF4.pyx":1573
* 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__14, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 1538, __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, 1573, __pyx_L1_error)
if (__pyx_t_14) {
- /* "netCDF4/_netCDF4.pyx":1539
+ /* "netCDF4/_netCDF4.pyx":1574
* 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, 1539, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1574, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_group);
__Pyx_GIVEREF(__pyx_v_group);
@@ -11088,21 +12443,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, 1539, __pyx_L1_error)
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __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, 1539, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1574, __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, 1539, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_6) < 0) __PYX_ERR(0, 1574, __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, 1539, __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, 1539, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_endian, __pyx_n_s_little) < 0) __PYX_ERR(0, 1574, __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, 1574, __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, 1539, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_6) < 0)) __PYX_ERR(0, 1574, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":1538
+ /* "netCDF4/_netCDF4.pyx":1573
* if endianness == '>':
* variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big')
* elif endianness == '<': # <<<<<<<<<<<<<<
@@ -11112,7 +12467,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
goto __pyx_L104;
}
- /* "netCDF4/_netCDF4.pyx":1541
+ /* "netCDF4/_netCDF4.pyx":1576
* variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little')
* else:
* variables[name] = Variable(group, name, datatype, dimensions, id=varid) # <<<<<<<<<<<<<<
@@ -11120,7 +12475,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, 1541, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1576, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_group);
__Pyx_GIVEREF(__pyx_v_group);
@@ -11134,24 +12489,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, 1541, __pyx_L1_error)
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1576, __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, 1541, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1576, __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, 1541, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_8) < 0) __PYX_ERR(0, 1576, __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, 1541, __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, 1576, __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, 1541, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_8) < 0)) __PYX_ERR(0, 1576, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
__pyx_L104:;
__pyx_L15_continue:;
}
- /* "netCDF4/_netCDF4.pyx":1542
+ /* "netCDF4/_netCDF4.pyx":1577
* else:
* variables[name] = Variable(group, name, datatype, dimensions, id=varid)
* free(varids) # free pointer holding variable ids. # <<<<<<<<<<<<<<
@@ -11160,7 +12515,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
free(__pyx_v_varids);
- /* "netCDF4/_netCDF4.pyx":1431
+ /* "netCDF4/_netCDF4.pyx":1466
* # create empty dictionary for variables.
* variables = OrderedDict()
* if numvars > 0: # <<<<<<<<<<<<<<
@@ -11169,7 +12524,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
*/
}
- /* "netCDF4/_netCDF4.pyx":1543
+ /* "netCDF4/_netCDF4.pyx":1578
* variables[name] = Variable(group, name, datatype, dimensions, id=varid)
* free(varids) # free pointer holding variable ids.
* return variables # <<<<<<<<<<<<<<
@@ -11181,7 +12536,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
__pyx_r = __pyx_v_variables;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":1414
+ /* "netCDF4/_netCDF4.pyx":1449
* return groups
*
* cdef _get_vars(group): # <<<<<<<<<<<<<<
@@ -11197,10 +12552,10 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_19);
__Pyx_XDECREF(__pyx_t_20);
__Pyx_XDECREF(__pyx_t_21);
__Pyx_XDECREF(__pyx_t_22);
- __Pyx_XDECREF(__pyx_t_23);
__Pyx_AddTraceback("netCDF4._netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
@@ -11218,7 +12573,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1678
+/* "netCDF4/_netCDF4.pyx":1713
* the parent Dataset or Group."""
*
* def __init__(self, filename, mode='r', clobber=True, format='NETCDF4', # <<<<<<<<<<<<<<
@@ -11228,7 +12583,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *__pyx_v_group) {
/* 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, weakref=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` me [...]
+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 [...]
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7netCDF4_8_netCDF4_7Dataset___init__;
#endif
@@ -11253,7 +12608,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self
values[2] = ((PyObject *)Py_True);
values[3] = ((PyObject *)__pyx_n_s_NETCDF4);
- /* "netCDF4/_netCDF4.pyx":1679
+ /* "netCDF4/_netCDF4.pyx":1714
*
* def __init__(self, filename, mode='r', clobber=True, format='NETCDF4',
* diskless=False, persist=False, keepweakref=False, **kwargs): # <<<<<<<<<<<<<<
@@ -11314,7 +12669,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1678, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1713, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -11339,7 +12694,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1678, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1713, __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);
@@ -11348,7 +12703,7 @@ static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self
__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);
- /* "netCDF4/_netCDF4.pyx":1678
+ /* "netCDF4/_netCDF4.pyx":1713
* the parent Dataset or Group."""
*
* def __init__(self, filename, mode='r', clobber=True, format='NETCDF4', # <<<<<<<<<<<<<<
@@ -11381,7 +12736,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
PyObject *(*__pyx_t_10)(PyObject *);
__Pyx_RefNannySetupContext("__init__", 0);
- /* "netCDF4/_netCDF4.pyx":1747
+ /* "netCDF4/_netCDF4.pyx":1783
* cdef char namstring[NC_MAX_NAME+1]
* # flag to indicate that Variables in this Dataset support orthogonal indexing.
* self.__orthogonal_indexing__ = True # <<<<<<<<<<<<<<
@@ -11394,54 +12749,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":1748
+ /* "netCDF4/_netCDF4.pyx":1784
* # 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, 1748, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1784, __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, 1748, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1784, __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, 1748, __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, 1784, __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, 1748, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1784, __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":1750
+ /* "netCDF4/_netCDF4.pyx":1786
* 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, 1750, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1786, __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, 1750, __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, 1786, __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, 1750, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1786, __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, 1750, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1786, __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, 1750, __pyx_L1_error)
+ __PYX_ERR(0, 1786, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1748
+ /* "netCDF4/_netCDF4.pyx":1784
* # flag to indicate that Variables in this Dataset support orthogonal indexing.
* self.__orthogonal_indexing__ = True
* if diskless and __netcdf4libversion__ < '4.2.1': # <<<<<<<<<<<<<<
@@ -11450,115 +12805,115 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
*/
}
- /* "netCDF4/_netCDF4.pyx":1751
+ /* "netCDF4/_netCDF4.pyx":1787
* #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, 1751, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1787, __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, 1751, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1787, __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, 1751, __pyx_L1_error)
+ __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1787, __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":1752
+ /* "netCDF4/_netCDF4.pyx":1788
* 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)
*/
- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1752, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1788, __pyx_L1_error)
__pyx_v_path = __pyx_t_5;
- /* "netCDF4/_netCDF4.pyx":1753
+ /* "netCDF4/_netCDF4.pyx":1789
* bytestr = _strencode(str(filename))
* path = bytestr
* 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, 1753, __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, 1789, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1754
+ /* "netCDF4/_netCDF4.pyx":1790
* path = bytestr
* 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, 1754, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_set_default_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1790, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1754, __pyx_L1_error)
+ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1790, __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, 1754, __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, 1754, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_format, __pyx_v_format) < 0) __PYX_ERR(0, 1790, __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, 1790, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__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;
- /* "netCDF4/_netCDF4.pyx":1755
+ /* "netCDF4/_netCDF4.pyx":1791
* 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, 1755, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_clobber); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1791, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1756
+ /* "netCDF4/_netCDF4.pyx":1792
* _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, 1756, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1792, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1757
+ /* "netCDF4/_netCDF4.pyx":1793
* 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, 1757, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1793, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1758
+ /* "netCDF4/_netCDF4.pyx":1794
* 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, 1758, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_From_int((NC_WRITE | NC_CLOBBER)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1794, __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, 1758, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __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, 1758, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_Or(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1794, __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, 1758, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1794, __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));
- /* "netCDF4/_netCDF4.pyx":1757
+ /* "netCDF4/_netCDF4.pyx":1793
* if clobber:
* if diskless:
* if persist: # <<<<<<<<<<<<<<
@@ -11568,7 +12923,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L9;
}
- /* "netCDF4/_netCDF4.pyx":1760
+ /* "netCDF4/_netCDF4.pyx":1796
* ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid)
* else:
* ierr = nc_create(path, NC_CLOBBER | NC_DISKLESS , &grpid) # <<<<<<<<<<<<<<
@@ -11576,21 +12931,21 @@ 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, 1760, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(NC_CLOBBER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1796, __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, 1760, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1796, __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, 1760, __pyx_L1_error)
+ __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1796, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__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, 1760, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1796, __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_L9:;
- /* "netCDF4/_netCDF4.pyx":1756
+ /* "netCDF4/_netCDF4.pyx":1792
* _set_default_format(format=format)
* if clobber:
* if diskless: # <<<<<<<<<<<<<<
@@ -11600,7 +12955,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L8;
}
- /* "netCDF4/_netCDF4.pyx":1762
+ /* "netCDF4/_netCDF4.pyx":1798
* ierr = nc_create(path, NC_CLOBBER | NC_DISKLESS , &grpid)
* else:
* ierr = nc_create(path, NC_CLOBBER, &grpid) # <<<<<<<<<<<<<<
@@ -11612,7 +12967,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
}
__pyx_L8:;
- /* "netCDF4/_netCDF4.pyx":1755
+ /* "netCDF4/_netCDF4.pyx":1791
* if mode == 'w':
* _set_default_format(format=format)
* if clobber: # <<<<<<<<<<<<<<
@@ -11622,7 +12977,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L7;
}
- /* "netCDF4/_netCDF4.pyx":1764
+ /* "netCDF4/_netCDF4.pyx":1800
* ierr = nc_create(path, NC_CLOBBER, &grpid)
* else:
* if diskless: # <<<<<<<<<<<<<<
@@ -11630,39 +12985,39 @@ 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, 1764, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1800, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1765
+ /* "netCDF4/_netCDF4.pyx":1801
* 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, 1765, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1801, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1766
+ /* "netCDF4/_netCDF4.pyx":1802
* 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, 1766, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_From_int((NC_WRITE | NC_NOCLOBBER)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1802, __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, 1766, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1802, __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, 1766, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_Or(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1802, __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, 1766, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1802, __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));
- /* "netCDF4/_netCDF4.pyx":1765
+ /* "netCDF4/_netCDF4.pyx":1801
* else:
* if diskless:
* if persist: # <<<<<<<<<<<<<<
@@ -11672,7 +13027,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L11;
}
- /* "netCDF4/_netCDF4.pyx":1768
+ /* "netCDF4/_netCDF4.pyx":1804
* ierr = nc_create(path, NC_WRITE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
* else:
* ierr = nc_create(path, NC_NOCLOBBER | NC_DISKLESS , &grpid) # <<<<<<<<<<<<<<
@@ -11680,21 +13035,21 @@ 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, 1768, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(NC_NOCLOBBER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1804, __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, 1768, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1804, __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, 1768, __pyx_L1_error)
+ __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1804, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__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, 1768, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1804, __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_L11:;
- /* "netCDF4/_netCDF4.pyx":1764
+ /* "netCDF4/_netCDF4.pyx":1800
* ierr = nc_create(path, NC_CLOBBER, &grpid)
* else:
* if diskless: # <<<<<<<<<<<<<<
@@ -11704,7 +13059,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L10;
}
- /* "netCDF4/_netCDF4.pyx":1770
+ /* "netCDF4/_netCDF4.pyx":1806
* ierr = nc_create(path, NC_NOCLOBBER | NC_DISKLESS , &grpid)
* else:
* ierr = nc_create(path, NC_NOCLOBBER, &grpid) # <<<<<<<<<<<<<<
@@ -11718,25 +13073,25 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
}
__pyx_L7:;
- /* "netCDF4/_netCDF4.pyx":1775
+ /* "netCDF4/_netCDF4.pyx":1811
* # 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:
*/
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_set_default_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1775, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_set_default_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1811, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1775, __pyx_L1_error)
+ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1811, __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, 1775, __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, 1775, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_format, __pyx_n_s_NETCDF3_64BIT_OFFSET) < 0) __PYX_ERR(0, 1811, __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, 1811, __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":1753
+ /* "netCDF4/_netCDF4.pyx":1789
* bytestr = _strencode(str(filename))
* path = bytestr
* if mode == 'w': # <<<<<<<<<<<<<<
@@ -11746,46 +13101,46 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L6;
}
- /* "netCDF4/_netCDF4.pyx":1776
+ /* "netCDF4/_netCDF4.pyx":1812
* # 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)
*/
- __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_r, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1776, __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, 1812, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1777
+ /* "netCDF4/_netCDF4.pyx":1813
* _set_default_format(format='NETCDF3_64BIT_OFFSET')
* elif mode == 'r':
* if 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, 1777, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1813, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1778
+ /* "netCDF4/_netCDF4.pyx":1814
* elif mode == 'r':
* if 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, 1778, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(NC_NOWRITE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1814, __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, 1778, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1814, __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, 1778, __pyx_L1_error)
+ __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1814, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__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, 1778, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1814, __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));
- /* "netCDF4/_netCDF4.pyx":1777
+ /* "netCDF4/_netCDF4.pyx":1813
* _set_default_format(format='NETCDF3_64BIT_OFFSET')
* elif mode == 'r':
* if diskless: # <<<<<<<<<<<<<<
@@ -11795,7 +13150,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L12;
}
- /* "netCDF4/_netCDF4.pyx":1780
+ /* "netCDF4/_netCDF4.pyx":1816
* ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid)
* else:
* ierr = nc_open(path, NC_NOWRITE, &grpid) # <<<<<<<<<<<<<<
@@ -11807,7 +13162,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
}
__pyx_L12:;
- /* "netCDF4/_netCDF4.pyx":1776
+ /* "netCDF4/_netCDF4.pyx":1812
* # 4.3.0 of the netcdf library (add a version check here?).
* _set_default_format(format='NETCDF3_64BIT_OFFSET')
* elif mode == 'r': # <<<<<<<<<<<<<<
@@ -11817,54 +13172,54 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L6;
}
- /* "netCDF4/_netCDF4.pyx":1781
+ /* "netCDF4/_netCDF4.pyx":1817
* 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, 1781, __pyx_L1_error)
+ __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, 1817, __pyx_L1_error)
if (!__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
goto __pyx_L13_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, 1781, __pyx_L1_error)
+ __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_a, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1817, __pyx_L1_error)
__pyx_t_1 = __pyx_t_2;
__pyx_L13_bool_binop_done:;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1782
+ /* "netCDF4/_netCDF4.pyx":1818
* 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, 1782, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1818, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1783
+ /* "netCDF4/_netCDF4.pyx":1819
* 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, 1783, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_From_int(NC_WRITE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1819, __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, 1783, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1819, __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, 1783, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_Or(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1819, __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, 1783, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1819, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_ierr = nc_open(__pyx_v_path, __pyx_t_7, (&__pyx_v_grpid));
- /* "netCDF4/_netCDF4.pyx":1782
+ /* "netCDF4/_netCDF4.pyx":1818
* ierr = nc_open(path, NC_NOWRITE, &grpid)
* elif mode == 'r+' or mode == 'a':
* if diskless: # <<<<<<<<<<<<<<
@@ -11874,7 +13229,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L15;
}
- /* "netCDF4/_netCDF4.pyx":1785
+ /* "netCDF4/_netCDF4.pyx":1821
* ierr = nc_open(path, NC_WRITE | NC_DISKLESS, &grpid)
* else:
* ierr = nc_open(path, NC_WRITE, &grpid) # <<<<<<<<<<<<<<
@@ -11886,7 +13241,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
}
__pyx_L15:;
- /* "netCDF4/_netCDF4.pyx":1781
+ /* "netCDF4/_netCDF4.pyx":1817
* else:
* ierr = nc_open(path, NC_NOWRITE, &grpid)
* elif mode == 'r+' or mode == 'a': # <<<<<<<<<<<<<<
@@ -11896,54 +13251,54 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L6;
}
- /* "netCDF4/_netCDF4.pyx":1786
+ /* "netCDF4/_netCDF4.pyx":1822
* 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, 1786, __pyx_L1_error)
+ __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_as, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1822, __pyx_L1_error)
if (!__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
goto __pyx_L16_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, 1786, __pyx_L1_error)
+ __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, 1822, __pyx_L1_error)
__pyx_t_1 = __pyx_t_2;
__pyx_L16_bool_binop_done:;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1787
+ /* "netCDF4/_netCDF4.pyx":1823
* 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, 1787, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1823, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1788
+ /* "netCDF4/_netCDF4.pyx":1824
* 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, 1788, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(NC_SHARE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1824, __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, 1788, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1824, __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, 1788, __pyx_L1_error)
+ __pyx_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1824, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__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, 1788, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1824, __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));
- /* "netCDF4/_netCDF4.pyx":1787
+ /* "netCDF4/_netCDF4.pyx":1823
* ierr = nc_open(path, NC_WRITE, &grpid)
* elif mode == 'as' or mode == 'r+s':
* if diskless: # <<<<<<<<<<<<<<
@@ -11953,7 +13308,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L18;
}
- /* "netCDF4/_netCDF4.pyx":1790
+ /* "netCDF4/_netCDF4.pyx":1826
* ierr = nc_open(path, NC_SHARE | NC_DISKLESS, &grpid)
* else:
* ierr = nc_open(path, NC_SHARE, &grpid) # <<<<<<<<<<<<<<
@@ -11965,7 +13320,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
}
__pyx_L18:;
- /* "netCDF4/_netCDF4.pyx":1786
+ /* "netCDF4/_netCDF4.pyx":1822
* else:
* ierr = nc_open(path, NC_WRITE, &grpid)
* elif mode == 'as' or mode == 'r+s': # <<<<<<<<<<<<<<
@@ -11975,66 +13330,66 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L6;
}
- /* "netCDF4/_netCDF4.pyx":1791
+ /* "netCDF4/_netCDF4.pyx":1827
* 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, 1791, __pyx_L1_error)
+ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_ws, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1827, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1792
+ /* "netCDF4/_netCDF4.pyx":1828
* 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, 1792, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_clobber); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1828, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1793
+ /* "netCDF4/_netCDF4.pyx":1829
* 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, 1793, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1829, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1794
+ /* "netCDF4/_netCDF4.pyx":1830
* 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, 1794, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1830, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1795
+ /* "netCDF4/_netCDF4.pyx":1831
* 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, 1795, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_From_int(((NC_WRITE | NC_SHARE) | NC_CLOBBER)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1831, __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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1831, __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_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1831, __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, 1795, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1831, __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));
- /* "netCDF4/_netCDF4.pyx":1794
+ /* "netCDF4/_netCDF4.pyx":1830
* if clobber:
* if diskless:
* if persist: # <<<<<<<<<<<<<<
@@ -12044,7 +13399,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L21;
}
- /* "netCDF4/_netCDF4.pyx":1797
+ /* "netCDF4/_netCDF4.pyx":1833
* 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) # <<<<<<<<<<<<<<
@@ -12052,21 +13407,21 @@ 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, 1797, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int((NC_SHARE | NC_CLOBBER)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1833, __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, 1833, __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_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1833, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__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_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1833, __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_L21:;
- /* "netCDF4/_netCDF4.pyx":1793
+ /* "netCDF4/_netCDF4.pyx":1829
* elif mode == 'ws':
* if clobber:
* if diskless: # <<<<<<<<<<<<<<
@@ -12076,7 +13431,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L20;
}
- /* "netCDF4/_netCDF4.pyx":1799
+ /* "netCDF4/_netCDF4.pyx":1835
* ierr = nc_create(path, NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid)
* else:
* ierr = nc_create(path, NC_SHARE | NC_CLOBBER, &grpid) # <<<<<<<<<<<<<<
@@ -12088,7 +13443,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
}
__pyx_L20:;
- /* "netCDF4/_netCDF4.pyx":1792
+ /* "netCDF4/_netCDF4.pyx":1828
* ierr = nc_open(path, NC_SHARE, &grpid)
* elif mode == 'ws':
* if clobber: # <<<<<<<<<<<<<<
@@ -12098,7 +13453,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L19;
}
- /* "netCDF4/_netCDF4.pyx":1801
+ /* "netCDF4/_netCDF4.pyx":1837
* ierr = nc_create(path, NC_SHARE | NC_CLOBBER, &grpid)
* else:
* if diskless: # <<<<<<<<<<<<<<
@@ -12106,39 +13461,39 @@ 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, 1801, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1837, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1802
+ /* "netCDF4/_netCDF4.pyx":1838
* 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, 1802, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1838, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1803
+ /* "netCDF4/_netCDF4.pyx":1839
* 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, 1803, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_From_int(((NC_WRITE | NC_SHARE) | NC_NOCLOBBER)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1839, __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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1839, __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_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1839, __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, 1803, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1839, __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));
- /* "netCDF4/_netCDF4.pyx":1802
+ /* "netCDF4/_netCDF4.pyx":1838
* else:
* if diskless:
* if persist: # <<<<<<<<<<<<<<
@@ -12148,7 +13503,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L23;
}
- /* "netCDF4/_netCDF4.pyx":1805
+ /* "netCDF4/_netCDF4.pyx":1841
* 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) # <<<<<<<<<<<<<<
@@ -12156,21 +13511,21 @@ 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, 1805, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int((NC_SHARE | NC_NOCLOBBER)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1841, __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, 1841, __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_t_6 = PyNumber_Or(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1841, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__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_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1841, __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_L23:;
- /* "netCDF4/_netCDF4.pyx":1801
+ /* "netCDF4/_netCDF4.pyx":1837
* ierr = nc_create(path, NC_SHARE | NC_CLOBBER, &grpid)
* else:
* if diskless: # <<<<<<<<<<<<<<
@@ -12180,7 +13535,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L22;
}
- /* "netCDF4/_netCDF4.pyx":1807
+ /* "netCDF4/_netCDF4.pyx":1843
* ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
* else:
* ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER, &grpid) # <<<<<<<<<<<<<<
@@ -12194,7 +13549,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
}
__pyx_L19:;
- /* "netCDF4/_netCDF4.pyx":1791
+ /* "netCDF4/_netCDF4.pyx":1827
* else:
* ierr = nc_open(path, NC_SHARE, &grpid)
* elif mode == 'ws': # <<<<<<<<<<<<<<
@@ -12204,7 +13559,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L6;
}
- /* "netCDF4/_netCDF4.pyx":1809
+ /* "netCDF4/_netCDF4.pyx":1845
* ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER, &grpid)
* else:
* raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode) # <<<<<<<<<<<<<<
@@ -12212,23 +13567,23 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
* raise IOError((<char *>nc_strerror(ierr)).decode('ascii'))
*/
/*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, 1809, __pyx_L1_error)
+ __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, 1845, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1809, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1845, __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, 1809, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1845, __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, 1809, __pyx_L1_error)
+ __PYX_ERR(0, 1845, __pyx_L1_error)
}
__pyx_L6:;
- /* "netCDF4/_netCDF4.pyx":1810
+ /* "netCDF4/_netCDF4.pyx":1846
* else:
* raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -12238,7 +13593,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
__pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1811
+ /* "netCDF4/_netCDF4.pyx":1847
* raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode)
* if ierr != NC_NOERR:
* raise IOError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -12246,22 +13601,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
* 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, 1811, __pyx_L1_error)
+ __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, 1847, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1811, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1847, __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, 1811, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1847, __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, 1811, __pyx_L1_error)
+ __PYX_ERR(0, 1847, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1810
+ /* "netCDF4/_netCDF4.pyx":1846
* else:
* raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -12270,14 +13625,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
*/
}
- /* "netCDF4/_netCDF4.pyx":1813
+ /* "netCDF4/_netCDF4.pyx":1849
* raise IOError((<char *>nc_strerror(ierr)).decode('ascii'))
* # 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, 1813, __pyx_L1_error)
+ __pyx_t_6 = __pyx_f_7netCDF4_8_netCDF4__get_format(__pyx_v_grpid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1849, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_v_self->data_model);
@@ -12285,7 +13640,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
__pyx_v_self->data_model = __pyx_t_6;
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":1816
+ /* "netCDF4/_netCDF4.pyx":1852
* # data_model attribute used to be file_format (versions < 1.0.8), retain
* # file_format for backwards compatibility.
* self.file_format = self.data_model # <<<<<<<<<<<<<<
@@ -12300,14 +13655,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
__pyx_v_self->file_format = __pyx_t_6;
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":1817
+ /* "netCDF4/_netCDF4.pyx":1853
* # 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, 1817, __pyx_L1_error)
+ __pyx_t_6 = __pyx_f_7netCDF4_8_netCDF4__get_full_format(__pyx_v_grpid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1853, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_v_self->disk_format);
@@ -12315,7 +13670,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
__pyx_v_self->disk_format = __pyx_t_6;
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":1822
+ /* "netCDF4/_netCDF4.pyx":1858
* #if diskless and self.data_model != 'NETCDF3_CLASSIC' and ncopen:
* # raise ValueError("diskless access only supported for NETCDF3_CLASSIC format")
* self._grpid = grpid # <<<<<<<<<<<<<<
@@ -12324,7 +13679,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
*/
__pyx_v_self->_grpid = __pyx_v_grpid;
- /* "netCDF4/_netCDF4.pyx":1823
+ /* "netCDF4/_netCDF4.pyx":1859
* # raise ValueError("diskless access only supported for NETCDF3_CLASSIC format")
* self._grpid = grpid
* self._isopen = 1 # <<<<<<<<<<<<<<
@@ -12333,20 +13688,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
*/
__pyx_v_self->_isopen = 1;
- /* "netCDF4/_netCDF4.pyx":1824
+ /* "netCDF4/_netCDF4.pyx":1860
* self._grpid = grpid
* self._isopen = 1
* self.path = '/' # <<<<<<<<<<<<<<
* self.parent = None
* self.keepweakref = keepweakref
*/
- __Pyx_INCREF(__pyx_kp_s__16);
- __Pyx_GIVEREF(__pyx_kp_s__16);
+ __Pyx_INCREF(__pyx_kp_s__15);
+ __Pyx_GIVEREF(__pyx_kp_s__15);
__Pyx_GOTREF(__pyx_v_self->path);
__Pyx_DECREF(__pyx_v_self->path);
- __pyx_v_self->path = __pyx_kp_s__16;
+ __pyx_v_self->path = __pyx_kp_s__15;
- /* "netCDF4/_netCDF4.pyx":1825
+ /* "netCDF4/_netCDF4.pyx":1861
* self._isopen = 1
* self.path = '/'
* self.parent = None # <<<<<<<<<<<<<<
@@ -12359,7 +13714,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":1826
+ /* "netCDF4/_netCDF4.pyx":1862
* self.path = '/'
* self.parent = None
* self.keepweakref = keepweakref # <<<<<<<<<<<<<<
@@ -12372,18 +13727,18 @@ 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":1828
+ /* "netCDF4/_netCDF4.pyx":1864
* 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, 1828, __pyx_L1_error)
+ __pyx_t_6 = __pyx_f_7netCDF4_8_netCDF4__get_types(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1864, __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;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -12391,9 +13746,9 @@ 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, 1828, __pyx_L1_error)
+ __PYX_ERR(0, 1864, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #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);
@@ -12407,17 +13762,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
__Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_8);
#else
- __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1828, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1864, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1828, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1864, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1828, __pyx_L1_error)
+ __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1864, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
#endif
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
} else {
Py_ssize_t index = -1;
- __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1828, __pyx_L1_error)
+ __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1864, __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;
@@ -12427,7 +13782,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
__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, 1828, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) __PYX_ERR(0, 1864, __pyx_L1_error)
__pyx_t_10 = NULL;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
goto __pyx_L26_unpacking_done;
@@ -12435,7 +13790,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_10 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 1828, __pyx_L1_error)
+ __PYX_ERR(0, 1864, __pyx_L1_error)
__pyx_L26_unpacking_done:;
}
__Pyx_GIVEREF(__pyx_t_4);
@@ -12454,14 +13809,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
__pyx_v_self->enumtypes = __pyx_t_8;
__pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":1830
+ /* "netCDF4/_netCDF4.pyx":1866
* 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, 1830, __pyx_L1_error)
+ __pyx_t_6 = __pyx_f_7netCDF4_8_netCDF4__get_dims(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1866, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_v_self->dimensions);
@@ -12469,14 +13824,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
__pyx_v_self->dimensions = __pyx_t_6;
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":1832
+ /* "netCDF4/_netCDF4.pyx":1868
* 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, 1832, __pyx_L1_error)
+ __pyx_t_6 = __pyx_f_7netCDF4_8_netCDF4__get_vars(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1868, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_v_self->variables);
@@ -12484,24 +13839,24 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
__pyx_v_self->variables = __pyx_t_6;
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":1834
+ /* "netCDF4/_netCDF4.pyx":1870
* 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, 1834, __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, 1870, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1835
+ /* "netCDF4/_netCDF4.pyx":1871
* # 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, 1835, __pyx_L1_error)
+ __pyx_t_6 = __pyx_f_7netCDF4_8_netCDF4__get_grps(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1871, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_v_self->groups);
@@ -12509,7 +13864,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
__pyx_v_self->groups = __pyx_t_6;
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":1834
+ /* "netCDF4/_netCDF4.pyx":1870
* self.variables = _get_vars(self)
* # get groups in the root Group.
* if self.data_model == 'NETCDF4': # <<<<<<<<<<<<<<
@@ -12519,7 +13874,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
goto __pyx_L27;
}
- /* "netCDF4/_netCDF4.pyx":1837
+ /* "netCDF4/_netCDF4.pyx":1873
* self.groups = _get_grps(self)
* else:
* self.groups = OrderedDict() # <<<<<<<<<<<<<<
@@ -12527,10 +13882,10 @@ 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, 1837, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1873, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
+ 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);
@@ -12540,10 +13895,10 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
}
}
if (__pyx_t_3) {
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1837, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1873, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else {
- __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1837, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1873, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
@@ -12555,7 +13910,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
}
__pyx_L27:;
- /* "netCDF4/_netCDF4.pyx":1678
+ /* "netCDF4/_netCDF4.pyx":1713
* the parent Dataset or Group."""
*
* def __init__(self, filename, mode='r', clobber=True, format='NETCDF4', # <<<<<<<<<<<<<<
@@ -12580,7 +13935,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCD
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1840
+/* "netCDF4/_netCDF4.pyx":1876
*
* # these allow Dataset objects to be used via a "with" statement.
* def __enter__(self): # <<<<<<<<<<<<<<
@@ -12606,7 +13961,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_2__enter__(struct __pyx_ob
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__enter__", 0);
- /* "netCDF4/_netCDF4.pyx":1841
+ /* "netCDF4/_netCDF4.pyx":1877
* # these allow Dataset objects to be used via a "with" statement.
* def __enter__(self):
* return self # <<<<<<<<<<<<<<
@@ -12618,7 +13973,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":1840
+ /* "netCDF4/_netCDF4.pyx":1876
*
* # these allow Dataset objects to be used via a "with" statement.
* def __enter__(self): # <<<<<<<<<<<<<<
@@ -12633,7 +13988,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_2__enter__(struct __pyx_ob
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1842
+/* "netCDF4/_netCDF4.pyx":1878
* def __enter__(self):
* return self
* def __exit__(self,atype,value,traceback): # <<<<<<<<<<<<<<
@@ -12671,16 +14026,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, 1842, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 1878, __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, 1842, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 1878, __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, 1842, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) __PYX_ERR(0, 1878, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
@@ -12695,7 +14050,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, 1842, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1878, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4.Dataset.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -12716,17 +14071,17 @@ 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":1843
+ /* "netCDF4/_netCDF4.pyx":1879
* 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, 1843, __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, 1879, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -12736,16 +14091,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, 1843, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1879, __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, 1843, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1879, __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":1842
+ /* "netCDF4/_netCDF4.pyx":1878
* def __enter__(self):
* return self
* def __exit__(self,atype,value,traceback): # <<<<<<<<<<<<<<
@@ -12768,7 +14123,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_4__exit__(struct __pyx_obj
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1845
+/* "netCDF4/_netCDF4.pyx":1881
* self.close()
*
* def __getitem__(self, elem): # <<<<<<<<<<<<<<
@@ -12809,20 +14164,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_
__Pyx_RefNannySetupContext("__getitem__", 0);
__Pyx_INCREF(__pyx_v_elem);
- /* "netCDF4/_netCDF4.pyx":1848
+ /* "netCDF4/_netCDF4.pyx":1884
* # 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, 1848, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1884, __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, 1848, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_normpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1884, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -12832,37 +14187,55 @@ 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, 1848, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_elem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1884, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1848, __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, 1848, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ #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, 1884, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 1884, __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, 1884, __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, 1884, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF_SET(__pyx_v_elem, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1850
+ /* "netCDF4/_netCDF4.pyx":1886
* 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, 1850, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1886, __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, 1850, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1886, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -12872,23 +14245,41 @@ 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, 1850, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_elem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1886, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1850, __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, 1850, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ #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, 1886, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 1886, __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, 1886, __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, 1886, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -12896,9 +14287,9 @@ 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, 1850, __pyx_L1_error)
+ __PYX_ERR(0, 1886, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
@@ -12909,15 +14300,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, 1850, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1886, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1850, __pyx_L1_error)
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1886, __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, 1850, __pyx_L1_error)
+ __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1886, __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;
@@ -12925,7 +14316,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, 1850, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1886, __pyx_L1_error)
__pyx_t_5 = NULL;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L4_unpacking_done;
@@ -12933,7 +14324,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, 1850, __pyx_L1_error)
+ __PYX_ERR(0, 1886, __pyx_L1_error)
__pyx_L4_unpacking_done:;
}
__pyx_v_dirname = __pyx_t_4;
@@ -12941,22 +14332,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":1851
+ /* "netCDF4/_netCDF4.pyx":1887
* # 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, 1851, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dirname, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1887, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1851, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __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":1852
+ /* "netCDF4/_netCDF4.pyx":1888
* dirname, lastname = posixpath.split(elem)
* nestedgroups = dirname.split('/')
* group = self # <<<<<<<<<<<<<<
@@ -12966,7 +14357,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":1854
+ /* "netCDF4/_netCDF4.pyx":1890
* group = self
* # iterate over groups in path.
* for g in nestedgroups: # <<<<<<<<<<<<<<
@@ -12977,26 +14368,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, 1854, __pyx_L1_error)
+ __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_nestedgroups); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1890, __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, 1854, __pyx_L1_error)
+ __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1890, __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_COMPILING_IN_CPYTHON
- __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, 1854, __pyx_L1_error)
+ #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, 1890, __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, 1854, __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, 1890, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 1854, __pyx_L1_error)
+ #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, 1890, __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, 1854, __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, 1890, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -13006,7 +14397,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, 1854, __pyx_L1_error)
+ else __PYX_ERR(0, 1890, __pyx_L1_error)
}
break;
}
@@ -13015,25 +14406,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":1855
+ /* "netCDF4/_netCDF4.pyx":1891
* # 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, 1855, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_g); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1891, __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, 1855, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1891, __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, 1855, __pyx_L1_error)
+ __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_g); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1891, __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":1854
+ /* "netCDF4/_netCDF4.pyx":1890
* group = self
* # iterate over groups in path.
* for g in nestedgroups: # <<<<<<<<<<<<<<
@@ -13043,21 +14434,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":1857
+ /* "netCDF4/_netCDF4.pyx":1893
* 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, 1857, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1893, __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, 1857, __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, 1893, __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":1858
+ /* "netCDF4/_netCDF4.pyx":1894
* # return last one, either a group or a variable.
* if lastname in group.groups:
* return group.groups[lastname] # <<<<<<<<<<<<<<
@@ -13065,16 +14456,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, 1858, __pyx_L1_error)
+ __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_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyObject_GetItem(__pyx_t_2, __pyx_v_lastname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1858, __pyx_L1_error)
+ __pyx_t_4 = PyObject_GetItem(__pyx_t_2, __pyx_v_lastname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1894, __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":1857
+ /* "netCDF4/_netCDF4.pyx":1893
* if g: group = group.groups[g]
* # return last one, either a group or a variable.
* if lastname in group.groups: # <<<<<<<<<<<<<<
@@ -13083,21 +14474,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_
*/
}
- /* "netCDF4/_netCDF4.pyx":1859
+ /* "netCDF4/_netCDF4.pyx":1895
* 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, 1859, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1895, __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, 1859, __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, 1895, __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":1860
+ /* "netCDF4/_netCDF4.pyx":1896
* return group.groups[lastname]
* elif lastname in group.variables:
* return group.variables[lastname] # <<<<<<<<<<<<<<
@@ -13105,16 +14496,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, 1860, __pyx_L1_error)
+ __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_GOTREF(__pyx_t_4);
- __pyx_t_2 = PyObject_GetItem(__pyx_t_4, __pyx_v_lastname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1860, __pyx_L1_error)
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_4, __pyx_v_lastname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1896, __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":1859
+ /* "netCDF4/_netCDF4.pyx":1895
* if lastname in group.groups:
* return group.groups[lastname]
* elif lastname in group.variables: # <<<<<<<<<<<<<<
@@ -13123,7 +14514,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_
*/
}
- /* "netCDF4/_netCDF4.pyx":1862
+ /* "netCDF4/_netCDF4.pyx":1898
* return group.variables[lastname]
* else:
* raise IndexError('%s not found in %s' % (lastname,group.path)) # <<<<<<<<<<<<<<
@@ -13131,9 +14522,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, 1862, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1898, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1862, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1898, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_lastname);
__Pyx_GIVEREF(__pyx_v_lastname);
@@ -13141,23 +14532,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, 1862, __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, 1898, __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, 1862, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1898, __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, 1862, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1898, __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, 1862, __pyx_L1_error)
+ __PYX_ERR(0, 1898, __pyx_L1_error)
}
- /* "netCDF4/_netCDF4.pyx":1845
+ /* "netCDF4/_netCDF4.pyx":1881
* self.close()
*
* def __getitem__(self, elem): # <<<<<<<<<<<<<<
@@ -13185,7 +14576,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1864
+/* "netCDF4/_netCDF4.pyx":1900
* raise IndexError('%s not found in %s' % (lastname,group.path))
*
* def filepath(self): # <<<<<<<<<<<<<<
@@ -13215,7 +14606,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":1891
+ /* "netCDF4/_netCDF4.pyx":1927
* return py_path.decode('ascii')
* ELSE:
* msg = """ # <<<<<<<<<<<<<<
@@ -13225,26 +14616,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":1894
+ /* "netCDF4/_netCDF4.pyx":1930
* 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, 1894, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1930, __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, 1894, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1930, __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, 1894, __pyx_L1_error)
+ __PYX_ERR(0, 1930, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1864
+ /* "netCDF4/_netCDF4.pyx":1900
* raise IndexError('%s not found in %s' % (lastname,group.path))
*
* def filepath(self): # <<<<<<<<<<<<<<
@@ -13264,7 +14655,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_8filepath(CYTHON_UNUSED st
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1896
+/* "netCDF4/_netCDF4.pyx":1932
* raise ValueError(msg)
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -13296,20 +14687,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":1897
+ /* "netCDF4/_netCDF4.pyx":1933
*
* 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, 1897, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __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, 1897, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1933, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":1898
+ /* "netCDF4/_netCDF4.pyx":1934
* def __repr__(self):
* if python3:
* return self.__unicode__() # <<<<<<<<<<<<<<
@@ -13317,10 +14708,10 @@ 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, 1898, __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, 1934, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -13330,10 +14721,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, 1898, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1934, __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, 1898, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1934, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -13341,7 +14732,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__repr__(struct __pyx_ob
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":1897
+ /* "netCDF4/_netCDF4.pyx":1933
*
* def __repr__(self):
* if python3: # <<<<<<<<<<<<<<
@@ -13350,7 +14741,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__repr__(struct __pyx_ob
*/
}
- /* "netCDF4/_netCDF4.pyx":1900
+ /* "netCDF4/_netCDF4.pyx":1936
* return self.__unicode__()
* else:
* return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<<
@@ -13359,21 +14750,21 @@ 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, 1900, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1936, __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, 1900, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1936, __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, 1900, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1936, __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, 1900, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1936, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ 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);
@@ -13383,19 +14774,39 @@ 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, 1900, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1936, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1900, __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, 1900, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 1936, __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
+ #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, 1936, __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, 1936, __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, 1936, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_1;
@@ -13403,7 +14814,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__repr__(struct __pyx_ob
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":1896
+ /* "netCDF4/_netCDF4.pyx":1932
* raise ValueError(msg)
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -13426,7 +14837,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__repr__(struct __pyx_ob
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1902
+/* "netCDF4/_netCDF4.pyx":1938
* return unicode(self).encode(default_encoding)
*
* def __unicode__(self): # <<<<<<<<<<<<<<
@@ -13474,16 +14885,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx
int __pyx_t_13;
__Pyx_RefNannySetupContext("__unicode__", 0);
- /* "netCDF4/_netCDF4.pyx":1903
+ /* "netCDF4/_netCDF4.pyx":1939
*
* 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, 1903, __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, 1939, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1903, __pyx_L1_error)
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1939, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_1);
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
@@ -13491,27 +14902,27 @@ 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":1904
+ /* "netCDF4/_netCDF4.pyx":1940
* 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, 1904, __pyx_L1_error)
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1940, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- /* "netCDF4/_netCDF4.pyx":1905
+ /* "netCDF4/_netCDF4.pyx":1941
* 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, 1905, __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, 1941, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -13521,10 +14932,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, 1905, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1941, __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, 1905, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1941, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -13532,27 +14943,27 @@ 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, 1905, __pyx_L1_error)
+ __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1941, __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, 1905, __pyx_L1_error)
+ __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1941, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
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_COMPILING_IN_CPYTHON
- __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, 1905, __pyx_L1_error)
+ #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, 1941, __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, 1905, __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, 1941, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 1905, __pyx_L1_error)
+ #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, 1941, __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, 1905, __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, 1941, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -13562,7 +14973,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, 1905, __pyx_L1_error)
+ else __PYX_ERR(0, 1941, __pyx_L1_error)
}
break;
}
@@ -13571,17 +14982,17 @@ 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":1904
+ /* "netCDF4/_netCDF4.pyx":1940
* 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, 1904, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1940, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_7)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -13591,37 +15002,55 @@ 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, 1904, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_dimname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1940, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1904, __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, 1904, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ #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, 1940, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 1940, __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, 1940, __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, 1940, __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, 1904, __pyx_L1_error)
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_dimname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1940, __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, 1904, __pyx_L1_error)
+ __pyx_t_9 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 1940, __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, 1904, __pyx_L1_error)
+ __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1940, __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, 1904, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1940, __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, 1904, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1940, __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, 1904, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1940, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":1905
+ /* "netCDF4/_netCDF4.pyx":1941
* ncdump = ['%r\n' % type(self)]
* dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
* for dimname in self.dimensions.keys()]) # <<<<<<<<<<<<<<
@@ -13631,40 +15060,40 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":1904
+ /* "netCDF4/_netCDF4.pyx":1940
* 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, 1904, __pyx_L1_error)
+ __pyx_t_3 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1940, __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":1907
+ /* "netCDF4/_netCDF4.pyx":1943
* 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, 1907, __pyx_L1_error)
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1943, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- /* "netCDF4/_netCDF4.pyx":1912
+ /* "netCDF4/_netCDF4.pyx":1948
* .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, 1912, __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, 1948, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_8 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -13674,10 +15103,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, 1912, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1948, __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, 1912, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1948, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -13685,27 +15114,27 @@ 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, 1912, __pyx_L1_error)
+ __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1948, __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, 1912, __pyx_L1_error)
+ __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1948, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
for (;;) {
if (likely(!__pyx_t_6)) {
if (likely(PyList_CheckExact(__pyx_t_4))) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 1912, __pyx_L1_error)
+ #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, 1948, __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, 1912, __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, 1948, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
} else {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 1912, __pyx_L1_error)
+ #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, 1948, __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, 1912, __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, 1948, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
}
@@ -13715,7 +15144,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, 1912, __pyx_L1_error)
+ else __PYX_ERR(0, 1948, __pyx_L1_error)
}
break;
}
@@ -13724,22 +15153,22 @@ 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":1907
+ /* "netCDF4/_netCDF4.pyx":1943
* 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, 1907, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1943, __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, 1907, __pyx_L1_error)
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_varname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __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, 1907, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1943, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
@@ -13749,28 +15178,48 @@ 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, 1907, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1943, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else {
- __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1907, __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, 1907, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ #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, 1943, __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
+ #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, 1943, __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, 1943, __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, 1943, __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, 1907, __pyx_L1_error)
+ __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_kp_s_4m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1943, __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, 1907, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1943, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
if (likely(__pyx_t_7)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
@@ -13780,44 +15229,62 @@ 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, 1907, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_varname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1943, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
} else {
- __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __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, 1907, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ #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, 1943, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #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, 1943, __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, 1943, __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, 1943, __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, 1907, __pyx_L1_error)
+ __pyx_t_10 = PyNumber_Add(__pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1943, __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, 1907, __pyx_L1_error)
+ __pyx_t_2 = PyNumber_Add(__pyx_t_10, __pyx_kp_s_0m); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1943, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":1908
+ /* "netCDF4/_netCDF4.pyx":1944
* 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, 1908, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1944, __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, 1908, __pyx_L1_error)
+ __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_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, 1908, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1944, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
@@ -13827,93 +15294,113 @@ 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, 1908, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1944, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_10);
} else {
- __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1908, __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, 1908, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ #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, 1944, __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
+ #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, 1944, __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, 1944, __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, 1944, __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":1909
+ /* "netCDF4/_netCDF4.pyx":1945
* [_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, 1909, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1945, __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__18, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1909, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1945, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":1910
+ /* "netCDF4/_netCDF4.pyx":1946
* (((_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, 1910, __pyx_L1_error)
+ __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_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1910, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1946, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":1911
+ /* "netCDF4/_netCDF4.pyx":1947
* .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, 1911, __pyx_L1_error)
+ __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_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1911, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1947, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":1912
+ /* "netCDF4/_netCDF4.pyx":1948
* .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, 1912, __pyx_L1_error)
+ __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_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1912, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1948, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":1907
+ /* "netCDF4/_netCDF4.pyx":1943
* 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, 1907, __pyx_L1_error)
+ __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1943, __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, 1907, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1943, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":1912
+ /* "netCDF4/_netCDF4.pyx":1948
* .replace("'",""))\
* .replace(", ",","))\
* .replace(",)",")") for varname in self.variables.keys()]) # <<<<<<<<<<<<<<
@@ -13923,32 +15410,32 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":1906
+ /* "netCDF4/_netCDF4.pyx":1942
* 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, 1906, __pyx_L1_error)
+ __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1942, __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":1913
+ /* "netCDF4/_netCDF4.pyx":1949
* .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, 1913, __pyx_L1_error)
+ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1949, __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, 1913, __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, 1949, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_10 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
@@ -13958,10 +15445,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, 1913, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1949, __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, 1913, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1949, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
@@ -13969,27 +15456,27 @@ 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, 1913, __pyx_L1_error)
+ __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1949, __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, 1913, __pyx_L1_error)
+ __pyx_t_6 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1949, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
for (;;) {
if (likely(!__pyx_t_6)) {
if (likely(PyList_CheckExact(__pyx_t_8))) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_8)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 1913, __pyx_L1_error)
+ #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, 1949, __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, 1913, __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, 1949, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
} else {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 1913, __pyx_L1_error)
+ #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, 1949, __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, 1913, __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, 1949, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
}
@@ -13999,7 +15486,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, 1913, __pyx_L1_error)
+ else __PYX_ERR(0, 1949, __pyx_L1_error)
}
break;
}
@@ -14007,10 +15494,10 @@ 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, 1913, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1949, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
@@ -14020,48 +15507,66 @@ 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, 1913, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_grpname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1949, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
} else {
- __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1913, __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, 1913, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ #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, 1949, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #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, 1949, __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, 1949, __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, 1949, __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, 1913, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1949, __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, 1913, __pyx_L1_error)
+ __pyx_t_8 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1949, __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":1914
+ /* "netCDF4/_netCDF4.pyx":1950
* .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__16, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1914, __pyx_L1_error)
+ __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, 1950, __pyx_L1_error)
if (__pyx_t_12) {
- /* "netCDF4/_netCDF4.pyx":1916
+ /* "netCDF4/_netCDF4.pyx":1952
* 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, 1916, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1952, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_self->data_model);
__Pyx_GIVEREF(__pyx_v_self->data_model);
@@ -14070,20 +15575,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":1915
+ /* "netCDF4/_netCDF4.pyx":1951
* 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, 1915, __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, 1951, __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, 1915, __pyx_L1_error)
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1951, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":1914
+ /* "netCDF4/_netCDF4.pyx":1950
* .replace(",)",")") for varname in self.variables.keys()])
* grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
* if self.path == '/': # <<<<<<<<<<<<<<
@@ -14093,7 +15598,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx
goto __pyx_L9;
}
- /* "netCDF4/_netCDF4.pyx":1918
+ /* "netCDF4/_netCDF4.pyx":1954
* (self.data_model, self.disk_format))
* else:
* ncdump.append('group %s:\n' % self.path) # <<<<<<<<<<<<<<
@@ -14101,34 +15606,34 @@ 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, 1918, __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, 1954, __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, 1918, __pyx_L1_error)
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1954, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
__pyx_L9:;
- /* "netCDF4/_netCDF4.pyx":1919
+ /* "netCDF4/_netCDF4.pyx":1955
* 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, 1919, __pyx_L1_error)
+ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1955, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- /* "netCDF4/_netCDF4.pyx":1920
+ /* "netCDF4/_netCDF4.pyx":1956
* 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, 1920, __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, 1956, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_10 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -14138,10 +15643,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, 1920, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1956, __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, 1920, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1956, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -14149,27 +15654,27 @@ 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, 1920, __pyx_L1_error)
+ __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1956, __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, 1920, __pyx_L1_error)
+ __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1956, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
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_COMPILING_IN_CPYTHON
- __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, 1920, __pyx_L1_error)
+ #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, 1956, __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, 1920, __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, 1956, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
#endif
} else {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 1920, __pyx_L1_error)
+ #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, 1956, __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, 1920, __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, 1956, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
#endif
}
@@ -14179,7 +15684,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, 1920, __pyx_L1_error)
+ else __PYX_ERR(0, 1956, __pyx_L1_error)
}
break;
}
@@ -14188,17 +15693,17 @@ 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":1919
+ /* "netCDF4/_netCDF4.pyx":1955
* 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, 1919, __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, 1955, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__pyx_t_11 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
__pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
if (likely(__pyx_t_11)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
@@ -14208,21 +15713,39 @@ 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, 1919, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1955, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
} else {
- __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_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, 1919, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ #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, 1955, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else
+ #endif
+ #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, 1955, __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, 1955, __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, 1955, __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, 1919, __pyx_L1_error)
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1955, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_INCREF(__pyx_v_name);
__Pyx_GIVEREF(__pyx_v_name);
@@ -14230,74 +15753,74 @@ 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, 1919, __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, 1955, __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, 1919, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1955, __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":1921
+ /* "netCDF4/_netCDF4.pyx":1957
* 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, 1921, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Add(__pyx_v_ncdump, __pyx_v_attrs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1957, __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":1922
+ /* "netCDF4/_netCDF4.pyx":1958
* 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__21, __pyx_v_dimnames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1922, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_dimnames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1958, __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, 1922, __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, 1958, __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, 1922, __pyx_L1_error)
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_3); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1958, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":1923
+ /* "netCDF4/_netCDF4.pyx":1959
* 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__21, __pyx_v_varnames); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1923, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_varnames); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1959, __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, 1923, __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, 1959, __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, 1923, __pyx_L1_error)
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1959, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":1924
+ /* "netCDF4/_netCDF4.pyx":1960
* 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__21, __pyx_v_grpnames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1924, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_grpnames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1960, __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, 1924, __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, 1960, __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, 1924, __pyx_L1_error)
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_3); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 1960, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":1925
+ /* "netCDF4/_netCDF4.pyx":1961
* ncdump.append(' variables(dimensions): %s\n' % ', '.join(varnames))
* ncdump.append(' groups: %s\n' % ', '.join(grpnames))
* return ''.join(ncdump) # <<<<<<<<<<<<<<
@@ -14305,13 +15828,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx
* def close(self):
*/
__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, 1925, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_v_ncdump); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1961, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":1902
+ /* "netCDF4/_netCDF4.pyx":1938
* return unicode(self).encode(default_encoding)
*
* def __unicode__(self): # <<<<<<<<<<<<<<
@@ -14346,7 +15869,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1927
+/* "netCDF4/_netCDF4.pyx":1963
* return ''.join(ncdump)
*
* def close(self): # <<<<<<<<<<<<<<
@@ -14378,7 +15901,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(struct __pyx_obj_7
PyObject *__pyx_t_4 = NULL;
__Pyx_RefNannySetupContext("close", 0);
- /* "netCDF4/_netCDF4.pyx":1934
+ /* "netCDF4/_netCDF4.pyx":1970
* """
* cdef int ierr
* ierr = nc_close(self._grpid) # <<<<<<<<<<<<<<
@@ -14387,7 +15910,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(struct __pyx_obj_7
*/
__pyx_v_ierr = nc_close(__pyx_v_self->_grpid);
- /* "netCDF4/_netCDF4.pyx":1935
+ /* "netCDF4/_netCDF4.pyx":1971
* cdef int ierr
* ierr = nc_close(self._grpid)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -14397,7 +15920,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(struct __pyx_obj_7
__pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1936
+ /* "netCDF4/_netCDF4.pyx":1972
* ierr = nc_close(self._grpid)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -14405,22 +15928,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(struct __pyx_obj_7
*
*/
__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, 1936, __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, 1972, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1936, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1972, __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, 1936, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1972, __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, 1936, __pyx_L1_error)
+ __PYX_ERR(0, 1972, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1935
+ /* "netCDF4/_netCDF4.pyx":1971
* cdef int ierr
* ierr = nc_close(self._grpid)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -14429,7 +15952,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":1937
+ /* "netCDF4/_netCDF4.pyx":1973
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* self._isopen = 0 # indicates file already closed, checked by __dealloc__ # <<<<<<<<<<<<<<
@@ -14438,7 +15961,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(struct __pyx_obj_7
*/
__pyx_v_self->_isopen = 0;
- /* "netCDF4/_netCDF4.pyx":1927
+ /* "netCDF4/_netCDF4.pyx":1963
* return ''.join(ncdump)
*
* def close(self): # <<<<<<<<<<<<<<
@@ -14460,7 +15983,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(struct __pyx_obj_7
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1939
+/* "netCDF4/_netCDF4.pyx":1975
* self._isopen = 0 # indicates file already closed, checked by __dealloc__
*
* def isopen(self): # <<<<<<<<<<<<<<
@@ -14489,7 +16012,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_16isopen(struct __pyx_obj_
int __pyx_t_2;
__Pyx_RefNannySetupContext("isopen", 0);
- /* "netCDF4/_netCDF4.pyx":1945
+ /* "netCDF4/_netCDF4.pyx":1981
* is the Dataset open or closed?
* """
* return bool(self._isopen) # <<<<<<<<<<<<<<
@@ -14497,17 +16020,17 @@ 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, 1945, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_isopen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1981, __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, 1945, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1981, __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, 1945, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1981, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":1939
+ /* "netCDF4/_netCDF4.pyx":1975
* self._isopen = 0 # indicates file already closed, checked by __dealloc__
*
* def isopen(self): # <<<<<<<<<<<<<<
@@ -14526,7 +16049,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_16isopen(struct __pyx_obj_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1947
+/* "netCDF4/_netCDF4.pyx":1983
* return bool(self._isopen)
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -14551,7 +16074,7 @@ static void __pyx_pf_7netCDF4_8_netCDF4_7Dataset_18__dealloc__(struct __pyx_obj_
int __pyx_t_1;
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "netCDF4/_netCDF4.pyx":1950
+ /* "netCDF4/_netCDF4.pyx":1986
* # close file when there are no references to object left
* cdef int ierr
* if self._isopen: # <<<<<<<<<<<<<<
@@ -14561,16 +16084,16 @@ static void __pyx_pf_7netCDF4_8_netCDF4_7Dataset_18__dealloc__(struct __pyx_obj_
__pyx_t_1 = (__pyx_v_self->_isopen != 0);
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1951
+ /* "netCDF4/_netCDF4.pyx":1987
* cdef int ierr
* if self._isopen:
* ierr = nc_close(self._grpid) # <<<<<<<<<<<<<<
*
- * def sync(self):
+ * def __reduce__(self):
*/
__pyx_v_ierr = nc_close(__pyx_v_self->_grpid);
- /* "netCDF4/_netCDF4.pyx":1950
+ /* "netCDF4/_netCDF4.pyx":1986
* # close file when there are no references to object left
* cdef int ierr
* if self._isopen: # <<<<<<<<<<<<<<
@@ -14579,7 +16102,7 @@ static void __pyx_pf_7netCDF4_8_netCDF4_7Dataset_18__dealloc__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":1947
+ /* "netCDF4/_netCDF4.pyx":1983
* return bool(self._isopen)
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -14591,29 +16114,87 @@ static void __pyx_pf_7netCDF4_8_netCDF4_7Dataset_18__dealloc__(struct __pyx_obj_
__Pyx_RefNannyFinishContext();
}
-/* "netCDF4/_netCDF4.pyx":1953
+/* "netCDF4/_netCDF4.pyx":1989
* ierr = nc_close(self._grpid)
*
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * # raise error is user tries to pickle a Dataset object.
+ * raise NotImplementedError('Dataset is not picklable')
+ */
+
+/* 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) {
+ 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));
+
+ /* 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) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce__", 0);
+
+ /* "netCDF4/_netCDF4.pyx":1991
+ * 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, 1991, __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, 1991, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":1989
+ * ierr = nc_close(self._grpid)
+ *
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * # raise error is user tries to pickle a Dataset object.
+ * raise NotImplementedError('Dataset is not picklable')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":1993
+ * raise NotImplementedError('Dataset is not picklable')
+ *
* def sync(self): # <<<<<<<<<<<<<<
* """
* **`sync(self)`**
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_21sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_20sync[] = "\n**`sync(self)`**\n\nWrites all buffered data in the `netCDF4.Dataset` to the disk file.";
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_21sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+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) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sync (wrapper)", 0);
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_20sync(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_22sync(((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_20sync(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_22sync(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
int __pyx_v_ierr;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -14623,7 +16204,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_20sync(struct __pyx_obj_7n
PyObject *__pyx_t_4 = NULL;
__Pyx_RefNannySetupContext("sync", 0);
- /* "netCDF4/_netCDF4.pyx":1959
+ /* "netCDF4/_netCDF4.pyx":1999
* Writes all buffered data in the `netCDF4.Dataset` to the disk file."""
* cdef int ierr
* ierr = nc_sync(self._grpid) # <<<<<<<<<<<<<<
@@ -14632,7 +16213,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_20sync(struct __pyx_obj_7n
*/
__pyx_v_ierr = nc_sync(__pyx_v_self->_grpid);
- /* "netCDF4/_netCDF4.pyx":1960
+ /* "netCDF4/_netCDF4.pyx":2000
* cdef int ierr
* ierr = nc_sync(self._grpid)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -14642,7 +16223,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_20sync(struct __pyx_obj_7n
__pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1961
+ /* "netCDF4/_netCDF4.pyx":2001
* ierr = nc_sync(self._grpid)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -14650,22 +16231,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_20sync(struct __pyx_obj_7n
* 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, 1961, __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, 2001, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1961, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2001, __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, 1961, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2001, __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, 1961, __pyx_L1_error)
+ __PYX_ERR(0, 2001, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1960
+ /* "netCDF4/_netCDF4.pyx":2000
* cdef int ierr
* ierr = nc_sync(self._grpid)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -14674,8 +16255,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_20sync(struct __pyx_obj_7n
*/
}
- /* "netCDF4/_netCDF4.pyx":1953
- * ierr = nc_close(self._grpid)
+ /* "netCDF4/_netCDF4.pyx":1993
+ * raise NotImplementedError('Dataset is not picklable')
*
* def sync(self): # <<<<<<<<<<<<<<
* """
@@ -14696,7 +16277,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_20sync(struct __pyx_obj_7n
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1963
+/* "netCDF4/_netCDF4.pyx":2003
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def _redef(self): # <<<<<<<<<<<<<<
@@ -14705,25 +16286,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_20sync(struct __pyx_obj_7n
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_23_redef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_23_redef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+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) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_redef (wrapper)", 0);
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_22_redef(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_24_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_22_redef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_24_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":1965
+ /* "netCDF4/_netCDF4.pyx":2005
* def _redef(self):
* cdef int ierr
* ierr = nc_redef(self._grpid) # <<<<<<<<<<<<<<
@@ -14732,7 +16313,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_22_redef(struct __pyx_obj_
*/
__pyx_v_ierr = nc_redef(__pyx_v_self->_grpid);
- /* "netCDF4/_netCDF4.pyx":1963
+ /* "netCDF4/_netCDF4.pyx":2003
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def _redef(self): # <<<<<<<<<<<<<<
@@ -14747,7 +16328,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_22_redef(struct __pyx_obj_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1967
+/* "netCDF4/_netCDF4.pyx":2007
* ierr = nc_redef(self._grpid)
*
* def _enddef(self): # <<<<<<<<<<<<<<
@@ -14756,25 +16337,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_22_redef(struct __pyx_obj_
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_25_enddef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_25_enddef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+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) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_enddef (wrapper)", 0);
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_24_enddef(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_26_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_24_enddef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26_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":1969
+ /* "netCDF4/_netCDF4.pyx":2009
* def _enddef(self):
* cdef int ierr
* ierr = nc_enddef(self._grpid) # <<<<<<<<<<<<<<
@@ -14783,7 +16364,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_24_enddef(struct __pyx_obj
*/
__pyx_v_ierr = nc_enddef(__pyx_v_self->_grpid);
- /* "netCDF4/_netCDF4.pyx":1967
+ /* "netCDF4/_netCDF4.pyx":2007
* ierr = nc_redef(self._grpid)
*
* def _enddef(self): # <<<<<<<<<<<<<<
@@ -14798,7 +16379,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_24_enddef(struct __pyx_obj
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1971
+/* "netCDF4/_netCDF4.pyx":2011
* ierr = nc_enddef(self._grpid)
*
* def set_fill_on(self): # <<<<<<<<<<<<<<
@@ -14807,20 +16388,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_24_enddef(struct __pyx_obj
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_27set_fill_on(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_26set_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 correspongs to `set_fill_on`. [...]
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_27set_fill_on(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+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`. [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_29set_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_26set_fill_on(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_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_26set_fill_on(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
+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;
int __pyx_v_oldmode;
PyObject *__pyx_r = NULL;
@@ -14831,7 +16412,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26set_fill_on(struct __pyx
PyObject *__pyx_t_4 = NULL;
__Pyx_RefNannySetupContext("set_fill_on", 0);
- /* "netCDF4/_netCDF4.pyx":1985
+ /* "netCDF4/_netCDF4.pyx":2025
* to."""
* cdef int ierr, oldmode
* ierr = nc_set_fill (self._grpid, NC_FILL, &oldmode) # <<<<<<<<<<<<<<
@@ -14840,7 +16421,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26set_fill_on(struct __pyx
*/
__pyx_v_ierr = nc_set_fill(__pyx_v_self->_grpid, NC_FILL, (&__pyx_v_oldmode));
- /* "netCDF4/_netCDF4.pyx":1986
+ /* "netCDF4/_netCDF4.pyx":2026
* cdef int ierr, oldmode
* ierr = nc_set_fill (self._grpid, NC_FILL, &oldmode)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -14850,7 +16431,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26set_fill_on(struct __pyx
__pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":1987
+ /* "netCDF4/_netCDF4.pyx":2027
* ierr = nc_set_fill (self._grpid, NC_FILL, &oldmode)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -14858,22 +16439,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26set_fill_on(struct __pyx
* 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, 1987, __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, 2027, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1987, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2027, __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, 1987, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2027, __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, 1987, __pyx_L1_error)
+ __PYX_ERR(0, 2027, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1986
+ /* "netCDF4/_netCDF4.pyx":2026
* cdef int ierr, oldmode
* ierr = nc_set_fill (self._grpid, NC_FILL, &oldmode)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -14882,7 +16463,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26set_fill_on(struct __pyx
*/
}
- /* "netCDF4/_netCDF4.pyx":1971
+ /* "netCDF4/_netCDF4.pyx":2011
* ierr = nc_enddef(self._grpid)
*
* def set_fill_on(self): # <<<<<<<<<<<<<<
@@ -14904,7 +16485,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26set_fill_on(struct __pyx
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1989
+/* "netCDF4/_netCDF4.pyx":2029
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def set_fill_off(self): # <<<<<<<<<<<<<<
@@ -14913,20 +16494,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26set_fill_on(struct __pyx
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_29set_fill_off(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_28set_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_29set_fill_off(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+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) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_fill_off (wrapper)", 0);
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_off(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_30set_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_28set_fill_off(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
+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;
int __pyx_v_oldmode;
PyObject *__pyx_r = NULL;
@@ -14937,7 +16518,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_off(struct __py
PyObject *__pyx_t_4 = NULL;
__Pyx_RefNannySetupContext("set_fill_off", 0);
- /* "netCDF4/_netCDF4.pyx":1999
+ /* "netCDF4/_netCDF4.pyx":2039
* sure the data is actually written before being read."""
* cdef int ierr, oldmode
* ierr = nc_set_fill (self._grpid, NC_NOFILL, &oldmode) # <<<<<<<<<<<<<<
@@ -14946,7 +16527,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_off(struct __py
*/
__pyx_v_ierr = nc_set_fill(__pyx_v_self->_grpid, NC_NOFILL, (&__pyx_v_oldmode));
- /* "netCDF4/_netCDF4.pyx":2000
+ /* "netCDF4/_netCDF4.pyx":2040
* cdef int ierr, oldmode
* ierr = nc_set_fill (self._grpid, NC_NOFILL, &oldmode)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -14956,7 +16537,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_off(struct __py
__pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":2001
+ /* "netCDF4/_netCDF4.pyx":2041
* ierr = nc_set_fill (self._grpid, NC_NOFILL, &oldmode)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -14964,22 +16545,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_off(struct __py
* 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, 2001, __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, 2041, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2001, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2041, __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, 2001, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2041, __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, 2001, __pyx_L1_error)
+ __PYX_ERR(0, 2041, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2000
+ /* "netCDF4/_netCDF4.pyx":2040
* cdef int ierr, oldmode
* ierr = nc_set_fill (self._grpid, NC_NOFILL, &oldmode)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -14988,7 +16569,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_off(struct __py
*/
}
- /* "netCDF4/_netCDF4.pyx":1989
+ /* "netCDF4/_netCDF4.pyx":2029
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def set_fill_off(self): # <<<<<<<<<<<<<<
@@ -15010,7 +16591,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_off(struct __py
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2003
+/* "netCDF4/_netCDF4.pyx":2043
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def createDimension(self, dimname, size=None): # <<<<<<<<<<<<<<
@@ -15019,9 +16600,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28set_fill_off(struct __py
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_31createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_30createDimension[] = "\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 dim [...]
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_31createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+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 dim [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_dimname = 0;
PyObject *__pyx_v_size = 0;
PyObject *__pyx_r = 0;
@@ -15052,7 +16633,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_31createDimension(PyObject
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createDimension") < 0)) __PYX_ERR(0, 2003, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createDimension") < 0)) __PYX_ERR(0, 2043, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -15067,20 +16648,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_31createDimension(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, 2003, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("createDimension", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2043, __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_30createDimension(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_dimname, __pyx_v_size);
+ __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);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30createDimension(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_32createDimension(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;
@@ -15088,14 +16669,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30createDimension(struct _
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("createDimension", 0);
- /* "netCDF4/_netCDF4.pyx":2016
+ /* "netCDF4/_netCDF4.pyx":2056
* 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, 2016, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2056, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
@@ -15103,17 +16684,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30createDimension(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, 2016, __pyx_L1_error)
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2056, __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, 2016, __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, 2016, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_size, __pyx_v_size) < 0) __PYX_ERR(0, 2056, __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, 2056, __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, 2016, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_self->dimensions, __pyx_v_dimname, __pyx_t_3) < 0)) __PYX_ERR(0, 2056, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":2017
+ /* "netCDF4/_netCDF4.pyx":2057
* `netCDF4.Dimension.isunlimited` method of the `netCDF4.Dimension` instance."""
* self.dimensions[dimname] = Dimension(self, dimname, size=size)
* return self.dimensions[dimname] # <<<<<<<<<<<<<<
@@ -15121,13 +16702,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30createDimension(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, 2017, __pyx_L1_error)
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_dimname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2057, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2003
+ /* "netCDF4/_netCDF4.pyx":2043
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def createDimension(self, dimname, size=None): # <<<<<<<<<<<<<<
@@ -15148,7 +16729,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30createDimension(struct _
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2019
+/* "netCDF4/_netCDF4.pyx":2059
* return self.dimensions[dimname]
*
* def renameDimension(self, oldname, newname): # <<<<<<<<<<<<<<
@@ -15157,9 +16738,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30createDimension(struct _
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33renameDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_32renameDimension[] = "\n**`renameDimension(self, oldname, newname)`**\n\nrename a `netCDF4.Dimension` named `oldname` to `newname`.";
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33renameDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+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) {
PyObject *__pyx_v_oldname = 0;
PyObject *__pyx_v_newname = 0;
PyObject *__pyx_r = 0;
@@ -15185,11 +16766,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33renameDimension(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, 2019, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("renameDimension", 1, 2, 2, 1); __PYX_ERR(0, 2059, __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, 2019, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameDimension") < 0)) __PYX_ERR(0, 2059, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -15202,20 +16783,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33renameDimension(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, 2019, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("renameDimension", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2059, __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_32renameDimension(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);
+ __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);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32renameDimension(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_34renameDimension(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;
@@ -15235,41 +16816,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32renameDimension(struct _
PyObject *__pyx_t_11 = NULL;
__Pyx_RefNannySetupContext("renameDimension", 0);
- /* "netCDF4/_netCDF4.pyx":2025
+ /* "netCDF4/_netCDF4.pyx":2065
* 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, 2025, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2065, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_bytestr = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2026
+ /* "netCDF4/_netCDF4.pyx":2066
* 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, 2026, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2066, __pyx_L1_error)
__pyx_v_namstring = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":2027
+ /* "netCDF4/_netCDF4.pyx":2067
* 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, 2027, __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, 2067, __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, 2027, __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, 2067, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -15279,17 +16860,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32renameDimension(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, 2027, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2067, __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, 2027, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2067, __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":2028
+ /* "netCDF4/_netCDF4.pyx":2068
* namstring = bytestr
* if self.data_model != 'NETCDF4': self._redef()
* try: # <<<<<<<<<<<<<<
@@ -15305,19 +16886,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32renameDimension(struct _
__Pyx_XGOTREF(__pyx_t_8);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":2029
+ /* "netCDF4/_netCDF4.pyx":2069
* 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, 2029, __pyx_L4_error)
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_oldname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2069, __pyx_L4_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_dim = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2028
+ /* "netCDF4/_netCDF4.pyx":2068
* namstring = bytestr
* if self.data_model != 'NETCDF4': self._redef()
* try: # <<<<<<<<<<<<<<
@@ -15335,7 +16916,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32renameDimension(struct _
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2030
+ /* "netCDF4/_netCDF4.pyx":2070
* try:
* dim = self.dimensions[oldname]
* except KeyError: # <<<<<<<<<<<<<<
@@ -15345,36 +16926,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32renameDimension(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, 2030, __pyx_L6_except_error)
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 2070, __pyx_L6_except_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_5);
- /* "netCDF4/_netCDF4.pyx":2031
+ /* "netCDF4/_netCDF4.pyx":2071
* 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, 2031, __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, 2071, __pyx_L6_except_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2031, __pyx_L6_except_error)
+ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2071, __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, 2031, __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, 2071, __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, 2031, __pyx_L6_except_error)
+ __PYX_ERR(0, 2071, __pyx_L6_except_error)
}
goto __pyx_L6_except_error;
__pyx_L6_except_error:;
- /* "netCDF4/_netCDF4.pyx":2028
+ /* "netCDF4/_netCDF4.pyx":2068
* namstring = bytestr
* if self.data_model != 'NETCDF4': self._redef()
* try: # <<<<<<<<<<<<<<
@@ -15390,32 +16971,32 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32renameDimension(struct _
__pyx_L11_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":2032
+ /* "netCDF4/_netCDF4.pyx":2072
* 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, 2032, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_dimid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2072, __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, 2032, __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, 2072, __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":2033
+ /* "netCDF4/_netCDF4.pyx":2073
* 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((<char *>nc_strerror(ierr)).decode('ascii'))
*/
- __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, 2033, __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, 2073, __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, 2033, __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, 2073, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -15425,17 +17006,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32renameDimension(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, 2033, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2073, __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, 2033, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2073, __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":2034
+ /* "netCDF4/_netCDF4.pyx":2074
* ierr = nc_rename_dim(self._grpid, dim._dimid, namstring)
* if self.data_model != 'NETCDF4': self._enddef()
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -15445,7 +17026,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32renameDimension(struct _
__pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":2035
+ /* "netCDF4/_netCDF4.pyx":2075
* if self.data_model != 'NETCDF4': self._enddef()
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -15453,22 +17034,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32renameDimension(struct _
* 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, 2035, __pyx_L1_error)
+ __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, 2075, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2035, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2075, __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, 2035, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2075, __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, 2035, __pyx_L1_error)
+ __PYX_ERR(0, 2075, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2034
+ /* "netCDF4/_netCDF4.pyx":2074
* ierr = nc_rename_dim(self._grpid, dim._dimid, namstring)
* if self.data_model != 'NETCDF4': self._enddef()
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -15477,17 +17058,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32renameDimension(struct _
*/
}
- /* "netCDF4/_netCDF4.pyx":2037
+ /* "netCDF4/_netCDF4.pyx":2077
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # 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, 2037, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dimensions, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2077, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -15497,32 +17078,50 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32renameDimension(struct _
}
}
if (!__pyx_t_1) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_oldname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2037, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_oldname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2077, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
} else {
- __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2037, __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, 2037, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ 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, 2077, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ 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, 2077, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2077, __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, 2077, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __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;
- /* "netCDF4/_netCDF4.pyx":2039
+ /* "netCDF4/_netCDF4.pyx":2079
* 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, 2039, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_self->dimensions, __pyx_v_newname, __pyx_v_dim) < 0)) __PYX_ERR(0, 2079, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2019
+ /* "netCDF4/_netCDF4.pyx":2059
* return self.dimensions[dimname]
*
* def renameDimension(self, oldname, newname): # <<<<<<<<<<<<<<
@@ -15549,7 +17148,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32renameDimension(struct _
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2043
+/* "netCDF4/_netCDF4.pyx":2083
* # looks in the file, so no need to manually update.
*
* def createCompoundType(self, datatype, datatype_name): # <<<<<<<<<<<<<<
@@ -15558,9 +17157,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32renameDimension(struct _
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35createCompoundType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_34createCompoundType[] = "\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 retur [...]
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35createCompoundType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+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 retur [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37createCompoundType(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;
@@ -15586,11 +17185,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35createCompoundType(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, 2043, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("createCompoundType", 1, 2, 2, 1); __PYX_ERR(0, 2083, __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, 2043, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createCompoundType") < 0)) __PYX_ERR(0, 2083, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -15603,34 +17202,34 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35createCompoundType(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, 2043, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("createCompoundType", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2083, __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_34createCompoundType(((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_36createCompoundType(((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_34createCompoundType(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_36createCompoundType(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":2057
+ /* "netCDF4/_netCDF4.pyx":2097
* 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, 2057, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2097, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
@@ -15641,13 +17240,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34createCompoundType(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, 2057, __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, 2097, __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, 2057, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_self->cmptypes, __pyx_v_datatype_name, __pyx_t_2) < 0)) __PYX_ERR(0, 2097, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2059
+ /* "netCDF4/_netCDF4.pyx":2099
* self.cmptypes[datatype_name] = CompoundType(self, datatype,\
* datatype_name)
* return self.cmptypes[datatype_name] # <<<<<<<<<<<<<<
@@ -15655,13 +17254,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34createCompoundType(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, 2059, __pyx_L1_error)
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_self->cmptypes, __pyx_v_datatype_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2099, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2043
+ /* "netCDF4/_netCDF4.pyx":2083
* # looks in the file, so no need to manually update.
*
* def createCompoundType(self, datatype, datatype_name): # <<<<<<<<<<<<<<
@@ -15681,7 +17280,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34createCompoundType(struc
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2061
+/* "netCDF4/_netCDF4.pyx":2101
* return self.cmptypes[datatype_name]
*
* def createVLType(self, datatype, datatype_name): # <<<<<<<<<<<<<<
@@ -15690,9 +17289,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34createCompoundType(struc
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37createVLType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_36createVLType[] = "\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_37createVLType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+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) {
PyObject *__pyx_v_datatype = 0;
PyObject *__pyx_v_datatype_name = 0;
PyObject *__pyx_r = 0;
@@ -15718,11 +17317,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37createVLType(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, 2061, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("createVLType", 1, 2, 2, 1); __PYX_ERR(0, 2101, __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, 2061, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createVLType") < 0)) __PYX_ERR(0, 2101, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -15735,34 +17334,34 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37createVLType(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, 2061, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("createVLType", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2101, __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_36createVLType(((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_38createVLType(((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_36createVLType(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_38createVLType(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":2070
+ /* "netCDF4/_netCDF4.pyx":2110
* 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, 2070, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2110, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
@@ -15773,13 +17372,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_36createVLType(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, 2070, __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, 2110, __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, 2070, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_self->vltypes, __pyx_v_datatype_name, __pyx_t_2) < 0)) __PYX_ERR(0, 2110, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2071
+ /* "netCDF4/_netCDF4.pyx":2111
* datatype."""
* self.vltypes[datatype_name] = VLType(self, datatype, datatype_name)
* return self.vltypes[datatype_name] # <<<<<<<<<<<<<<
@@ -15787,13 +17386,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_36createVLType(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, 2071, __pyx_L1_error)
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_self->vltypes, __pyx_v_datatype_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2111, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2061
+ /* "netCDF4/_netCDF4.pyx":2101
* return self.cmptypes[datatype_name]
*
* def createVLType(self, datatype, datatype_name): # <<<<<<<<<<<<<<
@@ -15813,7 +17412,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_36createVLType(struct __py
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2073
+/* "netCDF4/_netCDF4.pyx":2113
* return self.vltypes[datatype_name]
*
* def createEnumType(self, datatype, datatype_name, enum_dict): # <<<<<<<<<<<<<<
@@ -15822,9 +17421,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_36createVLType(struct __py
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39createEnumType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_38createEnumType[] = "\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_39createEnumType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+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) {
PyObject *__pyx_v_datatype = 0;
PyObject *__pyx_v_datatype_name = 0;
PyObject *__pyx_v_enum_dict = 0;
@@ -15852,16 +17451,16 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39createEnumType(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, 2073, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("createEnumType", 1, 3, 3, 1); __PYX_ERR(0, 2113, __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, 2073, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("createEnumType", 1, 3, 3, 2); __PYX_ERR(0, 2113, __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, 2073, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createEnumType") < 0)) __PYX_ERR(0, 2113, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
@@ -15876,34 +17475,34 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39createEnumType(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, 2073, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("createEnumType", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2113, __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_38createEnumType(((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_40createEnumType(((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_38createEnumType(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_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) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("createEnumType", 0);
- /* "netCDF4/_netCDF4.pyx":2083
+ /* "netCDF4/_netCDF4.pyx":2123
* 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, 2083, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2123, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
@@ -15917,13 +17516,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_38createEnumType(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, 2083, __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, 2123, __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, 2083, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_self->enumtypes, __pyx_v_datatype_name, __pyx_t_2) < 0)) __PYX_ERR(0, 2123, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2085
+ /* "netCDF4/_netCDF4.pyx":2125
* self.enumtypes[datatype_name] = EnumType(self, datatype, datatype_name,
* enum_dict)
* return self.enumtypes[datatype_name] # <<<<<<<<<<<<<<
@@ -15931,13 +17530,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_38createEnumType(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, 2085, __pyx_L1_error)
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_self->enumtypes, __pyx_v_datatype_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2125, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2073
+ /* "netCDF4/_netCDF4.pyx":2113
* return self.vltypes[datatype_name]
*
* def createEnumType(self, datatype, datatype_name, enum_dict): # <<<<<<<<<<<<<<
@@ -15957,7 +17556,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_38createEnumType(struct __
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2087
+/* "netCDF4/_netCDF4.pyx":2127
* return self.enumtypes[datatype_name]
*
* def createVariable(self, varname, datatype, dimensions=(), zlib=False, # <<<<<<<<<<<<<<
@@ -15966,9 +17565,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_38createEnumType(struct __
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_40createVariable[] = "\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 [...]
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+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 [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43createVariable(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;
@@ -15992,7 +17591,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createVariable(PyObject
values[3] = ((PyObject *)Py_False);
values[4] = ((PyObject *)__pyx_int_4);
- /* "netCDF4/_netCDF4.pyx":2088
+ /* "netCDF4/_netCDF4.pyx":2128
*
* def createVariable(self, varname, datatype, dimensions=(), zlib=False,
* complevel=4, shuffle=True, fletcher32=False, contiguous=False, # <<<<<<<<<<<<<<
@@ -16003,7 +17602,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createVariable(PyObject
values[6] = ((PyObject *)Py_False);
values[7] = ((PyObject *)Py_False);
- /* "netCDF4/_netCDF4.pyx":2089
+ /* "netCDF4/_netCDF4.pyx":2129
* def createVariable(self, varname, datatype, dimensions=(), zlib=False,
* complevel=4, shuffle=True, fletcher32=False, contiguous=False,
* chunksizes=None, endian='native', least_significant_digit=None, # <<<<<<<<<<<<<<
@@ -16014,7 +17613,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createVariable(PyObject
values[9] = ((PyObject *)__pyx_n_s_native);
values[10] = ((PyObject *)Py_None);
- /* "netCDF4/_netCDF4.pyx":2090
+ /* "netCDF4/_netCDF4.pyx":2130
* complevel=4, shuffle=True, fletcher32=False, contiguous=False,
* chunksizes=None, endian='native', least_significant_digit=None,
* fill_value=None, chunk_cache=None): # <<<<<<<<<<<<<<
@@ -16051,7 +17650,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createVariable(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, 2087, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("createVariable", 0, 2, 13, 1); __PYX_ERR(0, 2127, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
@@ -16110,7 +17709,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createVariable(PyObject
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createVariable") < 0)) __PYX_ERR(0, 2087, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createVariable") < 0)) __PYX_ERR(0, 2127, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -16147,15 +17746,15 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createVariable(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, 2087, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("createVariable", 0, 2, 13, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2127, __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_40createVariable(((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_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);
- /* "netCDF4/_netCDF4.pyx":2087
+ /* "netCDF4/_netCDF4.pyx":2127
* return self.enumtypes[datatype_name]
*
* def createVariable(self, varname, datatype, dimensions=(), zlib=False, # <<<<<<<<<<<<<<
@@ -16168,7 +17767,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createVariable(PyObject
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(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 [...]
+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 [...]
PyObject *__pyx_v_dirname = NULL;
PyObject *__pyx_v_group = NULL;
PyObject *__pyx_r = NULL;
@@ -16183,20 +17782,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(struct __
__Pyx_RefNannySetupContext("createVariable", 0);
__Pyx_INCREF(__pyx_v_varname);
- /* "netCDF4/_netCDF4.pyx":2214
+ /* "netCDF4/_netCDF4.pyx":2254
* 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, 2214, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2254, __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, 2214, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_normpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2254, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -16206,37 +17805,55 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(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, 2214, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_varname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2254, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2214, __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, 2214, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ #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, 2254, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 2254, __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, 2254, __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, 2254, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF_SET(__pyx_v_varname, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2215
+ /* "netCDF4/_netCDF4.pyx":2255
* # 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, 2215, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2255, __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, 2215, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2255, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -16246,23 +17863,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(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, 2215, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_varname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2255, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2215, __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, 2215, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ #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, 2255, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 2255, __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, 2255, __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, 2255, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -16270,9 +17905,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(struct __
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 2215, __pyx_L1_error)
+ __PYX_ERR(0, 2255, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
@@ -16283,15 +17918,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(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, 2215, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2255, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2215, __pyx_L1_error)
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2255, __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, 2215, __pyx_L1_error)
+ __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2255, __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;
@@ -16299,7 +17934,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(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, 2215, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2255, __pyx_L1_error)
__pyx_t_5 = NULL;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L4_unpacking_done;
@@ -16307,7 +17942,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(struct __
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_5 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 2215, __pyx_L1_error)
+ __PYX_ERR(0, 2255, __pyx_L1_error)
__pyx_L4_unpacking_done:;
}
__pyx_v_dirname = __pyx_t_4;
@@ -16315,18 +17950,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(struct __
__Pyx_DECREF_SET(__pyx_v_varname, __pyx_t_2);
__pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2217
+ /* "netCDF4/_netCDF4.pyx":2257
* 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, 2217, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_dirname); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2257, __pyx_L1_error)
__pyx_t_7 = ((!__pyx_t_6) != 0);
if (__pyx_t_7) {
- /* "netCDF4/_netCDF4.pyx":2218
+ /* "netCDF4/_netCDF4.pyx":2258
* # create parent groups (like mkdir -p).
* if not dirname:
* group = self # <<<<<<<<<<<<<<
@@ -16336,7 +17971,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(struct __
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__pyx_v_group = ((PyObject *)__pyx_v_self);
- /* "netCDF4/_netCDF4.pyx":2217
+ /* "netCDF4/_netCDF4.pyx":2257
* dirname, varname = posixpath.split(varname) # varname is last.
* # create parent groups (like mkdir -p).
* if not dirname: # <<<<<<<<<<<<<<
@@ -16346,7 +17981,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(struct __
goto __pyx_L5;
}
- /* "netCDF4/_netCDF4.pyx":2220
+ /* "netCDF4/_netCDF4.pyx":2260
* group = self
* else:
* group = self.createGroup(dirname) # <<<<<<<<<<<<<<
@@ -16354,10 +17989,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(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, 2220, __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, 2260, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -16367,18 +18002,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(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, 2220, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_dirname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2260, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2220, __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, 2220, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ #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, 2260, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 2260, __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, 2260, __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, 2260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_group = __pyx_t_1;
@@ -16386,14 +18039,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(struct __
}
__pyx_L5:;
- /* "netCDF4/_netCDF4.pyx":2222
+ /* "netCDF4/_netCDF4.pyx":2262
* 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, 2222, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2262, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_group);
__Pyx_GIVEREF(__pyx_v_group);
@@ -16405,69 +18058,69 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(struct __
__Pyx_GIVEREF(__pyx_v_datatype);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_datatype);
- /* "netCDF4/_netCDF4.pyx":2223
+ /* "netCDF4/_netCDF4.pyx":2263
* # 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, 2223, __pyx_L1_error)
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2263, __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, 2223, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_zlib, __pyx_v_zlib) < 0) __PYX_ERR(0, 2223, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_complevel, __pyx_v_complevel) < 0) __PYX_ERR(0, 2223, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shuffle, __pyx_v_shuffle) < 0) __PYX_ERR(0, 2223, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dimensions, __pyx_v_dimensions) < 0) __PYX_ERR(0, 2263, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_zlib, __pyx_v_zlib) < 0) __PYX_ERR(0, 2263, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_complevel, __pyx_v_complevel) < 0) __PYX_ERR(0, 2263, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shuffle, __pyx_v_shuffle) < 0) __PYX_ERR(0, 2263, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2224
+ /* "netCDF4/_netCDF4.pyx":2264
* 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, 2223, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_contiguous, __pyx_v_contiguous) < 0) __PYX_ERR(0, 2223, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chunksizes, __pyx_v_chunksizes) < 0) __PYX_ERR(0, 2223, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fletcher32, __pyx_v_fletcher32) < 0) __PYX_ERR(0, 2263, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_contiguous, __pyx_v_contiguous) < 0) __PYX_ERR(0, 2263, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chunksizes, __pyx_v_chunksizes) < 0) __PYX_ERR(0, 2263, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2225
+ /* "netCDF4/_netCDF4.pyx":2265
* 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, 2223, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_least_significant_digit, __pyx_v_least_significant_digit) < 0) __PYX_ERR(0, 2223, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_endian, __pyx_v_endian) < 0) __PYX_ERR(0, 2263, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_least_significant_digit, __pyx_v_least_significant_digit) < 0) __PYX_ERR(0, 2263, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2226
+ /* "netCDF4/_netCDF4.pyx":2266
* 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, 2223, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chunk_cache, __pyx_v_chunk_cache) < 0) __PYX_ERR(0, 2223, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) __PYX_ERR(0, 2263, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chunk_cache, __pyx_v_chunk_cache) < 0) __PYX_ERR(0, 2263, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2222
+ /* "netCDF4/_netCDF4.pyx":2262
* 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, 2222, __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, 2262, __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, 2222, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2262, __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, 2222, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_varname, __pyx_t_3) < 0)) __PYX_ERR(0, 2262, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":2227
+ /* "netCDF4/_netCDF4.pyx":2267
* endian=endian, least_significant_digit=least_significant_digit,
* fill_value=fill_value, chunk_cache=chunk_cache)
* return group.variables[varname] # <<<<<<<<<<<<<<
@@ -16475,16 +18128,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(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, 2227, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2267, __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, 2227, __pyx_L1_error)
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_varname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2267, __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":2087
+ /* "netCDF4/_netCDF4.pyx":2127
* return self.enumtypes[datatype_name]
*
* def createVariable(self, varname, datatype, dimensions=(), zlib=False, # <<<<<<<<<<<<<<
@@ -16509,7 +18162,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(struct __
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2229
+/* "netCDF4/_netCDF4.pyx":2269
* return group.variables[varname]
*
* def renameVariable(self, oldname, newname): # <<<<<<<<<<<<<<
@@ -16518,9 +18171,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createVariable(struct __
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43renameVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_42renameVariable[] = "\n**`renameVariable(self, oldname, newname)`**\n\nrename a `netCDF4.Variable` named `oldname` to `newname`";
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43renameVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+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) {
PyObject *__pyx_v_oldname = 0;
PyObject *__pyx_v_newname = 0;
PyObject *__pyx_r = 0;
@@ -16546,11 +18199,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43renameVariable(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, 2229, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("renameVariable", 1, 2, 2, 1); __PYX_ERR(0, 2269, __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, 2229, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameVariable") < 0)) __PYX_ERR(0, 2269, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -16563,20 +18216,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43renameVariable(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, 2229, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("renameVariable", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2269, __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_42renameVariable(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);
+ __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);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(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_44renameVariable(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;
@@ -16596,7 +18249,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(struct __
int __pyx_t_11;
__Pyx_RefNannySetupContext("renameVariable", 0);
- /* "netCDF4/_netCDF4.pyx":2235
+ /* "netCDF4/_netCDF4.pyx":2275
* rename a `netCDF4.Variable` named `oldname` to `newname`"""
* cdef char *namstring
* try: # <<<<<<<<<<<<<<
@@ -16612,19 +18265,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(struct __
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":2236
+ /* "netCDF4/_netCDF4.pyx":2276
* 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, 2236, __pyx_L3_error)
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_oldname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2276, __pyx_L3_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_v_var = __pyx_t_4;
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":2235
+ /* "netCDF4/_netCDF4.pyx":2275
* rename a `netCDF4.Variable` named `oldname` to `newname`"""
* cdef char *namstring
* try: # <<<<<<<<<<<<<<
@@ -16640,7 +18293,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(struct __
__Pyx_PyThreadState_assign
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":2237
+ /* "netCDF4/_netCDF4.pyx":2277
* try:
* var = self.variables[oldname]
* except KeyError: # <<<<<<<<<<<<<<
@@ -16650,36 +18303,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(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, 2237, __pyx_L5_except_error)
+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 2277, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "netCDF4/_netCDF4.pyx":2238
+ /* "netCDF4/_netCDF4.pyx":2278
* 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, 2238, __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, 2278, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2238, __pyx_L5_except_error)
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2278, __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, 2238, __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, 2278, __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, 2238, __pyx_L5_except_error)
+ __PYX_ERR(0, 2278, __pyx_L5_except_error)
}
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "netCDF4/_netCDF4.pyx":2235
+ /* "netCDF4/_netCDF4.pyx":2275
* rename a `netCDF4.Variable` named `oldname` to `newname`"""
* cdef char *namstring
* try: # <<<<<<<<<<<<<<
@@ -16695,41 +18348,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(struct __
__pyx_L10_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":2239
+ /* "netCDF4/_netCDF4.pyx":2279
* 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, 2239, __pyx_L1_error)
+ __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2279, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_v_bytestr = __pyx_t_7;
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":2240
+ /* "netCDF4/_netCDF4.pyx":2280
* 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, 2240, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 2280, __pyx_L1_error)
__pyx_v_namstring = __pyx_t_10;
- /* "netCDF4/_netCDF4.pyx":2241
+ /* "netCDF4/_netCDF4.pyx":2281
* 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, 2241, __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, 2281, __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, 2241, __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, 2281, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -16739,42 +18392,42 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(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, 2241, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2281, __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, 2241, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2281, __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":2242
+ /* "netCDF4/_netCDF4.pyx":2282
* 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, 2242, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_varid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2282, __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, 2242, __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, 2282, __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":2243
+ /* "netCDF4/_netCDF4.pyx":2283
* 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((<char *>nc_strerror(ierr)).decode('ascii'))
*/
- __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, 2243, __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, 2283, __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, 2243, __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, 2283, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -16784,17 +18437,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(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, 2243, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2283, __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, 2243, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2283, __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":2244
+ /* "netCDF4/_netCDF4.pyx":2284
* ierr = nc_rename_var(self._grpid, var._varid, namstring)
* if self.data_model != 'NETCDF4': self._enddef()
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -16804,7 +18457,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(struct __
__pyx_t_11 = ((__pyx_v_ierr != NC_NOERR) != 0);
if (__pyx_t_11) {
- /* "netCDF4/_netCDF4.pyx":2245
+ /* "netCDF4/_netCDF4.pyx":2285
* if self.data_model != 'NETCDF4': self._enddef()
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -16812,22 +18465,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(struct __
* 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, 2245, __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, 2285, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2245, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2285, __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, 2245, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2285, __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, 2245, __pyx_L1_error)
+ __PYX_ERR(0, 2285, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2244
+ /* "netCDF4/_netCDF4.pyx":2284
* ierr = nc_rename_var(self._grpid, var._varid, namstring)
* if self.data_model != 'NETCDF4': self._enddef()
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -16836,17 +18489,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(struct __
*/
}
- /* "netCDF4/_netCDF4.pyx":2247
+ /* "netCDF4/_netCDF4.pyx":2287
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # 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, 2247, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_pop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2287, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -16856,32 +18509,50 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(struct __
}
}
if (!__pyx_t_4) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_oldname); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2247, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_oldname); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2287, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
} else {
- __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2247, __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, 2247, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ 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, 2287, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ 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, 2287, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2287, __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, 2287, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __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;
- /* "netCDF4/_netCDF4.pyx":2249
+ /* "netCDF4/_netCDF4.pyx":2289
* 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, 2249, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_self->variables, __pyx_v_newname, __pyx_v_var) < 0)) __PYX_ERR(0, 2289, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2229
+ /* "netCDF4/_netCDF4.pyx":2269
* return group.variables[varname]
*
* def renameVariable(self, oldname, newname): # <<<<<<<<<<<<<<
@@ -16908,7 +18579,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(struct __
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2251
+/* "netCDF4/_netCDF4.pyx":2291
* self.variables[newname] = var
*
* def createGroup(self, groupname): # <<<<<<<<<<<<<<
@@ -16917,20 +18588,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(struct __
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45createGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_groupname); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_44createGroup[] = "\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' [...]
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45createGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_groupname) {
+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' [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_47createGroup(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_44createGroup(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_groupname));
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(((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_44createGroup(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_groupname) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46createGroup(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;
@@ -16947,20 +18618,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createGroup(struct __pyx
__Pyx_RefNannySetupContext("createGroup", 0);
__Pyx_INCREF(__pyx_v_groupname);
- /* "netCDF4/_netCDF4.pyx":2267
+ /* "netCDF4/_netCDF4.pyx":2307
* 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, 2267, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2307, __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, 2267, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_normpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2307, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -16970,39 +18641,57 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createGroup(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, 2267, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_groupname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2307, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2267, __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, 2267, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ #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, 2307, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 2307, __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, 2307, __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, 2307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF_SET(__pyx_v_groupname, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2268
+ /* "netCDF4/_netCDF4.pyx":2308
* # 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, 2268, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_groupname, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2308, __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, 2268, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2308, __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":2269
+ /* "netCDF4/_netCDF4.pyx":2309
* groupname = posixpath.normpath(groupname)
* nestedgroups = groupname.split('/')
* group = self # <<<<<<<<<<<<<<
@@ -17012,7 +18701,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createGroup(struct __pyx
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__pyx_v_group = ((PyObject *)__pyx_v_self);
- /* "netCDF4/_netCDF4.pyx":2272
+ /* "netCDF4/_netCDF4.pyx":2312
* # loop over group names, create parent groups if they do not already
* # exist.
* for g in nestedgroups: # <<<<<<<<<<<<<<
@@ -17023,26 +18712,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createGroup(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, 2272, __pyx_L1_error)
+ __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_nestedgroups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2312, __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, 2272, __pyx_L1_error)
+ __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2312, __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_COMPILING_IN_CPYTHON
- __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, 2272, __pyx_L1_error)
+ #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, 2312, __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, 2272, __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, 2312, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2272, __pyx_L1_error)
+ #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, 2312, __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, 2272, __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, 2312, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -17052,7 +18741,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createGroup(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, 2272, __pyx_L1_error)
+ else __PYX_ERR(0, 2312, __pyx_L1_error)
}
break;
}
@@ -17061,41 +18750,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createGroup(struct __pyx
__Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2273
+ /* "netCDF4/_netCDF4.pyx":2313
* # 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, 2273, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_g); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2313, __pyx_L1_error)
__pyx_t_8 = ((!__pyx_t_7) != 0);
if (__pyx_t_8) {
goto __pyx_L3_continue;
}
- /* "netCDF4/_netCDF4.pyx":2274
+ /* "netCDF4/_netCDF4.pyx":2314
* 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, 2274, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2314, __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, 2274, __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, 2314, __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":2275
+ /* "netCDF4/_netCDF4.pyx":2315
* 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, 2275, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2315, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_group);
__Pyx_GIVEREF(__pyx_v_group);
@@ -17103,16 +18792,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createGroup(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, 2275, __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, 2315, __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, 2275, __pyx_L1_error)
+ __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_GOTREF(__pyx_t_1);
- if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_g, __pyx_t_4) < 0)) __PYX_ERR(0, 2275, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_g, __pyx_t_4) < 0)) __PYX_ERR(0, 2315, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":2274
+ /* "netCDF4/_netCDF4.pyx":2314
* for g in nestedgroups:
* if not g: continue
* if g not in group.groups: # <<<<<<<<<<<<<<
@@ -17121,22 +18810,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createGroup(struct __pyx
*/
}
- /* "netCDF4/_netCDF4.pyx":2276
+ /* "netCDF4/_netCDF4.pyx":2316
* 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, 2276, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2316, __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, 2276, __pyx_L1_error)
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_4, __pyx_v_g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2316, __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":2272
+ /* "netCDF4/_netCDF4.pyx":2312
* # loop over group names, create parent groups if they do not already
* # exist.
* for g in nestedgroups: # <<<<<<<<<<<<<<
@@ -17147,7 +18836,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createGroup(struct __pyx
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":2279
+ /* "netCDF4/_netCDF4.pyx":2319
* # if group already exists, just return the group
* # (prior to 1.1.8, this would have raised an error)
* return group # <<<<<<<<<<<<<<
@@ -17159,7 +18848,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createGroup(struct __pyx
__pyx_r = __pyx_v_group;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2251
+ /* "netCDF4/_netCDF4.pyx":2291
* self.variables[newname] = var
*
* def createGroup(self, groupname): # <<<<<<<<<<<<<<
@@ -17185,7 +18874,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createGroup(struct __pyx
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2281
+/* "netCDF4/_netCDF4.pyx":2321
* return group
*
* def ncattrs(self): # <<<<<<<<<<<<<<
@@ -17194,26 +18883,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44createGroup(struct __pyx
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_47ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_46ncattrs[] = "\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_47ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+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) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("ncattrs (wrapper)", 0);
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_46ncattrs(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_48ncattrs(((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_46ncattrs(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48ncattrs(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":2286
+ /* "netCDF4/_netCDF4.pyx":2326
*
* return netCDF global attribute names for this `netCDF4.Dataset` or `netCDF4.Group` in a list."""
* return _get_att_names(self._grpid, NC_GLOBAL) # <<<<<<<<<<<<<<
@@ -17221,13 +18910,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46ncattrs(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, 2286, __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, 2326, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2281
+ /* "netCDF4/_netCDF4.pyx":2321
* return group
*
* def ncattrs(self): # <<<<<<<<<<<<<<
@@ -17246,7 +18935,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46ncattrs(struct __pyx_obj
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2288
+/* "netCDF4/_netCDF4.pyx":2328
* return _get_att_names(self._grpid, NC_GLOBAL)
*
* def setncattr(self,name,value): # <<<<<<<<<<<<<<
@@ -17255,9 +18944,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46ncattrs(struct __pyx_obj
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_49setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_48setncattr[] = "\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_49setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+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) {
PyObject *__pyx_v_name = 0;
PyObject *__pyx_v_value = 0;
PyObject *__pyx_r = 0;
@@ -17283,11 +18972,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_49setncattr(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, 2288, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, 1); __PYX_ERR(0, 2328, __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, 2288, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr") < 0)) __PYX_ERR(0, 2328, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -17300,20 +18989,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_49setncattr(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, 2288, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2328, __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_48setncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_name, __pyx_v_value);
+ __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);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48setncattr(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_50setncattr(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;
@@ -17322,19 +19011,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48setncattr(struct __pyx_o
PyObject *__pyx_t_4 = NULL;
__Pyx_RefNannySetupContext("setncattr", 0);
- /* "netCDF4/_netCDF4.pyx":2295
+ /* "netCDF4/_netCDF4.pyx":2335
* 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, 2295, __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, 2335, __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, 2295, __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, 2335, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -17344,40 +19033,40 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48setncattr(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, 2295, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2335, __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, 2295, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2335, __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":2296
+ /* "netCDF4/_netCDF4.pyx":2336
* 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, 2296, __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, 2336, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2297
+ /* "netCDF4/_netCDF4.pyx":2337
* 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, 2297, __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, 2337, __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, 2297, __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, 2337, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -17387,17 +19076,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48setncattr(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, 2297, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2337, __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, 2297, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2337, __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":2288
+ /* "netCDF4/_netCDF4.pyx":2328
* return _get_att_names(self._grpid, NC_GLOBAL)
*
* def setncattr(self,name,value): # <<<<<<<<<<<<<<
@@ -17420,7 +19109,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48setncattr(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2299
+/* "netCDF4/_netCDF4.pyx":2339
* if self.data_model != 'NETCDF4': self._enddef()
*
* def setncattr_string(self,name,value): # <<<<<<<<<<<<<<
@@ -17429,9 +19118,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48setncattr(struct __pyx_o
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_51setncattr_string(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_50setncattr_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`.";
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_51setncattr_string(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+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) {
PyObject *__pyx_v_name = 0;
PyObject *__pyx_v_value = 0;
PyObject *__pyx_r = 0;
@@ -17457,11 +19146,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_51setncattr_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, 2299, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("setncattr_string", 1, 2, 2, 1); __PYX_ERR(0, 2339, __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, 2299, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr_string") < 0)) __PYX_ERR(0, 2339, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -17474,20 +19163,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_51setncattr_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, 2299, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("setncattr_string", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2339, __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_50setncattr_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_52setncattr_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_50setncattr_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_52setncattr_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;
@@ -17498,8 +19187,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_50setncattr_string(struct
struct __pyx_opt_args_7netCDF4_8_netCDF4__set_att __pyx_t_4;
__Pyx_RefNannySetupContext("setncattr_string", 0);
- /* "netCDF4/_netCDF4.pyx":2307
- * `NC_STRING` if the file format is `NETCDF4`."""
+ /* "netCDF4/_netCDF4.pyx":2348
+ * Use if you need to set an attribute to an array of variable-length strings."""
* cdef nc_type xtype
* xtype=-99 # <<<<<<<<<<<<<<
* if self.data_model != 'NETCDF4':
@@ -17507,46 +19196,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_50setncattr_string(struct
*/
__pyx_v_xtype = -99;
- /* "netCDF4/_netCDF4.pyx":2308
+ /* "netCDF4/_netCDF4.pyx":2349
* 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, 2308, __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, 2349, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":2309
+ /* "netCDF4/_netCDF4.pyx":2350
* xtype=-99
* if self.data_model != 'NETCDF4':
* msg='file format does not support NC_STRING attributes' # <<<<<<<<<<<<<<
* raise IOError(msg)
- * _set_att(self, NC_GLOBAL, name, str(value), xtype=xtype, force_ncstring=True)
+ * _set_att(self, NC_GLOBAL, name, value, xtype=xtype, force_ncstring=True)
*/
__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":2310
+ /* "netCDF4/_netCDF4.pyx":2351
* if self.data_model != 'NETCDF4':
* msg='file format does not support NC_STRING attributes'
* raise IOError(msg) # <<<<<<<<<<<<<<
- * _set_att(self, NC_GLOBAL, name, str(value), xtype=xtype, force_ncstring=True)
+ * _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, 2310, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2351, __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, 2310, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2351, __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, 2310, __pyx_L1_error)
+ __PYX_ERR(0, 2351, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2308
+ /* "netCDF4/_netCDF4.pyx":2349
* cdef nc_type xtype
* xtype=-99
* if self.data_model != 'NETCDF4': # <<<<<<<<<<<<<<
@@ -17555,30 +19244,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_50setncattr_string(struct
*/
}
- /* "netCDF4/_netCDF4.pyx":2311
+ /* "netCDF4/_netCDF4.pyx":2352
* msg='file format does not support NC_STRING attributes'
* raise IOError(msg)
- * _set_att(self, NC_GLOBAL, name, str(value), xtype=xtype, force_ncstring=True) # <<<<<<<<<<<<<<
+ * _set_att(self, NC_GLOBAL, name, value, xtype=xtype, force_ncstring=True) # <<<<<<<<<<<<<<
*
* def setncatts(self,attdict):
*/
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2311, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_INCREF(__pyx_v_value);
- __Pyx_GIVEREF(__pyx_v_value);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value);
- __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2311, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__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_t_2, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2311, __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, 2352, __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":2299
+ /* "netCDF4/_netCDF4.pyx":2339
* if self.data_model != 'NETCDF4': self._enddef()
*
* def setncattr_string(self,name,value): # <<<<<<<<<<<<<<
@@ -17601,8 +19281,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_50setncattr_string(struct
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2313
- * _set_att(self, NC_GLOBAL, name, str(value), xtype=xtype, force_ncstring=True)
+/* "netCDF4/_netCDF4.pyx":2354
+ * _set_att(self, NC_GLOBAL, name, value, xtype=xtype, force_ncstring=True)
*
* def setncatts(self,attdict): # <<<<<<<<<<<<<<
* """
@@ -17610,20 +19290,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_50setncattr_string(struct
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_53setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_52setncatts[] = "\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_53setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict) {
+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) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("setncatts (wrapper)", 0);
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_attdict));
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(((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_52setncatts(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_attdict) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54setncatts(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;
@@ -17639,19 +19319,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(struct __pyx_o
PyObject *(*__pyx_t_9)(PyObject *);
__Pyx_RefNannySetupContext("setncatts", 0);
- /* "netCDF4/_netCDF4.pyx":2321
+ /* "netCDF4/_netCDF4.pyx":2362
* 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, 2321, __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, 2362, __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, 2321, __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, 2362, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -17661,27 +19341,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(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, 2321, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2362, __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, 2321, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2362, __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":2322
+ /* "netCDF4/_netCDF4.pyx":2363
* 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, 2322, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attdict, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2363, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -17691,10 +19371,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(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, 2322, __pyx_L1_error)
+ __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_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, 2322, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2363, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -17702,27 +19382,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(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, 2322, __pyx_L1_error)
+ __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2363, __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, 2322, __pyx_L1_error)
+ __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2363, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
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_COMPILING_IN_CPYTHON
- __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, 2322, __pyx_L1_error)
+ #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, 2363, __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, 2322, __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, 2363, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
} else {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2322, __pyx_L1_error)
+ #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, 2363, __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, 2322, __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, 2363, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
}
@@ -17732,7 +19412,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(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, 2322, __pyx_L1_error)
+ else __PYX_ERR(0, 2363, __pyx_L1_error)
}
break;
}
@@ -17740,7 +19420,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(struct __pyx_o
}
if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
PyObject* sequence = __pyx_t_2;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -17748,9 +19428,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(struct __pyx_o
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 2322, __pyx_L1_error)
+ __PYX_ERR(0, 2363, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
@@ -17761,15 +19441,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(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, 2322, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2363, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2322, __pyx_L1_error)
+ __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2363, __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, 2322, __pyx_L1_error)
+ __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2363, __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;
@@ -17777,7 +19457,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(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, 2322, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2363, __pyx_L1_error)
__pyx_t_9 = NULL;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
goto __pyx_L7_unpacking_done;
@@ -17785,7 +19465,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(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, 2322, __pyx_L1_error)
+ __PYX_ERR(0, 2363, __pyx_L1_error)
__pyx_L7_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
@@ -17793,18 +19473,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(struct __pyx_o
__Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":2323
+ /* "netCDF4/_netCDF4.pyx":2364
* 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, 2323, __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, 2364, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2322
+ /* "netCDF4/_netCDF4.pyx":2363
* each attribute"""
* if self.data_model != 'NETCDF4': self._redef()
* for name, value in attdict.items(): # <<<<<<<<<<<<<<
@@ -17814,19 +19494,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(struct __pyx_o
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":2324
+ /* "netCDF4/_netCDF4.pyx":2365
* 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, 2324, __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, 2365, __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, 2324, __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, 2365, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_7)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -17836,18 +19516,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(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, 2324, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2365, __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, 2324, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2365, __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":2313
- * _set_att(self, NC_GLOBAL, name, str(value), xtype=xtype, force_ncstring=True)
+ /* "netCDF4/_netCDF4.pyx":2354
+ * _set_att(self, NC_GLOBAL, name, value, xtype=xtype, force_ncstring=True)
*
* def setncatts(self,attdict): # <<<<<<<<<<<<<<
* """
@@ -17873,7 +19553,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2326
+/* "netCDF4/_netCDF4.pyx":2367
* if self.data_model != 'NETCDF4': self._enddef()
*
* def getncattr(self,name): # <<<<<<<<<<<<<<
@@ -17882,26 +19562,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52setncatts(struct __pyx_o
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_55getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_54getncattr[] = "\n**`getncattr(self,name)`**\n\nretrievel 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_55getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+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) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("getncattr (wrapper)", 0);
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_54getncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_56getncattr(((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_54getncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_56getncattr(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":2333
+ /* "netCDF4/_netCDF4.pyx":2374
* 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) # <<<<<<<<<<<<<<
@@ -17909,13 +19589,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54getncattr(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, 2333, __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, 2374, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2326
+ /* "netCDF4/_netCDF4.pyx":2367
* if self.data_model != 'NETCDF4': self._enddef()
*
* def getncattr(self,name): # <<<<<<<<<<<<<<
@@ -17934,7 +19614,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54getncattr(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2335
+/* "netCDF4/_netCDF4.pyx":2376
* return _get_att(self, NC_GLOBAL, name)
*
* def __delattr__(self,name): # <<<<<<<<<<<<<<
@@ -17943,19 +19623,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_54getncattr(struct __pyx_o
*/
/* Python wrapper */
-static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_57__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
-static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_57__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+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) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__delattr__ (wrapper)", 0);
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_56__delattr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58__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_56__delattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) {
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58__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;
@@ -17966,31 +19646,31 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_56__delattr__(struct __pyx_obj_7
PyObject *__pyx_t_6 = NULL;
__Pyx_RefNannySetupContext("__delattr__", 0);
- /* "netCDF4/_netCDF4.pyx":2337
+ /* "netCDF4/_netCDF4.pyx":2378
* 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, 2337, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2378, __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, 2337, __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, 2378, __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":2338
+ /* "netCDF4/_netCDF4.pyx":2379
* # 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, 2338, __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, 2379, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -18000,23 +19680,41 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_56__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, 2338, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2379, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2338, __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, 2338, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 2379, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 2379, __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, 2379, __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, 2379, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2337
+ /* "netCDF4/_netCDF4.pyx":2378
* def __delattr__(self,name):
* # if it's a netCDF attribute, remove it
* if name not in _private_atts: # <<<<<<<<<<<<<<
@@ -18026,7 +19724,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_56__delattr__(struct __pyx_obj_7
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":2340
+ /* "netCDF4/_netCDF4.pyx":2381
* self.delncattr(name)
* else:
* raise AttributeError( # <<<<<<<<<<<<<<
@@ -18035,19 +19733,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_56__delattr__(struct __pyx_obj_7
*/
/*else*/ {
- /* "netCDF4/_netCDF4.pyx":2341
+ /* "netCDF4/_netCDF4.pyx":2382
* 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, 2341, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2382, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2341, __pyx_L1_error)
+ __pyx_t_4 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2382, __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, 2341, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2382, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_name);
__Pyx_GIVEREF(__pyx_v_name);
@@ -18055,32 +19753,32 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_56__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, 2341, __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, 2382, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2340
+ /* "netCDF4/_netCDF4.pyx":2381
* 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, 2340, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2381, __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, 2340, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2381, __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, 2340, __pyx_L1_error)
+ __PYX_ERR(0, 2381, __pyx_L1_error)
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":2335
+ /* "netCDF4/_netCDF4.pyx":2376
* return _get_att(self, NC_GLOBAL, name)
*
* def __delattr__(self,name): # <<<<<<<<<<<<<<
@@ -18103,7 +19801,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_56__delattr__(struct __pyx_obj_7
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2343
+/* "netCDF4/_netCDF4.pyx":2384
* "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
*
* def delncattr(self, name): # <<<<<<<<<<<<<<
@@ -18112,20 +19810,20 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_56__delattr__(struct __pyx_obj_7
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_59delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_58delncattr[] = "\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_59delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+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) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("delncattr (wrapper)", 0);
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58delncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60delncattr(((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_58delncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_60delncattr(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;
@@ -18138,41 +19836,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_58delncattr(struct __pyx_o
PyObject *__pyx_t_5 = NULL;
__Pyx_RefNannySetupContext("delncattr", 0);
- /* "netCDF4/_netCDF4.pyx":2352
+ /* "netCDF4/_netCDF4.pyx":2393
* 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, 2352, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2393, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_bytestr = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2353
+ /* "netCDF4/_netCDF4.pyx":2394
* 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, 2353, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2394, __pyx_L1_error)
__pyx_v_attname = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":2354
+ /* "netCDF4/_netCDF4.pyx":2395
* 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, 2354, __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, 2395, __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, 2354, __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, 2395, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -18182,17 +19880,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_58delncattr(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, 2354, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2395, __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, 2354, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2395, __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":2355
+ /* "netCDF4/_netCDF4.pyx":2396
* attname = bytestr
* if self.data_model != 'NETCDF4': self._redef()
* ierr = nc_del_att(self._grpid, NC_GLOBAL, attname) # <<<<<<<<<<<<<<
@@ -18201,19 +19899,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_58delncattr(struct __pyx_o
*/
__pyx_v_ierr = nc_del_att(__pyx_v_self->_grpid, NC_GLOBAL, __pyx_v_attname);
- /* "netCDF4/_netCDF4.pyx":2356
+ /* "netCDF4/_netCDF4.pyx":2397
* 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((<char *>nc_strerror(ierr)).decode('ascii'))
*/
- __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, 2356, __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, 2397, __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, 2356, __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, 2397, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -18223,17 +19921,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_58delncattr(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, 2356, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2397, __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, 2356, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2397, __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":2357
+ /* "netCDF4/_netCDF4.pyx":2398
* ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)
* if self.data_model != 'NETCDF4': self._enddef()
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -18243,7 +19941,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_58delncattr(struct __pyx_o
__pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":2358
+ /* "netCDF4/_netCDF4.pyx":2399
* if self.data_model != 'NETCDF4': self._enddef()
* if ierr != NC_NOERR:
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -18251,22 +19949,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_58delncattr(struct __pyx_o
* 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, 2358, __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, 2399, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2358, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2399, __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, 2358, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2399, __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, 2358, __pyx_L1_error)
+ __PYX_ERR(0, 2399, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2357
+ /* "netCDF4/_netCDF4.pyx":2398
* ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)
* if self.data_model != 'NETCDF4': self._enddef()
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -18275,7 +19973,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_58delncattr(struct __pyx_o
*/
}
- /* "netCDF4/_netCDF4.pyx":2343
+ /* "netCDF4/_netCDF4.pyx":2384
* "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
*
* def delncattr(self, name): # <<<<<<<<<<<<<<
@@ -18299,7 +19997,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_58delncattr(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2360
+/* "netCDF4/_netCDF4.pyx":2401
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def __setattr__(self,name,value): # <<<<<<<<<<<<<<
@@ -18308,19 +20006,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_58delncattr(struct __pyx_o
*/
/* Python wrapper */
-static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_61__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/
-static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_61__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
+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) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60__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_62__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_60__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_62__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;
@@ -18328,36 +20026,36 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60__setattr__(struct __pyx_obj_7
int __pyx_t_3;
PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
__Pyx_RefNannySetupContext("__setattr__", 0);
- /* "netCDF4/_netCDF4.pyx":2363
+ /* "netCDF4/_netCDF4.pyx":2404
* # 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, 2363, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2404, __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, 2363, __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, 2404, __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":2364
+ /* "netCDF4/_netCDF4.pyx":2405
* # 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, 2364, __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, 2405, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
__pyx_t_6 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -18367,24 +20065,42 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60__setattr__(struct __pyx_obj_7
__pyx_t_6 = 1;
}
}
- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2364, __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;
+ #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, 2405, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 2405, __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, 2405, __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_INCREF(__pyx_v_name);
+ __Pyx_GIVEREF(__pyx_v_name);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_name);
+ __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, 2405, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
- __Pyx_INCREF(__pyx_v_name);
- __Pyx_GIVEREF(__pyx_v_name);
- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_name);
- __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, 2364, __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":2363
+ /* "netCDF4/_netCDF4.pyx":2404
* # if name in _private_atts, it is stored at the python
* # level and not in the netCDF file.
* if name not in _private_atts: # <<<<<<<<<<<<<<
@@ -18394,47 +20110,47 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60__setattr__(struct __pyx_obj_7
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":2365
+ /* "netCDF4/_netCDF4.pyx":2406
* 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, 2365, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2406, __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, 2365, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2406, __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, 2365, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2406, __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":2366
+ /* "netCDF4/_netCDF4.pyx":2407
* 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, 2366, __pyx_L1_error)
+ __pyx_t_2 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_name); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 2407, __pyx_L1_error)
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":2368
+ /* "netCDF4/_netCDF4.pyx":2409
* 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, 2368, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2409, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2368, __pyx_L1_error)
+ __pyx_t_1 = PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2409, __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, 2368, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2409, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_name);
__Pyx_GIVEREF(__pyx_v_name);
@@ -18442,30 +20158,30 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60__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, 2368, __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, 2409, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":2367
+ /* "netCDF4/_netCDF4.pyx":2408
* 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, 2367, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2408, __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, 2367, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2408, __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, 2367, __pyx_L1_error)
+ __PYX_ERR(0, 2408, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2366
+ /* "netCDF4/_netCDF4.pyx":2407
* self.setncattr(name, value)
* elif not name.endswith('__'):
* if hasattr(self,name): # <<<<<<<<<<<<<<
@@ -18474,7 +20190,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60__setattr__(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":2370
+ /* "netCDF4/_netCDF4.pyx":2411
* "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))
* else:
* self.__dict__[name]=value # <<<<<<<<<<<<<<
@@ -18482,13 +20198,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60__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, 2370, __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, 2411, __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, 2370, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 2411, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "netCDF4/_netCDF4.pyx":2365
+ /* "netCDF4/_netCDF4.pyx":2406
* if name not in _private_atts:
* self.setncattr(name, value)
* elif not name.endswith('__'): # <<<<<<<<<<<<<<
@@ -18498,7 +20214,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60__setattr__(struct __pyx_obj_7
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":2360
+ /* "netCDF4/_netCDF4.pyx":2401
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def __setattr__(self,name,value): # <<<<<<<<<<<<<<
@@ -18521,7 +20237,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60__setattr__(struct __pyx_obj_7
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2372
+/* "netCDF4/_netCDF4.pyx":2413
* self.__dict__[name]=value
*
* def __getattr__(self,name): # <<<<<<<<<<<<<<
@@ -18530,19 +20246,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60__setattr__(struct __pyx_obj_7
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_63__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_63__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+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) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__getattr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__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_62__getattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64__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;
@@ -18557,61 +20273,62 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__getattr__(struct __pyx
int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
PyObject *__pyx_t_10 = NULL;
- PyObject *__pyx_t_11 = NULL;
+ int __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
__Pyx_RefNannySetupContext("__getattr__", 0);
__Pyx_INCREF(__pyx_v_name);
- /* "netCDF4/_netCDF4.pyx":2375
+ /* "netCDF4/_netCDF4.pyx":2416
* # 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, 2375, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2416, __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, 2375, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2416, __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, 2375, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2416, __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, 2375, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2416, __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, 2375, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2416, __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, 2375, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2416, __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":2377
+ /* "netCDF4/_netCDF4.pyx":2418
* 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, 2377, __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, 2418, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":2378
+ /* "netCDF4/_netCDF4.pyx":2419
* # 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, 2378, __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, 2419, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ 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);
@@ -18621,29 +20338,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__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, 2378, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __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, 2378, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __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":2379
+ /* "netCDF4/_netCDF4.pyx":2420
* 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, 2379, __pyx_L1_error)
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2420, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_values = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2380
+ /* "netCDF4/_netCDF4.pyx":2421
* names = self.ncattrs()
* values = []
* for name in names: # <<<<<<<<<<<<<<
@@ -18654,26 +20371,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__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, 2380, __pyx_L1_error)
+ __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2421, __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, 2380, __pyx_L1_error)
+ __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2421, __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_COMPILING_IN_CPYTHON
- __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, 2380, __pyx_L1_error)
+ #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, 2421, __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, 2380, __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, 2421, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
} else {
if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2380, __pyx_L1_error)
+ #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, 2421, __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, 2380, __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, 2421, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
}
@@ -18683,7 +20400,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__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, 2380, __pyx_L1_error)
+ else __PYX_ERR(0, 2421, __pyx_L1_error)
}
break;
}
@@ -18692,19 +20409,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__getattr__(struct __pyx
__Pyx_DECREF_SET(__pyx_v_name, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":2381
+ /* "netCDF4/_netCDF4.pyx":2422
* 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, 2381, __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, 2422, __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, 2381, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_3); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 2422, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":2380
+ /* "netCDF4/_netCDF4.pyx":2421
* names = self.ncattrs()
* values = []
* for name in names: # <<<<<<<<<<<<<<
@@ -18714,7 +20431,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__getattr__(struct __pyx
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2382
+ /* "netCDF4/_netCDF4.pyx":2423
* for name in names:
* values.append(_get_att(self, NC_GLOBAL, name))
* return OrderedDict(zip(names,values)) # <<<<<<<<<<<<<<
@@ -18722,39 +20439,57 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__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, 2382, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2423, __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, 2382, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2423, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_t_10 = NULL;
- __pyx_t_6 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
__Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_9, function);
- __pyx_t_6 = 1;
+ __pyx_t_11 = 1;
}
}
- __pyx_t_11 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2382, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- if (__pyx_t_10) {
- __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
- }
- __Pyx_INCREF(__pyx_v_names);
- __Pyx_GIVEREF(__pyx_v_names);
- PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_v_names);
- __Pyx_INCREF(__pyx_v_values);
- __Pyx_GIVEREF(__pyx_v_values);
- PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_v_values);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2382, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ #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, 2423, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #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, 2423, __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, 2423, __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;
+ }
+ __Pyx_INCREF(__pyx_v_names);
+ __Pyx_GIVEREF(__pyx_v_names);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_names);
+ __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, 2423, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_9 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_9)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -18764,26 +20499,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__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, 2382, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2423, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else {
- __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2382, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_5);
- __pyx_t_5 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2382, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ #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, 2423, __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
+ #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, 2423, __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, 2423, __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, 2423, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 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":2377
+ /* "netCDF4/_netCDF4.pyx":2418
* if name.startswith('__') and name.endswith('__'):
* # if __dict__ requested, return a dict with netCDF attributes.
* if name == '__dict__': # <<<<<<<<<<<<<<
@@ -18792,7 +20547,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__getattr__(struct __pyx
*/
}
- /* "netCDF4/_netCDF4.pyx":2384
+ /* "netCDF4/_netCDF4.pyx":2425
* return OrderedDict(zip(names,values))
* else:
* raise AttributeError # <<<<<<<<<<<<<<
@@ -18801,10 +20556,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__getattr__(struct __pyx
*/
/*else*/ {
__Pyx_Raise(__pyx_builtin_AttributeError, 0, 0, 0);
- __PYX_ERR(0, 2384, __pyx_L1_error)
+ __PYX_ERR(0, 2425, __pyx_L1_error)
}
- /* "netCDF4/_netCDF4.pyx":2375
+ /* "netCDF4/_netCDF4.pyx":2416
* # if name in _private_atts, it is stored at the python
* # level and not in the netCDF file.
* if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<<
@@ -18813,21 +20568,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__getattr__(struct __pyx
*/
}
- /* "netCDF4/_netCDF4.pyx":2385
+ /* "netCDF4/_netCDF4.pyx":2426
* 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, 2385, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2426, __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, 2385, __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, 2426, __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":2386
+ /* "netCDF4/_netCDF4.pyx":2427
* raise AttributeError
* elif name in _private_atts:
* return self.__dict__[name] # <<<<<<<<<<<<<<
@@ -18835,16 +20590,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__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, 2386, __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, 2427, __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, 2386, __pyx_L1_error)
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2427, __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":2385
+ /* "netCDF4/_netCDF4.pyx":2426
* else:
* raise AttributeError
* elif name in _private_atts: # <<<<<<<<<<<<<<
@@ -18853,7 +20608,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__getattr__(struct __pyx
*/
}
- /* "netCDF4/_netCDF4.pyx":2388
+ /* "netCDF4/_netCDF4.pyx":2429
* return self.__dict__[name]
* else:
* return self.getncattr(name) # <<<<<<<<<<<<<<
@@ -18862,31 +20617,49 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__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, 2388, __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, 2429, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_11 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_11)) {
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_12);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_2, function);
}
}
- if (!__pyx_t_11) {
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2388, __pyx_L1_error)
+ if (!__pyx_t_12) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2429, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
} else {
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2388, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11); __pyx_t_11 = 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, 2388, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ #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, 2429, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #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, 2429, __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, 2429, __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, 2429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_3;
@@ -18894,7 +20667,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__getattr__(struct __pyx
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":2372
+ /* "netCDF4/_netCDF4.pyx":2413
* self.__dict__[name]=value
*
* def __getattr__(self,name): # <<<<<<<<<<<<<<
@@ -18909,7 +20682,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__getattr__(struct __pyx
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
- __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
__Pyx_AddTraceback("netCDF4._netCDF4.Dataset.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -18921,7 +20694,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__getattr__(struct __pyx
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2390
+/* "netCDF4/_netCDF4.pyx":2431
* return self.getncattr(name)
*
* def renameAttribute(self, oldname, newname): # <<<<<<<<<<<<<<
@@ -18930,9 +20703,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62__getattr__(struct __pyx
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_65renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_64renameAttribute[] = "\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_65renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+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) {
PyObject *__pyx_v_oldname = 0;
PyObject *__pyx_v_newname = 0;
PyObject *__pyx_r = 0;
@@ -18958,11 +20731,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_65renameAttribute(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, 2390, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, 1); __PYX_ERR(0, 2431, __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, 2390, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameAttribute") < 0)) __PYX_ERR(0, 2431, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -18975,20 +20748,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_65renameAttribute(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, 2390, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2431, __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_64renameAttribute(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);
+ __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);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64renameAttribute(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_66renameAttribute(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname) {
int __pyx_v_ierr;
char *__pyx_v_oldnamec;
char *__pyx_v_newnamec;
@@ -19001,51 +20774,51 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64renameAttribute(struct _
PyObject *__pyx_t_4 = NULL;
__Pyx_RefNannySetupContext("renameAttribute", 0);
- /* "netCDF4/_netCDF4.pyx":2398
+ /* "netCDF4/_netCDF4.pyx":2439
* 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, 2398, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_oldname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2439, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_bytestr = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2399
+ /* "netCDF4/_netCDF4.pyx":2440
* 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, 2399, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2440, __pyx_L1_error)
__pyx_v_oldnamec = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":2400
+ /* "netCDF4/_netCDF4.pyx":2441
* bytestr = _strencode(oldname)
* oldnamec = bytestr
* bytestr = _strencode(newname) # <<<<<<<<<<<<<<
* newnamec = bytestr
* ierr = 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, 2400, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2441, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2401
+ /* "netCDF4/_netCDF4.pyx":2442
* oldnamec = bytestr
* bytestr = _strencode(newname)
* newnamec = bytestr # <<<<<<<<<<<<<<
* ierr = nc_rename_att(self._grpid, NC_GLOBAL, 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, 2401, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2442, __pyx_L1_error)
__pyx_v_newnamec = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":2402
+ /* "netCDF4/_netCDF4.pyx":2443
* bytestr = _strencode(newname)
* newnamec = bytestr
* ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec) # <<<<<<<<<<<<<<
@@ -19054,7 +20827,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64renameAttribute(struct _
*/
__pyx_v_ierr = nc_rename_att(__pyx_v_self->_grpid, NC_GLOBAL, __pyx_v_oldnamec, __pyx_v_newnamec);
- /* "netCDF4/_netCDF4.pyx":2403
+ /* "netCDF4/_netCDF4.pyx":2444
* newnamec = bytestr
* ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -19064,7 +20837,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64renameAttribute(struct _
__pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":2404
+ /* "netCDF4/_netCDF4.pyx":2445
* ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -19072,22 +20845,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64renameAttribute(struct _
* 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, 2404, __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, 2445, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2404, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2445, __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, 2404, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2445, __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, 2404, __pyx_L1_error)
+ __PYX_ERR(0, 2445, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2403
+ /* "netCDF4/_netCDF4.pyx":2444
* newnamec = bytestr
* ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -19096,7 +20869,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64renameAttribute(struct _
*/
}
- /* "netCDF4/_netCDF4.pyx":2390
+ /* "netCDF4/_netCDF4.pyx":2431
* return self.getncattr(name)
*
* def renameAttribute(self, oldname, newname): # <<<<<<<<<<<<<<
@@ -19119,7 +20892,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64renameAttribute(struct _
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2406
+/* "netCDF4/_netCDF4.pyx":2447
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def renameGroup(self, oldname, newname): # <<<<<<<<<<<<<<
@@ -19128,9 +20901,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64renameAttribute(struct _
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67renameGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_66renameGroup[] = "\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_67renameGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+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) {
CYTHON_UNUSED PyObject *__pyx_v_oldname = 0;
CYTHON_UNUSED PyObject *__pyx_v_newname = 0;
PyObject *__pyx_r = 0;
@@ -19156,11 +20929,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67renameGroup(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, 2406, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("renameGroup", 1, 2, 2, 1); __PYX_ERR(0, 2447, __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, 2406, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameGroup") < 0)) __PYX_ERR(0, 2447, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -19173,20 +20946,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67renameGroup(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, 2406, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("renameGroup", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2447, __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_66renameGroup(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);
+ __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);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66renameGroup(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_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) {
PyObject *__pyx_v_msg = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -19194,7 +20967,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66renameGroup(CYTHON_UNUSE
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("renameGroup", 0);
- /* "netCDF4/_netCDF4.pyx":2428
+ /* "netCDF4/_netCDF4.pyx":2469
* self.groups[newname] = grp
* ELSE:
* msg = """ # <<<<<<<<<<<<<<
@@ -19204,26 +20977,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66renameGroup(CYTHON_UNUSE
__Pyx_INCREF(__pyx_kp_s_renameGroup_method_not_enabled);
__pyx_v_msg = __pyx_kp_s_renameGroup_method_not_enabled;
- /* "netCDF4/_netCDF4.pyx":2431
+ /* "netCDF4/_netCDF4.pyx":2472
* 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, 2431, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2472, __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, 2431, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2472, __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, 2431, __pyx_L1_error)
+ __PYX_ERR(0, 2472, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2406
+ /* "netCDF4/_netCDF4.pyx":2447
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def renameGroup(self, oldname, newname): # <<<<<<<<<<<<<<
@@ -19243,7 +21016,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66renameGroup(CYTHON_UNUSE
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2433
+/* "netCDF4/_netCDF4.pyx":2474
* raise ValueError(msg)
*
* def set_auto_maskandscale(self, value): # <<<<<<<<<<<<<<
@@ -19252,20 +21025,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66renameGroup(CYTHON_UNUSE
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_69set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_68set_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 af [...]
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_69set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+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 af [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_71set_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_68set_auto_maskandscale(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __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));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+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) {
PyObject *__pyx_v_var = NULL;
PyObject *__pyx_v_groups = NULL;
PyObject *__pyx_v_group = NULL;
@@ -19286,17 +21059,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
PyObject *__pyx_t_13 = NULL;
__Pyx_RefNannySetupContext("set_auto_maskandscale", 0);
- /* "netCDF4/_netCDF4.pyx":2447
+ /* "netCDF4/_netCDF4.pyx":2488
* """
*
* for var in self.variables.values(): # <<<<<<<<<<<<<<
* var.set_auto_maskandscale(value)
*
*/
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2447, __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, 2488, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -19306,10 +21079,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
}
}
if (__pyx_t_3) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2447, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2488, __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, 2447, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2488, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -19317,27 +21090,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
__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, 2447, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2488, __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, 2447, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2488, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_5)) {
if (likely(PyList_CheckExact(__pyx_t_2))) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2447, __pyx_L1_error)
+ #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, 2488, __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, 2447, __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, 2488, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2447, __pyx_L1_error)
+ #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, 2488, __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, 2447, __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, 2488, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -19347,7 +21120,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_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, 2447, __pyx_L1_error)
+ else __PYX_ERR(0, 2488, __pyx_L1_error)
}
break;
}
@@ -19356,17 +21129,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
__Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2448
+ /* "netCDF4/_netCDF4.pyx":2489
*
* for var in self.variables.values():
* var.set_auto_maskandscale(value) # <<<<<<<<<<<<<<
*
* for groups in _walk_grps(self):
*/
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2448, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2489, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -19376,23 +21149,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
}
}
if (!__pyx_t_6) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2448, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2489, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2448, __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, 2448, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #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, 2489, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 2489, __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, 2489, __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, 2489, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2447
+ /* "netCDF4/_netCDF4.pyx":2488
* """
*
* for var in self.variables.values(): # <<<<<<<<<<<<<<
@@ -19402,17 +21193,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2450
+ /* "netCDF4/_netCDF4.pyx":2491
* 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, 2450, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2491, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -19422,45 +21213,63 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
}
}
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, 2450, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2491, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2450, __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, 2450, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #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, 2491, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #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, 2491, __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, 2491, __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, 2491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
__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, 2450, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2491, __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, 2450, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2491, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
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_COMPILING_IN_CPYTHON
- __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, 2450, __pyx_L1_error)
+ #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, 2491, __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, 2450, __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, 2491, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2450, __pyx_L1_error)
+ #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, 2491, __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, 2450, __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, 2491, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
}
@@ -19470,7 +21279,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_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, 2450, __pyx_L1_error)
+ else __PYX_ERR(0, 2491, __pyx_L1_error)
}
break;
}
@@ -19479,7 +21288,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
__Pyx_XDECREF_SET(__pyx_v_groups, __pyx_t_2);
__pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2451
+ /* "netCDF4/_netCDF4.pyx":2492
*
* for groups in _walk_grps(self):
* for group in groups: # <<<<<<<<<<<<<<
@@ -19490,26 +21299,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
__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, 2451, __pyx_L1_error)
+ __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2492, __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, 2451, __pyx_L1_error)
+ __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2492, __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_COMPILING_IN_CPYTHON
- __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, 2451, __pyx_L1_error)
+ #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, 2492, __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, 2451, __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, 2492, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
} else {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2451, __pyx_L1_error)
+ #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, 2492, __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, 2451, __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, 2492, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
}
@@ -19519,7 +21328,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_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, 2451, __pyx_L1_error)
+ else __PYX_ERR(0, 2492, __pyx_L1_error)
}
break;
}
@@ -19528,20 +21337,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
__Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":2452
+ /* "netCDF4/_netCDF4.pyx":2493
* for groups in _walk_grps(self):
* for group in groups:
* for var in group.variables.values(): # <<<<<<<<<<<<<<
* var.set_auto_maskandscale(value)
*
*/
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2452, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2493, __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, 2452, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2493, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -19551,10 +21360,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
}
}
if (__pyx_t_3) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2452, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2493, __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, 2452, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2493, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -19562,27 +21371,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
__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, 2452, __pyx_L1_error)
+ __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2493, __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, 2452, __pyx_L1_error)
+ __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2493, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
for (;;) {
if (likely(!__pyx_t_11)) {
if (likely(PyList_CheckExact(__pyx_t_6))) {
if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2452, __pyx_L1_error)
+ #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, 2493, __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, 2452, __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, 2493, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
} else {
if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2452, __pyx_L1_error)
+ #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, 2493, __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, 2452, __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, 2493, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
}
@@ -19592,7 +21401,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_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, 2452, __pyx_L1_error)
+ else __PYX_ERR(0, 2493, __pyx_L1_error)
}
break;
}
@@ -19601,17 +21410,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
__Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":2453
+ /* "netCDF4/_netCDF4.pyx":2494
* for group in groups:
* for var in group.variables.values():
* var.set_auto_maskandscale(value) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2453, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2494, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_12 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_12)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -19621,23 +21430,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
}
}
if (!__pyx_t_12) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2453, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2494, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
} else {
- __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2453, __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, 2453, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ #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, 2494, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #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, 2494, __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, 2494, __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, 2494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":2452
+ /* "netCDF4/_netCDF4.pyx":2493
* for groups in _walk_grps(self):
* for group in groups:
* for var in group.variables.values(): # <<<<<<<<<<<<<<
@@ -19647,7 +21474,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":2451
+ /* "netCDF4/_netCDF4.pyx":2492
*
* for groups in _walk_grps(self):
* for group in groups: # <<<<<<<<<<<<<<
@@ -19657,7 +21484,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2450
+ /* "netCDF4/_netCDF4.pyx":2491
* var.set_auto_maskandscale(value)
*
* for groups in _walk_grps(self): # <<<<<<<<<<<<<<
@@ -19667,7 +21494,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2433
+ /* "netCDF4/_netCDF4.pyx":2474
* raise ValueError(msg)
*
* def set_auto_maskandscale(self, value): # <<<<<<<<<<<<<<
@@ -19697,7 +21524,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2456
+/* "netCDF4/_netCDF4.pyx":2497
*
*
* def set_auto_mask(self, value): # <<<<<<<<<<<<<<
@@ -19706,20 +21533,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale(st
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_71set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_70set_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\n [...]
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_71set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+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\n [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_73set_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_70set_auto_mask(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __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));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_mask(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+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) {
PyObject *__pyx_v_var = NULL;
PyObject *__pyx_v_groups = NULL;
PyObject *__pyx_v_group = NULL;
@@ -19740,17 +21567,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_mask(struct __p
PyObject *__pyx_t_13 = NULL;
__Pyx_RefNannySetupContext("set_auto_mask", 0);
- /* "netCDF4/_netCDF4.pyx":2470
+ /* "netCDF4/_netCDF4.pyx":2511
* """
*
* 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, 2470, __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, 2511, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -19760,10 +21587,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_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, 2470, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2511, __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, 2470, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2511, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -19771,27 +21598,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_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, 2470, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2511, __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, 2470, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2511, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_5)) {
if (likely(PyList_CheckExact(__pyx_t_2))) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2470, __pyx_L1_error)
+ #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, 2511, __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, 2470, __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, 2511, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2470, __pyx_L1_error)
+ #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, 2511, __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, 2470, __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, 2511, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -19801,7 +21628,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_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, 2470, __pyx_L1_error)
+ else __PYX_ERR(0, 2511, __pyx_L1_error)
}
break;
}
@@ -19810,17 +21637,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_mask(struct __p
__Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2471
+ /* "netCDF4/_netCDF4.pyx":2512
*
* 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, 2471, __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, 2512, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -19830,23 +21657,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_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, 2471, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2512, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2471, __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, 2471, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #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, 2512, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 2512, __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, 2512, __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, 2512, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2470
+ /* "netCDF4/_netCDF4.pyx":2511
* """
*
* for var in self.variables.values(): # <<<<<<<<<<<<<<
@@ -19856,17 +21701,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_mask(struct __p
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2473
+ /* "netCDF4/_netCDF4.pyx":2514
* 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, 2473, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2514, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -19876,45 +21721,63 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_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, 2473, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2514, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2473, __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, 2473, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #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, 2514, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #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, 2514, __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, 2514, __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, 2514, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
__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, 2473, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2514, __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, 2473, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2514, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
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_COMPILING_IN_CPYTHON
- __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, 2473, __pyx_L1_error)
+ #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, 2514, __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, 2473, __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, 2514, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2473, __pyx_L1_error)
+ #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, 2514, __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, 2473, __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, 2514, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
}
@@ -19924,7 +21787,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_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, 2473, __pyx_L1_error)
+ else __PYX_ERR(0, 2514, __pyx_L1_error)
}
break;
}
@@ -19933,7 +21796,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_mask(struct __p
__Pyx_XDECREF_SET(__pyx_v_groups, __pyx_t_2);
__pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2474
+ /* "netCDF4/_netCDF4.pyx":2515
*
* for groups in _walk_grps(self):
* for group in groups: # <<<<<<<<<<<<<<
@@ -19944,26 +21807,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_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, 2474, __pyx_L1_error)
+ __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2515, __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, 2474, __pyx_L1_error)
+ __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2515, __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_COMPILING_IN_CPYTHON
- __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, 2474, __pyx_L1_error)
+ #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, 2515, __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, 2474, __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, 2515, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
} else {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2474, __pyx_L1_error)
+ #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, 2515, __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, 2474, __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, 2515, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
}
@@ -19973,7 +21836,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_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, 2474, __pyx_L1_error)
+ else __PYX_ERR(0, 2515, __pyx_L1_error)
}
break;
}
@@ -19982,20 +21845,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_mask(struct __p
__Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":2475
+ /* "netCDF4/_netCDF4.pyx":2516
* 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, 2475, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2516, __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, 2475, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2516, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -20005,10 +21868,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_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, 2475, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2516, __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, 2475, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2516, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -20016,27 +21879,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_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, 2475, __pyx_L1_error)
+ __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2516, __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, 2475, __pyx_L1_error)
+ __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2516, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
for (;;) {
if (likely(!__pyx_t_11)) {
if (likely(PyList_CheckExact(__pyx_t_6))) {
if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2475, __pyx_L1_error)
+ #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, 2516, __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, 2475, __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, 2516, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
} else {
if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2475, __pyx_L1_error)
+ #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, 2516, __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, 2475, __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, 2516, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
}
@@ -20046,7 +21909,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_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, 2475, __pyx_L1_error)
+ else __PYX_ERR(0, 2516, __pyx_L1_error)
}
break;
}
@@ -20055,17 +21918,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_mask(struct __p
__Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":2476
+ /* "netCDF4/_netCDF4.pyx":2517
* 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, 2476, __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, 2517, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_12 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_12)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -20075,23 +21938,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_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, 2476, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2517, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
} else {
- __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2476, __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, 2476, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ #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, 2517, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #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, 2517, __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, 2517, __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, 2517, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":2475
+ /* "netCDF4/_netCDF4.pyx":2516
* for groups in _walk_grps(self):
* for group in groups:
* for var in group.variables.values(): # <<<<<<<<<<<<<<
@@ -20101,7 +21982,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_mask(struct __p
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":2474
+ /* "netCDF4/_netCDF4.pyx":2515
*
* for groups in _walk_grps(self):
* for group in groups: # <<<<<<<<<<<<<<
@@ -20111,7 +21992,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_mask(struct __p
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2473
+ /* "netCDF4/_netCDF4.pyx":2514
* var.set_auto_mask(value)
*
* for groups in _walk_grps(self): # <<<<<<<<<<<<<<
@@ -20121,7 +22002,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_mask(struct __p
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2456
+ /* "netCDF4/_netCDF4.pyx":2497
*
*
* def set_auto_mask(self, value): # <<<<<<<<<<<<<<
@@ -20151,7 +22032,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_mask(struct __p
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2478
+/* "netCDF4/_netCDF4.pyx":2519
* var.set_auto_mask(value)
*
* def set_auto_scale(self, value): # <<<<<<<<<<<<<<
@@ -20160,20 +22041,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_70set_auto_mask(struct __p
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_73set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_72set_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 ca [...]
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_73set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+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 ca [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_75set_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_72set_auto_scale(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+ __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));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+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) {
PyObject *__pyx_v_var = NULL;
PyObject *__pyx_v_groups = NULL;
PyObject *__pyx_v_group = NULL;
@@ -20194,17 +22075,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
PyObject *__pyx_t_13 = NULL;
__Pyx_RefNannySetupContext("set_auto_scale", 0);
- /* "netCDF4/_netCDF4.pyx":2492
+ /* "netCDF4/_netCDF4.pyx":2533
* """
*
* for var in self.variables.values(): # <<<<<<<<<<<<<<
* var.set_auto_scale(value)
*
*/
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2492, __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, 2533, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -20214,10 +22095,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
}
}
if (__pyx_t_3) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2492, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2533, __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, 2492, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2533, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -20225,27 +22106,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
__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, 2492, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2533, __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, 2492, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2533, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_5)) {
if (likely(PyList_CheckExact(__pyx_t_2))) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2492, __pyx_L1_error)
+ #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, 2533, __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, 2492, __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, 2533, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2492, __pyx_L1_error)
+ #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, 2533, __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, 2492, __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, 2533, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -20255,7 +22136,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_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, 2492, __pyx_L1_error)
+ else __PYX_ERR(0, 2533, __pyx_L1_error)
}
break;
}
@@ -20264,17 +22145,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
__Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2493
+ /* "netCDF4/_netCDF4.pyx":2534
*
* for var in self.variables.values():
* var.set_auto_scale(value) # <<<<<<<<<<<<<<
*
* for groups in _walk_grps(self):
*/
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2493, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2534, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -20284,23 +22165,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
}
}
if (!__pyx_t_6) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2493, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2534, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2493, __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, 2493, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #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, 2534, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 2534, __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, 2534, __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, 2534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2492
+ /* "netCDF4/_netCDF4.pyx":2533
* """
*
* for var in self.variables.values(): # <<<<<<<<<<<<<<
@@ -20310,17 +22209,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2495
+ /* "netCDF4/_netCDF4.pyx":2536
* 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, 2495, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2536, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -20330,45 +22229,63 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
}
}
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, 2495, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2536, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2495, __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, 2495, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #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, 2536, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #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, 2536, __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, 2536, __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, 2536, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
__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, 2495, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2536, __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, 2495, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2536, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
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_COMPILING_IN_CPYTHON
- __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, 2495, __pyx_L1_error)
+ #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, 2536, __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, 2495, __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, 2536, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2495, __pyx_L1_error)
+ #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, 2536, __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, 2495, __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, 2536, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
}
@@ -20378,7 +22295,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_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, 2495, __pyx_L1_error)
+ else __PYX_ERR(0, 2536, __pyx_L1_error)
}
break;
}
@@ -20387,7 +22304,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
__Pyx_XDECREF_SET(__pyx_v_groups, __pyx_t_2);
__pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2496
+ /* "netCDF4/_netCDF4.pyx":2537
*
* for groups in _walk_grps(self):
* for group in groups: # <<<<<<<<<<<<<<
@@ -20398,26 +22315,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
__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, 2496, __pyx_L1_error)
+ __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2537, __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, 2496, __pyx_L1_error)
+ __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2537, __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_COMPILING_IN_CPYTHON
- __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, 2496, __pyx_L1_error)
+ #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, 2537, __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, 2496, __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, 2537, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
} else {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2496, __pyx_L1_error)
+ #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, 2537, __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, 2496, __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, 2537, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
}
@@ -20427,7 +22344,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_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, 2496, __pyx_L1_error)
+ else __PYX_ERR(0, 2537, __pyx_L1_error)
}
break;
}
@@ -20436,20 +22353,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
__Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":2497
+ /* "netCDF4/_netCDF4.pyx":2538
* for groups in _walk_grps(self):
* for group in groups:
* for var in group.variables.values(): # <<<<<<<<<<<<<<
* var.set_auto_scale(value)
*
*/
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2497, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2538, __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, 2497, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2538, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -20459,10 +22376,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
}
}
if (__pyx_t_3) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2497, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2538, __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, 2497, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2538, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -20470,27 +22387,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
__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, 2497, __pyx_L1_error)
+ __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2538, __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, 2497, __pyx_L1_error)
+ __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2538, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
for (;;) {
if (likely(!__pyx_t_11)) {
if (likely(PyList_CheckExact(__pyx_t_6))) {
if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2497, __pyx_L1_error)
+ #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, 2538, __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, 2497, __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, 2538, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
} else {
if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2497, __pyx_L1_error)
+ #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, 2538, __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, 2497, __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, 2538, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
}
@@ -20500,7 +22417,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_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, 2497, __pyx_L1_error)
+ else __PYX_ERR(0, 2538, __pyx_L1_error)
}
break;
}
@@ -20509,17 +22426,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
__Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":2498
+ /* "netCDF4/_netCDF4.pyx":2539
* for group in groups:
* for var in group.variables.values():
* var.set_auto_scale(value) # <<<<<<<<<<<<<<
*
* def get_variables_by_attributes(self, **kwargs):
*/
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2498, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2539, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_12 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_12)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -20529,23 +22446,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
}
}
if (!__pyx_t_12) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2498, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2539, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
} else {
- __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2498, __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, 2498, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ #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, 2539, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #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, 2539, __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, 2539, __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, 2539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":2497
+ /* "netCDF4/_netCDF4.pyx":2538
* for groups in _walk_grps(self):
* for group in groups:
* for var in group.variables.values(): # <<<<<<<<<<<<<<
@@ -20555,7 +22490,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":2496
+ /* "netCDF4/_netCDF4.pyx":2537
*
* for groups in _walk_grps(self):
* for group in groups: # <<<<<<<<<<<<<<
@@ -20565,7 +22500,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":2495
+ /* "netCDF4/_netCDF4.pyx":2536
* var.set_auto_scale(value)
*
* for groups in _walk_grps(self): # <<<<<<<<<<<<<<
@@ -20575,7 +22510,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2478
+ /* "netCDF4/_netCDF4.pyx":2519
* var.set_auto_mask(value)
*
* def set_auto_scale(self, value): # <<<<<<<<<<<<<<
@@ -20605,7 +22540,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2500
+/* "netCDF4/_netCDF4.pyx":2541
* var.set_auto_scale(value)
*
* def get_variables_by_attributes(self, **kwargs): # <<<<<<<<<<<<<<
@@ -20614,9 +22549,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale(struct __
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_75get_variables_by_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_74get_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\" attri [...]
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_75get_variables_by_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+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\" attri [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_77get_variables_by_attributes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_kwargs = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
@@ -20626,7 +22561,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_75get_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_74get_variables_by_attributes(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __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);
/* function exit code */
__Pyx_XDECREF(__pyx_v_kwargs);
@@ -20634,7 +22569,7 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_75get_variables_by_attribu
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_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_76get_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_vname = NULL;
@@ -20661,19 +22596,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
int __pyx_t_16;
__Pyx_RefNannySetupContext("get_variables_by_attributes", 0);
- /* "netCDF4/_netCDF4.pyx":2528
+ /* "netCDF4/_netCDF4.pyx":2569
* >>> 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, 2528, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2569, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_vs = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2530
+ /* "netCDF4/_netCDF4.pyx":2571
* vs = []
*
* has_value_flag = False # <<<<<<<<<<<<<<
@@ -20683,7 +22618,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
__Pyx_INCREF(Py_False);
__pyx_v_has_value_flag = Py_False;
- /* "netCDF4/_netCDF4.pyx":2531
+ /* "netCDF4/_netCDF4.pyx":2572
*
* has_value_flag = False
* for vname in self.variables: # <<<<<<<<<<<<<<
@@ -20694,26 +22629,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
__pyx_t_1 = __pyx_v_self->variables; __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_self->variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2531, __pyx_L1_error)
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2572, __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, 2531, __pyx_L1_error)
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2572, __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_COMPILING_IN_CPYTHON
- __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, 2531, __pyx_L1_error)
+ #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, 2572, __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, 2531, __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, 2572, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 2531, __pyx_L1_error)
+ #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, 2572, __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, 2531, __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, 2572, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
@@ -20723,7 +22658,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_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, 2531, __pyx_L1_error)
+ else __PYX_ERR(0, 2572, __pyx_L1_error)
}
break;
}
@@ -20732,52 +22667,52 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
__Pyx_XDECREF_SET(__pyx_v_vname, __pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":2532
+ /* "netCDF4/_netCDF4.pyx":2573
* has_value_flag = False
* for vname in self.variables:
* var = self.variables[vname] # <<<<<<<<<<<<<<
* for k, v in kwargs.items():
* if callable(v):
*/
- __pyx_t_4 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_vname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2532, __pyx_L1_error)
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_vname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2573, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":2533
+ /* "netCDF4/_netCDF4.pyx":2574
* for vname in self.variables:
* var = self.variables[vname]
* for k, v in kwargs.items(): # <<<<<<<<<<<<<<
* if callable(v):
* has_value_flag = v(getattr(var, k, None))
*/
- __pyx_t_4 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2533, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2574, __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_6 = 0;
__pyx_t_7 = NULL;
} else {
- __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2533, __pyx_L1_error)
+ __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2574, __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, 2533, __pyx_L1_error)
+ __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2574, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
for (;;) {
if (likely(!__pyx_t_7)) {
if (likely(PyList_CheckExact(__pyx_t_5))) {
if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2533, __pyx_L1_error)
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2574, __pyx_L1_error)
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2533, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2574, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2533, __pyx_L1_error)
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2574, __pyx_L1_error)
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2533, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2574, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
@@ -20787,7 +22722,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_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, 2533, __pyx_L1_error)
+ else __PYX_ERR(0, 2574, __pyx_L1_error)
}
break;
}
@@ -20795,7 +22730,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
}
if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
PyObject* sequence = __pyx_t_4;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -20803,9 +22738,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 2533, __pyx_L1_error)
+ __PYX_ERR(0, 2574, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_8 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_9 = PyTuple_GET_ITEM(sequence, 1);
@@ -20816,15 +22751,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
__Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(__pyx_t_9);
#else
- __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2533, __pyx_L1_error)
+ __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2574, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2533, __pyx_L1_error)
+ __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2574, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
#endif
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
Py_ssize_t index = -1;
- __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2533, __pyx_L1_error)
+ __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2574, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
@@ -20832,7 +22767,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
__Pyx_GOTREF(__pyx_t_8);
index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L7_unpacking_failed;
__Pyx_GOTREF(__pyx_t_9);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 2533, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 2574, __pyx_L1_error)
__pyx_t_11 = NULL;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L8_unpacking_done;
@@ -20840,7 +22775,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_11 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 2533, __pyx_L1_error)
+ __PYX_ERR(0, 2574, __pyx_L1_error)
__pyx_L8_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_8);
@@ -20848,29 +22783,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
__Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_9);
__pyx_t_9 = 0;
- /* "netCDF4/_netCDF4.pyx":2534
+ /* "netCDF4/_netCDF4.pyx":2575
* var = self.variables[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_12 = __Pyx_PyCallable_Check(__pyx_v_v); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 2534, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyCallable_Check(__pyx_v_v); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 2575, __pyx_L1_error)
__pyx_t_13 = (__pyx_t_12 != 0);
if (__pyx_t_13) {
- /* "netCDF4/_netCDF4.pyx":2535
+ /* "netCDF4/_netCDF4.pyx":2576
* 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_9 = __Pyx_GetAttr3(__pyx_v_var, __pyx_v_k, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2535, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_GetAttr3(__pyx_v_var, __pyx_v_k, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2576, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_INCREF(__pyx_v_v);
__pyx_t_8 = __pyx_v_v; __pyx_t_10 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
@@ -20880,25 +22815,45 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
}
}
if (!__pyx_t_10) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2535, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2576, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_GOTREF(__pyx_t_4);
} else {
- __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2535, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
- __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_10); __pyx_t_10 = NULL;
- __Pyx_GIVEREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_9);
- __pyx_t_9 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2535, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_9};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2576, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_9};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2576, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2576, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2576, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF_SET(__pyx_v_has_value_flag, __pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":2536
+ /* "netCDF4/_netCDF4.pyx":2577
* if callable(v):
* has_value_flag = v(getattr(var, k, None))
* if has_value_flag is False: # <<<<<<<<<<<<<<
@@ -20909,7 +22864,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
__pyx_t_12 = (__pyx_t_13 != 0);
if (__pyx_t_12) {
- /* "netCDF4/_netCDF4.pyx":2537
+ /* "netCDF4/_netCDF4.pyx":2578
* has_value_flag = v(getattr(var, k, None))
* if has_value_flag is False:
* break # <<<<<<<<<<<<<<
@@ -20918,7 +22873,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
*/
goto __pyx_L6_break;
- /* "netCDF4/_netCDF4.pyx":2536
+ /* "netCDF4/_netCDF4.pyx":2577
* if callable(v):
* has_value_flag = v(getattr(var, k, None))
* if has_value_flag is False: # <<<<<<<<<<<<<<
@@ -20927,7 +22882,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
*/
}
- /* "netCDF4/_netCDF4.pyx":2534
+ /* "netCDF4/_netCDF4.pyx":2575
* var = self.variables[vname]
* for k, v in kwargs.items():
* if callable(v): # <<<<<<<<<<<<<<
@@ -20937,31 +22892,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
goto __pyx_L9;
}
- /* "netCDF4/_netCDF4.pyx":2538
+ /* "netCDF4/_netCDF4.pyx":2579
* if has_value_flag is False:
* break
* elif hasattr(var, k) and getattr(var, k) == v: # <<<<<<<<<<<<<<
* has_value_flag = True
* else:
*/
- __pyx_t_13 = PyObject_HasAttr(__pyx_v_var, __pyx_v_k); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 2538, __pyx_L1_error)
+ __pyx_t_13 = PyObject_HasAttr(__pyx_v_var, __pyx_v_k); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 2579, __pyx_L1_error)
__pyx_t_15 = (__pyx_t_13 != 0);
if (__pyx_t_15) {
} else {
__pyx_t_12 = __pyx_t_15;
goto __pyx_L11_bool_binop_done;
}
- __pyx_t_4 = __Pyx_GetAttr(__pyx_v_var, __pyx_v_k); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2538, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetAttr(__pyx_v_var, __pyx_v_k); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2579, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_4, __pyx_v_v, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2538, __pyx_L1_error)
+ __pyx_t_8 = PyObject_RichCompare(__pyx_t_4, __pyx_v_v, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2579, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 2538, __pyx_L1_error)
+ __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 2579, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_12 = __pyx_t_15;
__pyx_L11_bool_binop_done:;
if (__pyx_t_12) {
- /* "netCDF4/_netCDF4.pyx":2539
+ /* "netCDF4/_netCDF4.pyx":2580
* break
* elif hasattr(var, k) and getattr(var, k) == v:
* has_value_flag = True # <<<<<<<<<<<<<<
@@ -20971,7 +22926,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
__Pyx_INCREF(Py_True);
__Pyx_DECREF_SET(__pyx_v_has_value_flag, Py_True);
- /* "netCDF4/_netCDF4.pyx":2538
+ /* "netCDF4/_netCDF4.pyx":2579
* if has_value_flag is False:
* break
* elif hasattr(var, k) and getattr(var, k) == v: # <<<<<<<<<<<<<<
@@ -20981,7 +22936,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
goto __pyx_L9;
}
- /* "netCDF4/_netCDF4.pyx":2541
+ /* "netCDF4/_netCDF4.pyx":2582
* has_value_flag = True
* else:
* has_value_flag = False # <<<<<<<<<<<<<<
@@ -20992,7 +22947,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
__Pyx_INCREF(Py_False);
__Pyx_DECREF_SET(__pyx_v_has_value_flag, Py_False);
- /* "netCDF4/_netCDF4.pyx":2542
+ /* "netCDF4/_netCDF4.pyx":2583
* else:
* has_value_flag = False
* break # <<<<<<<<<<<<<<
@@ -21003,7 +22958,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
}
__pyx_L9:;
- /* "netCDF4/_netCDF4.pyx":2533
+ /* "netCDF4/_netCDF4.pyx":2574
* for vname in self.variables:
* var = self.variables[vname]
* for k, v in kwargs.items(): # <<<<<<<<<<<<<<
@@ -21014,7 +22969,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
__pyx_L6_break:;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":2544
+ /* "netCDF4/_netCDF4.pyx":2585
* break
*
* if has_value_flag is True: # <<<<<<<<<<<<<<
@@ -21025,19 +22980,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
__pyx_t_15 = (__pyx_t_12 != 0);
if (__pyx_t_15) {
- /* "netCDF4/_netCDF4.pyx":2545
+ /* "netCDF4/_netCDF4.pyx":2586
*
* if has_value_flag is True:
* vs.append(self.variables[vname]) # <<<<<<<<<<<<<<
*
* return vs
*/
- __pyx_t_5 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_vname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2545, __pyx_L1_error)
+ __pyx_t_5 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_vname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2586, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_vs, __pyx_t_5); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 2545, __pyx_L1_error)
+ __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_vs, __pyx_t_5); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 2586, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":2544
+ /* "netCDF4/_netCDF4.pyx":2585
* break
*
* if has_value_flag is True: # <<<<<<<<<<<<<<
@@ -21046,7 +23001,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
*/
}
- /* "netCDF4/_netCDF4.pyx":2531
+ /* "netCDF4/_netCDF4.pyx":2572
*
* has_value_flag = False
* for vname in self.variables: # <<<<<<<<<<<<<<
@@ -21056,7 +23011,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2547
+ /* "netCDF4/_netCDF4.pyx":2588
* vs.append(self.variables[vname])
*
* return vs # <<<<<<<<<<<<<<
@@ -21068,7 +23023,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
__pyx_r = __pyx_v_vs;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2500
+ /* "netCDF4/_netCDF4.pyx":2541
* var.set_auto_scale(value)
*
* def get_variables_by_attributes(self, **kwargs): # <<<<<<<<<<<<<<
@@ -21099,7 +23054,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attribu
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1623
+/* "netCDF4/_netCDF4.pyx":1658
* """
* cdef object __weakref__
* cdef public int _grpid # <<<<<<<<<<<<<<
@@ -21126,7 +23081,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, 1623, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -21161,7 +23116,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, 1623, __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, 1658, __pyx_L1_error)
__pyx_v_self->_grpid = __pyx_t_1;
/* function exit code */
@@ -21175,7 +23130,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6_grpid_2__set__(struct __pyx_ob
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1624
+/* "netCDF4/_netCDF4.pyx":1659
* cdef object __weakref__
* cdef public int _grpid
* cdef public int _isopen # <<<<<<<<<<<<<<
@@ -21202,7 +23157,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, 1624, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_isopen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1659, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -21237,7 +23192,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, 1624, __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, 1659, __pyx_L1_error)
__pyx_v_self->_isopen = __pyx_t_1;
/* function exit code */
@@ -21251,7 +23206,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_7_isopen_2__set__(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1625
+/* "netCDF4/_netCDF4.pyx":1660
* cdef public int _grpid
* cdef public int _isopen
* cdef public groups, dimensions, variables, disk_format, path, parent,\ # <<<<<<<<<<<<<<
@@ -21781,7 +23736,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6parent_4__del__(struct __pyx_ob
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1626
+/* "netCDF4/_netCDF4.pyx":1661
* cdef public int _isopen
* cdef public groups, dimensions, variables, disk_format, path, parent,\
* file_format, data_model, cmptypes, vltypes, enumtypes, __orthogonal_indexing__, \ # <<<<<<<<<<<<<<
@@ -22311,7 +24266,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___4__del
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":1627
+/* "netCDF4/_netCDF4.pyx":1662
* cdef public groups, dimensions, variables, disk_format, path, parent,\
* file_format, data_model, cmptypes, vltypes, enumtypes, __orthogonal_indexing__, \
* keepweakref # <<<<<<<<<<<<<<
@@ -22406,7 +24361,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11keepweakref_4__del__(struct __
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2569
+/* "netCDF4/_netCDF4.pyx":2610
* __pdoc__['Group.name']=\
* """A string describing the name of the `netCDF4.Group`."""
* def __init__(self, parent, name, **kwargs): # <<<<<<<<<<<<<<
@@ -22449,11 +24404,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, 2569, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2610, __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, 2569, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2610, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -22466,7 +24421,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, 2569, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2610, __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);
@@ -22491,16 +24446,15 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
- Py_ssize_t __pyx_t_5;
+ int __pyx_t_5;
PyObject *__pyx_t_6 = NULL;
int __pyx_t_7;
int __pyx_t_8;
- int __pyx_t_9;
- PyObject *(*__pyx_t_10)(PyObject *);
- char *__pyx_t_11;
+ PyObject *(*__pyx_t_9)(PyObject *);
+ char *__pyx_t_10;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "netCDF4/_netCDF4.pyx":2586
+ /* "netCDF4/_netCDF4.pyx":2627
* cdef char *groupname
* # flag to indicate that Variables in this Group support orthogonal indexing.
* self.__orthogonal_indexing__ = True # <<<<<<<<<<<<<<
@@ -22513,14 +24467,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":2588
+ /* "netCDF4/_netCDF4.pyx":2629
* 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, 2588, __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, 2629, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->__pyx_base.data_model);
@@ -22528,14 +24482,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":2589
+ /* "netCDF4/_netCDF4.pyx":2630
* # 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, 2589, __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, 2630, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->__pyx_base.file_format);
@@ -22543,23 +24497,23 @@ 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":2591
+ /* "netCDF4/_netCDF4.pyx":2632
* 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, 2591, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2632, __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, 2591, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2632, __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, 2591, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2632, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = NULL;
__pyx_t_5 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -22569,20 +24523,40 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
__pyx_t_5 = 1;
}
}
- __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2591, __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;
+ #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, 2632, __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
+ #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, 2632, __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, 2632, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_name);
+ __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, 2632, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
- __Pyx_INCREF(__pyx_v_name);
- __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, 2591, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->__pyx_base.path);
@@ -22590,7 +24564,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":2593
+ /* "netCDF4/_netCDF4.pyx":2634
* self.path = posixpath.join(parent.path, name)
* # parent group.
* self.parent = parent # <<<<<<<<<<<<<<
@@ -22603,14 +24577,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":2595
+ /* "netCDF4/_netCDF4.pyx":2636
* 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, 2595, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_keepweakref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2636, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->__pyx_base.keepweakref);
@@ -22618,42 +24592,42 @@ 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":2596
+ /* "netCDF4/_netCDF4.pyx":2637
* # 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, 2596, __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, 2637, __pyx_L1_error)
__pyx_t_8 = (__pyx_t_7 != 0);
if (__pyx_t_8) {
- /* "netCDF4/_netCDF4.pyx":2597
+ /* "netCDF4/_netCDF4.pyx":2638
* 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, 2597, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2638, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2597, __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, 2638, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_self->__pyx_base._grpid = __pyx_t_9;
+ __pyx_v_self->__pyx_base._grpid = __pyx_t_5;
- /* "netCDF4/_netCDF4.pyx":2599
+ /* "netCDF4/_netCDF4.pyx":2640
* 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, 2599, __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, 2640, __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;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -22661,9 +24635,9 @@ 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, 2599, __pyx_L1_error)
+ __PYX_ERR(0, 2640, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
@@ -22677,35 +24651,35 @@ 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, 2599, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2640, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2599, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2640, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2599, __pyx_L1_error)
+ __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2640, __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, 2599, __pyx_L1_error)
+ __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2640, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext;
- index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
+ __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_3 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
__Pyx_GOTREF(__pyx_t_3);
- index = 1; __pyx_t_6 = __pyx_t_10(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
+ index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
__Pyx_GOTREF(__pyx_t_6);
- index = 2; __pyx_t_2 = __pyx_t_10(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
+ 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_10(__pyx_t_4), 3) < 0) __PYX_ERR(0, 2599, __pyx_L1_error)
- __pyx_t_10 = NULL;
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 3) < 0) __PYX_ERR(0, 2640, __pyx_L1_error)
+ __pyx_t_9 = NULL;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L5_unpacking_done;
__pyx_L4_unpacking_failed:;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_10 = NULL;
+ __pyx_t_9 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 2599, __pyx_L1_error)
+ __PYX_ERR(0, 2640, __pyx_L1_error)
__pyx_L5_unpacking_done:;
}
__Pyx_GIVEREF(__pyx_t_3);
@@ -22724,14 +24698,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":2601
+ /* "netCDF4/_netCDF4.pyx":2642
* 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, 2601, __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, 2642, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->__pyx_base.dimensions);
@@ -22739,14 +24713,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":2603
+ /* "netCDF4/_netCDF4.pyx":2644
* 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, 2603, __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, 2644, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->__pyx_base.variables);
@@ -22754,14 +24728,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":2605
+ /* "netCDF4/_netCDF4.pyx":2646
* 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, 2605, __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, 2646, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->__pyx_base.groups);
@@ -22769,7 +24743,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":2596
+ /* "netCDF4/_netCDF4.pyx":2637
* # propagate weak reference setting from parent.
* self.keepweakref = parent.keepweakref
* if 'id' in kwargs: # <<<<<<<<<<<<<<
@@ -22779,7 +24753,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":2607
+ /* "netCDF4/_netCDF4.pyx":2648
* self.groups = _get_grps(self)
* else:
* bytestr = _strencode(name) # <<<<<<<<<<<<<<
@@ -22787,35 +24761,35 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
* ierr = 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, 2607, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2648, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_bytestr = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2608
+ /* "netCDF4/_netCDF4.pyx":2649
* else:
* bytestr = _strencode(name)
* groupname = bytestr # <<<<<<<<<<<<<<
* ierr = nc_def_grp(parent._grpid, groupname, &self._grpid)
* if ierr != NC_NOERR:
*/
- __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 2608, __pyx_L1_error)
- __pyx_v_groupname = __pyx_t_11;
+ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 2649, __pyx_L1_error)
+ __pyx_v_groupname = __pyx_t_10;
- /* "netCDF4/_netCDF4.pyx":2609
+ /* "netCDF4/_netCDF4.pyx":2650
* bytestr = _strencode(name)
* groupname = bytestr
* ierr = nc_def_grp(parent._grpid, groupname, &self._grpid) # <<<<<<<<<<<<<<
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 2609, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2650, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2609, __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, 2650, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_ierr = nc_def_grp(__pyx_t_9, __pyx_v_groupname, (&__pyx_v_self->__pyx_base._grpid));
+ __pyx_v_ierr = nc_def_grp(__pyx_t_5, __pyx_v_groupname, (&__pyx_v_self->__pyx_base._grpid));
- /* "netCDF4/_netCDF4.pyx":2610
+ /* "netCDF4/_netCDF4.pyx":2651
* groupname = bytestr
* ierr = nc_def_grp(parent._grpid, groupname, &self._grpid)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -22825,30 +24799,30 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
__pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0);
if (__pyx_t_8) {
- /* "netCDF4/_netCDF4.pyx":2611
+ /* "netCDF4/_netCDF4.pyx":2652
* ierr = nc_def_grp(parent._grpid, groupname, &self._grpid)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
* self.cmptypes = OrderedDict()
* self.vltypes = OrderedDict()
*/
- __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, 2611, __pyx_L1_error)
+ __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, 2652, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2611, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2652, __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, 2611, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2652, __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, 2611, __pyx_L1_error)
+ __PYX_ERR(0, 2652, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2610
+ /* "netCDF4/_netCDF4.pyx":2651
* groupname = bytestr
* ierr = nc_def_grp(parent._grpid, groupname, &self._grpid)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -22857,17 +24831,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
*/
}
- /* "netCDF4/_netCDF4.pyx":2612
+ /* "netCDF4/_netCDF4.pyx":2653
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* 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, 2612, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2653, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -22877,10 +24851,10 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
}
}
if (__pyx_t_6) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2612, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2653, __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, 2612, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2653, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -22890,17 +24864,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
__pyx_v_self->__pyx_base.cmptypes = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2613
+ /* "netCDF4/_netCDF4.pyx":2654
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* 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, 2613, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2654, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -22910,10 +24884,10 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
}
}
if (__pyx_t_6) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2613, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2654, __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, 2613, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2654, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -22923,17 +24897,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
__pyx_v_self->__pyx_base.vltypes = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2614
+ /* "netCDF4/_netCDF4.pyx":2655
* 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, 2614, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2655, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -22943,10 +24917,10 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
}
}
if (__pyx_t_6) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2614, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2655, __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, 2614, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2655, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -22956,17 +24930,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
__pyx_v_self->__pyx_base.enumtypes = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2615
+ /* "netCDF4/_netCDF4.pyx":2656
* 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, 2615, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2656, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -22976,10 +24950,10 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
}
}
if (__pyx_t_6) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2615, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2656, __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, 2615, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2656, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -22989,17 +24963,17 @@ 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":2616
+ /* "netCDF4/_netCDF4.pyx":2657
* 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, 2616, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2657, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -23009,10 +24983,10 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
}
}
if (__pyx_t_6) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2616, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2657, __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, 2616, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2657, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -23022,17 +24996,17 @@ 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":2617
+ /* "netCDF4/_netCDF4.pyx":2658
* 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, 2617, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2658, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -23042,10 +25016,10 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
}
}
if (__pyx_t_6) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2617, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2658, __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, 2617, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2658, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -23057,7 +25031,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":2569
+ /* "netCDF4/_netCDF4.pyx":2610
* __pdoc__['Group.name']=\
* """A string describing the name of the `netCDF4.Group`."""
* def __init__(self, parent, name, **kwargs): # <<<<<<<<<<<<<<
@@ -23082,7 +25056,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2619
+/* "netCDF4/_netCDF4.pyx":2660
* self.groups = OrderedDict()
*
* def close(self): # <<<<<<<<<<<<<<
@@ -23110,20 +25084,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":2625
+ /* "netCDF4/_netCDF4.pyx":2666
* 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, 2625, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2666, __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, 2625, __pyx_L1_error)
+ __PYX_ERR(0, 2666, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2619
+ /* "netCDF4/_netCDF4.pyx":2660
* self.groups = OrderedDict()
*
* def close(self): # <<<<<<<<<<<<<<
@@ -23141,7 +25115,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_2close(CYTHON_UNUSED struct
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2627
+/* "netCDF4/_netCDF4.pyx":2668
* raise IOError('cannot close a `netCDF4.Group` (only applies to Dataset)')
*
* def _getname(self): # <<<<<<<<<<<<<<
@@ -23174,11 +25148,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
- Py_ssize_t __pyx_t_8;
+ int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("_getname", 0);
- /* "netCDF4/_netCDF4.pyx":2631
+ /* "netCDF4/_netCDF4.pyx":2672
* cdef int err
* cdef char namstring[NC_MAX_NAME+1]
* with nogil: # <<<<<<<<<<<<<<
@@ -23192,7 +25166,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":2632
+ /* "netCDF4/_netCDF4.pyx":2673
* cdef char namstring[NC_MAX_NAME+1]
* with nogil:
* ierr = nc_inq_grpname(self._grpid, namstring) # <<<<<<<<<<<<<<
@@ -23202,7 +25176,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7
__pyx_v_ierr = nc_inq_grpname(__pyx_v_self->__pyx_base._grpid, __pyx_v_namstring);
}
- /* "netCDF4/_netCDF4.pyx":2631
+ /* "netCDF4/_netCDF4.pyx":2672
* cdef int err
* cdef char namstring[NC_MAX_NAME+1]
* with nogil: # <<<<<<<<<<<<<<
@@ -23220,7 +25194,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7
}
}
- /* "netCDF4/_netCDF4.pyx":2633
+ /* "netCDF4/_netCDF4.pyx":2674
* with nogil:
* ierr = nc_inq_grpname(self._grpid, namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -23230,7 +25204,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7
__pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":2634
+ /* "netCDF4/_netCDF4.pyx":2675
* ierr = nc_inq_grpname(self._grpid, namstring)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -23238,22 +25212,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7
*
*/
__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, 2634, __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, 2675, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2634, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2675, __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, 2634, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2675, __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, 2634, __pyx_L1_error)
+ __PYX_ERR(0, 2675, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2633
+ /* "netCDF4/_netCDF4.pyx":2674
* with nogil:
* ierr = nc_inq_grpname(self._grpid, namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -23262,7 +25236,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":2635
+ /* "netCDF4/_netCDF4.pyx":2676
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* return namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<<
@@ -23270,18 +25244,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7
* property name:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2635, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2676, __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, 2635, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2676, __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, 2635, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2676, __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, 2635, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2676, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = NULL;
__pyx_t_8 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ 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);
@@ -23291,26 +25265,48 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7
__pyx_t_8 = 1;
}
}
- __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2635, __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;
+ #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, 2676, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __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, 2676, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __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, 2676, __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_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);
+ __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, 2676, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
- __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);
- __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, 2635, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2627
+ /* "netCDF4/_netCDF4.pyx":2668
* raise IOError('cannot close a `netCDF4.Group` (only applies to Dataset)')
*
* def _getname(self): # <<<<<<<<<<<<<<
@@ -23334,7 +25330,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2639
+/* "netCDF4/_netCDF4.pyx":2680
* property name:
* """string name of Group instance"""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -23363,7 +25359,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":2640
+ /* "netCDF4/_netCDF4.pyx":2681
* """string name of Group instance"""
* def __get__(self):
* return self._getname() # <<<<<<<<<<<<<<
@@ -23371,10 +25367,10 @@ 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, 2640, __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, 2681, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -23384,10 +25380,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, 2640, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2681, __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, 2640, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2681, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -23395,7 +25391,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4name___get__(struct __pyx_o
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2639
+ /* "netCDF4/_netCDF4.pyx":2680
* property name:
* """string name of Group instance"""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -23416,7 +25412,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4name___get__(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2641
+/* "netCDF4/_netCDF4.pyx":2682
* def __get__(self):
* return self._getname()
* def __set__(self,value): # <<<<<<<<<<<<<<
@@ -23443,20 +25439,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":2642
+ /* "netCDF4/_netCDF4.pyx":2683
* 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, 2642, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2683, __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, 2642, __pyx_L1_error)
+ __PYX_ERR(0, 2683, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2641
+ /* "netCDF4/_netCDF4.pyx":2682
* def __get__(self):
* return self._getname()
* def __set__(self,value): # <<<<<<<<<<<<<<
@@ -23473,7 +25469,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_5Group_4name_2__set__(CYTHON_UNUSED struc
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2670
+/* "netCDF4/_netCDF4.pyx":2711
* `netCDF4.Variable` instance with `netCDF4.Dataset.createVariable`."""
*
* def __init__(self, grp, name, size=None, **kwargs): # <<<<<<<<<<<<<<
@@ -23519,7 +25515,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, 2670, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 2711, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
@@ -23528,7 +25524,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, 2670, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2711, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -23545,7 +25541,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, 2670, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2711, __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);
@@ -23578,46 +25574,46 @@ 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":2689
+ /* "netCDF4/_netCDF4.pyx":2730
* 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, 2689, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2730, __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, 2689, __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, 2730, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_self->_grpid = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":2692
+ /* "netCDF4/_netCDF4.pyx":2733
* # 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, 2692, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_keepweakref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2733, __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, 2692, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2733, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":2693
+ /* "netCDF4/_netCDF4.pyx":2734
* # 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, 2693, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_weakref); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2734, __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, 2693, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_proxy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2734, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -23627,18 +25623,36 @@ 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, 2693, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_grp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2734, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2693, __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, 2693, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 2734, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 2734, __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, 2734, __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, 2734, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GIVEREF(__pyx_t_1);
@@ -23647,7 +25661,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":2692
+ /* "netCDF4/_netCDF4.pyx":2733
* # make a weakref to group to avoid circular ref (issue 218)
* # keep strong reference the default behaviour (issue 251)
* if grp.keepweakref: # <<<<<<<<<<<<<<
@@ -23657,7 +25671,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":2695
+ /* "netCDF4/_netCDF4.pyx":2736
* self._grp = weakref.proxy(grp)
* else:
* self._grp = grp # <<<<<<<<<<<<<<
@@ -23673,14 +25687,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":2696
+ /* "netCDF4/_netCDF4.pyx":2737
* 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, 2696, __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, 2737, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->_data_model);
@@ -23688,7 +25702,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":2697
+ /* "netCDF4/_netCDF4.pyx":2738
* self._grp = grp
* self._data_model = grp.data_model
* self._name = name # <<<<<<<<<<<<<<
@@ -23701,31 +25715,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":2698
+ /* "netCDF4/_netCDF4.pyx":2739
* 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, 2698, __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, 2739, __pyx_L1_error)
__pyx_t_7 = (__pyx_t_3 != 0);
if (__pyx_t_7) {
- /* "netCDF4/_netCDF4.pyx":2699
+ /* "netCDF4/_netCDF4.pyx":2740
* 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, 2699, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2740, __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, 2699, __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, 2740, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_self->_dimid = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":2698
+ /* "netCDF4/_netCDF4.pyx":2739
* self._data_model = grp.data_model
* self._name = name
* if 'id' in kwargs: # <<<<<<<<<<<<<<
@@ -23735,7 +25749,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net
goto __pyx_L4;
}
- /* "netCDF4/_netCDF4.pyx":2701
+ /* "netCDF4/_netCDF4.pyx":2742
* self._dimid = kwargs['id']
* else:
* bytestr = _strencode(name) # <<<<<<<<<<<<<<
@@ -23743,22 +25757,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, 2701, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2742, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_bytestr = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":2702
+ /* "netCDF4/_netCDF4.pyx":2743
* 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, 2702, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 2743, __pyx_L1_error)
__pyx_v_dimname = __pyx_t_8;
- /* "netCDF4/_netCDF4.pyx":2703
+ /* "netCDF4/_netCDF4.pyx":2744
* bytestr = _strencode(name)
* dimname = bytestr
* if size is not None: # <<<<<<<<<<<<<<
@@ -23769,17 +25783,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":2704
+ /* "netCDF4/_netCDF4.pyx":2745
* 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, 2704, __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, 2745, __pyx_L1_error)
__pyx_v_lendim = __pyx_t_9;
- /* "netCDF4/_netCDF4.pyx":2703
+ /* "netCDF4/_netCDF4.pyx":2744
* bytestr = _strencode(name)
* dimname = bytestr
* if size is not None: # <<<<<<<<<<<<<<
@@ -23789,7 +25803,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net
goto __pyx_L5;
}
- /* "netCDF4/_netCDF4.pyx":2706
+ /* "netCDF4/_netCDF4.pyx":2747
* lendim = size
* else:
* lendim = NC_UNLIMITED # <<<<<<<<<<<<<<
@@ -23801,22 +25815,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net
}
__pyx_L5:;
- /* "netCDF4/_netCDF4.pyx":2707
+ /* "netCDF4/_netCDF4.pyx":2748
* 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, 2707, __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, 2748, __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, 2707, __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, 2748, __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, 2707, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2748, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -23826,17 +25840,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, 2707, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2748, __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, 2707, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2748, __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":2708
+ /* "netCDF4/_netCDF4.pyx":2749
* lendim = NC_UNLIMITED
* if grp.data_model != 'NETCDF4': grp._redef()
* ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid) # <<<<<<<<<<<<<<
@@ -23845,22 +25859,22 @@ 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":2709
+ /* "netCDF4/_netCDF4.pyx":2750
* 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((<char *>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, 2709, __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, 2750, __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, 2709, __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, 2750, __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, 2709, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2750, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -23870,17 +25884,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, 2709, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2750, __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, 2709, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2750, __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":2710
+ /* "netCDF4/_netCDF4.pyx":2751
* ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid)
* if grp.data_model != 'NETCDF4': grp._enddef()
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -23890,7 +25904,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":2711
+ /* "netCDF4/_netCDF4.pyx":2752
* if grp.data_model != 'NETCDF4': grp._enddef()
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -23898,22 +25912,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, 2711, __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, 2752, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2711, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2752, __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, 2711, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2752, __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, 2711, __pyx_L1_error)
+ __PYX_ERR(0, 2752, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2710
+ /* "netCDF4/_netCDF4.pyx":2751
* ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid)
* if grp.data_model != 'NETCDF4': grp._enddef()
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -23924,7 +25938,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net
}
__pyx_L4:;
- /* "netCDF4/_netCDF4.pyx":2670
+ /* "netCDF4/_netCDF4.pyx":2711
* `netCDF4.Variable` instance with `netCDF4.Dataset.createVariable`."""
*
* def __init__(self, grp, name, size=None, **kwargs): # <<<<<<<<<<<<<<
@@ -23948,7 +25962,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7net
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2713
+/* "netCDF4/_netCDF4.pyx":2754
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def _getname(self): # <<<<<<<<<<<<<<
@@ -23983,24 +25997,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
- Py_ssize_t __pyx_t_9;
- PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("_getname", 0);
- /* "netCDF4/_netCDF4.pyx":2717
+ /* "netCDF4/_netCDF4.pyx":2758
* 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, 2717, __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, 2758, __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, 2717, __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, 2758, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v__grpid = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":2718
+ /* "netCDF4/_netCDF4.pyx":2759
* cdef char namstring[NC_MAX_NAME+1]
* _grpid = self._grp._grpid
* with nogil: # <<<<<<<<<<<<<<
@@ -24014,7 +26027,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":2719
+ /* "netCDF4/_netCDF4.pyx":2760
* _grpid = self._grp._grpid
* with nogil:
* ierr = nc_inq_dimname(_grpid, self._dimid, namstring) # <<<<<<<<<<<<<<
@@ -24024,7 +26037,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":2718
+ /* "netCDF4/_netCDF4.pyx":2759
* cdef char namstring[NC_MAX_NAME+1]
* _grpid = self._grp._grpid
* with nogil: # <<<<<<<<<<<<<<
@@ -24042,7 +26055,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o
}
}
- /* "netCDF4/_netCDF4.pyx":2720
+ /* "netCDF4/_netCDF4.pyx":2761
* with nogil:
* ierr = nc_inq_dimname(_grpid, self._dimid, namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -24052,7 +26065,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":2721
+ /* "netCDF4/_netCDF4.pyx":2762
* ierr = nc_inq_dimname(_grpid, self._dimid, namstring)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -24060,22 +26073,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, 2721, __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, 2762, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2721, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2762, __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, 2721, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2762, __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, 2721, __pyx_L1_error)
+ __PYX_ERR(0, 2762, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2720
+ /* "netCDF4/_netCDF4.pyx":2761
* with nogil:
* ierr = nc_inq_dimname(_grpid, self._dimid, namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -24084,7 +26097,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o
*/
}
- /* "netCDF4/_netCDF4.pyx":2722
+ /* "netCDF4/_netCDF4.pyx":2763
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* return namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<<
@@ -24092,47 +26105,69 @@ 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, 2722, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2763, __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, 2722, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2763, __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, 2722, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2763, __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, 2722, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2763, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
- __pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_2 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_9 = 1;
+ __pyx_t_2 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2722, __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;
+ #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, 2763, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #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, 2763, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2763, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_2, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_7);
+ 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, 2763, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_7);
- 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, 2722, __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;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2713
+ /* "netCDF4/_netCDF4.pyx":2754
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def _getname(self): # <<<<<<<<<<<<<<
@@ -24147,7 +26182,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("netCDF4._netCDF4.Dimension._getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -24156,7 +26191,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2726
+/* "netCDF4/_netCDF4.pyx":2767
* property name:
* """string name of Dimension instance"""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -24185,7 +26220,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":2727
+ /* "netCDF4/_netCDF4.pyx":2768
* """string name of Dimension instance"""
* def __get__(self):
* return self._getname() # <<<<<<<<<<<<<<
@@ -24193,10 +26228,10 @@ 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, 2727, __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, 2768, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -24206,10 +26241,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, 2727, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2768, __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, 2727, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2768, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -24217,7 +26252,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name___get__(struct __p
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2726
+ /* "netCDF4/_netCDF4.pyx":2767
* property name:
* """string name of Dimension instance"""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -24238,7 +26273,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name___get__(struct __p
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2728
+/* "netCDF4/_netCDF4.pyx":2769
* def __get__(self):
* return self._getname()
* def __set__(self,value): # <<<<<<<<<<<<<<
@@ -24265,20 +26300,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":2729
+ /* "netCDF4/_netCDF4.pyx":2770
* 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, 2729, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2770, __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, 2729, __pyx_L1_error)
+ __PYX_ERR(0, 2770, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2728
+ /* "netCDF4/_netCDF4.pyx":2769
* def __get__(self):
* return self._getname()
* def __set__(self,value): # <<<<<<<<<<<<<<
@@ -24295,7 +26330,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name_2__set__(CYTHON_UNUSED s
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2733
+/* "netCDF4/_netCDF4.pyx":2774
* property size:
* """current size of Dimension (calls `len` on Dimension instance)"""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -24323,7 +26358,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":2734
+ /* "netCDF4/_netCDF4.pyx":2775
* """current size of Dimension (calls `len` on Dimension instance)"""
* def __get__(self):
* return len(self) # <<<<<<<<<<<<<<
@@ -24331,14 +26366,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, 2734, __pyx_L1_error)
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2734, __pyx_L1_error)
+ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 2775, __pyx_L1_error)
+ __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2775, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2733
+ /* "netCDF4/_netCDF4.pyx":2774
* property size:
* """current size of Dimension (calls `len` on Dimension instance)"""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -24357,7 +26392,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4size___get__(struct __p
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2735
+/* "netCDF4/_netCDF4.pyx":2776
* def __get__(self):
* return len(self)
* def __set__(self,value): # <<<<<<<<<<<<<<
@@ -24384,20 +26419,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":2736
+ /* "netCDF4/_netCDF4.pyx":2777
* 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, 2736, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2777, __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, 2736, __pyx_L1_error)
+ __PYX_ERR(0, 2777, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2735
+ /* "netCDF4/_netCDF4.pyx":2776
* def __get__(self):
* return len(self)
* def __set__(self,value): # <<<<<<<<<<<<<<
@@ -24414,7 +26449,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4size_2__set__(CYTHON_UNUSED s
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2738
+/* "netCDF4/_netCDF4.pyx":2779
* raise AttributeError("size cannot be altered")
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -24446,20 +26481,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":2739
+ /* "netCDF4/_netCDF4.pyx":2780
*
* 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, 2739, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2780, __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, 2739, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2780, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":2740
+ /* "netCDF4/_netCDF4.pyx":2781
* def __repr__(self):
* if python3:
* return self.__unicode__() # <<<<<<<<<<<<<<
@@ -24467,10 +26502,10 @@ 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, 2740, __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, 2781, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -24480,10 +26515,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, 2740, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2781, __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, 2740, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2781, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -24491,7 +26526,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_o
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2739
+ /* "netCDF4/_netCDF4.pyx":2780
*
* def __repr__(self):
* if python3: # <<<<<<<<<<<<<<
@@ -24500,7 +26535,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_o
*/
}
- /* "netCDF4/_netCDF4.pyx":2742
+ /* "netCDF4/_netCDF4.pyx":2783
* return self.__unicode__()
* else:
* return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<<
@@ -24509,21 +26544,21 @@ 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, 2742, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2783, __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, 2742, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2783, __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, 2742, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2783, __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, 2742, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2783, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ 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);
@@ -24533,19 +26568,39 @@ 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, 2742, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2783, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2742, __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, 2742, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 2783, __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
+ #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, 2783, __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, 2783, __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, 2783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_1;
@@ -24553,7 +26608,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_o
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":2738
+ /* "netCDF4/_netCDF4.pyx":2779
* raise AttributeError("size cannot be altered")
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -24576,7 +26631,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2744
+/* "netCDF4/_netCDF4.pyx":2785
* return unicode(self).encode(default_encoding)
*
* def __unicode__(self): # <<<<<<<<<<<<<<
@@ -24608,7 +26663,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":2745
+ /* "netCDF4/_netCDF4.pyx":2786
*
* def __unicode__(self):
* if not dir(self._grp): # <<<<<<<<<<<<<<
@@ -24617,15 +26672,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, 2745, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Dir(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2786, __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, 2745, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2786, __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":2746
+ /* "netCDF4/_netCDF4.pyx":2787
* def __unicode__(self):
* if not dir(self._grp):
* return 'Dimension object no longer valid' # <<<<<<<<<<<<<<
@@ -24637,7 +26692,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":2745
+ /* "netCDF4/_netCDF4.pyx":2786
*
* def __unicode__(self):
* if not dir(self._grp): # <<<<<<<<<<<<<<
@@ -24646,17 +26701,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py
*/
}
- /* "netCDF4/_netCDF4.pyx":2747
+ /* "netCDF4/_netCDF4.pyx":2788
* 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, 2747, __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, 2788, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -24666,18 +26721,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, 2747, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2788, __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, 2747, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2788, __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, 2747, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2788, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":2748
+ /* "netCDF4/_netCDF4.pyx":2789
* return 'Dimension object no longer valid'
* if self.isunlimited():
* return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self)) # <<<<<<<<<<<<<<
@@ -24685,12 +26740,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, 2748, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2789, __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, 2748, __pyx_L1_error)
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2748, __pyx_L1_error)
+ __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 2789, __pyx_L1_error)
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2789, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2748, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2789, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_v_self->_name);
__Pyx_GIVEREF(__pyx_v_self->_name);
@@ -24698,10 +26753,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, 2748, __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, 2789, __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, 2748, __pyx_L1_error)
+ __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2789, __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;
@@ -24709,7 +26764,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2747
+ /* "netCDF4/_netCDF4.pyx":2788
* if not dir(self._grp):
* return 'Dimension object no longer valid'
* if self.isunlimited(): # <<<<<<<<<<<<<<
@@ -24718,7 +26773,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py
*/
}
- /* "netCDF4/_netCDF4.pyx":2750
+ /* "netCDF4/_netCDF4.pyx":2791
* 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)) # <<<<<<<<<<<<<<
@@ -24727,12 +26782,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, 2750, __pyx_L1_error)
+ __pyx_t_5 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2791, __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, 2750, __pyx_L1_error)
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2750, __pyx_L1_error)
+ __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 2791, __pyx_L1_error)
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2791, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2750, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2791, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_self->_name);
__Pyx_GIVEREF(__pyx_v_self->_name);
@@ -24740,10 +26795,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, 2750, __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, 2791, __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, 2750, __pyx_L1_error)
+ __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2791, __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;
@@ -24752,7 +26807,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":2744
+ /* "netCDF4/_netCDF4.pyx":2785
* return unicode(self).encode(default_encoding)
*
* def __unicode__(self): # <<<<<<<<<<<<<<
@@ -24773,7 +26828,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __py
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2752
+/* "netCDF4/_netCDF4.pyx":2793
* return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -24805,7 +26860,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":2756
+ /* "netCDF4/_netCDF4.pyx":2797
* cdef int ierr
* cdef size_t lengthp
* with nogil: # <<<<<<<<<<<<<<
@@ -24819,7 +26874,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_o
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":2757
+ /* "netCDF4/_netCDF4.pyx":2798
* cdef size_t lengthp
* with nogil:
* ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp) # <<<<<<<<<<<<<<
@@ -24829,7 +26884,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":2756
+ /* "netCDF4/_netCDF4.pyx":2797
* cdef int ierr
* cdef size_t lengthp
* with nogil: # <<<<<<<<<<<<<<
@@ -24847,7 +26902,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_o
}
}
- /* "netCDF4/_netCDF4.pyx":2758
+ /* "netCDF4/_netCDF4.pyx":2799
* with nogil:
* ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -24857,7 +26912,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":2759
+ /* "netCDF4/_netCDF4.pyx":2800
* ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -24865,22 +26920,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, 2759, __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, 2800, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2759, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2800, __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, 2759, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2800, __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, 2759, __pyx_L1_error)
+ __PYX_ERR(0, 2800, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2758
+ /* "netCDF4/_netCDF4.pyx":2799
* with nogil:
* ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -24889,7 +26944,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_o
*/
}
- /* "netCDF4/_netCDF4.pyx":2760
+ /* "netCDF4/_netCDF4.pyx":2801
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* return lengthp # <<<<<<<<<<<<<<
@@ -24899,7 +26954,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":2752
+ /* "netCDF4/_netCDF4.pyx":2793
* return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -24918,7 +26973,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2762
+/* "netCDF4/_netCDF4.pyx":2803
* return lengthp
*
* def group(self): # <<<<<<<<<<<<<<
@@ -24945,7 +27000,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_10group(struct __pyx_obj
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("group", 0);
- /* "netCDF4/_netCDF4.pyx":2767
+ /* "netCDF4/_netCDF4.pyx":2808
*
* return the group that this `netCDF4.Dimension` is a member of."""
* return self._grp # <<<<<<<<<<<<<<
@@ -24957,7 +27012,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":2762
+ /* "netCDF4/_netCDF4.pyx":2803
* return lengthp
*
* def group(self): # <<<<<<<<<<<<<<
@@ -24972,7 +27027,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_10group(struct __pyx_obj
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2769
+/* "netCDF4/_netCDF4.pyx":2810
* return self._grp
*
* def isunlimited(self): # <<<<<<<<<<<<<<
@@ -25016,17 +27071,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
int __pyx_t_7;
__Pyx_RefNannySetupContext("isunlimited", 0);
- /* "netCDF4/_netCDF4.pyx":2776
+ /* "netCDF4/_netCDF4.pyx":2817
* 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, 2776, __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, 2817, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":2777
+ /* "netCDF4/_netCDF4.pyx":2818
* cdef int *unlimdimids
* if self._data_model == 'NETCDF4':
* ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL) # <<<<<<<<<<<<<<
@@ -25035,7 +27090,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":2778
+ /* "netCDF4/_netCDF4.pyx":2819
* if self._data_model == 'NETCDF4':
* ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -25045,7 +27100,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":2779
+ /* "netCDF4/_netCDF4.pyx":2820
* ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -25053,22 +27108,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, 2779, __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, 2820, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2779, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2820, __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, 2779, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2820, __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, 2779, __pyx_L1_error)
+ __PYX_ERR(0, 2820, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2778
+ /* "netCDF4/_netCDF4.pyx":2819
* if self._data_model == 'NETCDF4':
* ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -25077,7 +27132,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":2780
+ /* "netCDF4/_netCDF4.pyx":2821
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if numunlimdims == 0: # <<<<<<<<<<<<<<
@@ -25087,7 +27142,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":2781
+ /* "netCDF4/_netCDF4.pyx":2822
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if numunlimdims == 0:
* return False # <<<<<<<<<<<<<<
@@ -25099,7 +27154,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
__pyx_r = Py_False;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2780
+ /* "netCDF4/_netCDF4.pyx":2821
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if numunlimdims == 0: # <<<<<<<<<<<<<<
@@ -25108,7 +27163,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":2783
+ /* "netCDF4/_netCDF4.pyx":2824
* return False
* else:
* unlimdimids = <int *>malloc(sizeof(int) * numunlimdims) # <<<<<<<<<<<<<<
@@ -25118,7 +27173,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":2784
+ /* "netCDF4/_netCDF4.pyx":2825
* else:
* unlimdimids = <int *>malloc(sizeof(int) * numunlimdims)
* dimid = self._dimid # <<<<<<<<<<<<<<
@@ -25128,7 +27183,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":2785
+ /* "netCDF4/_netCDF4.pyx":2826
* unlimdimids = <int *>malloc(sizeof(int) * numunlimdims)
* dimid = self._dimid
* with nogil: # <<<<<<<<<<<<<<
@@ -25142,7 +27197,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":2786
+ /* "netCDF4/_netCDF4.pyx":2827
* dimid = self._dimid
* with nogil:
* ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids) # <<<<<<<<<<<<<<
@@ -25152,7 +27207,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":2785
+ /* "netCDF4/_netCDF4.pyx":2826
* unlimdimids = <int *>malloc(sizeof(int) * numunlimdims)
* dimid = self._dimid
* with nogil: # <<<<<<<<<<<<<<
@@ -25170,7 +27225,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
}
}
- /* "netCDF4/_netCDF4.pyx":2787
+ /* "netCDF4/_netCDF4.pyx":2828
* with nogil:
* ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -25180,7 +27235,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":2788
+ /* "netCDF4/_netCDF4.pyx":2829
* ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -25188,22 +27243,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, 2788, __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, 2829, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2788, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2829, __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, 2788, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2829, __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, 2788, __pyx_L1_error)
+ __PYX_ERR(0, 2829, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":2787
+ /* "netCDF4/_netCDF4.pyx":2828
* with nogil:
* ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -25212,19 +27267,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":2789
+ /* "netCDF4/_netCDF4.pyx":2830
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 2789, __pyx_L1_error)
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2830, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_unlimdim_ids = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":2790
+ /* "netCDF4/_netCDF4.pyx":2831
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* unlimdim_ids = []
* for n from 0 <= n < numunlimdims: # <<<<<<<<<<<<<<
@@ -25234,20 +27289,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":2791
+ /* "netCDF4/_netCDF4.pyx":2832
* 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, 2791, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_unlimdimids[__pyx_v_n])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2832, __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, 2791, __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, 2832, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
- /* "netCDF4/_netCDF4.pyx":2792
+ /* "netCDF4/_netCDF4.pyx":2833
* for n from 0 <= n < numunlimdims:
* unlimdim_ids.append(unlimdimids[n])
* free(unlimdimids) # <<<<<<<<<<<<<<
@@ -25256,21 +27311,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
*/
free(__pyx_v_unlimdimids);
- /* "netCDF4/_netCDF4.pyx":2793
+ /* "netCDF4/_netCDF4.pyx":2834
* 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, 2793, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dimid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2834, __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, 2793, __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, 2834, __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":2794
+ /* "netCDF4/_netCDF4.pyx":2835
* free(unlimdimids)
* if dimid in unlimdim_ids:
* return True # <<<<<<<<<<<<<<
@@ -25282,7 +27337,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
__pyx_r = Py_True;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2793
+ /* "netCDF4/_netCDF4.pyx":2834
* unlimdim_ids.append(unlimdimids[n])
* free(unlimdimids)
* if dimid in unlimdim_ids: # <<<<<<<<<<<<<<
@@ -25291,7 +27346,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":2796
+ /* "netCDF4/_netCDF4.pyx":2837
* return True
* else:
* return False # <<<<<<<<<<<<<<
@@ -25306,7 +27361,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
}
}
- /* "netCDF4/_netCDF4.pyx":2776
+ /* "netCDF4/_netCDF4.pyx":2817
* cdef int ierr, n, numunlimdims, ndims, nvars, ngatts, xdimid
* cdef int *unlimdimids
* if self._data_model == 'NETCDF4': # <<<<<<<<<<<<<<
@@ -25315,7 +27370,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":2799
+ /* "netCDF4/_netCDF4.pyx":2840
* else: # if not NETCDF4, there is only one unlimited dimension.
* # nc_inq_unlimdims only works for NETCDF4.
* with nogil: # <<<<<<<<<<<<<<
@@ -25330,7 +27385,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":2800
+ /* "netCDF4/_netCDF4.pyx":2841
* # nc_inq_unlimdims only works for NETCDF4.
* with nogil:
* ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid) # <<<<<<<<<<<<<<
@@ -25340,7 +27395,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":2799
+ /* "netCDF4/_netCDF4.pyx":2840
* else: # if not NETCDF4, there is only one unlimited dimension.
* # nc_inq_unlimdims only works for NETCDF4.
* with nogil: # <<<<<<<<<<<<<<
@@ -25358,7 +27413,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
}
}
- /* "netCDF4/_netCDF4.pyx":2801
+ /* "netCDF4/_netCDF4.pyx":2842
* with nogil:
* ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)
* if self._dimid == xdimid: # <<<<<<<<<<<<<<
@@ -25368,7 +27423,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":2802
+ /* "netCDF4/_netCDF4.pyx":2843
* ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)
* if self._dimid == xdimid:
* return True # <<<<<<<<<<<<<<
@@ -25380,7 +27435,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
__pyx_r = Py_True;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":2801
+ /* "netCDF4/_netCDF4.pyx":2842
* with nogil:
* ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)
* if self._dimid == xdimid: # <<<<<<<<<<<<<<
@@ -25389,7 +27444,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":2804
+ /* "netCDF4/_netCDF4.pyx":2845
* return True
* else:
* return False # <<<<<<<<<<<<<<
@@ -25404,7 +27459,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
}
}
- /* "netCDF4/_netCDF4.pyx":2769
+ /* "netCDF4/_netCDF4.pyx":2810
* return self._grp
*
* def isunlimited(self): # <<<<<<<<<<<<<<
@@ -25425,7 +27480,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __p
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2663
+/* "netCDF4/_netCDF4.pyx":2704
* `netCDF4.Dimension` instance).
* """
* cdef public int _dimid, _grpid # <<<<<<<<<<<<<<
@@ -25452,7 +27507,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, 2663, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_dimid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2704, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -25487,7 +27542,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, 2663, __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, 2704, __pyx_L1_error)
__pyx_v_self->_dimid = __pyx_t_1;
/* function exit code */
@@ -25520,7 +27575,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, 2663, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2704, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -25555,7 +27610,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, 2663, __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, 2704, __pyx_L1_error)
__pyx_v_self->_grpid = __pyx_t_1;
/* function exit code */
@@ -25569,7 +27624,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_grpid_2__set__(struct __pyx_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2664
+/* "netCDF4/_netCDF4.pyx":2705
* """
* cdef public int _dimid, _grpid
* cdef public _data_model, _name, _grp # <<<<<<<<<<<<<<
@@ -25838,7 +27893,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4_grp_4__del__(struct __pyx_ob
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2900
+/* "netCDF4/_netCDF4.pyx":2941
* """The number of stored elements."""
*
* def __init__(self, grp, name, datatype, dimensions=(), zlib=False, # <<<<<<<<<<<<<<
@@ -25848,7 +27903,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4_grp_4__del__(struct __pyx_ob
/* Python wrapper */
static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_8Variable___init__[] = "\n **`__init__(self, group, name, datatype, dimensions=(), zlib=False,\n complevel=4, shuffle=True, fletcher32=False, contiguous=False,\n chunksizes=None, endian='native',\n least_significant_digit=None,fill_value=None)`**\n\n `netCDF4.Variable` constructor.\n\n **`group`**: `netCDF4.Group` or `netCDF4.Dataset` instance to associate with variable.\n\n **`name`**: Name of the [...]
+static char __pyx_doc_7netCDF4_8_netCDF4_8Variable___init__[] = "\n **`__init__(self, group, name, datatype, dimensions=(), zlib=False,\n complevel=4, shuffle=True, fletcher32=False, contiguous=False,\n chunksizes=None, endian='native',\n least_significant_digit=None,fill_value=None)`**\n\n `netCDF4.Variable` constructor.\n\n **`group`**: `netCDF4.Group` or `netCDF4.Dataset` instance to associate with variable.\n\n **`name`**: Name of the [...]
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_7netCDF4_8_netCDF4_8Variable___init__;
#endif
@@ -25880,7 +27935,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":2901
+ /* "netCDF4/_netCDF4.pyx":2942
*
* def __init__(self, grp, name, datatype, dimensions=(), zlib=False,
* complevel=4, shuffle=True, fletcher32=False, contiguous=False, # <<<<<<<<<<<<<<
@@ -25891,7 +27946,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":2902
+ /* "netCDF4/_netCDF4.pyx":2943
* 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, # <<<<<<<<<<<<<<
@@ -25902,7 +27957,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":2903
+ /* "netCDF4/_netCDF4.pyx":2944
* complevel=4, shuffle=True, fletcher32=False, contiguous=False,
* chunksizes=None, endian='native', least_significant_digit=None,
* fill_value=None, chunk_cache=None, **kwargs): # <<<<<<<<<<<<<<
@@ -25940,12 +27995,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, 2900, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, 1); __PYX_ERR(0, 2941, __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, 2900, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, 2); __PYX_ERR(0, 2941, __pyx_L3_error)
}
case 3:
if (kw_args > 0) {
@@ -26004,7 +28059,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, 2900, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2941, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -26043,7 +28098,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, 2900, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2941, __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);
@@ -26052,7 +28107,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":2900
+ /* "netCDF4/_netCDF4.pyx":2941
* """The number of stored elements."""
*
* def __init__(self, grp, name, datatype, dimensions=(), zlib=False, # <<<<<<<<<<<<<<
@@ -26113,7 +28168,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":3002
+ /* "netCDF4/_netCDF4.pyx":3043
* cdef float preemptionp
* # flag to indicate that orthogonal indexing is supported
* self.__orthogonal_indexing__ = True # <<<<<<<<<<<<<<
@@ -26126,18 +28181,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":3004
+ /* "netCDF4/_netCDF4.pyx":3045
* 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, 3004, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_complevel); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3045, __pyx_L1_error)
__pyx_t_2 = ((!__pyx_t_1) != 0);
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3005
+ /* "netCDF4/_netCDF4.pyx":3046
* # if complevel is set to zero, set zlib to False.
* if not complevel:
* zlib = False # <<<<<<<<<<<<<<
@@ -26147,7 +28202,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":3004
+ /* "netCDF4/_netCDF4.pyx":3045
* self.__orthogonal_indexing__ = True
* # if complevel is set to zero, set zlib to False.
* if not complevel: # <<<<<<<<<<<<<<
@@ -26156,44 +28211,44 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3009
+ /* "netCDF4/_netCDF4.pyx":3050
* # 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, 3009, __pyx_L1_error)
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3009, __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, 3050, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3050, __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, 3009, __pyx_L1_error)
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3009, __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, 3050, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3050, __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, 3009, __pyx_L1_error)
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3009, __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, 3050, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3050, __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":3010
+ /* "netCDF4/_netCDF4.pyx":3051
* # 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, 3010, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3051, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_dimensions);
__Pyx_GIVEREF(__pyx_v_dimensions);
@@ -26201,7 +28256,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":3009
+ /* "netCDF4/_netCDF4.pyx":3050
* # 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: # <<<<<<<<<<<<<<
@@ -26210,46 +28265,46 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3011
+ /* "netCDF4/_netCDF4.pyx":3052
* 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, 3011, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3052, __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, 3011, __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, 3052, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_self->_grpid = __pyx_t_4;
- /* "netCDF4/_netCDF4.pyx":3014
+ /* "netCDF4/_netCDF4.pyx":3055
* # 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, 3014, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_keepweakref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3055, __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, 3014, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3055, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3015
+ /* "netCDF4/_netCDF4.pyx":3056
* # 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, 3015, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_weakref); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3056, __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, 3015, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_proxy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3056, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -26259,18 +28314,36 @@ 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, 3015, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_grp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3056, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3015, __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, 3015, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #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, 3056, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #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, 3056, __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, 3056, __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, 3056, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GIVEREF(__pyx_t_3);
@@ -26279,7 +28352,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":3014
+ /* "netCDF4/_netCDF4.pyx":3055
* # make a weakref to group to avoid circular ref (issue 218)
* # keep strong reference the default behaviour (issue 251)
* if grp.keepweakref: # <<<<<<<<<<<<<<
@@ -26289,7 +28362,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L8;
}
- /* "netCDF4/_netCDF4.pyx":3017
+ /* "netCDF4/_netCDF4.pyx":3058
* self._grp = weakref.proxy(grp)
* else:
* self._grp = grp # <<<<<<<<<<<<<<
@@ -26305,7 +28378,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
}
__pyx_L8:;
- /* "netCDF4/_netCDF4.pyx":3018
+ /* "netCDF4/_netCDF4.pyx":3059
* else:
* self._grp = grp
* user_type = isinstance(datatype, CompoundType) or \ # <<<<<<<<<<<<<<
@@ -26315,14 +28388,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, 3018, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3059, __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":3019
+ /* "netCDF4/_netCDF4.pyx":3060
* self._grp = grp
* user_type = isinstance(datatype, CompoundType) or \
* isinstance(datatype, VLType) or \ # <<<<<<<<<<<<<<
@@ -26332,14 +28405,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, 3019, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3060, __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":3020
+ /* "netCDF4/_netCDF4.pyx":3061
* user_type = isinstance(datatype, CompoundType) or \
* isinstance(datatype, VLType) or \
* isinstance(datatype, EnumType) or \ # <<<<<<<<<<<<<<
@@ -26349,21 +28422,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, 3020, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3061, __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":3021
+ /* "netCDF4/_netCDF4.pyx":3062
* 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, 3021, __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, 3062, __pyx_L1_error)
__Pyx_INCREF(__pyx_t_6);
__pyx_t_3 = __pyx_t_6;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -26371,47 +28444,47 @@ 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":3023
+ /* "netCDF4/_netCDF4.pyx":3064
* 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, 3023, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_user_type); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3064, __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, 3023, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3064, __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, 3023, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3064, __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, 3023, __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, 3064, __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, 3023, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3064, __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":3024
+ /* "netCDF4/_netCDF4.pyx":3065
* # 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, 3024, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3065, __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, 3024, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3065, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -26421,24 +28494,42 @@ 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, 3024, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_datatype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3065, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
} else {
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3024, __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, 3024, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ #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, 3065, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #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, 3065, __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, 3065, __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, 3065, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3023
+ /* "netCDF4/_netCDF4.pyx":3064
* datatype == str
* # convert to a real numpy datatype object if necessary.
* if not user_type and type(datatype) != numpy.dtype: # <<<<<<<<<<<<<<
@@ -26447,19 +28538,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3027
+ /* "netCDF4/_netCDF4.pyx":3068
* # 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, 3027, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3068, __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, 3027, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3068, __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, 3027, __pyx_L1_error)
+ __pyx_t_8 = PyObject_IsInstance(__pyx_v_datatype, __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3068, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_1 = (__pyx_t_8 != 0);
if (__pyx_t_1) {
@@ -26468,26 +28559,26 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L17_bool_binop_done;
}
- /* "netCDF4/_netCDF4.pyx":3028
+ /* "netCDF4/_netCDF4.pyx":3069
* # 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, 3028, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_kind); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3069, __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, 3028, __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, 3069, __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, 3028, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3069, __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, 3028, __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, 3069, __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, 3028, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3069, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (!__pyx_t_1) {
} else {
@@ -26496,21 +28587,21 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
}
__pyx_L19_next_or:;
- /* "netCDF4/_netCDF4.pyx":3029
+ /* "netCDF4/_netCDF4.pyx":3070
* 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, 3029, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_kind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3070, __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, 3029, __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, 3070, __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":3027
+ /* "netCDF4/_netCDF4.pyx":3068
* # convert numpy string dtype with length > 1
* # or any numpy unicode dtype into str
* if (isinstance(datatype, numpy.dtype) and # <<<<<<<<<<<<<<
@@ -26519,7 +28610,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3030
+ /* "netCDF4/_netCDF4.pyx":3071
* ((datatype.kind == 'S' and datatype.itemsize > 1) or
* datatype.kind == 'U')):
* datatype = str # <<<<<<<<<<<<<<
@@ -26529,7 +28620,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":3031
+ /* "netCDF4/_netCDF4.pyx":3072
* datatype.kind == 'U')):
* datatype = str
* user_type = True # <<<<<<<<<<<<<<
@@ -26539,7 +28630,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":3027
+ /* "netCDF4/_netCDF4.pyx":3068
* # convert numpy string dtype with length > 1
* # or any numpy unicode dtype into str
* if (isinstance(datatype, numpy.dtype) and # <<<<<<<<<<<<<<
@@ -26548,71 +28639,71 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3033
+ /* "netCDF4/_netCDF4.pyx":3074
* 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, 3033, __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, 3074, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_dtype_endian = __pyx_t_3;
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3034
+ /* "netCDF4/_netCDF4.pyx":3075
* # 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, 3034, __pyx_L1_error)
+ __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, 3075, __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":3035
+ /* "netCDF4/_netCDF4.pyx":3076
* 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__15, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3035, __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, 3076, __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":3036
+ /* "netCDF4/_netCDF4.pyx":3077
* 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__14, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3036, __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, 3077, __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":3037
+ /* "netCDF4/_netCDF4.pyx":3078
* 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, 3037, __pyx_L1_error)
+ __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, 3078, __pyx_L1_error)
if (__pyx_t_2) {
__Pyx_INCREF(Py_None);
__Pyx_DECREF_SET(__pyx_v_dtype_endian, Py_None);
}
- /* "netCDF4/_netCDF4.pyx":3038
+ /* "netCDF4/_netCDF4.pyx":3079
* if dtype_endian == '<': dtype_endian='little'
* if dtype_endian == '|': dtype_endian=None
* if dtype_endian is not None and dtype_endian != endian: # <<<<<<<<<<<<<<
@@ -26626,34 +28717,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, 3038, __pyx_L1_error)
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3038, __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, 3079, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3079, __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":3039
+ /* "netCDF4/_netCDF4.pyx":3080
* 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, 3039, __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, 3080, __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, 3039, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3080, __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, 3039, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3080, __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, 3039, __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, 3080, __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, 3039, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3080, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_2 = __pyx_t_8;
__pyx_L29_bool_binop_done:;
@@ -26661,7 +28752,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L28;
}
- /* "netCDF4/_netCDF4.pyx":3043
+ /* "netCDF4/_netCDF4.pyx":3084
* else:
* # endian keyword prevails, issue warning
* msg = 'endian-ness of dtype and endian kwarg do not match, using endian kwarg' # <<<<<<<<<<<<<<
@@ -26672,20 +28763,20 @@ 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":3045
+ /* "netCDF4/_netCDF4.pyx":3086
* 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, 3045, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3086, __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, 3045, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3086, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(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);
@@ -26695,25 +28786,43 @@ 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, 3045, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_msg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3086, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3045, __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, 3045, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 3086, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #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, 3086, __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, 3086, __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, 3086, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
__pyx_L28:;
- /* "netCDF4/_netCDF4.pyx":3038
+ /* "netCDF4/_netCDF4.pyx":3079
* if dtype_endian == '<': dtype_endian='little'
* if dtype_endian == '|': dtype_endian=None
* if dtype_endian is not None and dtype_endian != endian: # <<<<<<<<<<<<<<
@@ -26722,7 +28831,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3048
+ /* "netCDF4/_netCDF4.pyx":3089
* #endian = dtype_endian # dtype prevails
* # check validity of datatype.
* self._isprimitive = False # <<<<<<<<<<<<<<
@@ -26735,7 +28844,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":3049
+ /* "netCDF4/_netCDF4.pyx":3090
* # check validity of datatype.
* self._isprimitive = False
* self._iscompound = False # <<<<<<<<<<<<<<
@@ -26748,7 +28857,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":3050
+ /* "netCDF4/_netCDF4.pyx":3091
* self._isprimitive = False
* self._iscompound = False
* self._isvlen = False # <<<<<<<<<<<<<<
@@ -26761,7 +28870,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":3051
+ /* "netCDF4/_netCDF4.pyx":3092
* self._iscompound = False
* self._isvlen = False
* self._isenum = False # <<<<<<<<<<<<<<
@@ -26774,17 +28883,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":3052
+ /* "netCDF4/_netCDF4.pyx":3093
* 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, 3052, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_user_type); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3093, __pyx_L1_error)
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3053
+ /* "netCDF4/_netCDF4.pyx":3094
* self._isenum = False
* if user_type:
* if isinstance(datatype, CompoundType): # <<<<<<<<<<<<<<
@@ -26795,7 +28904,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":3054
+ /* "netCDF4/_netCDF4.pyx":3095
* if user_type:
* if isinstance(datatype, CompoundType):
* self._iscompound = True # <<<<<<<<<<<<<<
@@ -26808,7 +28917,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":3055
+ /* "netCDF4/_netCDF4.pyx":3096
* if isinstance(datatype, CompoundType):
* self._iscompound = True
* self._cmptype = datatype # <<<<<<<<<<<<<<
@@ -26821,7 +28930,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":3053
+ /* "netCDF4/_netCDF4.pyx":3094
* self._isenum = False
* if user_type:
* if isinstance(datatype, CompoundType): # <<<<<<<<<<<<<<
@@ -26830,7 +28939,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3056
+ /* "netCDF4/_netCDF4.pyx":3097
* self._iscompound = True
* self._cmptype = datatype
* if isinstance(datatype, VLType) or datatype==str: # <<<<<<<<<<<<<<
@@ -26844,14 +28953,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, 3056, __pyx_L1_error)
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3056, __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, 3097, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3097, __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":3057
+ /* "netCDF4/_netCDF4.pyx":3098
* self._cmptype = datatype
* if isinstance(datatype, VLType) or datatype==str:
* self._isvlen = True # <<<<<<<<<<<<<<
@@ -26864,7 +28973,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":3058
+ /* "netCDF4/_netCDF4.pyx":3099
* if isinstance(datatype, VLType) or datatype==str:
* self._isvlen = True
* self._vltype = datatype # <<<<<<<<<<<<<<
@@ -26877,7 +28986,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":3056
+ /* "netCDF4/_netCDF4.pyx":3097
* self._iscompound = True
* self._cmptype = datatype
* if isinstance(datatype, VLType) or datatype==str: # <<<<<<<<<<<<<<
@@ -26886,7 +28995,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3059
+ /* "netCDF4/_netCDF4.pyx":3100
* self._isvlen = True
* self._vltype = datatype
* if isinstance(datatype, EnumType): # <<<<<<<<<<<<<<
@@ -26897,7 +29006,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":3060
+ /* "netCDF4/_netCDF4.pyx":3101
* self._vltype = datatype
* if isinstance(datatype, EnumType):
* self._isenum = True # <<<<<<<<<<<<<<
@@ -26910,7 +29019,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":3061
+ /* "netCDF4/_netCDF4.pyx":3102
* if isinstance(datatype, EnumType):
* self._isenum = True
* self._enumtype = datatype # <<<<<<<<<<<<<<
@@ -26923,7 +29032,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":3059
+ /* "netCDF4/_netCDF4.pyx":3100
* self._isvlen = True
* self._vltype = datatype
* if isinstance(datatype, EnumType): # <<<<<<<<<<<<<<
@@ -26932,45 +29041,45 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3062
+ /* "netCDF4/_netCDF4.pyx":3103
* 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, 3062, __pyx_L1_error)
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3062, __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, 3103, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3103, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3063
+ /* "netCDF4/_netCDF4.pyx":3104
* 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, 3063, __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, 3104, __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, 3063, __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, 3104, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3064
+ /* "netCDF4/_netCDF4.pyx":3105
* 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, 3064, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3105, __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, 3064, __pyx_L1_error)
+ __PYX_ERR(0, 3105, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3063
+ /* "netCDF4/_netCDF4.pyx":3104
* self._enumtype = datatype
* if datatype==str:
* if grp.data_model != 'NETCDF4': # <<<<<<<<<<<<<<
@@ -26979,14 +29088,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3069
+ /* "netCDF4/_netCDF4.pyx":3110
* '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, 3069, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3110, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_self->_grp);
__Pyx_GIVEREF(__pyx_v_self->_grp);
@@ -26997,13 +29106,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, 3069, __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, 3110, __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":3070
+ /* "netCDF4/_netCDF4.pyx":3111
* 'character arrays with an additional dimension.')
* datatype = VLType(self._grp, str, None)
* self._vltype = datatype # <<<<<<<<<<<<<<
@@ -27016,7 +29125,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":3062
+ /* "netCDF4/_netCDF4.pyx":3103
* self._isenum = True
* self._enumtype = datatype
* if datatype==str: # <<<<<<<<<<<<<<
@@ -27025,27 +29134,27 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3071
+ /* "netCDF4/_netCDF4.pyx":3112
* 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, 3071, __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, 3112, __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, 3071, __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, 3112, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_xtype = __pyx_t_9;
- /* "netCDF4/_netCDF4.pyx":3073
+ /* "netCDF4/_netCDF4.pyx":3114
* 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, 3073, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3114, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__Pyx_GOTREF(__pyx_v_self->dtype);
@@ -27053,7 +29162,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":3052
+ /* "netCDF4/_netCDF4.pyx":3093
* self._isvlen = False
* self._isenum = False
* if user_type: # <<<<<<<<<<<<<<
@@ -27063,27 +29172,27 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L31;
}
- /* "netCDF4/_netCDF4.pyx":3074
+ /* "netCDF4/_netCDF4.pyx":3115
* # 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, 3074, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3115, __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, 3074, __pyx_L1_error)
+ __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, 3115, __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, 3074, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3115, __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, 3074, __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, 3115, __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":3075
+ /* "netCDF4/_netCDF4.pyx":3116
* self.dtype = datatype.dtype
* elif datatype.str[1:] in _supportedtypes:
* self._isprimitive = True # <<<<<<<<<<<<<<
@@ -27096,29 +29205,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":3078
+ /* "netCDF4/_netCDF4.pyx":3119
* # 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, 3078, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3119, __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, 3078, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3119, __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, 3078, __pyx_L1_error)
+ __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, 3119, __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, 3078, __pyx_L1_error)
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3119, __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, 3078, __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, 3119, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_xtype = __pyx_t_9;
- /* "netCDF4/_netCDF4.pyx":3080
+ /* "netCDF4/_netCDF4.pyx":3121
* xtype = _nptonctype[datatype.str[1:]]
* # dtype variable attribute is a numpy datatype object.
* self.dtype = datatype # <<<<<<<<<<<<<<
@@ -27131,7 +29240,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":3074
+ /* "netCDF4/_netCDF4.pyx":3115
* # dtype variable attribute is a numpy datatype object.
* self.dtype = datatype.dtype
* elif datatype.str[1:] in _supportedtypes: # <<<<<<<<<<<<<<
@@ -27141,7 +29250,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L31;
}
- /* "netCDF4/_netCDF4.pyx":3082
+ /* "netCDF4/_netCDF4.pyx":3123
* self.dtype = datatype
* else:
* raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype)) # <<<<<<<<<<<<<<
@@ -27149,9 +29258,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, 3082, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3123, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3082, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3123, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
@@ -27159,48 +29268,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, 3082, __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, 3123, __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, 3082, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3123, __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, 3082, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3123, __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, 3082, __pyx_L1_error)
+ __PYX_ERR(0, 3123, __pyx_L1_error)
}
__pyx_L31:;
- /* "netCDF4/_netCDF4.pyx":3083
+ /* "netCDF4/_netCDF4.pyx":3124
* 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, 3083, __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, 3124, __pyx_L1_error)
__pyx_t_1 = (__pyx_t_8 != 0);
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3084
+ /* "netCDF4/_netCDF4.pyx":3125
* 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, 3084, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3125, __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, 3084, __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, 3125, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_self->_varid = __pyx_t_4;
- /* "netCDF4/_netCDF4.pyx":3083
+ /* "netCDF4/_netCDF4.pyx":3124
* else:
* raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype))
* if 'id' in kwargs: # <<<<<<<<<<<<<<
@@ -27210,7 +29319,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L39;
}
- /* "netCDF4/_netCDF4.pyx":3086
+ /* "netCDF4/_netCDF4.pyx":3127
* self._varid = kwargs['id']
* else:
* bytestr = _strencode(name) # <<<<<<<<<<<<<<
@@ -27218,32 +29327,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, 3086, __pyx_L1_error)
+ __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3127, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_bytestr = __pyx_t_3;
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3087
+ /* "netCDF4/_netCDF4.pyx":3128
* 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, 3087, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 3128, __pyx_L1_error)
__pyx_v_varname = __pyx_t_10;
- /* "netCDF4/_netCDF4.pyx":3088
+ /* "netCDF4/_netCDF4.pyx":3129
* 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, 3088, __pyx_L1_error)
+ __pyx_t_11 = PyObject_Length(__pyx_v_dimensions); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3129, __pyx_L1_error)
__pyx_v_ndims = __pyx_t_11;
- /* "netCDF4/_netCDF4.pyx":3090
+ /* "netCDF4/_netCDF4.pyx":3131
* ndims = len(dimensions)
* # find dimension ids.
* if ndims: # <<<<<<<<<<<<<<
@@ -27253,19 +29362,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":3091
+ /* "netCDF4/_netCDF4.pyx":3132
* # find dimension ids.
* if ndims:
* dims = [] # <<<<<<<<<<<<<<
* dimids = <int *>malloc(sizeof(int) * ndims)
* for n from 0 <= n < ndims:
*/
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3091, __pyx_L1_error)
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3132, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_dims = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3092
+ /* "netCDF4/_netCDF4.pyx":3133
* if ndims:
* dims = []
* dimids = <int *>malloc(sizeof(int) * ndims) # <<<<<<<<<<<<<<
@@ -27274,7 +29383,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":3093
+ /* "netCDF4/_netCDF4.pyx":3134
* dims = []
* dimids = <int *>malloc(sizeof(int) * ndims)
* for n from 0 <= n < ndims: # <<<<<<<<<<<<<<
@@ -27284,58 +29393,76 @@ 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":3094
+ /* "netCDF4/_netCDF4.pyx":3135
* dimids = <int *>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, 3094, __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, 3135, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3097
+ /* "netCDF4/_netCDF4.pyx":3138
* # 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, 3097, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3138, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_5 = NULL;
- __pyx_t_11 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_12 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_11 = 1;
+ __pyx_t_12 = 1;
}
}
- __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3097, __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;
+ #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, 3138, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #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, 3138, __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, 3138, __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_INCREF(__pyx_v_grp);
+ __Pyx_GIVEREF(__pyx_v_grp);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_12, __pyx_v_grp);
+ __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, 3138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
- __Pyx_INCREF(__pyx_v_grp);
- __Pyx_GIVEREF(__pyx_v_grp);
- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_11, __pyx_v_grp);
- __Pyx_INCREF(__pyx_v_dimname);
- __Pyx_GIVEREF(__pyx_v_dimname);
- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_11, __pyx_v_dimname);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3097, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3098
+ /* "netCDF4/_netCDF4.pyx":3139
* # found there, look in parent (and it's parent, etc, back to root).
* dim = _find_dim(grp, dimname)
* if dim is None: # <<<<<<<<<<<<<<
@@ -27346,16 +29473,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":3099
+ /* "netCDF4/_netCDF4.pyx":3140
* 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, 3099, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3140, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3140, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_dimname);
__Pyx_GIVEREF(__pyx_v_dimname);
@@ -27363,22 +29490,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, 3099, __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, 3140, __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, 3099, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3140, __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, 3099, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3140, __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, 3099, __pyx_L1_error)
+ __PYX_ERR(0, 3140, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3098
+ /* "netCDF4/_netCDF4.pyx":3139
* # found there, look in parent (and it's parent, etc, back to root).
* dim = _find_dim(grp, dimname)
* if dim is None: # <<<<<<<<<<<<<<
@@ -27387,30 +29514,30 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3100
+ /* "netCDF4/_netCDF4.pyx":3141
* 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, 3100, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_dimid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3141, __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, 3100, __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, 3141, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
(__pyx_v_dimids[__pyx_v_n]) = __pyx_t_12;
- /* "netCDF4/_netCDF4.pyx":3101
+ /* "netCDF4/_netCDF4.pyx":3142
* 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, 3101, __pyx_L1_error)
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_dims, __pyx_v_dim); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 3142, __pyx_L1_error)
}
- /* "netCDF4/_netCDF4.pyx":3090
+ /* "netCDF4/_netCDF4.pyx":3131
* ndims = len(dimensions)
* # find dimension ids.
* if ndims: # <<<<<<<<<<<<<<
@@ -27419,22 +29546,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3105
+ /* "netCDF4/_netCDF4.pyx":3146
* # 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, 3105, __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, 3146, __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, 3105, __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, 3146, __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, 3105, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3146, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(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);
@@ -27444,17 +29571,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, 3105, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3146, __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, 3105, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3146, __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":3107
+ /* "netCDF4/_netCDF4.pyx":3148
* if grp.data_model != 'NETCDF4': grp._redef()
* # define variable.
* if ndims: # <<<<<<<<<<<<<<
@@ -27464,7 +29591,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":3108
+ /* "netCDF4/_netCDF4.pyx":3149
* # define variable.
* if ndims:
* ierr = nc_def_var(self._grpid, varname, xtype, ndims, # <<<<<<<<<<<<<<
@@ -27473,7 +29600,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":3110
+ /* "netCDF4/_netCDF4.pyx":3151
* ierr = nc_def_var(self._grpid, varname, xtype, ndims,
* dimids, &self._varid)
* free(dimids) # <<<<<<<<<<<<<<
@@ -27482,7 +29609,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
free(__pyx_v_dimids);
- /* "netCDF4/_netCDF4.pyx":3107
+ /* "netCDF4/_netCDF4.pyx":3148
* if grp.data_model != 'NETCDF4': grp._redef()
* # define variable.
* if ndims: # <<<<<<<<<<<<<<
@@ -27492,7 +29619,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L45;
}
- /* "netCDF4/_netCDF4.pyx":3112
+ /* "netCDF4/_netCDF4.pyx":3153
* free(dimids)
* else: # a scalar variable.
* ierr = nc_def_var(self._grpid, varname, xtype, ndims, # <<<<<<<<<<<<<<
@@ -27501,7 +29628,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
/*else*/ {
- /* "netCDF4/_netCDF4.pyx":3113
+ /* "netCDF4/_netCDF4.pyx":3154
* else: # a scalar variable.
* ierr = nc_def_var(self._grpid, varname, xtype, ndims,
* NULL, &self._varid) # <<<<<<<<<<<<<<
@@ -27512,22 +29639,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
}
__pyx_L45:;
- /* "netCDF4/_netCDF4.pyx":3118
+ /* "netCDF4/_netCDF4.pyx":3159
* # 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, 3118, __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, 3159, __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, 3118, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3159, __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, 3118, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__41, 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_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3118, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3159, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_1) {
} else {
@@ -27540,7 +29667,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":3119
+ /* "netCDF4/_netCDF4.pyx":3160
* # open.
* if grp.data_model.startswith('NETCDF4') and chunk_cache is not None:
* ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep, # <<<<<<<<<<<<<<
@@ -27549,7 +29676,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":3121
+ /* "netCDF4/_netCDF4.pyx":3162
* ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
* &nelemsp, &preemptionp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -27559,7 +29686,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":3122
+ /* "netCDF4/_netCDF4.pyx":3163
* &nelemsp, &preemptionp)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -27567,22 +29694,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, 3122, __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, 3163, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3122, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3163, __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, 3122, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3163, __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, 3122, __pyx_L1_error)
+ __PYX_ERR(0, 3163, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3121
+ /* "netCDF4/_netCDF4.pyx":3162
* ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
* &nelemsp, &preemptionp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -27591,17 +29718,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3124
+ /* "netCDF4/_netCDF4.pyx":3165
* raise RuntimeError((<char *>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, 3124, __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, 3165, __pyx_L1_error)
__pyx_v_sizep = __pyx_t_14;
- /* "netCDF4/_netCDF4.pyx":3125
+ /* "netCDF4/_netCDF4.pyx":3166
* # reset chunk cache size, leave other parameters unchanged.
* sizep = chunk_cache
* ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep, # <<<<<<<<<<<<<<
@@ -27610,7 +29737,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":3127
+ /* "netCDF4/_netCDF4.pyx":3168
* ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,
* nelemsp, preemptionp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -27620,7 +29747,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":3128
+ /* "netCDF4/_netCDF4.pyx":3169
* nelemsp, preemptionp)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -27628,22 +29755,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, 3128, __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, 3169, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3128, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3169, __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, 3128, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3169, __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, 3128, __pyx_L1_error)
+ __PYX_ERR(0, 3169, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3127
+ /* "netCDF4/_netCDF4.pyx":3168
* ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,
* nelemsp, preemptionp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -27652,7 +29779,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3118
+ /* "netCDF4/_netCDF4.pyx":3159
* # 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: # <<<<<<<<<<<<<<
@@ -27661,7 +29788,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3129
+ /* "netCDF4/_netCDF4.pyx":3170
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -27671,22 +29798,22 @@ 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":3130
+ /* "netCDF4/_netCDF4.pyx":3171
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if ierr != NC_NOERR:
* if grp.data_model != 'NETCDF4': grp._enddef() # <<<<<<<<<<<<<<
* raise RuntimeError((<char *>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, 3130, __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, 3171, __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, 3130, __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, 3171, __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, 3130, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3171, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(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);
@@ -27696,17 +29823,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, 3130, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3171, __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, 3130, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3171, __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":3131
+ /* "netCDF4/_netCDF4.pyx":3172
* if ierr != NC_NOERR:
* if grp.data_model != 'NETCDF4': grp._enddef()
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -27714,22 +29841,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, 3131, __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, 3172, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3131, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3172, __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, 3131, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3172, __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, 3131, __pyx_L1_error)
+ __PYX_ERR(0, 3172, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3129
+ /* "netCDF4/_netCDF4.pyx":3170
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -27738,36 +29865,36 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3138
+ /* "netCDF4/_netCDF4.pyx":3179
* # 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, 3138, __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, 3179, __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, 3138, __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, 3179, __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, 3138, __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, 3179, __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":3140
+ /* "netCDF4/_netCDF4.pyx":3181
* 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, 3140, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_zlib); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3181, __pyx_L1_error)
if (__pyx_t_8) {
} else {
__pyx_t_2 = __pyx_t_8;
@@ -27778,27 +29905,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":3141
+ /* "netCDF4/_netCDF4.pyx":3182
* # 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, 3141, __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, 3182, __pyx_L1_error)
__pyx_v_ideflate_level = __pyx_t_4;
- /* "netCDF4/_netCDF4.pyx":3142
+ /* "netCDF4/_netCDF4.pyx":3183
* 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, 3142, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_shuffle); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3183, __pyx_L1_error)
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3143
+ /* "netCDF4/_netCDF4.pyx":3184
* ideflate_level = complevel
* if shuffle:
* ierr = nc_def_var_deflate(self._grpid, self._varid, 1, 1, ideflate_level) # <<<<<<<<<<<<<<
@@ -27807,7 +29934,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":3142
+ /* "netCDF4/_netCDF4.pyx":3183
* if zlib and ndims: # don't bother for scalar variable
* ideflate_level = complevel
* if shuffle: # <<<<<<<<<<<<<<
@@ -27817,7 +29944,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L59;
}
- /* "netCDF4/_netCDF4.pyx":3145
+ /* "netCDF4/_netCDF4.pyx":3186
* 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) # <<<<<<<<<<<<<<
@@ -27829,7 +29956,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
}
__pyx_L59:;
- /* "netCDF4/_netCDF4.pyx":3146
+ /* "netCDF4/_netCDF4.pyx":3187
* else:
* ierr = nc_def_var_deflate(self._grpid, self._varid, 0, 1, ideflate_level)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -27839,22 +29966,22 @@ 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":3147
+ /* "netCDF4/_netCDF4.pyx":3188
* 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((<char *>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, 3147, __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, 3188, __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, 3147, __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, 3188, __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, 3147, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3188, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(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);
@@ -27864,17 +29991,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, 3147, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3188, __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, 3147, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3188, __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":3148
+ /* "netCDF4/_netCDF4.pyx":3189
* if ierr != NC_NOERR:
* if grp.data_model != 'NETCDF4': grp._enddef()
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -27882,22 +30009,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, 3148, __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, 3189, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3148, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3189, __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, 3148, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3189, __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, 3148, __pyx_L1_error)
+ __PYX_ERR(0, 3189, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3146
+ /* "netCDF4/_netCDF4.pyx":3187
* else:
* ierr = nc_def_var_deflate(self._grpid, self._varid, 0, 1, ideflate_level)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -27906,7 +30033,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3140
+ /* "netCDF4/_netCDF4.pyx":3181
* if grp.data_model in ['NETCDF4','NETCDF4_CLASSIC']:
* # set zlib and shuffle parameters.
* if zlib and ndims: # don't bother for scalar variable # <<<<<<<<<<<<<<
@@ -27915,14 +30042,14 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3150
+ /* "netCDF4/_netCDF4.pyx":3191
* raise RuntimeError((<char *>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, 3150, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_fletcher32); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3191, __pyx_L1_error)
if (__pyx_t_8) {
} else {
__pyx_t_2 = __pyx_t_8;
@@ -27933,7 +30060,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":3151
+ /* "netCDF4/_netCDF4.pyx":3192
* # set checksum.
* if fletcher32 and ndims: # don't bother for scalar variable
* ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1) # <<<<<<<<<<<<<<
@@ -27942,7 +30069,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":3152
+ /* "netCDF4/_netCDF4.pyx":3193
* if fletcher32 and ndims: # don't bother for scalar variable
* ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -27952,22 +30079,22 @@ 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":3153
+ /* "netCDF4/_netCDF4.pyx":3194
* ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1)
* if ierr != NC_NOERR:
* if grp.data_model != 'NETCDF4': grp._enddef() # <<<<<<<<<<<<<<
* raise RuntimeError((<char *>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, 3153, __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, 3194, __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, 3153, __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, 3194, __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, 3153, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3194, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(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);
@@ -27977,17 +30104,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, 3153, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3194, __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, 3153, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3194, __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":3154
+ /* "netCDF4/_netCDF4.pyx":3195
* if ierr != NC_NOERR:
* if grp.data_model != 'NETCDF4': grp._enddef()
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -27995,22 +30122,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, 3154, __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, 3195, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3154, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3195, __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, 3154, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, 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_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 3154, __pyx_L1_error)
+ __PYX_ERR(0, 3195, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3152
+ /* "netCDF4/_netCDF4.pyx":3193
* if fletcher32 and ndims: # don't bother for scalar variable
* ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -28019,7 +30146,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3150
+ /* "netCDF4/_netCDF4.pyx":3191
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # set checksum.
* if fletcher32 and ndims: # don't bother for scalar variable # <<<<<<<<<<<<<<
@@ -28028,7 +30155,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3156
+ /* "netCDF4/_netCDF4.pyx":3197
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # set chunking stuff.
* if ndims: # don't bother for scalar variable. # <<<<<<<<<<<<<<
@@ -28038,17 +30165,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":3157
+ /* "netCDF4/_netCDF4.pyx":3198
* # 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, 3157, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_contiguous); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3198, __pyx_L1_error)
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3158
+ /* "netCDF4/_netCDF4.pyx":3199
* if ndims: # don't bother for scalar variable.
* if contiguous:
* icontiguous = NC_CONTIGUOUS # <<<<<<<<<<<<<<
@@ -28057,7 +30184,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
__pyx_v_icontiguous = NC_CONTIGUOUS;
- /* "netCDF4/_netCDF4.pyx":3159
+ /* "netCDF4/_netCDF4.pyx":3200
* if contiguous:
* icontiguous = NC_CONTIGUOUS
* if chunksizes is not None: # <<<<<<<<<<<<<<
@@ -28068,20 +30195,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":3160
+ /* "netCDF4/_netCDF4.pyx":3201
* 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, 3160, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3201, __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, 3160, __pyx_L1_error)
+ __PYX_ERR(0, 3201, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3159
+ /* "netCDF4/_netCDF4.pyx":3200
* if contiguous:
* icontiguous = NC_CONTIGUOUS
* if chunksizes is not None: # <<<<<<<<<<<<<<
@@ -28090,7 +30217,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3157
+ /* "netCDF4/_netCDF4.pyx":3198
* # set chunking stuff.
* if ndims: # don't bother for scalar variable.
* if contiguous: # <<<<<<<<<<<<<<
@@ -28100,7 +30227,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L68;
}
- /* "netCDF4/_netCDF4.pyx":3162
+ /* "netCDF4/_netCDF4.pyx":3203
* raise ValueError('cannot specify chunksizes for a contiguous dataset')
* else:
* icontiguous = NC_CHUNKED # <<<<<<<<<<<<<<
@@ -28112,7 +30239,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
}
__pyx_L68:;
- /* "netCDF4/_netCDF4.pyx":3163
+ /* "netCDF4/_netCDF4.pyx":3204
* else:
* icontiguous = NC_CHUNKED
* if chunksizes is None: # <<<<<<<<<<<<<<
@@ -28123,7 +30250,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":3164
+ /* "netCDF4/_netCDF4.pyx":3205
* icontiguous = NC_CHUNKED
* if chunksizes is None:
* chunksizesp = NULL # <<<<<<<<<<<<<<
@@ -28132,7 +30259,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
__pyx_v_chunksizesp = NULL;
- /* "netCDF4/_netCDF4.pyx":3163
+ /* "netCDF4/_netCDF4.pyx":3204
* else:
* icontiguous = NC_CHUNKED
* if chunksizes is None: # <<<<<<<<<<<<<<
@@ -28142,7 +30269,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L70;
}
- /* "netCDF4/_netCDF4.pyx":3166
+ /* "netCDF4/_netCDF4.pyx":3207
* chunksizesp = NULL
* else:
* if len(chunksizes) != len(dimensions): # <<<<<<<<<<<<<<
@@ -28150,27 +30277,27 @@ 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, 3166, __pyx_L1_error)
- __pyx_t_15 = PyObject_Length(__pyx_v_dimensions); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 3166, __pyx_L1_error)
+ __pyx_t_11 = PyObject_Length(__pyx_v_chunksizes); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3207, __pyx_L1_error)
+ __pyx_t_15 = PyObject_Length(__pyx_v_dimensions); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 3207, __pyx_L1_error)
__pyx_t_2 = ((__pyx_t_11 != __pyx_t_15) != 0);
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3167
+ /* "netCDF4/_netCDF4.pyx":3208
* 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 = <size_t *>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, 3167, __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, 3208, __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, 3167, __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, 3208, __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, 3167, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3208, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(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);
@@ -28180,30 +30307,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, 3167, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3208, __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, 3167, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
- /* "netCDF4/_netCDF4.pyx":3168
+ /* "netCDF4/_netCDF4.pyx":3209
* 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 = <size_t *>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, 3168, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3209, __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, 3168, __pyx_L1_error)
+ __PYX_ERR(0, 3209, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3166
+ /* "netCDF4/_netCDF4.pyx":3207
* chunksizesp = NULL
* else:
* if len(chunksizes) != len(dimensions): # <<<<<<<<<<<<<<
@@ -28212,7 +30339,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3169
+ /* "netCDF4/_netCDF4.pyx":3210
* if grp.data_model != 'NETCDF4': grp._enddef()
* raise ValueError('chunksizes must be a sequence with the same length as dimensions')
* chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<<
@@ -28221,7 +30348,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":3170
+ /* "netCDF4/_netCDF4.pyx":3211
* raise ValueError('chunksizes must be a sequence with the same length as dimensions')
* chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
* for n from 0 <= n < ndims: # <<<<<<<<<<<<<<
@@ -28231,21 +30358,21 @@ 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":3171
+ /* "netCDF4/_netCDF4.pyx":3212
* chunksizesp = <size_t *>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, 3171, __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, 3171, __pyx_L1_error)
+ if (unlikely(!__pyx_v_dims)) { __Pyx_RaiseUnboundLocalError("dims"); __PYX_ERR(0, 3212, __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, 3212, __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, 3171, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3212, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -28255,14 +30382,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, 3171, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3212, __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, 3171, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3212, __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, 3171, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3212, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_1 = ((!__pyx_t_8) != 0);
if (__pyx_t_1) {
@@ -28271,30 +30398,30 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L76_bool_binop_done;
}
- /* "netCDF4/_netCDF4.pyx":3172
+ /* "netCDF4/_netCDF4.pyx":3213
* 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, 3172, __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, 3213, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- if (unlikely(!__pyx_v_dims)) { __Pyx_RaiseUnboundLocalError("dims"); __PYX_ERR(0, 3172, __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, 3172, __pyx_L1_error)
+ if (unlikely(!__pyx_v_dims)) { __Pyx_RaiseUnboundLocalError("dims"); __PYX_ERR(0, 3213, __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, 3213, __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, 3172, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3213, __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, 3172, __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, 3213, __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, 3172, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3213, __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":3171
+ /* "netCDF4/_netCDF4.pyx":3212
* chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
* for n from 0 <= n < ndims:
* if not dims[n].isunlimited() and \ # <<<<<<<<<<<<<<
@@ -28303,7 +30430,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3173
+ /* "netCDF4/_netCDF4.pyx":3214
* if not dims[n].isunlimited() and \
* chunksizes[n] > dims[n].size:
* msg = 'chunksize cannot exceed dimension size' # <<<<<<<<<<<<<<
@@ -28313,26 +30440,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":3174
+ /* "netCDF4/_netCDF4.pyx":3215
* 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, 3174, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3215, __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, 3174, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3215, __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, 3174, __pyx_L1_error)
+ __PYX_ERR(0, 3215, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3171
+ /* "netCDF4/_netCDF4.pyx":3212
* chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
* for n from 0 <= n < ndims:
* if not dims[n].isunlimited() and \ # <<<<<<<<<<<<<<
@@ -28341,23 +30468,23 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3175
+ /* "netCDF4/_netCDF4.pyx":3216
* 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, 3175, __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, 3216, __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, 3175, __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, 3216, __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":3176
+ /* "netCDF4/_netCDF4.pyx":3217
* raise ValueError(msg)
* chunksizesp[n] = chunksizes[n]
* if chunksizes is not None or contiguous: # <<<<<<<<<<<<<<
@@ -28371,12 +30498,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, 3176, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_contiguous); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3217, __pyx_L1_error)
__pyx_t_2 = __pyx_t_8;
__pyx_L79_bool_binop_done:;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3177
+ /* "netCDF4/_netCDF4.pyx":3218
* chunksizesp[n] = chunksizes[n]
* if chunksizes is not None or contiguous:
* ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp) # <<<<<<<<<<<<<<
@@ -28385,7 +30512,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":3178
+ /* "netCDF4/_netCDF4.pyx":3219
* if chunksizes is not None or contiguous:
* ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp)
* free(chunksizesp) # <<<<<<<<<<<<<<
@@ -28394,7 +30521,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
free(__pyx_v_chunksizesp);
- /* "netCDF4/_netCDF4.pyx":3179
+ /* "netCDF4/_netCDF4.pyx":3220
* ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp)
* free(chunksizesp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -28404,22 +30531,22 @@ 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":3180
+ /* "netCDF4/_netCDF4.pyx":3221
* free(chunksizesp)
* if ierr != NC_NOERR:
* if grp.data_model != 'NETCDF4': grp._enddef() # <<<<<<<<<<<<<<
* raise RuntimeError((<char *>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, 3180, __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, 3221, __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, 3180, __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, 3221, __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, 3180, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3221, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -28429,17 +30556,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, 3180, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3221, __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, 3180, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3221, __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":3181
+ /* "netCDF4/_netCDF4.pyx":3222
* if ierr != NC_NOERR:
* if grp.data_model != 'NETCDF4': grp._enddef()
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -28447,22 +30574,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, 3181, __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, 3222, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3181, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3222, __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, 3181, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3222, __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, 3181, __pyx_L1_error)
+ __PYX_ERR(0, 3222, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3179
+ /* "netCDF4/_netCDF4.pyx":3220
* ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp)
* free(chunksizesp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -28471,7 +30598,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3176
+ /* "netCDF4/_netCDF4.pyx":3217
* raise ValueError(msg)
* chunksizesp[n] = chunksizes[n]
* if chunksizes is not None or contiguous: # <<<<<<<<<<<<<<
@@ -28480,7 +30607,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3156
+ /* "netCDF4/_netCDF4.pyx":3197
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # set chunking stuff.
* if ndims: # don't bother for scalar variable. # <<<<<<<<<<<<<<
@@ -28489,17 +30616,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3183
+ /* "netCDF4/_netCDF4.pyx":3224
* raise RuntimeError((<char *>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, 3183, __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, 3224, __pyx_L1_error)
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3184
+ /* "netCDF4/_netCDF4.pyx":3225
* # set endian-ness of variable
* if endian == 'little':
* ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_LITTLE) # <<<<<<<<<<<<<<
@@ -28508,7 +30635,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":3183
+ /* "netCDF4/_netCDF4.pyx":3224
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # set endian-ness of variable
* if endian == 'little': # <<<<<<<<<<<<<<
@@ -28518,17 +30645,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L83;
}
- /* "netCDF4/_netCDF4.pyx":3185
+ /* "netCDF4/_netCDF4.pyx":3226
* 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, 3185, __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, 3226, __pyx_L1_error)
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3186
+ /* "netCDF4/_netCDF4.pyx":3227
* 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) # <<<<<<<<<<<<<<
@@ -28537,7 +30664,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":3185
+ /* "netCDF4/_netCDF4.pyx":3226
* if endian == 'little':
* ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_LITTLE)
* elif endian == 'big': # <<<<<<<<<<<<<<
@@ -28547,19 +30674,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L83;
}
- /* "netCDF4/_netCDF4.pyx":3187
+ /* "netCDF4/_netCDF4.pyx":3228
* 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, 3187, __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, 3228, __pyx_L1_error)
if (__pyx_t_2) {
goto __pyx_L83;
}
- /* "netCDF4/_netCDF4.pyx":3190
+ /* "netCDF4/_netCDF4.pyx":3231
* pass # this is the default format.
* else:
* raise ValueError("'endian' keyword argument must be 'little','big' or 'native', got '%s'" % endian) # <<<<<<<<<<<<<<
@@ -28567,23 +30694,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, 3190, __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, 3231, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3190, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3231, __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, 3190, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3231, __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, 3190, __pyx_L1_error)
+ __PYX_ERR(0, 3231, __pyx_L1_error)
}
__pyx_L83:;
- /* "netCDF4/_netCDF4.pyx":3191
+ /* "netCDF4/_netCDF4.pyx":3232
* else:
* raise ValueError("'endian' keyword argument must be 'little','big' or 'native', got '%s'" % endian)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -28593,22 +30720,22 @@ 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":3192
+ /* "netCDF4/_netCDF4.pyx":3233
* 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((<char *>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, 3192, __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, 3233, __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, 3192, __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, 3233, __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, 3192, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3233, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -28618,17 +30745,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, 3192, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3233, __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, 3192, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3233, __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":3193
+ /* "netCDF4/_netCDF4.pyx":3234
* if ierr != NC_NOERR:
* if grp.data_model != 'NETCDF4': grp._enddef()
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -28636,22 +30763,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, 3193, __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, 3234, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3193, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3234, __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, 3193, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3234, __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, 3193, __pyx_L1_error)
+ __PYX_ERR(0, 3234, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3191
+ /* "netCDF4/_netCDF4.pyx":3232
* else:
* raise ValueError("'endian' keyword argument must be 'little','big' or 'native', got '%s'" % endian)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -28660,7 +30787,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3138
+ /* "netCDF4/_netCDF4.pyx":3179
* # and fletcher32 are silently ignored. Only
* # endian='native' allowed for NETCDF3.
* if grp.data_model in ['NETCDF4','NETCDF4_CLASSIC']: # <<<<<<<<<<<<<<
@@ -28670,7 +30797,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L53;
}
- /* "netCDF4/_netCDF4.pyx":3195
+ /* "netCDF4/_netCDF4.pyx":3236
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* else:
* if endian != 'native': # <<<<<<<<<<<<<<
@@ -28678,10 +30805,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, 3195, __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, 3236, __pyx_L1_error)
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3196
+ /* "netCDF4/_netCDF4.pyx":3237
* else:
* if endian != 'native':
* msg="only endian='native' allowed for NETCDF3 files" # <<<<<<<<<<<<<<
@@ -28691,26 +30818,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":3197
+ /* "netCDF4/_netCDF4.pyx":3238
* 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, 3197, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3238, __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, 3197, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3238, __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, 3197, __pyx_L1_error)
+ __PYX_ERR(0, 3238, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3195
+ /* "netCDF4/_netCDF4.pyx":3236
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* else:
* if endian != 'native': # <<<<<<<<<<<<<<
@@ -28721,7 +30848,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
}
__pyx_L53:;
- /* "netCDF4/_netCDF4.pyx":3201
+ /* "netCDF4/_netCDF4.pyx":3242
* # 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: # <<<<<<<<<<<<<<
@@ -28732,14 +30859,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":3202
+ /* "netCDF4/_netCDF4.pyx":3243
* # 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, 3202, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fill_value); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3243, __pyx_L1_error)
__pyx_t_1 = ((!__pyx_t_2) != 0);
if (__pyx_t_1) {
} else {
@@ -28748,25 +30875,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, 3202, __pyx_L1_error)
+ __pyx_t_1 = PyObject_IsInstance(__pyx_v_fill_value, __pyx_t_7); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 3243, __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":3204
+ /* "netCDF4/_netCDF4.pyx":3245
* 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, 3204, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3245, __pyx_L1_error)
__pyx_t_2 = ((!__pyx_t_8) != 0);
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3207
+ /* "netCDF4/_netCDF4.pyx":3248
* # no fill values for VLEN and compound variables
* # anyway.
* ierr = 0 # <<<<<<<<<<<<<<
@@ -28775,7 +30902,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
__pyx_v_ierr = 0;
- /* "netCDF4/_netCDF4.pyx":3204
+ /* "netCDF4/_netCDF4.pyx":3245
* if not fill_value and isinstance(fill_value,bool):
* # no filling for this variable if fill_value==False.
* if not self._isprimitive: # <<<<<<<<<<<<<<
@@ -28785,7 +30912,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L91;
}
- /* "netCDF4/_netCDF4.pyx":3209
+ /* "netCDF4/_netCDF4.pyx":3250
* ierr = 0
* else:
* ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL) # <<<<<<<<<<<<<<
@@ -28797,7 +30924,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
}
__pyx_L91:;
- /* "netCDF4/_netCDF4.pyx":3210
+ /* "netCDF4/_netCDF4.pyx":3251
* else:
* ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -28807,22 +30934,22 @@ 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":3211
+ /* "netCDF4/_netCDF4.pyx":3252
* ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL)
* if ierr != NC_NOERR:
* if grp.data_model != 'NETCDF4': grp._enddef() # <<<<<<<<<<<<<<
* raise RuntimeError((<char *>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, 3211, __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, 3252, __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, 3211, __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, 3252, __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, 3211, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3252, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -28832,40 +30959,40 @@ 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, 3211, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3252, __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, 3211, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3252, __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":3212
+ /* "netCDF4/_netCDF4.pyx":3253
* if ierr != NC_NOERR:
* if grp.data_model != 'NETCDF4': grp._enddef()
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
* else:
- * # cast fill_value to type of variable.
+ * # cast fill_value to type/endian-ness 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, 3212, __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, 3253, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3212, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3253, __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, 3212, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3253, __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, 3212, __pyx_L1_error)
+ __PYX_ERR(0, 3253, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3210
+ /* "netCDF4/_netCDF4.pyx":3251
* else:
* ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -28874,7 +31001,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3202
+ /* "netCDF4/_netCDF4.pyx":3243
* # 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): # <<<<<<<<<<<<<<
@@ -28884,79 +31011,215 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
goto __pyx_L88;
}
- /* "netCDF4/_netCDF4.pyx":3215
+ /* "netCDF4/_netCDF4.pyx":3256
* else:
- * # cast fill_value to type of variable.
+ * # cast fill_value to type/endian-ness of variable.
* if self._isprimitive or self._isenum: # <<<<<<<<<<<<<<
* fillval = numpy.array(fill_value, self.dtype)
- * _set_att(self._grp, self._varid, '_FillValue',\
+ * if (is_native_little and self.endian() == 'big') or\
*/
/*else*/ {
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3215, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3256, __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, 3215, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3256, __pyx_L1_error)
__pyx_t_2 = __pyx_t_8;
__pyx_L95_bool_binop_done:;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3216
- * # cast fill_value to type of variable.
+ /* "netCDF4/_netCDF4.pyx":3257
+ * # cast fill_value to type/endian-ness of variable.
* if self._isprimitive or self._isenum:
* fillval = numpy.array(fill_value, self.dtype) # <<<<<<<<<<<<<<
- * _set_att(self._grp, self._varid, '_FillValue',\
- * fillval, xtype=xtype)
+ * if (is_native_little and self.endian() == 'big') or\
+ * (is_native_big and self.endian() == 'little'):
*/
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3216, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3257, __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, 3216, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3257, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = NULL;
- __pyx_t_15 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
__Pyx_INCREF(__pyx_t_6);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_3, function);
- __pyx_t_15 = 1;
+ __pyx_t_4 = 1;
}
}
- __pyx_t_5 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3216, __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;
+ #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, 3257, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #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, 3257, __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, 3257, __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;
+ }
+ __Pyx_INCREF(__pyx_v_fill_value);
+ __Pyx_GIVEREF(__pyx_v_fill_value);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_fill_value);
+ __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, 3257, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
- __Pyx_INCREF(__pyx_v_fill_value);
- __Pyx_GIVEREF(__pyx_v_fill_value);
- PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_15, __pyx_v_fill_value);
- __Pyx_INCREF(__pyx_v_self->dtype);
- __Pyx_GIVEREF(__pyx_v_self->dtype);
- PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_15, __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, 3216, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_fillval = __pyx_t_7;
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":3217
+ /* "netCDF4/_netCDF4.pyx":3258
* if self._isprimitive or self._isenum:
* fillval = numpy.array(fill_value, self.dtype)
+ * if (is_native_little and self.endian() == 'big') or\ # <<<<<<<<<<<<<<
+ * (is_native_big and self.endian() == 'little'):
+ * fillval = fillval.byteswap(True)
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3258, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3258, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (!__pyx_t_8) {
+ goto __pyx_L99_next_or;
+ } else {
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3258, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ 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_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3258, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3258, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3258, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (!__pyx_t_8) {
+ } else {
+ __pyx_t_2 = __pyx_t_8;
+ goto __pyx_L98_bool_binop_done;
+ }
+ __pyx_L99_next_or:;
+
+ /* "netCDF4/_netCDF4.pyx":3259
+ * fillval = numpy.array(fill_value, self.dtype)
+ * if (is_native_little and self.endian() == 'big') or\
+ * (is_native_big and self.endian() == 'little'): # <<<<<<<<<<<<<<
+ * fillval = fillval.byteswap(True)
+ * _set_att(self._grp, self._varid, '_FillValue',\
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3259, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3259, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (__pyx_t_8) {
+ } else {
+ __pyx_t_2 = __pyx_t_8;
+ goto __pyx_L98_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3259, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ 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_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3259, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3259, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_little, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3259, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_2 = __pyx_t_8;
+ __pyx_L98_bool_binop_done:;
+
+ /* "netCDF4/_netCDF4.pyx":3258
+ * if self._isprimitive or self._isenum:
+ * fillval = numpy.array(fill_value, self.dtype)
+ * if (is_native_little and self.endian() == 'big') or\ # <<<<<<<<<<<<<<
+ * (is_native_big and self.endian() == 'little'):
+ * fillval = fillval.byteswap(True)
+ */
+ if (__pyx_t_2) {
+
+ /* "netCDF4/_netCDF4.pyx":3260
+ * if (is_native_little and self.endian() == 'big') or\
+ * (is_native_big and self.endian() == 'little'):
+ * fillval = 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_byteswap); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF_SET(__pyx_v_fillval, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":3258
+ * if self._isprimitive or self._isenum:
+ * fillval = numpy.array(fill_value, self.dtype)
+ * if (is_native_little and self.endian() == 'big') or\ # <<<<<<<<<<<<<<
+ * (is_native_big and self.endian() == 'little'):
+ * fillval = fillval.byteswap(True)
+ */
+ }
+
+ /* "netCDF4/_netCDF4.pyx":3261
+ * (is_native_big and self.endian() == 'little'):
+ * fillval = fillval.byteswap(True)
* _set_att(self._grp, self._varid, '_FillValue',\ # <<<<<<<<<<<<<<
* fillval, xtype=xtype)
* else:
*/
- __pyx_t_7 = __pyx_v_self->_grp;
- __Pyx_INCREF(__pyx_t_7);
+ __pyx_t_3 = __pyx_v_self->_grp;
+ __Pyx_INCREF(__pyx_t_3);
- /* "netCDF4/_netCDF4.pyx":3218
- * fillval = numpy.array(fill_value, self.dtype)
+ /* "netCDF4/_netCDF4.pyx":3262
+ * fillval = fillval.byteswap(True)
* _set_att(self._grp, self._varid, '_FillValue',\
* fillval, xtype=xtype) # <<<<<<<<<<<<<<
* else:
@@ -28964,22 +31227,22 @@ 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, 3217, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__set_att(__pyx_t_3, __pyx_v_self->_varid, __pyx_n_s_FillValue, __pyx_v_fillval, &__pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3261, __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":3215
+ /* "netCDF4/_netCDF4.pyx":3256
* else:
- * # cast fill_value to type of variable.
+ * # cast fill_value to type/endian-ness of variable.
* if self._isprimitive or self._isenum: # <<<<<<<<<<<<<<
* fillval = numpy.array(fill_value, self.dtype)
- * _set_att(self._grp, self._varid, '_FillValue',\
+ * if (is_native_little and self.endian() == 'big') or\
*/
goto __pyx_L94;
}
- /* "netCDF4/_netCDF4.pyx":3220
+ /* "netCDF4/_netCDF4.pyx":3264
* fillval, xtype=xtype)
* else:
* raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable") # <<<<<<<<<<<<<<
@@ -28987,17 +31250,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__44, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3220, __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, 3220, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3264, __pyx_L1_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, 3264, __pyx_L1_error)
}
__pyx_L94:;
}
__pyx_L88:;
- /* "netCDF4/_netCDF4.pyx":3201
+ /* "netCDF4/_netCDF4.pyx":3242
* # 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: # <<<<<<<<<<<<<<
@@ -29006,7 +31269,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3221
+ /* "netCDF4/_netCDF4.pyx":3265
* else:
* raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable")
* if least_significant_digit is not None: # <<<<<<<<<<<<<<
@@ -29017,16 +31280,16 @@ 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":3222
+ /* "netCDF4/_netCDF4.pyx":3266
* 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, 3222, __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, 3266, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3221
+ /* "netCDF4/_netCDF4.pyx":3265
* else:
* raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable")
* if least_significant_digit is not None: # <<<<<<<<<<<<<<
@@ -29035,44 +31298,44 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3224
+ /* "netCDF4/_netCDF4.pyx":3268
* 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, 3224, __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, 3224, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3268, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3268, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_8) {
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3224, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3268, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
+ 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_7);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
}
}
if (__pyx_t_5) {
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3224, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3268, __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, 3224, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3268, __pyx_L1_error)
}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
}
__pyx_L39:;
- /* "netCDF4/_netCDF4.pyx":3226
+ /* "netCDF4/_netCDF4.pyx":3270
* if grp.data_model != 'NETCDF4': grp._enddef()
* # count how many unlimited dimensions there are.
* self._nunlimdim = 0 # <<<<<<<<<<<<<<
@@ -29081,7 +31344,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
__pyx_v_self->_nunlimdim = 0;
- /* "netCDF4/_netCDF4.pyx":3227
+ /* "netCDF4/_netCDF4.pyx":3271
* # count how many unlimited dimensions there are.
* self._nunlimdim = 0
* for dimname in dimensions: # <<<<<<<<<<<<<<
@@ -29089,97 +31352,115 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
* dim = _find_dim(self._grp, dimname)
*/
if (likely(PyList_CheckExact(__pyx_v_dimensions)) || PyTuple_CheckExact(__pyx_v_dimensions)) {
- __pyx_t_3 = __pyx_v_dimensions; __Pyx_INCREF(__pyx_t_3); __pyx_t_15 = 0;
+ __pyx_t_7 = __pyx_v_dimensions; __Pyx_INCREF(__pyx_t_7); __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, 3227, __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, 3227, __pyx_L1_error)
+ __pyx_t_15 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_dimensions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_17 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3271, __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_COMPILING_IN_CPYTHON
- __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, 3227, __pyx_L1_error)
+ if (likely(PyList_CheckExact(__pyx_t_7))) {
+ if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_7)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 3271, __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, 3227, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_7, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
#endif
} else {
- if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 3227, __pyx_L1_error)
+ if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 3271, __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, 3227, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_7, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
#endif
}
} else {
- __pyx_t_7 = __pyx_t_17(__pyx_t_3);
- if (unlikely(!__pyx_t_7)) {
+ __pyx_t_3 = __pyx_t_17(__pyx_t_7);
+ if (unlikely(!__pyx_t_3)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 3227, __pyx_L1_error)
+ else __PYX_ERR(0, 3271, __pyx_L1_error)
}
break;
}
- __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GOTREF(__pyx_t_3);
}
- __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_7);
- __pyx_t_7 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_3);
+ __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3229
+ /* "netCDF4/_netCDF4.pyx":3273
* 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, 3229, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3273, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- __pyx_t_11 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_4 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
__Pyx_INCREF(__pyx_t_6);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_5, function);
- __pyx_t_11 = 1;
+ __pyx_t_4 = 1;
}
}
- __pyx_t_18 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3229, __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;
+ #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_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3273, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #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_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3273, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_18 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3273, __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;
+ }
+ __Pyx_INCREF(__pyx_v_self->_grp);
+ __Pyx_GIVEREF(__pyx_v_self->_grp);
+ PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_4, __pyx_v_self->_grp);
+ __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_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
}
- __Pyx_INCREF(__pyx_v_self->_grp);
- __Pyx_GIVEREF(__pyx_v_self->_grp);
- PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_11, __pyx_v_self->_grp);
- __Pyx_INCREF(__pyx_v_dimname);
- __Pyx_GIVEREF(__pyx_v_dimname);
- PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_11, __pyx_v_dimname);
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_18, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_7);
- __pyx_t_7 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_3);
+ __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3230
+ /* "netCDF4/_netCDF4.pyx":3274
* # 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, 3230, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3274, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_18 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_18 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_18)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -29189,20 +31470,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, 3230, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_18); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3274, __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, 3230, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3274, __pyx_L1_error)
}
- __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3230, __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, 3274, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_8) {
__pyx_v_self->_nunlimdim = (__pyx_v_self->_nunlimdim + 1);
}
- /* "netCDF4/_netCDF4.pyx":3227
+ /* "netCDF4/_netCDF4.pyx":3271
* # count how many unlimited dimensions there are.
* self._nunlimdim = 0
* for dimname in dimensions: # <<<<<<<<<<<<<<
@@ -29210,9 +31491,9 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
* dim = _find_dim(self._grp, dimname)
*/
}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":3232
+ /* "netCDF4/_netCDF4.pyx":3276
* if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1
* # set ndim attribute (number of dimensions).
* with nogil: # <<<<<<<<<<<<<<
@@ -29226,7 +31507,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3233
+ /* "netCDF4/_netCDF4.pyx":3277
* # set ndim attribute (number of dimensions).
* with nogil:
* ierr = nc_inq_varndims(self._grpid, self._varid, &numdims) # <<<<<<<<<<<<<<
@@ -29236,7 +31517,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":3232
+ /* "netCDF4/_netCDF4.pyx":3276
* if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1
* # set ndim attribute (number of dimensions).
* with nogil: # <<<<<<<<<<<<<<
@@ -29248,13 +31529,13 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
#ifdef WITH_THREAD
Py_BLOCK_THREADS
#endif
- goto __pyx_L104;
+ goto __pyx_L109;
}
- __pyx_L104:;
+ __pyx_L109:;
}
}
- /* "netCDF4/_netCDF4.pyx":3234
+ /* "netCDF4/_netCDF4.pyx":3278
* with nogil:
* ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -29264,7 +31545,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":3235
+ /* "netCDF4/_netCDF4.pyx":3279
* ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -29272,22 +31553,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, 3235, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3235, __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, 3279, __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, 3235, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3279, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3279, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 3235, __pyx_L1_error)
+ __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __PYX_ERR(0, 3279, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3234
+ /* "netCDF4/_netCDF4.pyx":3278
* with nogil:
* ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -29296,22 +31577,22 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":3236
+ /* "netCDF4/_netCDF4.pyx":3280
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 3236, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_numdims); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
__Pyx_GOTREF(__pyx_v_self->ndim);
__Pyx_DECREF(__pyx_v_self->ndim);
- __pyx_v_self->ndim = __pyx_t_3;
- __pyx_t_3 = 0;
+ __pyx_v_self->ndim = __pyx_t_7;
+ __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":3237
+ /* "netCDF4/_netCDF4.pyx":3281
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* self.ndim = numdims
* self._name = name # <<<<<<<<<<<<<<
@@ -29324,7 +31605,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":3240
+ /* "netCDF4/_netCDF4.pyx":3284
* # default for automatically applying scale_factor and
* # add_offset, and converting to/from masked arrays is True.
* self.scale = True # <<<<<<<<<<<<<<
@@ -29337,7 +31618,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":3241
+ /* "netCDF4/_netCDF4.pyx":3285
* # add_offset, and converting to/from masked arrays is True.
* self.scale = True
* self.mask = True # <<<<<<<<<<<<<<
@@ -29350,39 +31631,39 @@ 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":3242
+ /* "netCDF4/_netCDF4.pyx":3286
* 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, 3242, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3286, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
+ 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_7);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
}
}
if (__pyx_t_5) {
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3242, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3286, __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, 3242, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3286, __pyx_L1_error)
}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_least_significant_digit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3242, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_least_significant_digit, __pyx_t_7, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3286, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_2 = (__pyx_t_8 != 0);
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3243
+ /* "netCDF4/_netCDF4.pyx":3287
* self.mask = True
* if 'least_significant_digit' in self.ncattrs():
* self._has_lsd = True # <<<<<<<<<<<<<<
@@ -29395,7 +31676,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":3242
+ /* "netCDF4/_netCDF4.pyx":3286
* self.scale = True
* self.mask = True
* if 'least_significant_digit' in self.ncattrs(): # <<<<<<<<<<<<<<
@@ -29404,7 +31685,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
*/
}
- /* "netCDF4/_netCDF4.pyx":2900
+ /* "netCDF4/_netCDF4.pyx":2941
* """The number of stored elements."""
*
* def __init__(self, grp, name, datatype, dimensions=(), zlib=False, # <<<<<<<<<<<<<<
@@ -29439,7 +31720,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netC
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3245
+/* "netCDF4/_netCDF4.pyx":3289
* self._has_lsd = True
*
* def __array__(self): # <<<<<<<<<<<<<<
@@ -29466,7 +31747,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":3249
+ /* "netCDF4/_netCDF4.pyx":3293
* # allows numpy ufuncs to work faster on Variable objects
* # (issue 216).
* return self[...] # <<<<<<<<<<<<<<
@@ -29474,13 +31755,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, 3249, __pyx_L1_error)
+ __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self), Py_Ellipsis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3293, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3245
+ /* "netCDF4/_netCDF4.pyx":3289
* self._has_lsd = True
*
* def __array__(self): # <<<<<<<<<<<<<<
@@ -29499,7 +31780,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_2__array__(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3251
+/* "netCDF4/_netCDF4.pyx":3295
* return self[...]
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -29531,20 +31812,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":3252
+ /* "netCDF4/_netCDF4.pyx":3296
*
* 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, 3252, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3296, __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, 3252, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3296, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3253
+ /* "netCDF4/_netCDF4.pyx":3297
* def __repr__(self):
* if python3:
* return self.__unicode__() # <<<<<<<<<<<<<<
@@ -29552,10 +31833,10 @@ 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, 3253, __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, 3297, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -29565,10 +31846,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, 3253, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3297, __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, 3253, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3297, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -29576,7 +31857,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__repr__(struct __pyx_ob
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3252
+ /* "netCDF4/_netCDF4.pyx":3296
*
* def __repr__(self):
* if python3: # <<<<<<<<<<<<<<
@@ -29585,7 +31866,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__repr__(struct __pyx_ob
*/
}
- /* "netCDF4/_netCDF4.pyx":3255
+ /* "netCDF4/_netCDF4.pyx":3299
* return self.__unicode__()
* else:
* return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<<
@@ -29594,21 +31875,21 @@ 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, 3255, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3299, __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, 3255, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3299, __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, 3255, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3299, __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, 3255, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3299, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ 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);
@@ -29618,19 +31899,39 @@ 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, 3255, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3299, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3255, __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, 3255, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 3299, __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
+ #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, 3299, __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, 3299, __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, 3299, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_1;
@@ -29638,7 +31939,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__repr__(struct __pyx_ob
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":3251
+ /* "netCDF4/_netCDF4.pyx":3295
* return self[...]
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -29661,7 +31962,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__repr__(struct __pyx_ob
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3257
+/* "netCDF4/_netCDF4.pyx":3301
* return unicode(self).encode(default_encoding)
*
* def __unicode__(self): # <<<<<<<<<<<<<<
@@ -29707,15 +32008,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
PyObject *__pyx_t_9 = NULL;
PyObject *__pyx_t_10 = NULL;
int __pyx_t_11;
- Py_ssize_t __pyx_t_12;
+ int __pyx_t_12;
char *__pyx_t_13;
PyObject *__pyx_t_14 = NULL;
PyObject *__pyx_t_15 = NULL;
PyObject *__pyx_t_16 = NULL;
- int __pyx_t_17;
__Pyx_RefNannySetupContext("__unicode__", 0);
- /* "netCDF4/_netCDF4.pyx":3259
+ /* "netCDF4/_netCDF4.pyx":3303
* def __unicode__(self):
* cdef int ierr, no_fill
* if not dir(self._grp): # <<<<<<<<<<<<<<
@@ -29724,15 +32024,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, 3259, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Dir(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3303, __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, 3259, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3303, __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":3260
+ /* "netCDF4/_netCDF4.pyx":3304
* cdef int ierr, no_fill
* if not dir(self._grp):
* return 'Variable object no longer valid' # <<<<<<<<<<<<<<
@@ -29744,7 +32044,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":3259
+ /* "netCDF4/_netCDF4.pyx":3303
* def __unicode__(self):
* cdef int ierr, no_fill
* if not dir(self._grp): # <<<<<<<<<<<<<<
@@ -29753,16 +32053,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
*/
}
- /* "netCDF4/_netCDF4.pyx":3261
+ /* "netCDF4/_netCDF4.pyx":3305
* 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, 3261, __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, 3305, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3261, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3305, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_2);
PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
@@ -29770,42 +32070,42 @@ 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":3262
+ /* "netCDF4/_netCDF4.pyx":3306
* 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, 3262, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3306, __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, 3262, __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, 3306, __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, 3262, __pyx_L1_error)
+ __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3306, __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, 3262, __pyx_L1_error)
+ __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3306, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
for (;;) {
if (likely(!__pyx_t_7)) {
if (likely(PyList_CheckExact(__pyx_t_5))) {
if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 3262, __pyx_L1_error)
+ #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, 3306, __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, 3262, __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, 3306, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
} else {
if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 3262, __pyx_L1_error)
+ #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, 3306, __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, 3262, __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, 3306, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
}
@@ -29815,7 +32115,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, 3262, __pyx_L1_error)
+ else __PYX_ERR(0, 3306, __pyx_L1_error)
}
break;
}
@@ -29823,10 +32123,10 @@ 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, 3262, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3306, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_9 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_9)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
@@ -29836,51 +32136,69 @@ 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, 3262, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_dimname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3306, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
} else {
- __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3262, __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, 3262, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ #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, 3306, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #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, 3306, __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, 3306, __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, 3306, __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, 3262, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 3306, __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, 3262, __pyx_L1_error)
+ __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3306, __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":3263
+ /* "netCDF4/_netCDF4.pyx":3307
* 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, 3263, __pyx_L1_error)
+ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3307, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- /* "netCDF4/_netCDF4.pyx":3264
+ /* "netCDF4/_netCDF4.pyx":3308
* 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, 3264, __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, 3308, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_8 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -29890,10 +32208,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, 3264, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3308, __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, 3264, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3308, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -29901,27 +32219,27 @@ 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, 3264, __pyx_L1_error)
+ __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3308, __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, 3264, __pyx_L1_error)
+ __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3308, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
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_COMPILING_IN_CPYTHON
- __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, 3264, __pyx_L1_error)
+ #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, 3308, __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, 3264, __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, 3308, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 3264, __pyx_L1_error)
+ #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, 3308, __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, 3264, __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, 3308, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -29931,7 +32249,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, 3264, __pyx_L1_error)
+ else __PYX_ERR(0, 3308, __pyx_L1_error)
}
break;
}
@@ -29940,17 +32258,17 @@ 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":3263
+ /* "netCDF4/_netCDF4.pyx":3307
* 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, 3263, __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, 3307, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_10 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
@@ -29960,21 +32278,39 @@ 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, 3263, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3307, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3263, __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, 3263, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ #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, 3307, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 3307, __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, 3307, __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, 3307, __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, 3263, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3307, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_name);
__Pyx_GIVEREF(__pyx_v_name);
@@ -29982,36 +32318,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, 3263, __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, 3307, __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, 3263, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 3307, __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":3265
+ /* "netCDF4/_netCDF4.pyx":3309
* 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, 3265, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3309, __pyx_L1_error)
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":3267
+ /* "netCDF4/_netCDF4.pyx":3311
* 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__21, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3267, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3311, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3267, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3311, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_n_s_compound);
__Pyx_GIVEREF(__pyx_n_s_compound);
@@ -30023,20 +32359,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":3266
+ /* "netCDF4/_netCDF4.pyx":3310
* 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, 3266, __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, 3310, __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, 3266, __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, 3310, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3265
+ /* "netCDF4/_netCDF4.pyx":3309
* attrs = [' %s: %s\n' % (name,self.getncattr(name)) for name in\
* self.ncattrs()]
* if self._iscompound: # <<<<<<<<<<<<<<
@@ -30046,26 +32382,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
goto __pyx_L8;
}
- /* "netCDF4/_netCDF4.pyx":3268
+ /* "netCDF4/_netCDF4.pyx":3312
* 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, 3268, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3312, __pyx_L1_error)
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":3270
+ /* "netCDF4/_netCDF4.pyx":3314
* 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__21, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3270, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3314, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3270, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3314, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_n_s_vlen);
__Pyx_GIVEREF(__pyx_n_s_vlen);
@@ -30077,20 +32413,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":3269
+ /* "netCDF4/_netCDF4.pyx":3313
* ('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, 3269, __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, 3313, __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, 3269, __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, 3313, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3268
+ /* "netCDF4/_netCDF4.pyx":3312
* ncdump_var.append('%s %s(%s)\n' %\
* ('compound',self._name,', '.join(dimnames)))
* elif self._isvlen: # <<<<<<<<<<<<<<
@@ -30100,26 +32436,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
goto __pyx_L8;
}
- /* "netCDF4/_netCDF4.pyx":3271
+ /* "netCDF4/_netCDF4.pyx":3315
* 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, 3271, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3315, __pyx_L1_error)
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":3273
+ /* "netCDF4/_netCDF4.pyx":3317
* 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__21, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3273, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3317, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3273, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3317, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_n_s_enum);
__Pyx_GIVEREF(__pyx_n_s_enum);
@@ -30131,20 +32467,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":3272
+ /* "netCDF4/_netCDF4.pyx":3316
* ('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, 3272, __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, 3316, __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, 3272, __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, 3316, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3271
+ /* "netCDF4/_netCDF4.pyx":3315
* ncdump_var.append('%s %s(%s)\n' %\
* ('vlen',self._name,', '.join(dimnames)))
* elif self._isenum: # <<<<<<<<<<<<<<
@@ -30154,7 +32490,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
goto __pyx_L8;
}
- /* "netCDF4/_netCDF4.pyx":3275
+ /* "netCDF4/_netCDF4.pyx":3319
* ('enum',self._name,', '.join(dimnames)))
* else:
* ncdump_var.append('%s %s(%s)\n' %\ # <<<<<<<<<<<<<<
@@ -30163,16 +32499,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
*/
/*else*/ {
- /* "netCDF4/_netCDF4.pyx":3276
+ /* "netCDF4/_netCDF4.pyx":3320
* 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__21, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3276, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3320, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3276, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3320, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_self->dtype);
__Pyx_GIVEREF(__pyx_v_self->dtype);
@@ -30184,56 +32520,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":3275
+ /* "netCDF4/_netCDF4.pyx":3319
* ('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, 3275, __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, 3319, __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, 3275, __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, 3319, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__pyx_L8:;
- /* "netCDF4/_netCDF4.pyx":3277
+ /* "netCDF4/_netCDF4.pyx":3321
* 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, 3277, __pyx_L1_error)
+ __pyx_t_5 = PyNumber_Add(__pyx_v_ncdump_var, __pyx_v_attrs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3321, __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":3278
+ /* "netCDF4/_netCDF4.pyx":3322
* (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, 3278, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3322, __pyx_L1_error)
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":3279
+ /* "netCDF4/_netCDF4.pyx":3323
* 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, 3279, __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, 3323, __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, 3279, __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, 3323, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3278
+ /* "netCDF4/_netCDF4.pyx":3322
* (self.dtype,self._name,', '.join(dimnames)))
* ncdump_var = ncdump_var + attrs
* if self._iscompound: # <<<<<<<<<<<<<<
@@ -30243,29 +32579,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
goto __pyx_L9;
}
- /* "netCDF4/_netCDF4.pyx":3280
+ /* "netCDF4/_netCDF4.pyx":3324
* 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, 3280, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3324, __pyx_L1_error)
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":3281
+ /* "netCDF4/_netCDF4.pyx":3325
* 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, 3281, __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, 3325, __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, 3281, __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, 3325, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3280
+ /* "netCDF4/_netCDF4.pyx":3324
* if self._iscompound:
* ncdump_var.append('compound data type: %s\n' % self.dtype)
* elif self._isvlen: # <<<<<<<<<<<<<<
@@ -30275,29 +32611,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
goto __pyx_L9;
}
- /* "netCDF4/_netCDF4.pyx":3282
+ /* "netCDF4/_netCDF4.pyx":3326
* 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, 3282, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3326, __pyx_L1_error)
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":3283
+ /* "netCDF4/_netCDF4.pyx":3327
* 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, 3283, __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, 3327, __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, 3283, __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, 3327, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3282
+ /* "netCDF4/_netCDF4.pyx":3326
* elif self._isvlen:
* ncdump_var.append('vlen data type: %s\n' % self.dtype)
* elif self._isenum: # <<<<<<<<<<<<<<
@@ -30307,52 +32643,52 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
}
__pyx_L9:;
- /* "netCDF4/_netCDF4.pyx":3284
+ /* "netCDF4/_netCDF4.pyx":3328
* 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, 3284, __pyx_L1_error)
+ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3328, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_v_unlimdims = ((PyObject*)__pyx_t_5);
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3285
+ /* "netCDF4/_netCDF4.pyx":3329
* 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, 3285, __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, 3329, __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, 3285, __pyx_L1_error)
+ __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3329, __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, 3285, __pyx_L1_error)
+ __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3329, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
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_COMPILING_IN_CPYTHON
- __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, 3285, __pyx_L1_error)
+ #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, 3329, __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, 3285, __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, 3329, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
} else {
if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 3285, __pyx_L1_error)
+ #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, 3329, __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, 3285, __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, 3329, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
}
@@ -30362,7 +32698,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, 3285, __pyx_L1_error)
+ else __PYX_ERR(0, 3329, __pyx_L1_error)
}
break;
}
@@ -30371,18 +32707,18 @@ 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":3286
+ /* "netCDF4/_netCDF4.pyx":3330
* 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, 3286, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3330, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_8 = NULL;
__pyx_t_12 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -30392,35 +32728,53 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
__pyx_t_12 = 1;
}
}
- __pyx_t_9 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3286, __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;
+ #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, 3330, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #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, 3330, __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, 3330, __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;
+ }
+ __Pyx_INCREF(__pyx_v_self->_grp);
+ __Pyx_GIVEREF(__pyx_v_self->_grp);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_12, __pyx_v_self->_grp);
+ __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, 3330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
- __Pyx_INCREF(__pyx_v_self->_grp);
- __Pyx_GIVEREF(__pyx_v_self->_grp);
- PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_12, __pyx_v_self->_grp);
- __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, 3286, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_5);
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3287
+ /* "netCDF4/_netCDF4.pyx":3331
* 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, 3287, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3331, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_9 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_9)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -30430,27 +32784,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, 3287, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3331, __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, 3287, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3331, __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, 3287, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3331, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":3288
+ /* "netCDF4/_netCDF4.pyx":3332
* 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, 3288, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_unlimdims, __pyx_v_dimname); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3332, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3287
+ /* "netCDF4/_netCDF4.pyx":3331
* for dimname in self.dimensions:
* dim = _find_dim(self._grp, dimname)
* if dim.isunlimited(): # <<<<<<<<<<<<<<
@@ -30459,7 +32813,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
*/
}
- /* "netCDF4/_netCDF4.pyx":3285
+ /* "netCDF4/_netCDF4.pyx":3329
* ncdump_var.append('enum data type: %s\n' % self.dtype)
* unlimdims = []
* for dimname in self.dimensions: # <<<<<<<<<<<<<<
@@ -30469,61 +32823,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":3289
+ /* "netCDF4/_netCDF4.pyx":3333
* 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, 3289, __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, 3333, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__16, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3289, __pyx_L1_error)
+ __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__15, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3333, __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, 3289, __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, 3333, __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, 3289, __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, 3333, __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, 3289, __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, 3333, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
- /* "netCDF4/_netCDF4.pyx":3290
+ /* "netCDF4/_netCDF4.pyx":3334
* 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__21, __pyx_v_unlimdims); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3290, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__20, __pyx_v_unlimdims); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3334, __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, 3290, __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, 3334, __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, 3290, __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, 3334, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":3291
+ /* "netCDF4/_netCDF4.pyx":3335
* 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, 3291, __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, 3335, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_5 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3291, __pyx_L1_error)
+ __pyx_t_5 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3335, __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, 3291, __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, 3335, __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, 3291, __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, 3335, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":3292
+ /* "netCDF4/_netCDF4.pyx":3336
* ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))
* ncdump_var.append('current shape = %s\n' % repr(self.shape))
* with nogil: # <<<<<<<<<<<<<<
@@ -30537,7 +32891,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3293
+ /* "netCDF4/_netCDF4.pyx":3337
* ncdump_var.append('current shape = %s\n' % repr(self.shape))
* with nogil:
* ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) # <<<<<<<<<<<<<<
@@ -30547,7 +32901,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":3292
+ /* "netCDF4/_netCDF4.pyx":3336
* ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))
* ncdump_var.append('current shape = %s\n' % repr(self.shape))
* with nogil: # <<<<<<<<<<<<<<
@@ -30565,7 +32919,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
}
}
- /* "netCDF4/_netCDF4.pyx":3294
+ /* "netCDF4/_netCDF4.pyx":3338
* with nogil:
* ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -30575,7 +32929,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":3295
+ /* "netCDF4/_netCDF4.pyx":3339
* ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -30583,22 +32937,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, 3295, __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, 3339, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3295, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3339, __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, 3295, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3339, __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, 3295, __pyx_L1_error)
+ __PYX_ERR(0, 3339, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3294
+ /* "netCDF4/_netCDF4.pyx":3338
* with nogil:
* ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -30607,17 +32961,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
*/
}
- /* "netCDF4/_netCDF4.pyx":3296
+ /* "netCDF4/_netCDF4.pyx":3340
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 3296, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3340, __pyx_L1_error)
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":3297
+ /* "netCDF4/_netCDF4.pyx":3341
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if self._isprimitive:
* if no_fill != 1: # <<<<<<<<<<<<<<
@@ -30627,7 +32981,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":3298
+ /* "netCDF4/_netCDF4.pyx":3342
* if self._isprimitive:
* if no_fill != 1:
* try: # <<<<<<<<<<<<<<
@@ -30643,19 +32997,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
__Pyx_XGOTREF(__pyx_t_16);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3299
+ /* "netCDF4/_netCDF4.pyx":3343
* 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, 3299, __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, 3343, __pyx_L20_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_fillval = __pyx_t_2;
__pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":3300
+ /* "netCDF4/_netCDF4.pyx":3344
* try:
* fillval = self._FillValue
* msg = 'filling on' # <<<<<<<<<<<<<<
@@ -30665,7 +33019,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":3298
+ /* "netCDF4/_netCDF4.pyx":3342
* if self._isprimitive:
* if no_fill != 1:
* try: # <<<<<<<<<<<<<<
@@ -30686,80 +33040,80 @@ 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":3301
+ /* "netCDF4/_netCDF4.pyx":3345
* fillval = self._FillValue
* msg = 'filling on'
* except AttributeError: # <<<<<<<<<<<<<<
* fillval = default_fillvals[self.dtype.str[1:]]
* if self.dtype.str[1:] in ['u1','i1']:
*/
- __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
- if (__pyx_t_17) {
+ __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, 3301, __pyx_L22_except_error)
+ if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 3345, __pyx_L22_except_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GOTREF(__pyx_t_1);
- /* "netCDF4/_netCDF4.pyx":3302
+ /* "netCDF4/_netCDF4.pyx":3346
* 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, 3302, __pyx_L22_except_error)
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3346, __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, 3302, __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, 3346, __pyx_L22_except_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_t_8, 1, 0, NULL, NULL, &__pyx_slice__45, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3302, __pyx_L22_except_error)
+ __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, 3346, __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, 3302, __pyx_L22_except_error)
+ __pyx_t_8 = PyObject_GetItem(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3346, __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":3303
+ /* "netCDF4/_netCDF4.pyx":3347
* 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, 3303, __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, 3347, __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, 3303, __pyx_L22_except_error)
+ __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, 3347, __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, 3303, __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, 3347, __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, 3303, __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, 3347, __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":3304
+ /* "netCDF4/_netCDF4.pyx":3348
* 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, 3304, __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, 3348, __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":3303
+ /* "netCDF4/_netCDF4.pyx":3347
* except AttributeError:
* fillval = default_fillvals[self.dtype.str[1:]]
* if self.dtype.str[1:] in ['u1','i1']: # <<<<<<<<<<<<<<
@@ -30769,7 +33123,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
goto __pyx_L30;
}
- /* "netCDF4/_netCDF4.pyx":3306
+ /* "netCDF4/_netCDF4.pyx":3350
* msg = 'filling on, default _FillValue of %s ignored\n' % fillval
* else:
* msg = 'filling on, default _FillValue of %s used\n' % fillval # <<<<<<<<<<<<<<
@@ -30777,7 +33131,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, 3306, __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, 3350, __pyx_L22_except_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_XDECREF_SET(__pyx_v_msg, __pyx_t_10);
__pyx_t_10 = 0;
@@ -30791,7 +33145,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":3298
+ /* "netCDF4/_netCDF4.pyx":3342
* if self._isprimitive:
* if no_fill != 1:
* try: # <<<<<<<<<<<<<<
@@ -30813,16 +33167,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
__pyx_L27_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":3307
+ /* "netCDF4/_netCDF4.pyx":3351
* 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, 3307, __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, 3351, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3297
+ /* "netCDF4/_netCDF4.pyx":3341
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if self._isprimitive:
* if no_fill != 1: # <<<<<<<<<<<<<<
@@ -30832,7 +33186,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
goto __pyx_L19;
}
- /* "netCDF4/_netCDF4.pyx":3309
+ /* "netCDF4/_netCDF4.pyx":3353
* ncdump_var.append(msg)
* else:
* ncdump_var.append('filling off\n') # <<<<<<<<<<<<<<
@@ -30840,11 +33194,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, 3309, __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, 3353, __pyx_L1_error)
}
__pyx_L19:;
- /* "netCDF4/_netCDF4.pyx":3296
+ /* "netCDF4/_netCDF4.pyx":3340
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if self._isprimitive: # <<<<<<<<<<<<<<
@@ -30853,7 +33207,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
*/
}
- /* "netCDF4/_netCDF4.pyx":3312
+ /* "netCDF4/_netCDF4.pyx":3356
*
*
* return ''.join(ncdump_var) # <<<<<<<<<<<<<<
@@ -30861,13 +33215,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, 3312, __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, 3356, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3257
+ /* "netCDF4/_netCDF4.pyx":3301
* return unicode(self).encode(default_encoding)
*
* def __unicode__(self): # <<<<<<<<<<<<<<
@@ -30900,7 +33254,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3314
+/* "netCDF4/_netCDF4.pyx":3358
* return ''.join(ncdump_var)
*
* def _getdims(self): # <<<<<<<<<<<<<<
@@ -30939,11 +33293,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
- Py_ssize_t __pyx_t_9;
+ int __pyx_t_9;
PyObject *__pyx_t_10 = NULL;
__Pyx_RefNannySetupContext("_getdims", 0);
- /* "netCDF4/_netCDF4.pyx":3320
+ /* "netCDF4/_netCDF4.pyx":3364
* cdef int *dimids
* # get number of dimensions for this variable.
* with nogil: # <<<<<<<<<<<<<<
@@ -30957,7 +33311,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3321
+ /* "netCDF4/_netCDF4.pyx":3365
* # get number of dimensions for this variable.
* with nogil:
* ierr = nc_inq_varndims(self._grpid, self._varid, &numdims) # <<<<<<<<<<<<<<
@@ -30967,7 +33321,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":3320
+ /* "netCDF4/_netCDF4.pyx":3364
* cdef int *dimids
* # get number of dimensions for this variable.
* with nogil: # <<<<<<<<<<<<<<
@@ -30985,7 +33339,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob
}
}
- /* "netCDF4/_netCDF4.pyx":3322
+ /* "netCDF4/_netCDF4.pyx":3366
* with nogil:
* ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -30995,7 +33349,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":3323
+ /* "netCDF4/_netCDF4.pyx":3367
* ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -31003,22 +33357,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, 3323, __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, 3367, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3323, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3367, __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, 3323, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3367, __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, 3323, __pyx_L1_error)
+ __PYX_ERR(0, 3367, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3322
+ /* "netCDF4/_netCDF4.pyx":3366
* with nogil:
* ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -31027,7 +33381,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob
*/
}
- /* "netCDF4/_netCDF4.pyx":3324
+ /* "netCDF4/_netCDF4.pyx":3368
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* dimids = <int *>malloc(sizeof(int) * numdims) # <<<<<<<<<<<<<<
@@ -31036,7 +33390,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":3326
+ /* "netCDF4/_netCDF4.pyx":3370
* dimids = <int *>malloc(sizeof(int) * numdims)
* # get dimension ids.
* with nogil: # <<<<<<<<<<<<<<
@@ -31050,7 +33404,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3327
+ /* "netCDF4/_netCDF4.pyx":3371
* # get dimension ids.
* with nogil:
* ierr = nc_inq_vardimid(self._grpid, self._varid, dimids) # <<<<<<<<<<<<<<
@@ -31060,7 +33414,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":3326
+ /* "netCDF4/_netCDF4.pyx":3370
* dimids = <int *>malloc(sizeof(int) * numdims)
* # get dimension ids.
* with nogil: # <<<<<<<<<<<<<<
@@ -31078,7 +33432,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob
}
}
- /* "netCDF4/_netCDF4.pyx":3328
+ /* "netCDF4/_netCDF4.pyx":3372
* with nogil:
* ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -31088,7 +33442,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":3329
+ /* "netCDF4/_netCDF4.pyx":3373
* ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -31096,22 +33450,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, 3329, __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, 3373, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3329, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3373, __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, 3329, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3373, __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, 3329, __pyx_L1_error)
+ __PYX_ERR(0, 3373, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3328
+ /* "netCDF4/_netCDF4.pyx":3372
* with nogil:
* ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -31120,7 +33474,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob
*/
}
- /* "netCDF4/_netCDF4.pyx":3331
+ /* "netCDF4/_netCDF4.pyx":3375
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # loop over dimensions, retrieve names.
* dimensions = () # <<<<<<<<<<<<<<
@@ -31130,7 +33484,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":3332
+ /* "netCDF4/_netCDF4.pyx":3376
* # loop over dimensions, retrieve names.
* dimensions = ()
* for nn from 0 <= nn < numdims: # <<<<<<<<<<<<<<
@@ -31140,7 +33494,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":3333
+ /* "netCDF4/_netCDF4.pyx":3377
* dimensions = ()
* for nn from 0 <= nn < numdims:
* with nogil: # <<<<<<<<<<<<<<
@@ -31154,7 +33508,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3334
+ /* "netCDF4/_netCDF4.pyx":3378
* for nn from 0 <= nn < numdims:
* with nogil:
* ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring) # <<<<<<<<<<<<<<
@@ -31164,7 +33518,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":3333
+ /* "netCDF4/_netCDF4.pyx":3377
* dimensions = ()
* for nn from 0 <= nn < numdims:
* with nogil: # <<<<<<<<<<<<<<
@@ -31182,7 +33536,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob
}
}
- /* "netCDF4/_netCDF4.pyx":3335
+ /* "netCDF4/_netCDF4.pyx":3379
* with nogil:
* ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -31192,7 +33546,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":3336
+ /* "netCDF4/_netCDF4.pyx":3380
* ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -31200,22 +33554,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, 3336, __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, 3380, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3336, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __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, 3336, __pyx_L1_error)
+ __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_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, 3336, __pyx_L1_error)
+ __PYX_ERR(0, 3380, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3335
+ /* "netCDF4/_netCDF4.pyx":3379
* with nogil:
* ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -31224,25 +33578,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob
*/
}
- /* "netCDF4/_netCDF4.pyx":3337
+ /* "netCDF4/_netCDF4.pyx":3381
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 3337, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3381, __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, 3337, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3381, __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, 3337, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3381, __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, 3337, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3381, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
__pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -31252,44 +33606,66 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob
__pyx_t_9 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3337, __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;
+ #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, 3381, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #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, 3381, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3381, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_7);
+ 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, 3381, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_7);
- 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, 3337, __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_XDECREF_SET(__pyx_v_name, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3338
+ /* "netCDF4/_netCDF4.pyx":3382
* raise RuntimeError((<char *>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, 3338, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3382, __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, 3338, __pyx_L1_error)
+ __pyx_t_6 = PyNumber_Add(__pyx_v_dimensions, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3382, __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":3339
+ /* "netCDF4/_netCDF4.pyx":3383
* name = namstring.decode(default_encoding,unicode_error)
* dimensions = dimensions + (name,)
* free(dimids) # <<<<<<<<<<<<<<
@@ -31298,7 +33674,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob
*/
free(__pyx_v_dimids);
- /* "netCDF4/_netCDF4.pyx":3340
+ /* "netCDF4/_netCDF4.pyx":3384
* dimensions = dimensions + (name,)
* free(dimids)
* return dimensions # <<<<<<<<<<<<<<
@@ -31310,7 +33686,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":3314
+ /* "netCDF4/_netCDF4.pyx":3358
* return ''.join(ncdump_var)
*
* def _getdims(self): # <<<<<<<<<<<<<<
@@ -31336,7 +33712,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_ob
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3342
+/* "netCDF4/_netCDF4.pyx":3386
* return dimensions
*
* def _getname(self): # <<<<<<<<<<<<<<
@@ -31371,24 +33747,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
- Py_ssize_t __pyx_t_9;
- PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("_getname", 0);
- /* "netCDF4/_netCDF4.pyx":3346
+ /* "netCDF4/_netCDF4.pyx":3390
* 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, 3346, __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, 3390, __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, 3346, __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, 3390, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v__grpid = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":3347
+ /* "netCDF4/_netCDF4.pyx":3391
* cdef char namstring[NC_MAX_NAME+1]
* _grpid = self._grp._grpid
* with nogil: # <<<<<<<<<<<<<<
@@ -31402,7 +33777,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3348
+ /* "netCDF4/_netCDF4.pyx":3392
* _grpid = self._grp._grpid
* with nogil:
* ierr = nc_inq_varname(_grpid, self._varid, namstring) # <<<<<<<<<<<<<<
@@ -31412,7 +33787,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":3347
+ /* "netCDF4/_netCDF4.pyx":3391
* cdef char namstring[NC_MAX_NAME+1]
* _grpid = self._grp._grpid
* with nogil: # <<<<<<<<<<<<<<
@@ -31430,7 +33805,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o
}
}
- /* "netCDF4/_netCDF4.pyx":3349
+ /* "netCDF4/_netCDF4.pyx":3393
* with nogil:
* ierr = nc_inq_varname(_grpid, self._varid, namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -31440,7 +33815,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":3350
+ /* "netCDF4/_netCDF4.pyx":3394
* ierr = nc_inq_varname(_grpid, self._varid, namstring)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -31448,22 +33823,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, 3350, __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, 3394, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3350, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3394, __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, 3350, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3394, __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, 3350, __pyx_L1_error)
+ __PYX_ERR(0, 3394, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3349
+ /* "netCDF4/_netCDF4.pyx":3393
* with nogil:
* ierr = nc_inq_varname(_grpid, self._varid, namstring)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -31472,7 +33847,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o
*/
}
- /* "netCDF4/_netCDF4.pyx":3351
+ /* "netCDF4/_netCDF4.pyx":3395
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* return namstring.decode(default_encoding,unicode_error) # <<<<<<<<<<<<<<
@@ -31480,47 +33855,69 @@ 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, 3351, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3395, __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, 3351, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3395, __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, 3351, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3395, __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, 3351, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3395, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
- __pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_2 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_9 = 1;
+ __pyx_t_2 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3351, __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;
+ #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, 3395, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #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, 3395, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3395, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_2, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_7);
+ 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, 3395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_7);
- 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, 3351, __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;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3342
+ /* "netCDF4/_netCDF4.pyx":3386
* return dimensions
*
* def _getname(self): # <<<<<<<<<<<<<<
@@ -31535,7 +33932,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("netCDF4._netCDF4.Variable._getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -31544,7 +33941,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3355
+/* "netCDF4/_netCDF4.pyx":3399
* property name:
* """string name of Variable instance"""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -31573,7 +33970,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":3356
+ /* "netCDF4/_netCDF4.pyx":3400
* """string name of Variable instance"""
* def __get__(self):
* return self._getname() # <<<<<<<<<<<<<<
@@ -31581,10 +33978,10 @@ 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, 3356, __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, 3400, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -31594,10 +33991,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, 3356, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3400, __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, 3356, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3400, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -31605,7 +34002,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4name___get__(struct __py
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3355
+ /* "netCDF4/_netCDF4.pyx":3399
* property name:
* """string name of Variable instance"""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -31626,7 +34023,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4name___get__(struct __py
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3357
+/* "netCDF4/_netCDF4.pyx":3401
* def __get__(self):
* return self._getname()
* def __set__(self,value): # <<<<<<<<<<<<<<
@@ -31653,20 +34050,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":3358
+ /* "netCDF4/_netCDF4.pyx":3402
* 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__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3358, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3402, __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, 3358, __pyx_L1_error)
+ __PYX_ERR(0, 3402, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3357
+ /* "netCDF4/_netCDF4.pyx":3401
* def __get__(self):
* return self._getname()
* def __set__(self,value): # <<<<<<<<<<<<<<
@@ -31683,7 +34080,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4name_2__set__(CYTHON_UNUSED st
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3364
+/* "netCDF4/_netCDF4.pyx":3408
* VLType/CompoundType/EnumType instance
* (for compound, vlen or enum data types)"""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -31710,17 +34107,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct
int __pyx_t_1;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "netCDF4/_netCDF4.pyx":3365
+ /* "netCDF4/_netCDF4.pyx":3409
* (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, 3365, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3409, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3366
+ /* "netCDF4/_netCDF4.pyx":3410
* def __get__(self):
* if self._iscompound:
* return self._cmptype # <<<<<<<<<<<<<<
@@ -31732,7 +34129,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct
__pyx_r = __pyx_v_self->_cmptype;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3365
+ /* "netCDF4/_netCDF4.pyx":3409
* (for compound, vlen or enum data types)"""
* def __get__(self):
* if self._iscompound: # <<<<<<<<<<<<<<
@@ -31741,17 +34138,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct
*/
}
- /* "netCDF4/_netCDF4.pyx":3367
+ /* "netCDF4/_netCDF4.pyx":3411
* 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, 3367, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3411, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3368
+ /* "netCDF4/_netCDF4.pyx":3412
* return self._cmptype
* elif self._isvlen:
* return self._vltype # <<<<<<<<<<<<<<
@@ -31763,7 +34160,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct
__pyx_r = __pyx_v_self->_vltype;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3367
+ /* "netCDF4/_netCDF4.pyx":3411
* if self._iscompound:
* return self._cmptype
* elif self._isvlen: # <<<<<<<<<<<<<<
@@ -31772,17 +34169,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct
*/
}
- /* "netCDF4/_netCDF4.pyx":3369
+ /* "netCDF4/_netCDF4.pyx":3413
* 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, 3369, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3413, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3370
+ /* "netCDF4/_netCDF4.pyx":3414
* return self._vltype
* elif self._isenum:
* return self._enumtype # <<<<<<<<<<<<<<
@@ -31794,7 +34191,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct
__pyx_r = __pyx_v_self->_enumtype;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3369
+ /* "netCDF4/_netCDF4.pyx":3413
* elif self._isvlen:
* return self._vltype
* elif self._isenum: # <<<<<<<<<<<<<<
@@ -31803,17 +34200,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct
*/
}
- /* "netCDF4/_netCDF4.pyx":3371
+ /* "netCDF4/_netCDF4.pyx":3415
* 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, 3371, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3415, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3372
+ /* "netCDF4/_netCDF4.pyx":3416
* return self._enumtype
* elif self._isprimitive:
* return self.dtype # <<<<<<<<<<<<<<
@@ -31825,7 +34222,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct
__pyx_r = __pyx_v_self->dtype;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3371
+ /* "netCDF4/_netCDF4.pyx":3415
* elif self._isenum:
* return self._enumtype
* elif self._isprimitive: # <<<<<<<<<<<<<<
@@ -31834,7 +34231,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct
*/
}
- /* "netCDF4/_netCDF4.pyx":3364
+ /* "netCDF4/_netCDF4.pyx":3408
* VLType/CompoundType/EnumType instance
* (for compound, vlen or enum data types)"""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -31854,7 +34251,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3376
+/* "netCDF4/_netCDF4.pyx":3420
* property shape:
* """find current sizes of all variable dimensions"""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -31887,11 +34284,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p
Py_ssize_t __pyx_t_4;
PyObject *(*__pyx_t_5)(PyObject *);
PyObject *__pyx_t_6 = NULL;
- Py_ssize_t __pyx_t_7;
+ int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
+ Py_ssize_t __pyx_t_9;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "netCDF4/_netCDF4.pyx":3377
+ /* "netCDF4/_netCDF4.pyx":3421
* """find current sizes of all variable dimensions"""
* def __get__(self):
* shape = () # <<<<<<<<<<<<<<
@@ -31901,17 +34299,17 @@ 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":3378
+ /* "netCDF4/_netCDF4.pyx":3422
* 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, 3378, __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, 3422, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -31921,10 +34319,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, 3378, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3422, __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, 3378, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3422, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -31932,27 +34330,27 @@ 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, 3378, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3422, __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, 3378, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3422, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_5)) {
if (likely(PyList_CheckExact(__pyx_t_2))) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 3378, __pyx_L1_error)
+ #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, 3422, __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, 3378, __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, 3422, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 3378, __pyx_L1_error)
+ #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, 3422, __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, 3378, __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, 3422, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -31962,7 +34360,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, 3378, __pyx_L1_error)
+ else __PYX_ERR(0, 3422, __pyx_L1_error)
}
break;
}
@@ -31971,18 +34369,18 @@ 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":3380
+ /* "netCDF4/_netCDF4.pyx":3424
* 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, 3380, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3424, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = NULL;
__pyx_t_7 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -31992,46 +34390,64 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p
__pyx_t_7 = 1;
}
}
- __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3380, __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;
+ #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, 3424, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 3424, __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, 3424, __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;
+ }
+ __Pyx_INCREF(__pyx_v_self->_grp);
+ __Pyx_GIVEREF(__pyx_v_self->_grp);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->_grp);
+ __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, 3424, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
- __Pyx_INCREF(__pyx_v_self->_grp);
- __Pyx_GIVEREF(__pyx_v_self->_grp);
- PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->_grp);
- __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, 3380, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3381
+ /* "netCDF4/_netCDF4.pyx":3425
* # 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_7 = PyObject_Length(__pyx_v_dim); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 3381, __pyx_L1_error)
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3381, __pyx_L1_error)
+ __pyx_t_9 = PyObject_Length(__pyx_v_dim); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3425, __pyx_L1_error)
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3425, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3381, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3425, __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, 3381, __pyx_L1_error)
+ __pyx_t_1 = PyNumber_Add(__pyx_v_shape, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3425, __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":3378
+ /* "netCDF4/_netCDF4.pyx":3422
* def __get__(self):
* shape = ()
* for dimname in self._getdims(): # <<<<<<<<<<<<<<
@@ -32041,7 +34457,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":3382
+ /* "netCDF4/_netCDF4.pyx":3426
* dim = _find_dim(self._grp,dimname)
* shape = shape + (len(dim),)
* return shape # <<<<<<<<<<<<<<
@@ -32053,7 +34469,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p
__pyx_r = __pyx_v_shape;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3376
+ /* "netCDF4/_netCDF4.pyx":3420
* property shape:
* """find current sizes of all variable dimensions"""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -32079,7 +34495,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __p
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3383
+/* "netCDF4/_netCDF4.pyx":3427
* shape = shape + (len(dim),)
* return shape
* def __set__(self,value): # <<<<<<<<<<<<<<
@@ -32106,20 +34522,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":3384
+ /* "netCDF4/_netCDF4.pyx":3428
* 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__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3384, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3428, __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, 3384, __pyx_L1_error)
+ __PYX_ERR(0, 3428, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3383
+ /* "netCDF4/_netCDF4.pyx":3427
* shape = shape + (len(dim),)
* return shape
* def __set__(self,value): # <<<<<<<<<<<<<<
@@ -32136,7 +34552,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape_2__set__(CYTHON_UNUSED s
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3388
+/* "netCDF4/_netCDF4.pyx":3432
* property size:
* """Return the number of stored elements."""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -32167,7 +34583,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":3389
+ /* "netCDF4/_netCDF4.pyx":3433
* """Return the number of stored elements."""
* def __get__(self):
* return numpy.prod(self.shape) # <<<<<<<<<<<<<<
@@ -32175,15 +34591,15 @@ 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, 3389, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3433, __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, 3389, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_prod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3433, __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, 3389, __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, 3433, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -32193,26 +34609,46 @@ 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, 3389, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3433, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3389, __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, 3389, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ #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, 3433, __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
+ #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, 3433, __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, 3433, __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, 3433, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3388
+ /* "netCDF4/_netCDF4.pyx":3432
* property size:
* """Return the number of stored elements."""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -32235,7 +34671,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4size___get__(struct __py
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3393
+/* "netCDF4/_netCDF4.pyx":3437
* property dimensions:
* """get variables's dimension names"""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -32264,7 +34700,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions___get__(stru
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "netCDF4/_netCDF4.pyx":3394
+ /* "netCDF4/_netCDF4.pyx":3438
* """get variables's dimension names"""
* def __get__(self):
* return self._getdims() # <<<<<<<<<<<<<<
@@ -32272,10 +34708,10 @@ 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, 3394, __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, 3438, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -32285,10 +34721,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, 3394, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3438, __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, 3394, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3438, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -32296,7 +34732,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions___get__(stru
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3393
+ /* "netCDF4/_netCDF4.pyx":3437
* property dimensions:
* """get variables's dimension names"""
* def __get__(self): # <<<<<<<<<<<<<<
@@ -32317,7 +34753,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions___get__(stru
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3395
+/* "netCDF4/_netCDF4.pyx":3439
* def __get__(self):
* return self._getdims()
* def __set__(self,value): # <<<<<<<<<<<<<<
@@ -32344,20 +34780,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":3396
+ /* "netCDF4/_netCDF4.pyx":3440
* return self._getdims()
* def __set__(self,value):
* raise AttributeError("dimensions cannot be altered") # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3396, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3440, __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, 3396, __pyx_L1_error)
+ __PYX_ERR(0, 3440, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3395
+ /* "netCDF4/_netCDF4.pyx":3439
* def __get__(self):
* return self._getdims()
* def __set__(self,value): # <<<<<<<<<<<<<<
@@ -32374,7 +34810,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions_2__set__(CYTHON_UN
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3399
+/* "netCDF4/_netCDF4.pyx":3443
*
*
* def group(self): # <<<<<<<<<<<<<<
@@ -32401,7 +34837,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_12group(struct __pyx_obj_
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("group", 0);
- /* "netCDF4/_netCDF4.pyx":3404
+ /* "netCDF4/_netCDF4.pyx":3448
*
* return the group that this `netCDF4.Variable` is a member of."""
* return self._grp # <<<<<<<<<<<<<<
@@ -32413,7 +34849,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":3399
+ /* "netCDF4/_netCDF4.pyx":3443
*
*
* def group(self): # <<<<<<<<<<<<<<
@@ -32428,7 +34864,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_12group(struct __pyx_obj_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3406
+/* "netCDF4/_netCDF4.pyx":3450
* return self._grp
*
* def ncattrs(self): # <<<<<<<<<<<<<<
@@ -32456,7 +34892,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":3411
+ /* "netCDF4/_netCDF4.pyx":3455
*
* return netCDF attribute names for this `netCDF4.Variable` in a list."""
* return _get_att_names(self._grpid, self._varid) # <<<<<<<<<<<<<<
@@ -32464,13 +34900,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, 3411, __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, 3455, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3406
+ /* "netCDF4/_netCDF4.pyx":3450
* return self._grp
*
* def ncattrs(self): # <<<<<<<<<<<<<<
@@ -32489,7 +34925,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_14ncattrs(struct __pyx_ob
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3413
+/* "netCDF4/_netCDF4.pyx":3457
* return _get_att_names(self._grpid, self._varid)
*
* def setncattr(self,name,value): # <<<<<<<<<<<<<<
@@ -32526,11 +34962,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, 3413, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, 1); __PYX_ERR(0, 3457, __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, 3413, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr") < 0)) __PYX_ERR(0, 3457, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -32543,7 +34979,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, 3413, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3457, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4.Variable.setncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -32565,22 +35001,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_16setncattr(struct __pyx_
PyObject *__pyx_t_4 = NULL;
__Pyx_RefNannySetupContext("setncattr", 0);
- /* "netCDF4/_netCDF4.pyx":3420
+ /* "netCDF4/_netCDF4.pyx":3464
* 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, 3420, __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, 3464, __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, 3420, __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, 3464, __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, 3420, __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, 3464, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -32590,17 +35026,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, 3420, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3464, __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, 3420, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3464, __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":3421
+ /* "netCDF4/_netCDF4.pyx":3465
* attributes."""
* if self._grp.data_model != 'NETCDF4': self._grp._redef()
* _set_att(self._grp, self._varid, name, value) # <<<<<<<<<<<<<<
@@ -32609,27 +35045,27 @@ 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, 3421, __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, 3465, __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":3422
+ /* "netCDF4/_netCDF4.pyx":3466
* 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, 3422, __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, 3466, __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, 3422, __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, 3466, __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, 3422, __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, 3466, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -32639,17 +35075,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, 3422, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3466, __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, 3422, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3466, __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":3413
+ /* "netCDF4/_netCDF4.pyx":3457
* return _get_att_names(self._grpid, self._varid)
*
* def setncattr(self,name,value): # <<<<<<<<<<<<<<
@@ -32672,7 +35108,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_16setncattr(struct __pyx_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3424
+/* "netCDF4/_netCDF4.pyx":3468
* if self._grp.data_model != 'NETCDF4': self._grp._enddef()
*
* def setncattr_string(self,name,value): # <<<<<<<<<<<<<<
@@ -32682,7 +35118,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_16setncattr(struct __pyx_
/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_19setncattr_string(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_18setncattr_string[] = "\n**`setncattr_string(self,name,value)`**\n\nset a netCDF variable 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`.";
+static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_18setncattr_string[] = "\n**`setncattr_string(self,name,value)`**\n\nset a netCDF variable 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_8Variable_19setncattr_string(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_name = 0;
PyObject *__pyx_v_value = 0;
@@ -32709,11 +35145,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, 3424, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("setncattr_string", 1, 2, 2, 1); __PYX_ERR(0, 3468, __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, 3424, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr_string") < 0)) __PYX_ERR(0, 3468, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -32726,7 +35162,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, 3424, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("setncattr_string", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3468, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4.Variable.setncattr_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -32747,12 +35183,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_18setncattr_string(struct
PyObject *__pyx_t_1 = NULL;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- struct __pyx_opt_args_7netCDF4_8_netCDF4__set_att __pyx_t_5;
+ struct __pyx_opt_args_7netCDF4_8_netCDF4__set_att __pyx_t_4;
__Pyx_RefNannySetupContext("setncattr_string", 0);
- /* "netCDF4/_netCDF4.pyx":3432
- * `NC_STRING` if the file format is `NETCDF4`."""
+ /* "netCDF4/_netCDF4.pyx":3477
+ * Use if you need to set an attribute to an array of variable-length strings."""
* cdef nc_type xtype
* xtype=-99 # <<<<<<<<<<<<<<
* if self._grp.data_model != 'NETCDF4':
@@ -32760,49 +35195,49 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_18setncattr_string(struct
*/
__pyx_v_xtype = -99;
- /* "netCDF4/_netCDF4.pyx":3433
+ /* "netCDF4/_netCDF4.pyx":3478
* 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, 3433, __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, 3478, __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, 3433, __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, 3478, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3434
+ /* "netCDF4/_netCDF4.pyx":3479
* xtype=-99
* 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, str(value), xtype=xtype, force_ncstring=True)
+ * _set_att(self._grp, self._varid, name, value, xtype=xtype, force_ncstring=True)
*/
__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":3435
+ /* "netCDF4/_netCDF4.pyx":3480
* 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, str(value), xtype=xtype, force_ncstring=True)
+ * _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, 3435, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3480, __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, 3435, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3480, __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, 3435, __pyx_L1_error)
+ __PYX_ERR(0, 3480, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3433
+ /* "netCDF4/_netCDF4.pyx":3478
* cdef nc_type xtype
* xtype=-99
* if self._grp.data_model != 'NETCDF4': # <<<<<<<<<<<<<<
@@ -32811,33 +35246,24 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_18setncattr_string(struct
*/
}
- /* "netCDF4/_netCDF4.pyx":3436
+ /* "netCDF4/_netCDF4.pyx":3481
* msg='file format does not support NC_STRING attributes'
* raise IOError(msg)
- * _set_att(self._grp, self._varid, name, str(value), xtype=xtype, force_ncstring=True) # <<<<<<<<<<<<<<
+ * _set_att(self._grp, self._varid, name, value, xtype=xtype, force_ncstring=True) # <<<<<<<<<<<<<<
*
* def setncatts(self,attdict):
*/
__pyx_t_3 = __pyx_v_self->_grp;
__Pyx_INCREF(__pyx_t_3);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3436, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(__pyx_v_value);
- __Pyx_GIVEREF(__pyx_v_value);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
- __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3436, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_5.__pyx_n = 2;
- __pyx_t_5.xtype = __pyx_v_xtype;
- __pyx_t_5.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_t_4, &__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3436, __pyx_L1_error)
+ __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, 3481, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3424
+ /* "netCDF4/_netCDF4.pyx":3468
* if self._grp.data_model != 'NETCDF4': self._grp._enddef()
*
* def setncattr_string(self,name,value): # <<<<<<<<<<<<<<
@@ -32851,7 +35277,6 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_18setncattr_string(struct
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("netCDF4._netCDF4.Variable.setncattr_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -32861,8 +35286,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_18setncattr_string(struct
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3438
- * _set_att(self._grp, self._varid, name, str(value), xtype=xtype, force_ncstring=True)
+/* "netCDF4/_netCDF4.pyx":3483
+ * _set_att(self._grp, self._varid, name, value, xtype=xtype, force_ncstring=True)
*
* def setncatts(self,attdict): # <<<<<<<<<<<<<<
* """
@@ -32899,22 +35324,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_
PyObject *(*__pyx_t_9)(PyObject *);
__Pyx_RefNannySetupContext("setncatts", 0);
- /* "netCDF4/_netCDF4.pyx":3446
+ /* "netCDF4/_netCDF4.pyx":3491
* 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, 3446, __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, 3491, __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, 3446, __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, 3491, __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, 3446, __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, 3491, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -32924,27 +35349,27 @@ 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, 3446, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3491, __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, 3446, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3491, __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":3447
+ /* "netCDF4/_netCDF4.pyx":3492
* 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, 3447, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attdict, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3492, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -32954,10 +35379,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, 3447, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3492, __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, 3447, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3492, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -32965,27 +35390,27 @@ 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, 3447, __pyx_L1_error)
+ __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3492, __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, 3447, __pyx_L1_error)
+ __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3492, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
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_COMPILING_IN_CPYTHON
- __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, 3447, __pyx_L1_error)
+ #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, 3492, __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, 3447, __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, 3492, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 3447, __pyx_L1_error)
+ #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, 3492, __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, 3447, __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, 3492, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -32995,7 +35420,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, 3447, __pyx_L1_error)
+ else __PYX_ERR(0, 3492, __pyx_L1_error)
}
break;
}
@@ -33003,7 +35428,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_
}
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -33011,9 +35436,9 @@ 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, 3447, __pyx_L1_error)
+ __PYX_ERR(0, 3492, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
@@ -33024,15 +35449,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, 3447, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3492, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3447, __pyx_L1_error)
+ __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3492, __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, 3447, __pyx_L1_error)
+ __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3492, __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;
@@ -33040,7 +35465,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, 3447, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 3492, __pyx_L1_error)
__pyx_t_9 = NULL;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
goto __pyx_L7_unpacking_done;
@@ -33048,7 +35473,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, 3447, __pyx_L1_error)
+ __PYX_ERR(0, 3492, __pyx_L1_error)
__pyx_L7_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
@@ -33056,7 +35481,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":3448
+ /* "netCDF4/_netCDF4.pyx":3493
* if self._grp.data_model != 'NETCDF4': self._grp._redef()
* for name, value in attdict.items():
* _set_att(self._grp, self._varid, name, value) # <<<<<<<<<<<<<<
@@ -33065,12 +35490,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, 3448, __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, 3493, __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":3447
+ /* "netCDF4/_netCDF4.pyx":3492
* each attribute"""
* if self._grp.data_model != 'NETCDF4': self._grp._redef()
* for name, value in attdict.items(): # <<<<<<<<<<<<<<
@@ -33080,22 +35505,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3449
+ /* "netCDF4/_netCDF4.pyx":3494
* 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, 3449, __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, 3494, __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, 3449, __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, 3494, __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, 3449, __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, 3494, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -33105,18 +35530,18 @@ 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, 3449, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3494, __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, 3449, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3494, __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":3438
- * _set_att(self._grp, self._varid, name, str(value), xtype=xtype, force_ncstring=True)
+ /* "netCDF4/_netCDF4.pyx":3483
+ * _set_att(self._grp, self._varid, name, value, xtype=xtype, force_ncstring=True)
*
* def setncatts(self,attdict): # <<<<<<<<<<<<<<
* """
@@ -33142,7 +35567,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3451
+/* "netCDF4/_netCDF4.pyx":3496
* if self._grp.data_model != 'NETCDF4': self._grp._enddef()
*
* def getncattr(self,name): # <<<<<<<<<<<<<<
@@ -33152,7 +35577,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20setncatts(struct __pyx_
/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_23getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_22getncattr[] = "\n**`getncattr(self,name)`**\n\nretrievel a netCDF variable attribute. Use if you need to set a\nnetCDF attribute with the same name as one of the reserved python\nattributes.";
+static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_22getncattr[] = "\n**`getncattr(self,name)`**\n\nretrieve a netCDF variable attribute. Use if you need to set a\nnetCDF attribute with the same name as one of the reserved python\nattributes.";
static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_23getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
@@ -33171,7 +35596,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_22getncattr(struct __pyx_
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("getncattr", 0);
- /* "netCDF4/_netCDF4.pyx":3458
+ /* "netCDF4/_netCDF4.pyx":3503
* netCDF attribute with the same name as one of the reserved python
* attributes."""
* return _get_att(self._grp, self._varid, name) # <<<<<<<<<<<<<<
@@ -33181,14 +35606,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, 3458, __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, 3503, __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":3451
+ /* "netCDF4/_netCDF4.pyx":3496
* if self._grp.data_model != 'NETCDF4': self._grp._enddef()
*
* def getncattr(self,name): # <<<<<<<<<<<<<<
@@ -33208,7 +35633,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_22getncattr(struct __pyx_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3460
+/* "netCDF4/_netCDF4.pyx":3505
* return _get_att(self._grp, self._varid, name)
*
* def delncattr(self, name): # <<<<<<<<<<<<<<
@@ -33243,44 +35668,44 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_24delncattr(struct __pyx_
PyObject *__pyx_t_5 = NULL;
__Pyx_RefNannySetupContext("delncattr", 0);
- /* "netCDF4/_netCDF4.pyx":3468
+ /* "netCDF4/_netCDF4.pyx":3513
* 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, 3468, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3513, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_bytestr = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3469
+ /* "netCDF4/_netCDF4.pyx":3514
* 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, 3469, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3514, __pyx_L1_error)
__pyx_v_attname = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":3470
+ /* "netCDF4/_netCDF4.pyx":3515
* 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, 3470, __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, 3515, __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, 3470, __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, 3515, __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, 3470, __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, 3515, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -33290,17 +35715,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, 3470, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3515, __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, 3470, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3515, __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":3471
+ /* "netCDF4/_netCDF4.pyx":3516
* attname = bytestr
* if self._grp.data_model != 'NETCDF4': self._grp._redef()
* ierr = nc_del_att(self._grpid, self._varid, attname) # <<<<<<<<<<<<<<
@@ -33309,22 +35734,22 @@ 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":3472
+ /* "netCDF4/_netCDF4.pyx":3517
* 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((<char *>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, 3472, __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, 3517, __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, 3472, __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, 3517, __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, 3472, __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, 3517, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -33334,17 +35759,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, 3472, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3517, __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, 3472, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3517, __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":3473
+ /* "netCDF4/_netCDF4.pyx":3518
* ierr = nc_del_att(self._grpid, self._varid, attname)
* if self._grp.data_model != 'NETCDF4': self._grp._enddef()
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -33354,7 +35779,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":3474
+ /* "netCDF4/_netCDF4.pyx":3519
* if self._grp.data_model != 'NETCDF4': self._grp._enddef()
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -33362,22 +35787,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, 3474, __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, 3519, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3474, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3519, __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, 3474, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3519, __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, 3474, __pyx_L1_error)
+ __PYX_ERR(0, 3519, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3473
+ /* "netCDF4/_netCDF4.pyx":3518
* ierr = nc_del_att(self._grpid, self._varid, attname)
* if self._grp.data_model != 'NETCDF4': self._grp._enddef()
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -33386,7 +35811,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_24delncattr(struct __pyx_
*/
}
- /* "netCDF4/_netCDF4.pyx":3460
+ /* "netCDF4/_netCDF4.pyx":3505
* return _get_att(self._grp, self._varid, name)
*
* def delncattr(self, name): # <<<<<<<<<<<<<<
@@ -33410,7 +35835,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_24delncattr(struct __pyx_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3476
+/* "netCDF4/_netCDF4.pyx":3521
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def filters(self): # <<<<<<<<<<<<<<
@@ -33448,38 +35873,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":3482
+ /* "netCDF4/_netCDF4.pyx":3527
* 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, 3482, __pyx_L1_error)
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3527, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_zlib, Py_False) < 0) __PYX_ERR(0, 3482, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shuffle, Py_False) < 0) __PYX_ERR(0, 3482, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_complevel, __pyx_int_0) < 0) __PYX_ERR(0, 3482, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fletcher32, Py_False) < 0) __PYX_ERR(0, 3482, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_zlib, Py_False) < 0) __PYX_ERR(0, 3527, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shuffle, Py_False) < 0) __PYX_ERR(0, 3527, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_complevel, __pyx_int_0) < 0) __PYX_ERR(0, 3527, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fletcher32, Py_False) < 0) __PYX_ERR(0, 3527, __pyx_L1_error)
__pyx_v_filtdict = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3483
+ /* "netCDF4/_netCDF4.pyx":3528
* 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, 3483, __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, 3528, __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, 3483, __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, 3528, __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, 3483, __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, 3528, __pyx_L1_error)
__pyx_t_2 = __pyx_t_3;
__pyx_L4_bool_binop_done:;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -33490,7 +35915,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":3484
+ /* "netCDF4/_netCDF4.pyx":3529
* filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False}
* if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
* with nogil: # <<<<<<<<<<<<<<
@@ -33504,7 +35929,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3485
+ /* "netCDF4/_netCDF4.pyx":3530
* 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) # <<<<<<<<<<<<<<
@@ -33514,7 +35939,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":3484
+ /* "netCDF4/_netCDF4.pyx":3529
* filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False}
* if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
* with nogil: # <<<<<<<<<<<<<<
@@ -33532,7 +35957,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob
}
}
- /* "netCDF4/_netCDF4.pyx":3486
+ /* "netCDF4/_netCDF4.pyx":3531
* with nogil:
* ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -33542,7 +35967,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":3487
+ /* "netCDF4/_netCDF4.pyx":3532
* ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -33550,22 +35975,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, 3487, __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, 3532, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3487, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3532, __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, 3487, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3532, __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, 3487, __pyx_L1_error)
+ __PYX_ERR(0, 3532, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3486
+ /* "netCDF4/_netCDF4.pyx":3531
* with nogil:
* ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -33574,7 +35999,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob
*/
}
- /* "netCDF4/_netCDF4.pyx":3488
+ /* "netCDF4/_netCDF4.pyx":3533
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* with nogil: # <<<<<<<<<<<<<<
@@ -33588,7 +36013,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3489
+ /* "netCDF4/_netCDF4.pyx":3534
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* with nogil:
* ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32) # <<<<<<<<<<<<<<
@@ -33598,7 +36023,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":3488
+ /* "netCDF4/_netCDF4.pyx":3533
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* with nogil: # <<<<<<<<<<<<<<
@@ -33616,7 +36041,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob
}
}
- /* "netCDF4/_netCDF4.pyx":3490
+ /* "netCDF4/_netCDF4.pyx":3535
* with nogil:
* ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -33626,7 +36051,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":3491
+ /* "netCDF4/_netCDF4.pyx":3536
* ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -33634,22 +36059,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, 3491, __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, 3536, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3491, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3536, __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, 3491, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3536, __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, 3491, __pyx_L1_error)
+ __PYX_ERR(0, 3536, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3490
+ /* "netCDF4/_netCDF4.pyx":3535
* with nogil:
* ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -33658,7 +36083,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob
*/
}
- /* "netCDF4/_netCDF4.pyx":3492
+ /* "netCDF4/_netCDF4.pyx":3537
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if ideflate: # <<<<<<<<<<<<<<
@@ -33668,28 +36093,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":3493
+ /* "netCDF4/_netCDF4.pyx":3538
* raise RuntimeError((<char *>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, 3493, __pyx_L1_error)
+ if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_zlib, Py_True) < 0)) __PYX_ERR(0, 3538, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3494
+ /* "netCDF4/_netCDF4.pyx":3539
* 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, 3494, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ideflate_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3539, __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, 3494, __pyx_L1_error)
+ if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_complevel, __pyx_t_1) < 0)) __PYX_ERR(0, 3539, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3492
+ /* "netCDF4/_netCDF4.pyx":3537
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if ideflate: # <<<<<<<<<<<<<<
@@ -33698,7 +36123,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob
*/
}
- /* "netCDF4/_netCDF4.pyx":3495
+ /* "netCDF4/_netCDF4.pyx":3540
* filtdict['zlib']=True
* filtdict['complevel']=ideflate_level
* if ishuffle: # <<<<<<<<<<<<<<
@@ -33708,16 +36133,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":3496
+ /* "netCDF4/_netCDF4.pyx":3541
* 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, 3496, __pyx_L1_error)
+ if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_shuffle, Py_True) < 0)) __PYX_ERR(0, 3541, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3495
+ /* "netCDF4/_netCDF4.pyx":3540
* filtdict['zlib']=True
* filtdict['complevel']=ideflate_level
* if ishuffle: # <<<<<<<<<<<<<<
@@ -33726,7 +36151,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob
*/
}
- /* "netCDF4/_netCDF4.pyx":3497
+ /* "netCDF4/_netCDF4.pyx":3542
* if ishuffle:
* filtdict['shuffle']=True
* if ifletcher32: # <<<<<<<<<<<<<<
@@ -33736,16 +36161,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":3498
+ /* "netCDF4/_netCDF4.pyx":3543
* 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, 3498, __pyx_L1_error)
+ if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_fletcher32, Py_True) < 0)) __PYX_ERR(0, 3543, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3497
+ /* "netCDF4/_netCDF4.pyx":3542
* if ishuffle:
* filtdict['shuffle']=True
* if ifletcher32: # <<<<<<<<<<<<<<
@@ -33754,7 +36179,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob
*/
}
- /* "netCDF4/_netCDF4.pyx":3499
+ /* "netCDF4/_netCDF4.pyx":3544
* if ifletcher32:
* filtdict['fletcher32']=True
* return filtdict # <<<<<<<<<<<<<<
@@ -33766,7 +36191,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob
__pyx_r = __pyx_v_filtdict;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3476
+ /* "netCDF4/_netCDF4.pyx":3521
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def filters(self): # <<<<<<<<<<<<<<
@@ -33787,7 +36212,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26filters(struct __pyx_ob
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3501
+/* "netCDF4/_netCDF4.pyx":3546
* return filtdict
*
* def endian(self): # <<<<<<<<<<<<<<
@@ -33821,29 +36246,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":3507
+ /* "netCDF4/_netCDF4.pyx":3552
* 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, 3507, __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, 3552, __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, 3507, __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, 3552, __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, 3507, __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, 3552, __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":3508
+ /* "netCDF4/_netCDF4.pyx":3553
* cdef int ierr, iendian
* if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:
* return 'native' # <<<<<<<<<<<<<<
@@ -33855,7 +36280,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":3507
+ /* "netCDF4/_netCDF4.pyx":3552
* 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']: # <<<<<<<<<<<<<<
@@ -33864,7 +36289,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj
*/
}
- /* "netCDF4/_netCDF4.pyx":3509
+ /* "netCDF4/_netCDF4.pyx":3554
* if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:
* return 'native'
* with nogil: # <<<<<<<<<<<<<<
@@ -33878,7 +36303,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3510
+ /* "netCDF4/_netCDF4.pyx":3555
* return 'native'
* with nogil:
* ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian) # <<<<<<<<<<<<<<
@@ -33888,7 +36313,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":3509
+ /* "netCDF4/_netCDF4.pyx":3554
* if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:
* return 'native'
* with nogil: # <<<<<<<<<<<<<<
@@ -33906,7 +36331,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj
}
}
- /* "netCDF4/_netCDF4.pyx":3511
+ /* "netCDF4/_netCDF4.pyx":3556
* with nogil:
* ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -33916,7 +36341,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":3512
+ /* "netCDF4/_netCDF4.pyx":3557
* ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -33924,22 +36349,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, 3512, __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, 3557, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3512, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3557, __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, 3512, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3557, __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, 3512, __pyx_L1_error)
+ __PYX_ERR(0, 3557, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3511
+ /* "netCDF4/_netCDF4.pyx":3556
* with nogil:
* ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -33948,7 +36373,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj
*/
}
- /* "netCDF4/_netCDF4.pyx":3513
+ /* "netCDF4/_netCDF4.pyx":3558
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if iendian == NC_ENDIAN_LITTLE: # <<<<<<<<<<<<<<
@@ -33958,7 +36383,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj
switch (__pyx_v_iendian) {
case NC_ENDIAN_LITTLE:
- /* "netCDF4/_netCDF4.pyx":3514
+ /* "netCDF4/_netCDF4.pyx":3559
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if iendian == NC_ENDIAN_LITTLE:
* return 'little' # <<<<<<<<<<<<<<
@@ -33970,7 +36395,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":3513
+ /* "netCDF4/_netCDF4.pyx":3558
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* if iendian == NC_ENDIAN_LITTLE: # <<<<<<<<<<<<<<
@@ -33979,7 +36404,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj
*/
break;
- /* "netCDF4/_netCDF4.pyx":3515
+ /* "netCDF4/_netCDF4.pyx":3560
* if iendian == NC_ENDIAN_LITTLE:
* return 'little'
* elif iendian == NC_ENDIAN_BIG: # <<<<<<<<<<<<<<
@@ -33988,7 +36413,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj
*/
case NC_ENDIAN_BIG:
- /* "netCDF4/_netCDF4.pyx":3516
+ /* "netCDF4/_netCDF4.pyx":3561
* return 'little'
* elif iendian == NC_ENDIAN_BIG:
* return 'big' # <<<<<<<<<<<<<<
@@ -34000,7 +36425,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":3515
+ /* "netCDF4/_netCDF4.pyx":3560
* if iendian == NC_ENDIAN_LITTLE:
* return 'little'
* elif iendian == NC_ENDIAN_BIG: # <<<<<<<<<<<<<<
@@ -34010,7 +36435,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj
break;
default:
- /* "netCDF4/_netCDF4.pyx":3518
+ /* "netCDF4/_netCDF4.pyx":3563
* return 'big'
* else:
* return 'native' # <<<<<<<<<<<<<<
@@ -34024,7 +36449,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj
break;
}
- /* "netCDF4/_netCDF4.pyx":3501
+ /* "netCDF4/_netCDF4.pyx":3546
* return filtdict
*
* def endian(self): # <<<<<<<<<<<<<<
@@ -34044,7 +36469,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28endian(struct __pyx_obj
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3520
+/* "netCDF4/_netCDF4.pyx":3565
* return 'native'
*
* def chunking(self): # <<<<<<<<<<<<<<
@@ -34084,22 +36509,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o
int __pyx_t_7;
__Pyx_RefNannySetupContext("chunking", 0);
- /* "netCDF4/_netCDF4.pyx":3530
+ /* "netCDF4/_netCDF4.pyx":3575
* 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 = <size_t *>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, 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, 3575, __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, 3530, __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, 3575, __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, 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, 3575, __pyx_L1_error)
__pyx_t_2 = __pyx_t_3;
__pyx_L4_bool_binop_done:;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -34111,17 +36536,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":3531
+ /* "netCDF4/_netCDF4.pyx":3576
* cdef size_t *chunksizesp
* if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return None
* ndims = self.ndim # <<<<<<<<<<<<<<
* chunksizesp = <size_t *>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, 3531, __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, 3576, __pyx_L1_error)
__pyx_v_ndims = __pyx_t_4;
- /* "netCDF4/_netCDF4.pyx":3532
+ /* "netCDF4/_netCDF4.pyx":3577
* if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return None
* ndims = self.ndim
* chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<<
@@ -34130,7 +36555,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":3533
+ /* "netCDF4/_netCDF4.pyx":3578
* ndims = self.ndim
* chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
* with nogil: # <<<<<<<<<<<<<<
@@ -34144,7 +36569,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3534
+ /* "netCDF4/_netCDF4.pyx":3579
* chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
* with nogil:
* ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp) # <<<<<<<<<<<<<<
@@ -34154,7 +36579,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":3533
+ /* "netCDF4/_netCDF4.pyx":3578
* ndims = self.ndim
* chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
* with nogil: # <<<<<<<<<<<<<<
@@ -34172,7 +36597,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o
}
}
- /* "netCDF4/_netCDF4.pyx":3535
+ /* "netCDF4/_netCDF4.pyx":3580
* with nogil:
* ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -34182,7 +36607,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":3536
+ /* "netCDF4/_netCDF4.pyx":3581
* ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -34190,22 +36615,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, 3536, __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, 3581, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3536, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3581, __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, 3536, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3581, __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, 3536, __pyx_L1_error)
+ __PYX_ERR(0, 3581, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3535
+ /* "netCDF4/_netCDF4.pyx":3580
* with nogil:
* ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -34214,19 +36639,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o
*/
}
- /* "netCDF4/_netCDF4.pyx":3537
+ /* "netCDF4/_netCDF4.pyx":3582
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 3537, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3582, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_chunksizes = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3538
+ /* "netCDF4/_netCDF4.pyx":3583
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* chunksizes=[]
* for n from 0 <= n < ndims: # <<<<<<<<<<<<<<
@@ -34236,20 +36661,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":3539
+ /* "netCDF4/_netCDF4.pyx":3584
* 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, 3539, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_FromSize_t((__pyx_v_chunksizesp[__pyx_v_n])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3584, __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, 3539, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_chunksizes, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 3584, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "netCDF4/_netCDF4.pyx":3540
+ /* "netCDF4/_netCDF4.pyx":3585
* for n from 0 <= n < ndims:
* chunksizes.append(chunksizesp[n])
* free(chunksizesp) # <<<<<<<<<<<<<<
@@ -34258,7 +36683,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o
*/
free(__pyx_v_chunksizesp);
- /* "netCDF4/_netCDF4.pyx":3541
+ /* "netCDF4/_netCDF4.pyx":3586
* chunksizes.append(chunksizesp[n])
* free(chunksizesp)
* if icontiguous: # <<<<<<<<<<<<<<
@@ -34268,7 +36693,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":3542
+ /* "netCDF4/_netCDF4.pyx":3587
* free(chunksizesp)
* if icontiguous:
* return 'contiguous' # <<<<<<<<<<<<<<
@@ -34280,7 +36705,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":3541
+ /* "netCDF4/_netCDF4.pyx":3586
* chunksizes.append(chunksizesp[n])
* free(chunksizesp)
* if icontiguous: # <<<<<<<<<<<<<<
@@ -34289,7 +36714,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o
*/
}
- /* "netCDF4/_netCDF4.pyx":3544
+ /* "netCDF4/_netCDF4.pyx":3589
* return 'contiguous'
* else:
* return chunksizes # <<<<<<<<<<<<<<
@@ -34303,7 +36728,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":3520
+ /* "netCDF4/_netCDF4.pyx":3565
* return 'native'
*
* def chunking(self): # <<<<<<<<<<<<<<
@@ -34324,7 +36749,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30chunking(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3546
+/* "netCDF4/_netCDF4.pyx":3591
* return chunksizes
*
* def get_var_chunk_cache(self): # <<<<<<<<<<<<<<
@@ -34363,7 +36788,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":3556
+ /* "netCDF4/_netCDF4.pyx":3601
* cdef size_t sizep, nelemsp
* cdef float preemptionp
* with nogil: # <<<<<<<<<<<<<<
@@ -34377,7 +36802,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3557
+ /* "netCDF4/_netCDF4.pyx":3602
* cdef float preemptionp
* with nogil:
* ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep, # <<<<<<<<<<<<<<
@@ -34387,7 +36812,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":3556
+ /* "netCDF4/_netCDF4.pyx":3601
* cdef size_t sizep, nelemsp
* cdef float preemptionp
* with nogil: # <<<<<<<<<<<<<<
@@ -34405,7 +36830,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str
}
}
- /* "netCDF4/_netCDF4.pyx":3559
+ /* "netCDF4/_netCDF4.pyx":3604
* ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
* &nelemsp, &preemptionp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -34415,7 +36840,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":3560
+ /* "netCDF4/_netCDF4.pyx":3605
* &nelemsp, &preemptionp)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -34423,22 +36848,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, 3560, __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, 3605, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3560, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3605, __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, 3560, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3605, __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, 3560, __pyx_L1_error)
+ __PYX_ERR(0, 3605, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3559
+ /* "netCDF4/_netCDF4.pyx":3604
* ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
* &nelemsp, &preemptionp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -34447,7 +36872,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str
*/
}
- /* "netCDF4/_netCDF4.pyx":3561
+ /* "netCDF4/_netCDF4.pyx":3606
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* size = sizep; nelems = nelemsp; preemption = preemptionp # <<<<<<<<<<<<<<
@@ -34456,12 +36881,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, 3561, __pyx_L1_error)
+ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_preemptionp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3606, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_preemption = __pyx_t_3;
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3562
+ /* "netCDF4/_netCDF4.pyx":3607
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* size = sizep; nelems = nelemsp; preemption = preemptionp
* return (size,nelems,preemption) # <<<<<<<<<<<<<<
@@ -34469,11 +36894,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, 3562, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3607, __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, 3562, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_nelems); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3607, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3562, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3607, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
@@ -34488,7 +36913,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3546
+ /* "netCDF4/_netCDF4.pyx":3591
* return chunksizes
*
* def get_var_chunk_cache(self): # <<<<<<<<<<<<<<
@@ -34510,7 +36935,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32get_var_chunk_cache(str
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3564
+/* "netCDF4/_netCDF4.pyx":3609
* return (size,nelems,preemption)
*
* def set_var_chunk_cache(self,size=None,nelems=None,preemption=None): # <<<<<<<<<<<<<<
@@ -34563,7 +36988,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, 3564, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_var_chunk_cache") < 0)) __PYX_ERR(0, 3609, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -34580,7 +37005,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, 3564, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_var_chunk_cache", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3609, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4.Variable.set_var_chunk_cache", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -34616,17 +37041,17 @@ 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":3575
+ /* "netCDF4/_netCDF4.pyx":3620
* 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, 3575, __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, 3620, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -34636,16 +37061,16 @@ 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, 3575, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3620, __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, 3575, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3620, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -34653,9 +37078,9 @@ 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, 3575, __pyx_L1_error)
+ __PYX_ERR(0, 3620, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
@@ -34669,17 +37094,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, 3575, __pyx_L1_error)
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3620, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3575, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3620, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3575, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3620, __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, 3575, __pyx_L1_error)
+ __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3620, __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;
@@ -34689,7 +37114,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, 3575, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(0, 3620, __pyx_L1_error)
__pyx_t_6 = NULL;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
goto __pyx_L4_unpacking_done;
@@ -34697,7 +37122,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, 3575, __pyx_L1_error)
+ __PYX_ERR(0, 3620, __pyx_L1_error)
__pyx_L4_unpacking_done:;
}
__pyx_v_size_orig = __pyx_t_2;
@@ -34707,7 +37132,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":3576
+ /* "netCDF4/_netCDF4.pyx":3621
* # reset chunk cache size, leave other parameters unchanged.
* size_orig, nelems_orig, preemption_orig = self.get_var_chunk_cache()
* if size is not None: # <<<<<<<<<<<<<<
@@ -34718,17 +37143,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":3577
+ /* "netCDF4/_netCDF4.pyx":3622
* 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, 3577, __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, 3622, __pyx_L1_error)
__pyx_v_sizep = __pyx_t_9;
- /* "netCDF4/_netCDF4.pyx":3576
+ /* "netCDF4/_netCDF4.pyx":3621
* # reset chunk cache size, leave other parameters unchanged.
* size_orig, nelems_orig, preemption_orig = self.get_var_chunk_cache()
* if size is not None: # <<<<<<<<<<<<<<
@@ -34738,7 +37163,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str
goto __pyx_L5;
}
- /* "netCDF4/_netCDF4.pyx":3579
+ /* "netCDF4/_netCDF4.pyx":3624
* sizep = size
* else:
* sizep = size_orig # <<<<<<<<<<<<<<
@@ -34746,12 +37171,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, 3579, __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, 3624, __pyx_L1_error)
__pyx_v_sizep = __pyx_t_9;
}
__pyx_L5:;
- /* "netCDF4/_netCDF4.pyx":3580
+ /* "netCDF4/_netCDF4.pyx":3625
* else:
* sizep = size_orig
* if nelems is not None: # <<<<<<<<<<<<<<
@@ -34762,17 +37187,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":3581
+ /* "netCDF4/_netCDF4.pyx":3626
* 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, 3581, __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, 3626, __pyx_L1_error)
__pyx_v_nelemsp = __pyx_t_9;
- /* "netCDF4/_netCDF4.pyx":3580
+ /* "netCDF4/_netCDF4.pyx":3625
* else:
* sizep = size_orig
* if nelems is not None: # <<<<<<<<<<<<<<
@@ -34782,7 +37207,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str
goto __pyx_L6;
}
- /* "netCDF4/_netCDF4.pyx":3583
+ /* "netCDF4/_netCDF4.pyx":3628
* nelemsp = nelems
* else:
* nelemsp = nelems_orig # <<<<<<<<<<<<<<
@@ -34790,12 +37215,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, 3583, __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, 3628, __pyx_L1_error)
__pyx_v_nelemsp = __pyx_t_9;
}
__pyx_L6:;
- /* "netCDF4/_netCDF4.pyx":3584
+ /* "netCDF4/_netCDF4.pyx":3629
* else:
* nelemsp = nelems_orig
* if preemption is not None: # <<<<<<<<<<<<<<
@@ -34806,17 +37231,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":3585
+ /* "netCDF4/_netCDF4.pyx":3630
* 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, 3585, __pyx_L1_error)
+ __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_preemption); if (unlikely((__pyx_t_10 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3630, __pyx_L1_error)
__pyx_v_preemptionp = __pyx_t_10;
- /* "netCDF4/_netCDF4.pyx":3584
+ /* "netCDF4/_netCDF4.pyx":3629
* else:
* nelemsp = nelems_orig
* if preemption is not None: # <<<<<<<<<<<<<<
@@ -34826,7 +37251,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str
goto __pyx_L7;
}
- /* "netCDF4/_netCDF4.pyx":3587
+ /* "netCDF4/_netCDF4.pyx":3632
* preemptionp = preemption
* else:
* preemptionp = preemption_orig # <<<<<<<<<<<<<<
@@ -34834,12 +37259,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, 3587, __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, 3632, __pyx_L1_error)
__pyx_v_preemptionp = __pyx_t_10;
}
__pyx_L7:;
- /* "netCDF4/_netCDF4.pyx":3588
+ /* "netCDF4/_netCDF4.pyx":3633
* else:
* preemptionp = preemption_orig
* ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep, # <<<<<<<<<<<<<<
@@ -34848,7 +37273,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":3590
+ /* "netCDF4/_netCDF4.pyx":3635
* ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,
* nelemsp, preemptionp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -34858,7 +37283,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":3591
+ /* "netCDF4/_netCDF4.pyx":3636
* nelemsp, preemptionp)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -34866,22 +37291,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, 3591, __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, 3636, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3591, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3636, __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, 3591, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3636, __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, 3591, __pyx_L1_error)
+ __PYX_ERR(0, 3636, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3590
+ /* "netCDF4/_netCDF4.pyx":3635
* ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,
* nelemsp, preemptionp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -34890,7 +37315,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str
*/
}
- /* "netCDF4/_netCDF4.pyx":3564
+ /* "netCDF4/_netCDF4.pyx":3609
* return (size,nelems,preemption)
*
* def set_var_chunk_cache(self,size=None,nelems=None,preemption=None): # <<<<<<<<<<<<<<
@@ -34918,7 +37343,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_34set_var_chunk_cache(str
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3593
+/* "netCDF4/_netCDF4.pyx":3638
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def __delattr__(self,name): # <<<<<<<<<<<<<<
@@ -34950,31 +37375,31 @@ 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":3595
+ /* "netCDF4/_netCDF4.pyx":3640
* 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, 3595, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3640, __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, 3595, __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, 3640, __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":3596
+ /* "netCDF4/_netCDF4.pyx":3641
* # 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, 3596, __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, 3641, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -34984,23 +37409,41 @@ 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, 3596, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3641, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3596, __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, 3596, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 3641, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 3641, __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, 3641, __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, 3641, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3595
+ /* "netCDF4/_netCDF4.pyx":3640
* def __delattr__(self,name):
* # if it's a netCDF attribute, remove it
* if name not in _private_atts: # <<<<<<<<<<<<<<
@@ -35010,7 +37453,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_36__delattr__(struct __pyx_obj_
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":3598
+ /* "netCDF4/_netCDF4.pyx":3643
* self.delncattr(name)
* else:
* raise AttributeError( # <<<<<<<<<<<<<<
@@ -35019,19 +37462,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_36__delattr__(struct __pyx_obj_
*/
/*else*/ {
- /* "netCDF4/_netCDF4.pyx":3599
+ /* "netCDF4/_netCDF4.pyx":3644
* 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, 3599, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3644, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3599, __pyx_L1_error)
+ __pyx_t_4 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3644, __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, 3599, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3644, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_name);
__Pyx_GIVEREF(__pyx_v_name);
@@ -35039,32 +37482,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, 3599, __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, 3644, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3598
+ /* "netCDF4/_netCDF4.pyx":3643
* 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, 3598, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3643, __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, 3598, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3643, __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, 3598, __pyx_L1_error)
+ __PYX_ERR(0, 3643, __pyx_L1_error)
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":3593
+ /* "netCDF4/_netCDF4.pyx":3638
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def __delattr__(self,name): # <<<<<<<<<<<<<<
@@ -35087,7 +37530,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_36__delattr__(struct __pyx_obj_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3601
+/* "netCDF4/_netCDF4.pyx":3646
* "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
*
* def __setattr__(self,name,value): # <<<<<<<<<<<<<<
@@ -35116,68 +37559,69 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_
int __pyx_t_2;
int __pyx_t_3;
PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- Py_ssize_t __pyx_t_6;
- PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
__Pyx_RefNannySetupContext("__setattr__", 0);
__Pyx_INCREF(__pyx_v_value);
- /* "netCDF4/_netCDF4.pyx":3604
+ /* "netCDF4/_netCDF4.pyx":3649
* # 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, 3604, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3649, __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, 3604, __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, 3649, __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":3607
+ /* "netCDF4/_netCDF4.pyx":3652
* # 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, 3607, __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, 3652, __pyx_L1_error)
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":3608
+ /* "netCDF4/_netCDF4.pyx":3653
* # 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, 3608, __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, 3653, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_msg = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3610
+ /* "netCDF4/_netCDF4.pyx":3655
* 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, 3610, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3655, __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, 3610, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3655, __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, 3610, __pyx_L1_error)
+ __PYX_ERR(0, 3655, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3607
+ /* "netCDF4/_netCDF4.pyx":3652
* # if setting _FillValue or missing_value, make sure value
* # has same type and byte order as variable.
* if name == '_FillValue': # <<<<<<<<<<<<<<
@@ -35186,177 +37630,219 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3617
+ /* "netCDF4/_netCDF4.pyx":3662
* # "VLEN or compound variable"
* # raise AttributeError(msg)
- * elif name == 'missing_value' and self._isprimitive: # <<<<<<<<<<<<<<
+ * elif name in ['valid_min','valid_max','valid_range','missing_value'] and self._isprimitive: # <<<<<<<<<<<<<<
* if (is_native_little and self.endian() == 'big') or\
* (is_native_big and self.endian() == 'little'):
*/
- __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_missing_value, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3617, __pyx_L1_error)
- if (__pyx_t_2) {
+ __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, 3662, __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, 3662, __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, 3662, __pyx_L1_error)
+ if (!__pyx_t_5) {
} else {
- __pyx_t_3 = __pyx_t_2;
+ __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, 3662, __pyx_L1_error)
+ __pyx_t_2 = __pyx_t_5;
+ __pyx_L7_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_5 = (__pyx_t_2 != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
goto __pyx_L5_bool_binop_done;
}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3617, __pyx_L1_error)
- __pyx_t_3 = __pyx_t_2;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3662, __pyx_L1_error)
+ __pyx_t_3 = __pyx_t_5;
__pyx_L5_bool_binop_done:;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":3618
+ /* "netCDF4/_netCDF4.pyx":3663
* # raise AttributeError(msg)
- * elif name == 'missing_value' and self._isprimitive:
+ * elif name in ['valid_min','valid_max','valid_range','missing_value'] and self._isprimitive:
* if (is_native_little and self.endian() == 'big') or\ # <<<<<<<<<<<<<<
* (is_native_big and self.endian() == 'little'):
* value = numpy.array(value, self.dtype).byteswap(True)
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3618, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3618, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3663, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (!__pyx_t_2) {
- goto __pyx_L9_next_or;
+ if (!__pyx_t_5) {
+ goto __pyx_L13_next_or;
} else {
}
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3618, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
- if (likely(__pyx_t_5)) {
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(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_1);
- __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_1, function);
}
}
- if (__pyx_t_5) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3618, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3663, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
} else {
- __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3618, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3663, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3618, __pyx_L1_error)
+ __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3663, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (!__pyx_t_2) {
+ if (!__pyx_t_5) {
} else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L8_bool_binop_done;
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L12_bool_binop_done;
}
- __pyx_L9_next_or:;
+ __pyx_L13_next_or:;
- /* "netCDF4/_netCDF4.pyx":3619
- * elif name == 'missing_value' and self._isprimitive:
+ /* "netCDF4/_netCDF4.pyx":3664
+ * elif name in ['valid_min','valid_max','valid_range','missing_value'] and self._isprimitive:
* if (is_native_little and self.endian() == 'big') or\
* (is_native_big and self.endian() == 'little'): # <<<<<<<<<<<<<<
* value = numpy.array(value, self.dtype).byteswap(True)
* else:
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3619, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3664, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3619, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3664, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_2) {
+ if (__pyx_t_5) {
} else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L8_bool_binop_done;
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L12_bool_binop_done;
}
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3619, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3664, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
- if (likely(__pyx_t_5)) {
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(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_1);
- __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_1, function);
}
}
- if (__pyx_t_5) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3619, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3664, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
} else {
- __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3619, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3664, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_little, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3619, __pyx_L1_error)
+ __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_little, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3664, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_3 = __pyx_t_2;
- __pyx_L8_bool_binop_done:;
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L12_bool_binop_done:;
- /* "netCDF4/_netCDF4.pyx":3618
+ /* "netCDF4/_netCDF4.pyx":3663
* # raise AttributeError(msg)
- * elif name == 'missing_value' and self._isprimitive:
+ * elif name in ['valid_min','valid_max','valid_range','missing_value'] and self._isprimitive:
* if (is_native_little and self.endian() == 'big') or\ # <<<<<<<<<<<<<<
* (is_native_big and self.endian() == 'little'):
* value = numpy.array(value, self.dtype).byteswap(True)
*/
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":3620
+ /* "netCDF4/_netCDF4.pyx":3665
* if (is_native_little and self.endian() == 'big') or\
* (is_native_big and self.endian() == 'little'):
* value = numpy.array(value, self.dtype).byteswap(True) # <<<<<<<<<<<<<<
* else:
* value = numpy.array(value, self.dtype)
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3620, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3665, __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, 3620, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3665, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = NULL;
- __pyx_t_6 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_1)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_5, function);
- __pyx_t_6 = 1;
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_7 = 1;
}
}
- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3620, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- if (__pyx_t_1) {
- __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ #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, 3665, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #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, 3665, __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, 3665, __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;
+ }
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_value);
+ __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, 3665, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
- __Pyx_INCREF(__pyx_v_value);
- __Pyx_GIVEREF(__pyx_v_value);
- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
- __Pyx_INCREF(__pyx_v_self->dtype);
- __Pyx_GIVEREF(__pyx_v_self->dtype);
- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_self->dtype);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3620, __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 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3620, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_byteswap); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3665, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3620, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3665, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":3618
+ /* "netCDF4/_netCDF4.pyx":3663
* # raise AttributeError(msg)
- * elif name == 'missing_value' and self._isprimitive:
+ * elif name in ['valid_min','valid_max','valid_range','missing_value'] and self._isprimitive:
* if (is_native_little and self.endian() == 'big') or\ # <<<<<<<<<<<<<<
* (is_native_big and self.endian() == 'little'):
* value = numpy.array(value, self.dtype).byteswap(True)
*/
- goto __pyx_L7;
+ goto __pyx_L11;
}
- /* "netCDF4/_netCDF4.pyx":3622
+ /* "netCDF4/_netCDF4.pyx":3667
* value = numpy.array(value, self.dtype).byteswap(True)
* else:
* value = numpy.array(value, self.dtype) # <<<<<<<<<<<<<<
@@ -35364,91 +37850,127 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_
* elif not name.endswith('__'):
*/
/*else*/ {
- __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3622, __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, 3622, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = NULL;
- __pyx_t_6 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
- if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
- __Pyx_INCREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3667, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3667, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_6);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
- __pyx_t_6 = 1;
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ __pyx_t_7 = 1;
}
}
- __pyx_t_1 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3622, __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;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_value, __pyx_v_self->dtype};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3667, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_value, __pyx_v_self->dtype};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3667, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 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, 3667, __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;
+ }
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_v_value);
+ __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_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3667, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- __Pyx_INCREF(__pyx_v_value);
- __Pyx_GIVEREF(__pyx_v_value);
- PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_v_value);
- __Pyx_INCREF(__pyx_v_self->dtype);
- __Pyx_GIVEREF(__pyx_v_self->dtype);
- PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_v_self->dtype);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3622, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
__pyx_t_4 = 0;
}
- __pyx_L7:;
+ __pyx_L11:;
- /* "netCDF4/_netCDF4.pyx":3617
+ /* "netCDF4/_netCDF4.pyx":3662
* # "VLEN or compound variable"
* # raise AttributeError(msg)
- * elif name == 'missing_value' and self._isprimitive: # <<<<<<<<<<<<<<
+ * elif name in ['valid_min','valid_max','valid_range','missing_value'] and self._isprimitive: # <<<<<<<<<<<<<<
* if (is_native_little and self.endian() == 'big') or\
* (is_native_big and self.endian() == 'little'):
*/
}
- /* "netCDF4/_netCDF4.pyx":3623
+ /* "netCDF4/_netCDF4.pyx":3668
* else:
* value = numpy.array(value, self.dtype)
* self.setncattr(name, value) # <<<<<<<<<<<<<<
* elif not name.endswith('__'):
* if hasattr(self,name):
*/
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setncattr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3623, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setncattr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__pyx_t_1 = NULL;
- __pyx_t_6 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_1)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
- __pyx_t_6 = 1;
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ __pyx_t_7 = 1;
}
}
- __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3623, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- if (__pyx_t_1) {
- __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_name, __pyx_v_value};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3668, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_name, __pyx_v_value};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3668, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_1) {
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_name);
+ __Pyx_GIVEREF(__pyx_v_name);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_name);
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_value);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
- __Pyx_INCREF(__pyx_v_name);
- __Pyx_GIVEREF(__pyx_v_name);
- PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_name);
- __Pyx_INCREF(__pyx_v_value);
- __Pyx_GIVEREF(__pyx_v_value);
- PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_value);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3623, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":3604
+ /* "netCDF4/_netCDF4.pyx":3649
* # if name in _private_atts, it is stored at the python
* # level and not in the netCDF file.
* if name not in _private_atts: # <<<<<<<<<<<<<<
@@ -35458,78 +37980,78 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":3624
+ /* "netCDF4/_netCDF4.pyx":3669
* value = numpy.array(value, self.dtype)
* 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, 3624, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3669, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3624, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3669, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3624, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_2 = ((!__pyx_t_3) != 0);
- if (__pyx_t_2) {
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3669, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_5 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_5) {
- /* "netCDF4/_netCDF4.pyx":3625
+ /* "netCDF4/_netCDF4.pyx":3670
* 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, 3625, __pyx_L1_error)
- __pyx_t_3 = (__pyx_t_2 != 0);
+ __pyx_t_5 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_name); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 3670, __pyx_L1_error)
+ __pyx_t_3 = (__pyx_t_5 != 0);
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":3627
+ /* "netCDF4/_netCDF4.pyx":3672
* 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_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3627, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_4 = PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3627, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3672, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_4 = PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3672, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3627, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3672, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_name);
__Pyx_GIVEREF(__pyx_v_name);
- PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_name);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_name);
__Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_8, 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_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3627, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib_2, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3672, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":3626
+ /* "netCDF4/_netCDF4.pyx":3671
* 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_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3626, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3671, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3626, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3671, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(0, 3626, __pyx_L1_error)
+ __PYX_ERR(0, 3671, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3625
+ /* "netCDF4/_netCDF4.pyx":3670
* self.setncattr(name, value)
* elif not name.endswith('__'):
* if hasattr(self,name): # <<<<<<<<<<<<<<
@@ -35538,7 +38060,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3629
+ /* "netCDF4/_netCDF4.pyx":3674
* "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))
* else:
* self.__dict__[name]=value # <<<<<<<<<<<<<<
@@ -35546,13 +38068,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, 3629, __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, 3674, __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, 3629, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 3674, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
- /* "netCDF4/_netCDF4.pyx":3624
+ /* "netCDF4/_netCDF4.pyx":3669
* value = numpy.array(value, self.dtype)
* self.setncattr(name, value)
* elif not name.endswith('__'): # <<<<<<<<<<<<<<
@@ -35562,7 +38084,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":3601
+ /* "netCDF4/_netCDF4.pyx":3646
* "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
*
* def __setattr__(self,name,value): # <<<<<<<<<<<<<<
@@ -35576,8 +38098,8 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("netCDF4._netCDF4.Variable.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
@@ -35587,7 +38109,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__setattr__(struct __pyx_obj_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3631
+/* "netCDF4/_netCDF4.pyx":3676
* self.__dict__[name]=value
*
* def __getattr__(self,name): # <<<<<<<<<<<<<<
@@ -35623,61 +38145,62 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py
int __pyx_t_8;
PyObject *__pyx_t_9 = NULL;
PyObject *__pyx_t_10 = NULL;
- PyObject *__pyx_t_11 = NULL;
+ int __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
__Pyx_RefNannySetupContext("__getattr__", 0);
__Pyx_INCREF(__pyx_v_name);
- /* "netCDF4/_netCDF4.pyx":3634
+ /* "netCDF4/_netCDF4.pyx":3679
* # 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, 3634, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3679, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3634, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3679, __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, 3634, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3679, __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, 3634, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3679, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3634, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3679, __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, 3634, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3679, __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":3636
+ /* "netCDF4/_netCDF4.pyx":3681
* 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, 3636, __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, 3681, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3637
+ /* "netCDF4/_netCDF4.pyx":3682
* # 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, 3637, __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, 3682, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ 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);
@@ -35687,29 +38210,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, 3637, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3682, __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, 3637, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3682, __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":3638
+ /* "netCDF4/_netCDF4.pyx":3683
* 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, 3638, __pyx_L1_error)
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3683, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_values = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":3639
+ /* "netCDF4/_netCDF4.pyx":3684
* names = self.ncattrs()
* values = []
* for name in names: # <<<<<<<<<<<<<<
@@ -35720,26 +38243,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, 3639, __pyx_L1_error)
+ __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3684, __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, 3639, __pyx_L1_error)
+ __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3684, __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_COMPILING_IN_CPYTHON
- __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, 3639, __pyx_L1_error)
+ #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, 3684, __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, 3639, __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, 3684, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
} else {
if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 3639, __pyx_L1_error)
+ #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, 3684, __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, 3639, __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, 3684, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
}
@@ -35749,7 +38272,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, 3639, __pyx_L1_error)
+ else __PYX_ERR(0, 3684, __pyx_L1_error)
}
break;
}
@@ -35758,7 +38281,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":3640
+ /* "netCDF4/_netCDF4.pyx":3685
* values = []
* for name in names:
* values.append(_get_att(self._grp, self._varid, name)) # <<<<<<<<<<<<<<
@@ -35767,13 +38290,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, 3640, __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, 3685, __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, 3640, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_5); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3685, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3639
+ /* "netCDF4/_netCDF4.pyx":3684
* names = self.ncattrs()
* values = []
* for name in names: # <<<<<<<<<<<<<<
@@ -35783,7 +38306,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":3641
+ /* "netCDF4/_netCDF4.pyx":3686
* for name in names:
* values.append(_get_att(self._grp, self._varid, name))
* return OrderedDict(zip(names,values)) # <<<<<<<<<<<<<<
@@ -35791,39 +38314,57 @@ 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, 3641, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3686, __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, 3641, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3686, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__pyx_t_10 = NULL;
- __pyx_t_6 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
__Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_9, function);
- __pyx_t_6 = 1;
+ __pyx_t_11 = 1;
}
}
- __pyx_t_11 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3641, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- if (__pyx_t_10) {
- __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
- }
- __Pyx_INCREF(__pyx_v_names);
- __Pyx_GIVEREF(__pyx_v_names);
- PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_v_names);
- __Pyx_INCREF(__pyx_v_values);
- __Pyx_GIVEREF(__pyx_v_values);
- PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_v_values);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3641, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ #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, 3686, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #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, 3686, __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, 3686, __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;
+ }
+ __Pyx_INCREF(__pyx_v_names);
+ __Pyx_GIVEREF(__pyx_v_names);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_names);
+ __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, 3686, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_9 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_9)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -35833,26 +38374,46 @@ 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, 3641, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3686, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else {
- __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3641, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_3);
- __pyx_t_3 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3641, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ #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, 3686, __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
+ #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, 3686, __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, 3686, __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, 3686, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3636
+ /* "netCDF4/_netCDF4.pyx":3681
* if name.startswith('__') and name.endswith('__'):
* # if __dict__ requested, return a dict with netCDF attributes.
* if name == '__dict__': # <<<<<<<<<<<<<<
@@ -35861,7 +38422,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py
*/
}
- /* "netCDF4/_netCDF4.pyx":3643
+ /* "netCDF4/_netCDF4.pyx":3688
* return OrderedDict(zip(names,values))
* else:
* raise AttributeError # <<<<<<<<<<<<<<
@@ -35870,10 +38431,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, 3643, __pyx_L1_error)
+ __PYX_ERR(0, 3688, __pyx_L1_error)
}
- /* "netCDF4/_netCDF4.pyx":3634
+ /* "netCDF4/_netCDF4.pyx":3679
* # if name in _private_atts, it is stored at the python
* # level and not in the netCDF file.
* if name.startswith('__') and name.endswith('__'): # <<<<<<<<<<<<<<
@@ -35882,21 +38443,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py
*/
}
- /* "netCDF4/_netCDF4.pyx":3644
+ /* "netCDF4/_netCDF4.pyx":3689
* 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, 3644, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3689, __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, 3644, __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, 3689, __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":3645
+ /* "netCDF4/_netCDF4.pyx":3690
* raise AttributeError
* elif name in _private_atts:
* return self.__dict__[name] # <<<<<<<<<<<<<<
@@ -35904,16 +38465,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, 3645, __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, 3690, __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, 3645, __pyx_L1_error)
+ __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3690, __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":3644
+ /* "netCDF4/_netCDF4.pyx":3689
* else:
* raise AttributeError
* elif name in _private_atts: # <<<<<<<<<<<<<<
@@ -35922,7 +38483,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py
*/
}
- /* "netCDF4/_netCDF4.pyx":3647
+ /* "netCDF4/_netCDF4.pyx":3692
* return self.__dict__[name]
* else:
* return self.getncattr(name) # <<<<<<<<<<<<<<
@@ -35931,31 +38492,49 @@ 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, 3647, __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, 3692, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_11 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_11)) {
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_12);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_2, function);
}
}
- if (!__pyx_t_11) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3647, __pyx_L1_error)
+ if (!__pyx_t_12) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3692, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
} else {
- __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3647, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __pyx_t_11 = 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, 3647, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ #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, 3692, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #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, 3692, __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, 3692, __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, 3692, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
@@ -35963,7 +38542,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":3631
+ /* "netCDF4/_netCDF4.pyx":3676
* self.__dict__[name]=value
*
* def __getattr__(self,name): # <<<<<<<<<<<<<<
@@ -35978,7 +38557,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
- __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
__Pyx_AddTraceback("netCDF4._netCDF4.Variable.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -35990,7 +38569,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40__getattr__(struct __py
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3649
+/* "netCDF4/_netCDF4.pyx":3694
* return self.getncattr(name)
*
* def renameAttribute(self, oldname, newname): # <<<<<<<<<<<<<<
@@ -36027,11 +38606,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, 3649, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, 1); __PYX_ERR(0, 3694, __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, 3649, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameAttribute") < 0)) __PYX_ERR(0, 3694, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -36044,7 +38623,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, 3649, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3694, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4.Variable.renameAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -36070,51 +38649,51 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_42renameAttribute(struct
PyObject *__pyx_t_4 = NULL;
__Pyx_RefNannySetupContext("renameAttribute", 0);
- /* "netCDF4/_netCDF4.pyx":3657
+ /* "netCDF4/_netCDF4.pyx":3702
* 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, 3657, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_oldname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3702, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_bytestr = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3658
+ /* "netCDF4/_netCDF4.pyx":3703
* 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, 3658, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3703, __pyx_L1_error)
__pyx_v_oldnamec = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":3659
+ /* "netCDF4/_netCDF4.pyx":3704
* 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, 3659, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3704, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3660
+ /* "netCDF4/_netCDF4.pyx":3705
* 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, 3660, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3705, __pyx_L1_error)
__pyx_v_newnamec = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":3661
+ /* "netCDF4/_netCDF4.pyx":3706
* bytestr = _strencode(newname)
* newnamec = bytestr
* ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec) # <<<<<<<<<<<<<<
@@ -36123,7 +38702,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":3662
+ /* "netCDF4/_netCDF4.pyx":3707
* newnamec = bytestr
* ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -36133,7 +38712,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":3663
+ /* "netCDF4/_netCDF4.pyx":3708
* ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec)
* if ierr != NC_NOERR:
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -36141,22 +38720,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, 3663, __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, 3708, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3663, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3708, __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, 3663, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3708, __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, 3663, __pyx_L1_error)
+ __PYX_ERR(0, 3708, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3662
+ /* "netCDF4/_netCDF4.pyx":3707
* newnamec = bytestr
* ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -36165,7 +38744,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_42renameAttribute(struct
*/
}
- /* "netCDF4/_netCDF4.pyx":3649
+ /* "netCDF4/_netCDF4.pyx":3694
* return self.getncattr(name)
*
* def renameAttribute(self, oldname, newname): # <<<<<<<<<<<<<<
@@ -36188,7 +38767,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_42renameAttribute(struct
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3665
+/* "netCDF4/_netCDF4.pyx":3710
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def __getitem__(self, elem): # <<<<<<<<<<<<<<
@@ -36232,36 +38811,37 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
- Py_ssize_t __pyx_t_5;
+ int __pyx_t_5;
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *(*__pyx_t_8)(PyObject *);
int __pyx_t_9;
- PyObject *(*__pyx_t_10)(PyObject *);
- int __pyx_t_11;
- PyObject *__pyx_t_12 = NULL;
- Py_ssize_t __pyx_t_13;
+ Py_ssize_t __pyx_t_10;
+ PyObject *(*__pyx_t_11)(PyObject *);
+ int __pyx_t_12;
+ PyObject *__pyx_t_13 = NULL;
int __pyx_t_14;
- PyObject *__pyx_t_15 = NULL;
+ Py_ssize_t __pyx_t_15;
PyObject *__pyx_t_16 = NULL;
PyObject *__pyx_t_17 = NULL;
- double __pyx_t_18;
+ PyObject *__pyx_t_18 = NULL;
+ double __pyx_t_19;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "netCDF4/_netCDF4.pyx":3671
+ /* "netCDF4/_netCDF4.pyx":3716
* # 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, 3671, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3716, __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, 3671, __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, 3716, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
__pyx_t_5 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -36271,24 +38851,44 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
__pyx_t_5 = 1;
}
}
- __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3671, __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;
+ #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, 3716, __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
+ #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, 3716, __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, 3716, __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;
+ }
+ __Pyx_INCREF(__pyx_v_elem);
+ __Pyx_GIVEREF(__pyx_v_elem);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_elem);
+ __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, 3716, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
- __Pyx_INCREF(__pyx_v_elem);
- __Pyx_GIVEREF(__pyx_v_elem);
- PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_elem);
- __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, 3671, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -36296,9 +38896,9 @@ 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, 3671, __pyx_L1_error)
+ __PYX_ERR(0, 3716, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
@@ -36319,7 +38919,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, 3671, __pyx_L1_error)
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 3716, __pyx_L1_error)
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
@@ -36329,7 +38929,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, 3671, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3716, __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;
@@ -36338,7 +38938,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, 3671, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 4) < 0) __PYX_ERR(0, 3716, __pyx_L1_error)
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L4_unpacking_done;
@@ -36346,7 +38946,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, 3671, __pyx_L1_error)
+ __PYX_ERR(0, 3716, __pyx_L1_error)
__pyx_L4_unpacking_done:;
}
__pyx_v_start = __pyx_t_2;
@@ -36358,17 +38958,17 @@ 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":3672
+ /* "netCDF4/_netCDF4.pyx":3717
* # 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, 3672, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3717, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -36378,54 +38978,72 @@ 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, 3672, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3717, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3672, __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, 3672, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 3717, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 3717, __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, 3717, __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, 3717, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_datashape = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3673
+ /* "netCDF4/_netCDF4.pyx":3718
* 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, 3673, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3718, __pyx_L1_error)
if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":3674
+ /* "netCDF4/_netCDF4.pyx":3719
* 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, 3674, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3719, __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, 3674, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3719, __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, 3674, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3719, __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, 3674, __pyx_L1_error)
+ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3719, __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, 3674, __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, 3674, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_n_s_O) < 0) __PYX_ERR(0, 3719, __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, 3719, __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;
@@ -36433,7 +39051,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":3673
+ /* "netCDF4/_netCDF4.pyx":3718
* start, count, stride, put_ind = _StartCountStride(elem,self.shape)
* datashape = _out_array_shape(count)
* if self._isvlen: # <<<<<<<<<<<<<<
@@ -36443,7 +39061,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
goto __pyx_L5;
}
- /* "netCDF4/_netCDF4.pyx":3676
+ /* "netCDF4/_netCDF4.pyx":3721
* data = numpy.empty(datashape, dtype='O')
* else:
* data = numpy.empty(datashape, dtype=self.dtype) # <<<<<<<<<<<<<<
@@ -36451,20 +39069,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, 3676, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3721, __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, 3676, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3721, __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, 3676, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3721, __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, 3676, __pyx_L1_error)
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3721, __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, 3676, __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, 3676, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_v_self->dtype) < 0) __PYX_ERR(0, 3721, __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, 3721, __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;
@@ -36474,28 +39092,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
}
__pyx_L5:;
- /* "netCDF4/_netCDF4.pyx":3682
+ /* "netCDF4/_netCDF4.pyx":3727
* # 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, 3682, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3727, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3682, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3727, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(__pyx_slice__54);
- __Pyx_GIVEREF(__pyx_slice__54);
- PyList_SET_ITEM(__pyx_t_1, 0, __pyx_slice__54);
- __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3682, __pyx_L1_error)
+ __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, 3727, __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":3683
+ /* "netCDF4/_netCDF4.pyx":3728
* # 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]): # <<<<<<<<<<<<<<
@@ -36504,46 +39122,46 @@ 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, 3683, __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, 3728, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, -1L, NULL, NULL, &__pyx_slice__55, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3683, __pyx_L1_error)
+ __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, 3728, __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_5 = 0;
- __pyx_t_10 = NULL;
+ __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
+ __pyx_t_11 = NULL;
} else {
- __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3683, __pyx_L1_error)
+ __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3728, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3683, __pyx_L1_error)
+ __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3728, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
for (;;) {
- if (likely(!__pyx_t_10)) {
+ if (likely(!__pyx_t_11)) {
if (likely(PyList_CheckExact(__pyx_t_1))) {
- if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 3683, __pyx_L1_error)
+ 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, 3728, __pyx_L1_error)
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3683, __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, 3728, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
- if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 3683, __pyx_L1_error)
+ 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, 3728, __pyx_L1_error)
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3683, __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, 3728, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
} else {
- __pyx_t_4 = __pyx_t_10(__pyx_t_1);
+ __pyx_t_4 = __pyx_t_11(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
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, 3683, __pyx_L1_error)
+ else __PYX_ERR(0, 3728, __pyx_L1_error)
}
break;
}
@@ -36553,29 +39171,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, 3683, __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, 3728, __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":3684
+ /* "netCDF4/_netCDF4.pyx":3729
* 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, 3684, __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, 3729, __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, 3684, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3729, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_11) {
+ if (__pyx_t_12) {
} else {
- __pyx_t_9 = __pyx_t_11;
+ __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, 3684, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3729, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(Py_Ellipsis);
__Pyx_GIVEREF(Py_Ellipsis);
@@ -36583,14 +39201,14 @@ 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, 3684, __pyx_L1_error)
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_put_ind, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3729, __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, 3684, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ravel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3729, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -36600,35 +39218,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, 3684, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3729, __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, 3684, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3729, __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, 3684, __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, 3729, __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, 3684, __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, 3729, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 3684, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3729, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_9 = __pyx_t_11;
+ __pyx_t_9 = __pyx_t_12;
__pyx_L9_bool_binop_done:;
if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":3685
+ /* "netCDF4/_netCDF4.pyx":3730
* 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, 3685, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_squeeze, __pyx_v_i, __pyx_int_0) < 0)) __PYX_ERR(0, 3730, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3684
+ /* "netCDF4/_netCDF4.pyx":3729
* squeeze = data.ndim * [slice(None),]
* for i,n in enumerate(put_ind.shape[:-1]):
* if n == 1 and put_ind[...,i].ravel()[0] == -1: # <<<<<<<<<<<<<<
@@ -36637,7 +39255,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
*/
}
- /* "netCDF4/_netCDF4.pyx":3683
+ /* "netCDF4/_netCDF4.pyx":3728
* # 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]): # <<<<<<<<<<<<<<
@@ -36648,28 +39266,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":3688
+ /* "netCDF4/_netCDF4.pyx":3733
*
* # 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, 3688, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3733, __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, 3688, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3733, __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, 3688, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3733, __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, 3688, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3733, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
@@ -36678,7 +39296,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
__pyx_t_4 = 0;
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -36688,46 +39306,66 @@ 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, 3688, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3733, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else {
- __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3688, __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, 3688, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ #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, 3733, __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
+ #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, 3733, __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, 3733, __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, 3733, __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_DECREF_SET(__pyx_v_start, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3689
+ /* "netCDF4/_netCDF4.pyx":3734
* # 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, 3689, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3734, __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, 3689, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3734, __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, 3689, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3734, __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, 3689, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3734, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
@@ -36736,7 +39374,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
__pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -36746,46 +39384,66 @@ 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, 3689, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3734, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else {
- __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3689, __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, 3689, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ #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, 3734, __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
+ #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, 3734, __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, 3734, __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, 3734, __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_DECREF_SET(__pyx_v_count, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3690
+ /* "netCDF4/_netCDF4.pyx":3735
* 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, 3690, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3735, __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, 3690, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3735, __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, 3690, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3735, __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, 3690, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3735, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
@@ -36794,7 +39452,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
__pyx_t_4 = 0;
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -36804,46 +39462,66 @@ 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, 3690, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3735, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else {
- __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3690, __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, 3690, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ #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, 3735, __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
+ #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, 3735, __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, 3735, __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, 3735, __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_DECREF_SET(__pyx_v_stride, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3691
+ /* "netCDF4/_netCDF4.pyx":3736
* 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, 3691, __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, 3736, __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, 3691, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3736, __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, 3691, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3736, __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, 3691, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3736, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
@@ -36852,7 +39530,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
__pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -36862,36 +39540,56 @@ 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, 3691, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3736, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else {
- __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3691, __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, 3691, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ #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, 3736, __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
+ #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, 3736, __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, 3736, __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, 3736, __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_DECREF_SET(__pyx_v_put_ind, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3694
+ /* "netCDF4/_netCDF4.pyx":3739
*
* # 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, 3694, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3739, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_4 = NULL;
__pyx_t_5 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -36901,62 +39599,80 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
__pyx_t_5 = 1;
}
}
- __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3694, __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;
- }
- __Pyx_INCREF(__pyx_v_start);
- __Pyx_GIVEREF(__pyx_v_start);
- PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_start);
- __Pyx_INCREF(__pyx_v_count);
- __Pyx_GIVEREF(__pyx_v_count);
- PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_count);
- __Pyx_INCREF(__pyx_v_stride);
- __Pyx_GIVEREF(__pyx_v_stride);
- PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_stride);
- __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, 3694, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 3739, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #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, 3739, __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, 3739, __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;
+ }
+ __Pyx_INCREF(__pyx_v_start);
+ __Pyx_GIVEREF(__pyx_v_start);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_start);
+ __Pyx_INCREF(__pyx_v_count);
+ __Pyx_GIVEREF(__pyx_v_count);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_count);
+ __Pyx_INCREF(__pyx_v_stride);
+ __Pyx_GIVEREF(__pyx_v_stride);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_stride);
+ __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, 3739, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
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_5 = 0;
- __pyx_t_10 = NULL;
+ __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
+ __pyx_t_11 = NULL;
} else {
- __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3694, __pyx_L1_error)
+ __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3739, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3694, __pyx_L1_error)
+ __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3739, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
for (;;) {
- if (likely(!__pyx_t_10)) {
+ if (likely(!__pyx_t_11)) {
if (likely(PyList_CheckExact(__pyx_t_1))) {
- if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 3694, __pyx_L1_error)
+ 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, 3739, __pyx_L1_error)
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3694, __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, 3739, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
} else {
- if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 3694, __pyx_L1_error)
+ 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, 3739, __pyx_L1_error)
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3694, __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, 3739, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
}
} else {
- __pyx_t_3 = __pyx_t_10(__pyx_t_1);
+ __pyx_t_3 = __pyx_t_11(__pyx_t_1);
if (unlikely(!__pyx_t_3)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 3694, __pyx_L1_error)
+ else __PYX_ERR(0, 3739, __pyx_L1_error)
}
break;
}
@@ -36964,7 +39680,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
}
if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
PyObject* sequence = __pyx_t_3;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -36972,9 +39688,9 @@ 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, 3694, __pyx_L1_error)
+ __PYX_ERR(0, 3739, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
@@ -36995,7 +39711,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, 3694, __pyx_L1_error)
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 3739, __pyx_L1_error)
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
@@ -37005,24 +39721,24 @@ 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_12 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3694, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3739, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_8 = Py_TYPE(__pyx_t_12)->tp_iternext;
+ __pyx_t_8 = Py_TYPE(__pyx_t_13)->tp_iternext;
for (index=0; index < 4; index++) {
- PyObject* item = __pyx_t_8(__pyx_t_12); if (unlikely(!item)) goto __pyx_L21_unpacking_failed;
+ PyObject* item = __pyx_t_8(__pyx_t_13); if (unlikely(!item)) goto __pyx_L21_unpacking_failed;
__Pyx_GOTREF(item);
*(temps[index]) = item;
}
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_12), 4) < 0) __PYX_ERR(0, 3694, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_13), 4) < 0) __PYX_ERR(0, 3739, __pyx_L1_error)
__pyx_t_8 = NULL;
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
goto __pyx_L22_unpacking_done;
__pyx_L21_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
__pyx_t_8 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 3694, __pyx_L1_error)
+ __PYX_ERR(0, 3739, __pyx_L1_error)
__pyx_L22_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_6);
@@ -37034,76 +39750,94 @@ 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":3695
+ /* "netCDF4/_netCDF4.pyx":3740
* # 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, 3695, __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, 3740, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_2 = NULL;
- __pyx_t_13 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
__Pyx_INCREF(__pyx_t_2);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_7, function);
- __pyx_t_13 = 1;
+ __pyx_t_5 = 1;
}
}
- __pyx_t_4 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3695, __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;
+ #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, 3740, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #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, 3740, __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, 3740, __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;
+ }
+ __Pyx_INCREF(__pyx_v_a);
+ __Pyx_GIVEREF(__pyx_v_a);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_a);
+ __Pyx_INCREF(__pyx_v_b);
+ __Pyx_GIVEREF(__pyx_v_b);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_b);
+ __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, 3740, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
- __Pyx_INCREF(__pyx_v_a);
- __Pyx_GIVEREF(__pyx_v_a);
- PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_13, __pyx_v_a);
- __Pyx_INCREF(__pyx_v_b);
- __Pyx_GIVEREF(__pyx_v_b);
- PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_13, __pyx_v_b);
- __Pyx_INCREF(__pyx_v_c);
- __Pyx_GIVEREF(__pyx_v_c);
- PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_13, __pyx_v_c);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3695, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF_SET(__pyx_v_datout, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3696
+ /* "netCDF4/_netCDF4.pyx":3741
* 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_11 = PyObject_HasAttr(__pyx_v_datout, __pyx_n_s_shape); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3696, __pyx_L1_error)
- __pyx_t_14 = ((!(__pyx_t_11 != 0)) != 0);
+ __pyx_t_12 = PyObject_HasAttr(__pyx_v_datout, __pyx_n_s_shape); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 3741, __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, 3696, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3741, __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, 3696, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datout, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3741, __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, 3696, __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, 3741, __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, 3696, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 3741, __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":3697
+ /* "netCDF4/_netCDF4.pyx":3742
* datout = self._get(a,b,c)
* if not hasattr(datout,'shape') or data.shape == datout.shape:
* data = datout # <<<<<<<<<<<<<<
@@ -37113,7 +39847,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":3696
+ /* "netCDF4/_netCDF4.pyx":3741
* 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: # <<<<<<<<<<<<<<
@@ -37123,7 +39857,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
goto __pyx_L23;
}
- /* "netCDF4/_netCDF4.pyx":3699
+ /* "netCDF4/_netCDF4.pyx":3744
* data = datout
* else:
* shape = getattr(data[tuple(i)], 'shape', ()) # <<<<<<<<<<<<<<
@@ -37131,49 +39865,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, 3699, __pyx_L1_error)
+ __pyx_t_4 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3744, __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, 3699, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_data, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3744, __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, 3699, __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, 3744, __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":3700
+ /* "netCDF4/_netCDF4.pyx":3745
* 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, 3700, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 3745, __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, 3700, __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, 3745, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_13 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 3700, __pyx_L1_error)
+ __pyx_t_15 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 3745, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_14 = ((!(__pyx_t_13 != 0)) != 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":3702
+ /* "netCDF4/_netCDF4.pyx":3747
* 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, 3702, __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, 3747, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3700
+ /* "netCDF4/_netCDF4.pyx":3745
* else:
* shape = getattr(data[tuple(i)], 'shape', ())
* if self._isvlen and not len(self.dimensions): # <<<<<<<<<<<<<<
@@ -37183,7 +39917,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
goto __pyx_L26;
}
- /* "netCDF4/_netCDF4.pyx":3704
+ /* "netCDF4/_netCDF4.pyx":3749
* data[0] = datout
* else:
* data[tuple(i)] = datout.reshape(shape) # <<<<<<<<<<<<<<
@@ -37191,10 +39925,10 @@ 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, 3704, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datout, __pyx_n_s_reshape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3749, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -37204,23 +39938,41 @@ 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, 3704, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3749, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
} else {
- __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3704, __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, 3704, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ #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, 3749, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #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, 3749, __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, 3749, __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, 3749, __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, 3704, __pyx_L1_error)
+ __pyx_t_7 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3749, __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, 3704, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_7, __pyx_t_4) < 0)) __PYX_ERR(0, 3749, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
@@ -37228,7 +39980,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
}
__pyx_L23:;
- /* "netCDF4/_netCDF4.pyx":3694
+ /* "netCDF4/_netCDF4.pyx":3739
*
* # Fill output array with data chunks.
* for (a,b,c,i) in zip(start, count, stride, put_ind): # <<<<<<<<<<<<<<
@@ -37238,33 +39990,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":3707
+ /* "netCDF4/_netCDF4.pyx":3752
*
* # 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, 3707, __pyx_L1_error)
+ __pyx_t_9 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3752, __pyx_L1_error)
__pyx_t_14 = (__pyx_t_9 != 0);
if (__pyx_t_14) {
- /* "netCDF4/_netCDF4.pyx":3708
+ /* "netCDF4/_netCDF4.pyx":3753
* # 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, 3708, __pyx_L1_error)
+ __pyx_t_1 = PySequence_Tuple(__pyx_v_squeeze); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3753, __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, 3708, __pyx_L1_error)
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_data, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3753, __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":3707
+ /* "netCDF4/_netCDF4.pyx":3752
*
* # Remove extra singleton dimensions.
* if hasattr(data,'shape'): # <<<<<<<<<<<<<<
@@ -37273,51 +40025,51 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
*/
}
- /* "netCDF4/_netCDF4.pyx":3709
+ /* "netCDF4/_netCDF4.pyx":3754
* 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, 3709, __pyx_L1_error)
- __pyx_t_11 = (__pyx_t_9 != 0);
- if (__pyx_t_11) {
+ __pyx_t_9 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3754, __pyx_L1_error)
+ __pyx_t_12 = (__pyx_t_9 != 0);
+ if (__pyx_t_12) {
} else {
- __pyx_t_14 = __pyx_t_11;
+ __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, 3709, __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, 3754, __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, 3709, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3754, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_14 = __pyx_t_11;
+ __pyx_t_14 = __pyx_t_12;
__pyx_L31_bool_binop_done:;
if (__pyx_t_14) {
- /* "netCDF4/_netCDF4.pyx":3712
+ /* "netCDF4/_netCDF4.pyx":3757
* # 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, 3712, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3757, __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, 3712, __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, 3757, __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, 3712, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 3757, __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, 3712, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3757, __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, 3712, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3757, __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, 3712, __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, 3757, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -37327,26 +40079,46 @@ 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, 3712, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3757, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3712, __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, 3712, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ #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, 3757, __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
+ #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, 3757, __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, 3757, __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, 3757, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1);
__pyx_t_1 = 0;
}
- /* "netCDF4/_netCDF4.pyx":3709
+ /* "netCDF4/_netCDF4.pyx":3754
* if hasattr(data,'shape'):
* data = data[tuple(squeeze)]
* if hasattr(data,'ndim') and self.ndim == 0: # <<<<<<<<<<<<<<
@@ -37355,7 +40127,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
*/
}
- /* "netCDF4/_netCDF4.pyx":3722
+ /* "netCDF4/_netCDF4.pyx":3767
* # 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). # <<<<<<<<<<<<<<
@@ -37365,45 +40137,45 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
- __Pyx_XGOTREF(__pyx_t_15);
+ __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
__Pyx_XGOTREF(__pyx_t_16);
__Pyx_XGOTREF(__pyx_t_17);
+ __Pyx_XGOTREF(__pyx_t_18);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3723
+ /* "netCDF4/_netCDF4.pyx":3768
* # 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, 3723, __pyx_L34_error)
- __pyx_t_11 = (__pyx_t_14 != 0);
- if (__pyx_t_11) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3723, __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, 3768, __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, 3768, __pyx_L34_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_18 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_18 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3723, __pyx_L34_error)
+ __pyx_t_19 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_19 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3768, __pyx_L34_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "netCDF4/_netCDF4.pyx":3724
+ /* "netCDF4/_netCDF4.pyx":3769
* 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_11 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3724, __pyx_L34_error)
- __pyx_t_14 = (__pyx_t_11 != 0);
+ __pyx_t_12 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 3769, __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, 3724, __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, 3769, __pyx_L34_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_18 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_18 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3724, __pyx_L34_error)
+ __pyx_t_19 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_19 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3769, __pyx_L34_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "netCDF4/_netCDF4.pyx":3725
+ /* "netCDF4/_netCDF4.pyx":3770
* if hasattr(self,'scale_factor'): float(self.scale_factor)
* if hasattr(self,'add_offset'): float(self.add_offset)
* valid_scaleoffset = True # <<<<<<<<<<<<<<
@@ -37412,7 +40184,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
*/
__pyx_v_valid_scaleoffset = 1;
- /* "netCDF4/_netCDF4.pyx":3722
+ /* "netCDF4/_netCDF4.pyx":3767
* # 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). # <<<<<<<<<<<<<<
@@ -37420,13 +40192,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
* if hasattr(self,'add_offset'): float(self.add_offset)
*/
}
- __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
__Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
goto __pyx_L41_try_end;
__pyx_L34_error:;
__Pyx_PyThreadState_assign
- __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -37434,7 +40206,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":3726
+ /* "netCDF4/_netCDF4.pyx":3771
* if hasattr(self,'add_offset'): float(self.add_offset)
* valid_scaleoffset = True
* except: # <<<<<<<<<<<<<<
@@ -37443,12 +40215,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, 3726, __pyx_L36_except_error)
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(0, 3771, __pyx_L36_except_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GOTREF(__pyx_t_3);
- /* "netCDF4/_netCDF4.pyx":3727
+ /* "netCDF4/_netCDF4.pyx":3772
* valid_scaleoffset = True
* except:
* valid_scaleoffset = False # <<<<<<<<<<<<<<
@@ -37457,17 +40229,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
*/
__pyx_v_valid_scaleoffset = 0;
- /* "netCDF4/_netCDF4.pyx":3728
+ /* "netCDF4/_netCDF4.pyx":3773
* 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, 3728, __pyx_L36_except_error)
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 3773, __pyx_L36_except_error)
if (__pyx_t_14) {
- /* "netCDF4/_netCDF4.pyx":3729
+ /* "netCDF4/_netCDF4.pyx":3774
* valid_scaleoffset = False
* if self.scale:
* msg = 'invalid scale_factor or add_offset attribute, no unpacking done...' # <<<<<<<<<<<<<<
@@ -37477,20 +40249,20 @@ 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":3730
+ /* "netCDF4/_netCDF4.pyx":3775
* 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, 3730, __pyx_L36_except_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3775, __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, 3730, __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, 3775, __pyx_L36_except_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -37500,23 +40272,41 @@ 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, 3730, __pyx_L36_except_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_msg); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3775, __pyx_L36_except_error)
__Pyx_GOTREF(__pyx_t_4);
} else {
- __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3730, __pyx_L36_except_error)
- __Pyx_GOTREF(__pyx_t_12);
- __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); __pyx_t_2 = NULL;
- __Pyx_INCREF(__pyx_v_msg);
- __Pyx_GIVEREF(__pyx_v_msg);
- PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_msg);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3730, __pyx_L36_except_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ #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, 3775, __pyx_L36_except_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #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, 3775, __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, 3775, __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, 3775, __pyx_L36_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":3728
+ /* "netCDF4/_netCDF4.pyx":3773
* except:
* valid_scaleoffset = False
* if self.scale: # <<<<<<<<<<<<<<
@@ -37531,7 +40321,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
}
__pyx_L36_except_error:;
- /* "netCDF4/_netCDF4.pyx":3722
+ /* "netCDF4/_netCDF4.pyx":3767
* # 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). # <<<<<<<<<<<<<<
@@ -37539,55 +40329,55 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
* if hasattr(self,'add_offset'): float(self.add_offset)
*/
__Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_15);
__Pyx_XGIVEREF(__pyx_t_16);
__Pyx_XGIVEREF(__pyx_t_17);
- __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
+ __Pyx_XGIVEREF(__pyx_t_18);
+ __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
goto __pyx_L1_error;
__pyx_L35_exception_handled:;
__Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_15);
__Pyx_XGIVEREF(__pyx_t_16);
__Pyx_XGIVEREF(__pyx_t_17);
- __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
+ __Pyx_XGIVEREF(__pyx_t_18);
+ __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
__pyx_L41_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":3731
+ /* "netCDF4/_netCDF4.pyx":3776
* 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_11 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 3731, __pyx_L1_error)
- if (__pyx_t_11) {
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3776, __pyx_L1_error)
+ if (__pyx_t_12) {
} else {
- __pyx_t_14 = __pyx_t_11;
+ __pyx_t_14 = __pyx_t_12;
goto __pyx_L48_bool_binop_done;
}
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 3731, __pyx_L1_error)
- if (!__pyx_t_11) {
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3776, __pyx_L1_error)
+ if (!__pyx_t_12) {
} else {
- __pyx_t_14 = __pyx_t_11;
+ __pyx_t_14 = __pyx_t_12;
goto __pyx_L48_bool_binop_done;
}
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 3731, __pyx_L1_error)
- __pyx_t_14 = __pyx_t_11;
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3776, __pyx_L1_error)
+ __pyx_t_14 = __pyx_t_12;
__pyx_L48_bool_binop_done:;
if (__pyx_t_14) {
- /* "netCDF4/_netCDF4.pyx":3732
+ /* "netCDF4/_netCDF4.pyx":3777
* 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, 3732, __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, 3777, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -37597,24 +40387,42 @@ 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, 3732, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3777, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
} else {
- __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3732, __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, 3732, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ #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, 3777, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #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, 3777, __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, 3777, __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, 3777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF_SET(__pyx_v_data, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3731
+ /* "netCDF4/_netCDF4.pyx":3776
* msg = 'invalid scale_factor or add_offset attribute, no unpacking done...'
* warnings.warn(msg)
* if self.mask and (self._isprimitive or self._isenum): # <<<<<<<<<<<<<<
@@ -37623,80 +40431,80 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
*/
}
- /* "netCDF4/_netCDF4.pyx":3733
+ /* "netCDF4/_netCDF4.pyx":3778
* 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_11 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 3733, __pyx_L1_error)
- if (__pyx_t_11) {
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3778, __pyx_L1_error)
+ if (__pyx_t_12) {
} else {
- __pyx_t_14 = __pyx_t_11;
+ __pyx_t_14 = __pyx_t_12;
goto __pyx_L52_bool_binop_done;
}
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 3733, __pyx_L1_error)
- if (__pyx_t_11) {
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3778, __pyx_L1_error)
+ if (__pyx_t_12) {
} else {
- __pyx_t_14 = __pyx_t_11;
+ __pyx_t_14 = __pyx_t_12;
goto __pyx_L52_bool_binop_done;
}
- __pyx_t_11 = (__pyx_v_valid_scaleoffset != 0);
- __pyx_t_14 = __pyx_t_11;
+ __pyx_t_12 = (__pyx_v_valid_scaleoffset != 0);
+ __pyx_t_14 = __pyx_t_12;
__pyx_L52_bool_binop_done:;
if (__pyx_t_14) {
- /* "netCDF4/_netCDF4.pyx":3735
+ /* "netCDF4/_netCDF4.pyx":3780
* 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_11 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3735, __pyx_L1_error)
- __pyx_t_9 = (__pyx_t_11 != 0);
+ __pyx_t_12 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 3780, __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, 3735, __pyx_L1_error)
- __pyx_t_11 = (__pyx_t_9 != 0);
- if (__pyx_t_11) {
+ __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3780, __pyx_L1_error)
+ __pyx_t_12 = (__pyx_t_9 != 0);
+ if (__pyx_t_12) {
} else {
- __pyx_t_14 = __pyx_t_11;
+ __pyx_t_14 = __pyx_t_12;
goto __pyx_L56_bool_binop_done;
}
- /* "netCDF4/_netCDF4.pyx":3736
+ /* "netCDF4/_netCDF4.pyx":3781
* # 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, 3736, __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, 3781, __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, 3736, __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, 3781, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 3736, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3781, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- if (!__pyx_t_11) {
+ if (!__pyx_t_12) {
} else {
- __pyx_t_14 = __pyx_t_11;
+ __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, 3736, __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, 3781, __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, 3736, __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, 3781, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 3736, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3781, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_14 = __pyx_t_11;
+ __pyx_t_14 = __pyx_t_12;
__pyx_L56_bool_binop_done:;
- /* "netCDF4/_netCDF4.pyx":3735
+ /* "netCDF4/_netCDF4.pyx":3780
* 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\ # <<<<<<<<<<<<<<
@@ -37705,28 +40513,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
*/
if (__pyx_t_14) {
- /* "netCDF4/_netCDF4.pyx":3737
+ /* "netCDF4/_netCDF4.pyx":3782
* 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, 3737, __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, 3782, __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, 3737, __pyx_L1_error)
+ __pyx_t_7 = PyNumber_Multiply(__pyx_v_data, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3782, __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, 3737, __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, 3782, __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, 3737, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Add(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3782, __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":3735
+ /* "netCDF4/_netCDF4.pyx":3780
* 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\ # <<<<<<<<<<<<<<
@@ -37736,46 +40544,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
goto __pyx_L55;
}
- /* "netCDF4/_netCDF4.pyx":3739
+ /* "netCDF4/_netCDF4.pyx":3784
* 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_11 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 3739, __pyx_L1_error)
- __pyx_t_9 = (__pyx_t_11 != 0);
+ __pyx_t_12 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 3784, __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, 3739, __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, 3784, __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, 3739, __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, 3784, __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, 3739, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3784, __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":3740
+ /* "netCDF4/_netCDF4.pyx":3785
* # 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, 3740, __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, 3785, __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, 3740, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Multiply(__pyx_v_data, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3785, __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":3739
+ /* "netCDF4/_netCDF4.pyx":3784
* 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: # <<<<<<<<<<<<<<
@@ -37785,46 +40593,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
goto __pyx_L55;
}
- /* "netCDF4/_netCDF4.pyx":3742
+ /* "netCDF4/_netCDF4.pyx":3787
* 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, 3742, __pyx_L1_error)
- __pyx_t_11 = (__pyx_t_9 != 0);
- if (__pyx_t_11) {
+ __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3787, __pyx_L1_error)
+ __pyx_t_12 = (__pyx_t_9 != 0);
+ if (__pyx_t_12) {
} else {
- __pyx_t_14 = __pyx_t_11;
+ __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, 3742, __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, 3787, __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, 3742, __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, 3787, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 3742, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 3787, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_14 = __pyx_t_11;
+ __pyx_t_14 = __pyx_t_12;
__pyx_L62_bool_binop_done:;
if (__pyx_t_14) {
- /* "netCDF4/_netCDF4.pyx":3743
+ /* "netCDF4/_netCDF4.pyx":3788
* # 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, 3743, __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, 3788, __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, 3743, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Add(__pyx_v_data, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __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":3742
+ /* "netCDF4/_netCDF4.pyx":3787
* 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: # <<<<<<<<<<<<<<
@@ -37834,7 +40642,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
}
__pyx_L55:;
- /* "netCDF4/_netCDF4.pyx":3733
+ /* "netCDF4/_netCDF4.pyx":3778
* if self.mask and (self._isprimitive or self._isenum):
* data = self._toma(data)
* if self.scale and self._isprimitive and valid_scaleoffset: # <<<<<<<<<<<<<<
@@ -37843,7 +40651,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
*/
}
- /* "netCDF4/_netCDF4.pyx":3744
+ /* "netCDF4/_netCDF4.pyx":3789
* elif hasattr(self, 'add_offset') and self.add_offset != 0.0:
* data = data + self.add_offset
* return data # <<<<<<<<<<<<<<
@@ -37855,7 +40663,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
__pyx_r = __pyx_v_data;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3665
+ /* "netCDF4/_netCDF4.pyx":3710
* raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
*
* def __getitem__(self, elem): # <<<<<<<<<<<<<<
@@ -37871,7 +40679,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
- __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
__Pyx_AddTraceback("netCDF4._netCDF4.Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -37895,7 +40703,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44__getitem__(struct __py
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3746
+/* "netCDF4/_netCDF4.pyx":3791
* return data
*
* def _toma(self,data): # <<<<<<<<<<<<<<
@@ -37922,12 +40730,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
PyObject *__pyx_v_totalmask = NULL;
PyObject *__pyx_v_fill_value = NULL;
PyObject *__pyx_v_mval = NULL;
- PyObject *__pyx_v_hasmval = NULL;
- PyObject *__pyx_v_mvalisnan = NULL;
- PyObject *__pyx_v_m = NULL;
- PyObject *__pyx_v_mask = NULL;
+ PyObject *__pyx_v_mvalmask = NULL;
+ PyObject *__pyx_v_validmin = NULL;
+ PyObject *__pyx_v_validmax = NULL;
+ int __pyx_v_byte_type;
PyObject *__pyx_v_fval = NULL;
+ PyObject *__pyx_v_m = NULL;
+ PyObject *__pyx_v_mvalisnan = NULL;
PyObject *__pyx_v_fvalisnan = NULL;
+ PyObject *__pyx_v_mask = NULL;
PyObject *__pyx_v_fillval = NULL;
PyObject *__pyx_v_has_fillval = NULL;
PyObject *__pyx_r = NULL;
@@ -37937,42 +40748,42 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
- Py_ssize_t __pyx_t_6;
+ int __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
int __pyx_t_8;
int __pyx_t_9;
- PyObject *__pyx_t_10 = NULL;
- PyObject *__pyx_t_11 = NULL;
- PyObject *__pyx_t_12 = NULL;
- int __pyx_t_13;
- PyObject *(*__pyx_t_14)(PyObject *);
- char *__pyx_t_15;
- int __pyx_t_16;
+ int __pyx_t_10;
+ Py_ssize_t __pyx_t_11;
+ PyObject *(*__pyx_t_12)(PyObject *);
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ char *__pyx_t_16;
__Pyx_RefNannySetupContext("_toma", 0);
__Pyx_INCREF(__pyx_v_data);
- /* "netCDF4/_netCDF4.pyx":3750
+ /* "netCDF4/_netCDF4.pyx":3795
* # 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, 3750, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3795, __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, 3750, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3795, __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, 3750, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3795, __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, 3750, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3795, __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, 3750, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_bool); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3795, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = NULL;
__pyx_t_6 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -37982,25 +40793,47 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
__pyx_t_6 = 1;
}
}
- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3750, __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;
+ #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, 3795, __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;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #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, 3795, __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;
+ __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, 3795, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_5);
+ 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, 3795, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_5);
- 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, 3750, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_totalmask = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3751
+ /* "netCDF4/_netCDF4.pyx":3796
* # and/or _FillValues.
* totalmask = numpy.zeros(data.shape, numpy.bool)
* fill_value = None # <<<<<<<<<<<<<<
@@ -38010,34 +40843,34 @@ 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":3752
+ /* "netCDF4/_netCDF4.pyx":3797
* totalmask = numpy.zeros(data.shape, numpy.bool)
* fill_value = None
* if hasattr(self, 'missing_value'): # <<<<<<<<<<<<<<
* # note: missing_value has to have same endian-ness as variable
* # or this won't work.
*/
- __pyx_t_8 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3752, __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, 3797, __pyx_L1_error)
__pyx_t_9 = (__pyx_t_8 != 0);
if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":3755
+ /* "netCDF4/_netCDF4.pyx":3800
* # note: missing_value has to have same endian-ness as variable
* # or this won't work.
* mval = numpy.array(self.missing_value, self.dtype) # <<<<<<<<<<<<<<
- * if mval.shape == (): # mval a scalar.
- * hasmval = data==mval
+ * # 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, 3755, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3800, __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, 3755, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3800, __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, 3755, __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, 3800, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = NULL;
__pyx_t_6 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -38047,537 +40880,1236 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
__pyx_t_6 = 1;
}
}
- __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3755, __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;
+ #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, 3800, __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
+ #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, 3800, __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, 3800, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self->dtype);
+ __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, 3800, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_t_3);
- __Pyx_INCREF(__pyx_v_self->dtype);
- __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, 3755, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_v_mval = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3756
- * # or this won't work.
+ /* "netCDF4/_netCDF4.pyx":3802
* mval = numpy.array(self.missing_value, self.dtype)
- * if mval.shape == (): # mval a scalar. # <<<<<<<<<<<<<<
- * hasmval = data==mval
- * # is scalar missing value a NaN?
+ * # 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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mval, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3756, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3756, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3756, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3802, __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, 3802, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- if (__pyx_t_9) {
-
- /* "netCDF4/_netCDF4.pyx":3757
- * mval = numpy.array(self.missing_value, self.dtype)
- * if mval.shape == (): # mval a scalar.
- * hasmval = data==mval # <<<<<<<<<<<<<<
- * # is scalar missing value a NaN?
- * try:
- */
- __pyx_t_7 = PyObject_RichCompare(__pyx_v_data, __pyx_v_mval, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3757, __pyx_L1_error)
- __pyx_v_hasmval = __pyx_t_7;
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3802, __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, 3802, __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, 3802, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #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, 3802, __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;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #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, 3802, __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;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3802, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_5);
+ 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, 3802, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_mvalmask = __pyx_t_1;
+ __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3759
- * hasmval = data==mval
- * # is scalar missing value a NaN?
- * try: # <<<<<<<<<<<<<<
- * mvalisnan = numpy.isnan(mval)
- * except TypeError: # isnan fails on some dtypes (issue 206)
+ /* "netCDF4/_netCDF4.pyx":3805
+ * # set mask=True for data outside valid_min,valid_max.
+ * # (issue #576)
+ * validmin = None; validmax = None # <<<<<<<<<<<<<<
+ * # if valid_range exists use that, otherwise
+ * # look for valid_min, valid_max. No special
*/
- {
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
- __Pyx_XGOTREF(__pyx_t_10);
- __Pyx_XGOTREF(__pyx_t_11);
- __Pyx_XGOTREF(__pyx_t_12);
- /*try:*/ {
+ __Pyx_INCREF(Py_None);
+ __pyx_v_validmin = Py_None;
+ __Pyx_INCREF(Py_None);
+ __pyx_v_validmax = Py_None;
- /* "netCDF4/_netCDF4.pyx":3760
- * # is scalar missing value a NaN?
- * try:
- * mvalisnan = numpy.isnan(mval) # <<<<<<<<<<<<<<
- * except TypeError: # isnan fails on some dtypes (issue 206)
- * mvalisnan = False
+ /* "netCDF4/_netCDF4.pyx":3810
+ * # 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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3760, __pyx_L5_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isnan); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3760, __pyx_L5_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_1)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_2, function);
- }
- }
- if (!__pyx_t_1) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_mval); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3760, __pyx_L5_error)
- __Pyx_GOTREF(__pyx_t_7);
- } else {
- __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3760, __pyx_L5_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
- __Pyx_INCREF(__pyx_v_mval);
- __Pyx_GIVEREF(__pyx_v_mval);
- PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_mval);
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3760, __pyx_L5_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_mvalisnan = __pyx_t_7;
- __pyx_t_7 = 0;
+ __pyx_t_8 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_range); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3810, __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, 3810, __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, 3810, __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":3759
- * hasmval = data==mval
- * # is scalar missing value a NaN?
- * try: # <<<<<<<<<<<<<<
- * mvalisnan = numpy.isnan(mval)
- * except TypeError: # isnan fails on some dtypes (issue 206)
+ /* "netCDF4/_netCDF4.pyx":3811
+ * # 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, 3811, __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, 3811, __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, 3811, __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, 3811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_6 = 1;
}
- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
- __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
- goto __pyx_L12_try_end;
- __pyx_L5_error:;
- __Pyx_PyThreadState_assign
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ #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, 3811, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-
- /* "netCDF4/_netCDF4.pyx":3761
- * try:
- * mvalisnan = numpy.isnan(mval)
- * except TypeError: # isnan fails on some dtypes (issue 206) # <<<<<<<<<<<<<<
- * mvalisnan = False
- * else: # mval a vector.
- */
- __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
- if (__pyx_t_13) {
- __Pyx_AddTraceback("netCDF4._netCDF4.Variable._toma", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 3761, __pyx_L7_except_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GOTREF(__pyx_t_3);
-
- /* "netCDF4/_netCDF4.pyx":3762
- * mvalisnan = numpy.isnan(mval)
- * except TypeError: # isnan fails on some dtypes (issue 206)
- * mvalisnan = False # <<<<<<<<<<<<<<
- * else: # mval a vector.
- * hasmval = numpy.zeros(data.shape, numpy.bool)
- */
- __Pyx_INCREF(Py_False);
- __Pyx_XDECREF_SET(__pyx_v_mvalisnan, Py_False);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- goto __pyx_L6_exception_handled;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #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, 3811, __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, 3811, __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;
}
- goto __pyx_L7_except_error;
- __pyx_L7_except_error:;
-
- /* "netCDF4/_netCDF4.pyx":3759
- * hasmval = data==mval
- * # is scalar missing value a NaN?
- * try: # <<<<<<<<<<<<<<
- * mvalisnan = numpy.isnan(mval)
- * except TypeError: # isnan fails on some dtypes (issue 206)
- */
- __Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_10);
- __Pyx_XGIVEREF(__pyx_t_11);
- __Pyx_XGIVEREF(__pyx_t_12);
- __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
- goto __pyx_L1_error;
- __pyx_L6_exception_handled:;
- __Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_10);
- __Pyx_XGIVEREF(__pyx_t_11);
- __Pyx_XGIVEREF(__pyx_t_12);
- __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
- __pyx_L12_try_end:;
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5);
+ __Pyx_INCREF(__pyx_v_self->dtype);
+ __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, 3811, __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_SET(__pyx_v_validmin, __pyx_t_1);
+ __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3756
- * # or this won't work.
- * mval = numpy.array(self.missing_value, self.dtype)
- * if mval.shape == (): # mval a scalar. # <<<<<<<<<<<<<<
- * hasmval = data==mval
- * # is scalar missing value a NaN?
- */
- goto __pyx_L4;
- }
-
- /* "netCDF4/_netCDF4.pyx":3764
- * mvalisnan = False
- * else: # mval a vector.
- * hasmval = numpy.zeros(data.shape, numpy.bool) # <<<<<<<<<<<<<<
- * for m in mval:
- * m = numpy.array(m)
+ /* "netCDF4/_netCDF4.pyx":3812
+ * 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'):
*/
- /*else*/ {
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3764, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3764, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3812, __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, 3812, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __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, 3764, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3764, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_bool); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3764, __pyx_L1_error)
+ __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, 3812, __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, 3812, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
__pyx_t_6 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
- if (likely(__pyx_t_1)) {
+ if (CYTHON_UNPACK_METHODS && unlikely(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_7);
- __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_7, function);
__pyx_t_6 = 1;
}
}
- __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3764, __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;
+ #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, 3812, __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
+ #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, 3812, __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, 3812, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_t_5);
+ __Pyx_INCREF(__pyx_v_self->dtype);
+ __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, 3812, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_t_5);
- __pyx_t_2 = 0;
- __pyx_t_5 = 0;
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3764, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_v_hasmval = __pyx_t_3;
- __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_validmax, __pyx_t_1);
+ __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3765
- * else: # mval a vector.
- * hasmval = numpy.zeros(data.shape, numpy.bool)
- * for m in mval: # <<<<<<<<<<<<<<
- * m = numpy.array(m)
- * hasmval += data == m
+ /* "netCDF4/_netCDF4.pyx":3810
+ * # 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)
*/
- if (likely(PyList_CheckExact(__pyx_v_mval)) || PyTuple_CheckExact(__pyx_v_mval)) {
- __pyx_t_3 = __pyx_v_mval; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
- __pyx_t_14 = NULL;
- } else {
- __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_mval); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3765, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_14 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3765, __pyx_L1_error)
- }
- for (;;) {
- if (likely(!__pyx_t_14)) {
- if (likely(PyList_CheckExact(__pyx_t_3))) {
- if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3765, __pyx_L1_error)
- #else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3765, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- #endif
- } else {
- if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3765, __pyx_L1_error)
- #else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3765, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- #endif
- }
- } else {
- __pyx_t_7 = __pyx_t_14(__pyx_t_3);
- if (unlikely(!__pyx_t_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, 3765, __pyx_L1_error)
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_7);
- }
- __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_7);
- __pyx_t_7 = 0;
+ goto __pyx_L4;
+ }
- /* "netCDF4/_netCDF4.pyx":3766
- * hasmval = numpy.zeros(data.shape, numpy.bool)
- * for m in mval:
- * m = numpy.array(m) # <<<<<<<<<<<<<<
- * hasmval += data == m
- * if mval.shape == () and mvalisnan:
+ /* "netCDF4/_netCDF4.pyx":3814
+ * validmax = numpy.array(self.valid_range[1], self.dtype)
+ * else:
+ * if hasattr(self, 'valid_min'): # <<<<<<<<<<<<<<
+ * validmin = numpy.array(self.valid_min, self.dtype)
+ * if hasattr(self, 'valid_max'):
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3766, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3766, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
- if (likely(__pyx_t_4)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_4);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_5, function);
- }
- }
- if (!__pyx_t_4) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_m); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3766, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- } else {
- __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3766, __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_INCREF(__pyx_v_m);
- __Pyx_GIVEREF(__pyx_v_m);
- PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_m);
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3766, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- }
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF_SET(__pyx_v_m, __pyx_t_7);
- __pyx_t_7 = 0;
+ /*else*/ {
+ __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_min); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3814, __pyx_L1_error)
+ __pyx_t_10 = (__pyx_t_9 != 0);
+ if (__pyx_t_10) {
- /* "netCDF4/_netCDF4.pyx":3767
- * for m in mval:
- * m = numpy.array(m)
- * hasmval += data == m # <<<<<<<<<<<<<<
- * if mval.shape == () and mvalisnan:
- * mask = numpy.isnan(data)
+ /* "netCDF4/_netCDF4.pyx":3815
+ * 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 = PyObject_RichCompare(__pyx_v_data, __pyx_v_m, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3767, __pyx_L1_error)
- __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_hasmval, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3767, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3815, __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, 3815, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF_SET(__pyx_v_hasmval, __pyx_t_5);
- __pyx_t_5 = 0;
-
- /* "netCDF4/_netCDF4.pyx":3765
- * else: # mval a vector.
- * hasmval = numpy.zeros(data.shape, numpy.bool)
- * for m in mval: # <<<<<<<<<<<<<<
- * m = numpy.array(m)
- * hasmval += data == m
- */
- }
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- }
- __pyx_L4:;
-
- /* "netCDF4/_netCDF4.pyx":3768
- * m = numpy.array(m)
- * hasmval += data == m
- * if mval.shape == () and mvalisnan: # <<<<<<<<<<<<<<
- * mask = numpy.isnan(data)
- * elif hasmval.any():
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_valid_min); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3815, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #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, 3815, __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
+ #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, 3815, __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, 3815, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_7);
+ __Pyx_INCREF(__pyx_v_self->dtype);
+ __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, 3815, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_validmin, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":3814
+ * validmax = numpy.array(self.valid_range[1], self.dtype)
+ * else:
+ * if hasattr(self, 'valid_min'): # <<<<<<<<<<<<<<
+ * validmin = numpy.array(self.valid_min, self.dtype)
+ * if hasattr(self, 'valid_max'):
*/
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_mval, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3768, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3768, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3768, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (__pyx_t_8) {
+ }
+
+ /* "netCDF4/_netCDF4.pyx":3816
+ * 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, 3816, __pyx_L1_error)
+ __pyx_t_9 = (__pyx_t_10 != 0);
+ if (__pyx_t_9) {
+
+ /* "netCDF4/_netCDF4.pyx":3817
+ * 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, 3817, __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, 3817, __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, 3817, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #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, 3817, __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
+ #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, 3817, __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, 3817, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self->dtype);
+ __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, 3817, __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;
+ __Pyx_DECREF_SET(__pyx_v_validmax, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":3816
+ * 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_L4:;
+
+ /* "netCDF4/_netCDF4.pyx":3826
+ * # 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, 3826, __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, 3826, __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, 3826, __pyx_L1_error)
+ if (!__pyx_t_10) {
} else {
- __pyx_t_9 = __pyx_t_8;
- goto __pyx_L18_bool_binop_done;
+ __pyx_t_9 = __pyx_t_10;
+ goto __pyx_L9_bool_binop_done;
}
- if (unlikely(!__pyx_v_mvalisnan)) { __Pyx_RaiseUnboundLocalError("mvalisnan"); __PYX_ERR(0, 3768, __pyx_L1_error) }
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_mvalisnan); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3768, __pyx_L1_error)
- __pyx_t_9 = __pyx_t_8;
- __pyx_L18_bool_binop_done:;
- if (__pyx_t_9) {
+ __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_i1, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3826, __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":3769
- * hasmval += data == m
- * if mval.shape == () and mvalisnan:
- * mask = numpy.isnan(data) # <<<<<<<<<<<<<<
- * elif hasmval.any():
- * mask = hasmval
+ /* "netCDF4/_netCDF4.pyx":3827
+ * # 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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3769, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isnan); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3769, __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, 3827, __pyx_L1_error)
+ __pyx_t_10 = (__pyx_t_9 != 0);
+ if (__pyx_t_10) {
+
+ /* "netCDF4/_netCDF4.pyx":3828
+ * 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, 3828, __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, 3828, __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, 3828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #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, 3828, __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
+ #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, 3828, __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, 3828, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_1);
+ __Pyx_INCREF(__pyx_v_self->dtype);
+ __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, 3828, __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_v_fval = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":3827
+ * # 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:
+ */
+ goto __pyx_L11;
+ }
+
+ /* "netCDF4/_netCDF4.pyx":3830
+ * 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):
+ */
+ /*else*/ {
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3830, __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, 3830, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
- if (likely(__pyx_t_3)) {
+ __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, 3830, __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, 3830, __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, 3830, __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, 3830, __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;
+ __pyx_t_2 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
- __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_7, function);
+ __pyx_t_6 = 1;
}
}
- if (!__pyx_t_3) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3769, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- } else {
- __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_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
- __Pyx_INCREF(__pyx_v_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_data);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3769, __pyx_L1_error)
+ #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, 3830, __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
+ #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, 3830, __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, 3830, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_2) {
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_t_1);
+ __Pyx_INCREF(__pyx_v_self->dtype);
+ __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, 3830, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_v_mask = __pyx_t_5;
- __pyx_t_5 = 0;
+ __pyx_v_fval = __pyx_t_4;
+ __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":3768
- * m = numpy.array(m)
- * hasmval += data == m
- * if mval.shape == () and mvalisnan: # <<<<<<<<<<<<<<
- * mask = numpy.isnan(data)
- * elif hasmval.any():
+ /* "netCDF4/_netCDF4.pyx":3831
+ * 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):
+ * validmin = fval
*/
- goto __pyx_L17;
+ __pyx_t_10 = (__pyx_v_byte_type != 0);
+ if (__pyx_t_10) {
+ __Pyx_INCREF(Py_None);
+ __Pyx_DECREF_SET(__pyx_v_fval, Py_None);
+ }
}
+ __pyx_L11:;
- /* "netCDF4/_netCDF4.pyx":3770
- * if mval.shape == () and mvalisnan:
- * mask = numpy.isnan(data)
- * elif hasmval.any(): # <<<<<<<<<<<<<<
- * mask = hasmval
- * else:
+ /* "netCDF4/_netCDF4.pyx":3832
+ * 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): # <<<<<<<<<<<<<<
+ * validmin = fval
+ * elif validmax is None and (fval is not None and fval > 0):
*/
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_hasmval, __pyx_n_s_any); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3770, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
- if (likely(__pyx_t_2)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
- __Pyx_INCREF(__pyx_t_2);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
- }
+ __pyx_t_9 = (__pyx_v_validmin == Py_None);
+ __pyx_t_8 = (__pyx_t_9 != 0);
+ if (__pyx_t_8) {
+ } else {
+ __pyx_t_10 = __pyx_t_8;
+ goto __pyx_L14_bool_binop_done;
}
- if (__pyx_t_2) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3770, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = (__pyx_v_fval != Py_None);
+ __pyx_t_9 = (__pyx_t_8 != 0);
+ if (__pyx_t_9) {
} else {
- __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3770, __pyx_L1_error)
+ __pyx_t_10 = __pyx_t_9;
+ goto __pyx_L14_bool_binop_done;
}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3770, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __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, 3832, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3832, __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":3833
+ * if byte_type: fval = None
+ * 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):
+ * validmax = fval
+ */
+ __Pyx_INCREF(__pyx_v_fval);
+ __Pyx_DECREF_SET(__pyx_v_validmin, __pyx_v_fval);
+
+ /* "netCDF4/_netCDF4.pyx":3832
+ * 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): # <<<<<<<<<<<<<<
+ * validmin = fval
+ * elif validmax is None and (fval is not None and fval > 0):
+ */
+ goto __pyx_L13;
+ }
+
+ /* "netCDF4/_netCDF4.pyx":3834
+ * 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): # <<<<<<<<<<<<<<
+ * validmax = fval
+ * if validmin is not None:
+ */
+ __pyx_t_9 = (__pyx_v_validmax == Py_None);
+ __pyx_t_8 = (__pyx_t_9 != 0);
+ if (__pyx_t_8) {
+ } else {
+ __pyx_t_10 = __pyx_t_8;
+ goto __pyx_L17_bool_binop_done;
+ }
+ __pyx_t_8 = (__pyx_v_fval != Py_None);
+ __pyx_t_9 = (__pyx_t_8 != 0);
if (__pyx_t_9) {
+ } else {
+ __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, 3834, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3834, __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":3771
- * mask = numpy.isnan(data)
- * elif hasmval.any():
- * mask = hasmval # <<<<<<<<<<<<<<
- * else:
- * mask = None
+ /* "netCDF4/_netCDF4.pyx":3835
+ * validmin = fval
+ * elif validmax is None and (fval is not None and fval > 0):
+ * validmax = fval # <<<<<<<<<<<<<<
+ * if validmin is not None:
+ * mvalmask += data < validmin
*/
- __Pyx_INCREF(__pyx_v_hasmval);
- __pyx_v_mask = __pyx_v_hasmval;
+ __Pyx_INCREF(__pyx_v_fval);
+ __Pyx_DECREF_SET(__pyx_v_validmax, __pyx_v_fval);
- /* "netCDF4/_netCDF4.pyx":3770
- * if mval.shape == () and mvalisnan:
- * mask = numpy.isnan(data)
- * elif hasmval.any(): # <<<<<<<<<<<<<<
- * mask = hasmval
- * else:
+ /* "netCDF4/_netCDF4.pyx":3834
+ * 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): # <<<<<<<<<<<<<<
+ * validmax = fval
+ * if validmin is not None:
*/
- goto __pyx_L17;
}
+ __pyx_L13:;
- /* "netCDF4/_netCDF4.pyx":3773
- * mask = hasmval
- * else:
- * mask = None # <<<<<<<<<<<<<<
- * if mask is not None:
- * fill_value = mval
+ /* "netCDF4/_netCDF4.pyx":3836
+ * elif validmax is None and (fval is not None and fval > 0):
+ * validmax = fval
+ * if validmin is not None: # <<<<<<<<<<<<<<
+ * mvalmask += data < validmin
+ * if validmax is not None:
+ */
+ __pyx_t_10 = (__pyx_v_validmin != Py_None);
+ __pyx_t_9 = (__pyx_t_10 != 0);
+ if (__pyx_t_9) {
+
+ /* "netCDF4/_netCDF4.pyx":3837
+ * 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, 3837, __pyx_L1_error)
+ __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3837, __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":3836
+ * elif validmax is None and (fval is not None and fval > 0):
+ * validmax = fval
+ * if validmin is not None: # <<<<<<<<<<<<<<
+ * mvalmask += data < validmin
+ * if validmax is not None:
*/
- /*else*/ {
- __Pyx_INCREF(Py_None);
- __pyx_v_mask = Py_None;
}
- __pyx_L17:;
- /* "netCDF4/_netCDF4.pyx":3774
- * else:
- * mask = None
- * if mask is not None: # <<<<<<<<<<<<<<
- * fill_value = mval
- * totalmask += mask
+ /* "netCDF4/_netCDF4.pyx":3838
+ * if validmin is not None:
+ * mvalmask += data < validmin
+ * if validmax is not None: # <<<<<<<<<<<<<<
+ * mvalmask += data > validmax
+ * if mval.shape == (): # mval a scalar.
*/
- __pyx_t_9 = (__pyx_v_mask != Py_None);
- __pyx_t_8 = (__pyx_t_9 != 0);
- if (__pyx_t_8) {
+ __pyx_t_9 = (__pyx_v_validmax != Py_None);
+ __pyx_t_10 = (__pyx_t_9 != 0);
+ if (__pyx_t_10) {
- /* "netCDF4/_netCDF4.pyx":3775
- * mask = None
- * if mask is not None:
- * fill_value = mval # <<<<<<<<<<<<<<
- * totalmask += mask
- * if hasattr(self, '_FillValue'):
+ /* "netCDF4/_netCDF4.pyx":3839
+ * 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, 3839, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3839, __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":3838
+ * if validmin is not None:
+ * mvalmask += data < validmin
+ * if validmax is not None: # <<<<<<<<<<<<<<
+ * mvalmask += data > validmax
+ * if mval.shape == (): # mval a scalar.
+ */
+ }
+
+ /* "netCDF4/_netCDF4.pyx":3840
+ * 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, 3840, __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, 3840, __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, 3840, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (__pyx_t_10) {
+
+ /* "netCDF4/_netCDF4.pyx":3841
+ * 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, 3841, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_mval);
- __Pyx_DECREF_SET(__pyx_v_fill_value, __pyx_v_mval);
+ __Pyx_GIVEREF(__pyx_v_mval);
+ PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_mval);
+ __Pyx_DECREF_SET(__pyx_v_mval, __pyx_t_7);
+ __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":3776
- * if mask is not None:
- * fill_value = mval
- * totalmask += mask # <<<<<<<<<<<<<<
+ /* "netCDF4/_netCDF4.pyx":3840
+ * if validmax is not None:
+ * mvalmask += data > validmax
+ * if mval.shape == (): # mval a scalar. # <<<<<<<<<<<<<<
+ * mval = [mval] # make into iterable.
+ * for m in mval:
+ */
+ }
+
+ /* "netCDF4/_netCDF4.pyx":3842
+ * if mval.shape == (): # mval a scalar.
+ * mval = [mval] # make into iterable.
+ * for m in mval: # <<<<<<<<<<<<<<
+ * # is scalar missing value a NaN?
+ * try:
+ */
+ if (likely(PyList_CheckExact(__pyx_v_mval)) || PyTuple_CheckExact(__pyx_v_mval)) {
+ __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, 3842, __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, 3842, __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, 3842, __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, 3842, __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, 3842, __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, 3842, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_12(__pyx_t_7);
+ if (unlikely(!__pyx_t_4)) {
+ 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, 3842, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":3844
+ * for m in mval:
+ * # is scalar missing value a NaN?
+ * try: # <<<<<<<<<<<<<<
+ * mvalisnan = numpy.isnan(m)
+ * except TypeError: # isnan fails on some dtypes (issue 206)
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
+ __Pyx_XGOTREF(__pyx_t_13);
+ __Pyx_XGOTREF(__pyx_t_14);
+ __Pyx_XGOTREF(__pyx_t_15);
+ /*try:*/ {
+
+ /* "netCDF4/_netCDF4.pyx":3845
+ * # 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, 3845, __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, 3845, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_m); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3845, __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, 3845, __pyx_L25_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #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, 3845, __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, 3845, __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, 3845, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_mvalisnan, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":3844
+ * for m in mval:
+ * # is scalar missing value a NaN?
+ * try: # <<<<<<<<<<<<<<
+ * mvalisnan = numpy.isnan(m)
+ * except TypeError: # isnan fails on some dtypes (issue 206)
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ goto __pyx_L32_try_end;
+ __pyx_L25_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":3846
+ * try:
+ * mvalisnan = numpy.isnan(m)
+ * except TypeError: # isnan fails on some dtypes (issue 206) # <<<<<<<<<<<<<<
+ * mvalisnan = False
+ * if mvalisnan:
+ */
+ __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, 3846, __pyx_L27_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_2);
+
+ /* "netCDF4/_netCDF4.pyx":3847
+ * mvalisnan = numpy.isnan(m)
+ * except TypeError: # isnan fails on some dtypes (issue 206)
+ * mvalisnan = False # <<<<<<<<<<<<<<
+ * if mvalisnan:
+ * mvalmask += numpy.isnan(data)
+ */
+ __Pyx_INCREF(Py_False);
+ __Pyx_XDECREF_SET(__pyx_v_mvalisnan, Py_False);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L26_exception_handled;
+ }
+ goto __pyx_L27_except_error;
+ __pyx_L27_except_error:;
+
+ /* "netCDF4/_netCDF4.pyx":3844
+ * for m in mval:
+ * # is scalar missing value a NaN?
+ * try: # <<<<<<<<<<<<<<
+ * mvalisnan = numpy.isnan(m)
+ * except TypeError: # isnan fails on some dtypes (issue 206)
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
+ goto __pyx_L1_error;
+ __pyx_L26_exception_handled:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
+ __pyx_L32_try_end:;
+ }
+
+ /* "netCDF4/_netCDF4.pyx":3848
+ * 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, 3848, __pyx_L1_error)
+ if (__pyx_t_10) {
+
+ /* "netCDF4/_netCDF4.pyx":3849
+ * mvalisnan = False
+ * if mvalisnan:
+ * mvalmask += numpy.isnan(data) # <<<<<<<<<<<<<<
+ * else:
+ * mvalmask += data==mval
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3849, __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, 3849, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3849, __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, 3849, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #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, 3849, __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, 3849, __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, 3849, __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, 3849, __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":3848
+ * except TypeError: # isnan fails on some dtypes (issue 206)
+ * mvalisnan = False
+ * if mvalisnan: # <<<<<<<<<<<<<<
+ * mvalmask += numpy.isnan(data)
+ * else:
+ */
+ goto __pyx_L35;
+ }
+
+ /* "netCDF4/_netCDF4.pyx":3851
+ * mvalmask += numpy.isnan(data)
+ * else:
+ * mvalmask += data==mval # <<<<<<<<<<<<<<
+ * if mvalmask.any():
+ * # set fill_value for masked array
+ */
+ /*else*/ {
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_data, __pyx_v_mval, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3851, __pyx_L1_error)
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_mvalmask, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3851, __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);
+ __pyx_t_2 = 0;
+ }
+ __pyx_L35:;
+
+ /* "netCDF4/_netCDF4.pyx":3842
+ * if mval.shape == (): # mval a scalar.
+ * mval = [mval] # make into iterable.
+ * for m in mval: # <<<<<<<<<<<<<<
+ * # is scalar missing value a NaN?
+ * try:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":3852
+ * else:
+ * mvalmask += data==mval
+ * 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, 3852, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3852, __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, 3852, __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, 3852, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (__pyx_t_10) {
+
+ /* "netCDF4/_netCDF4.pyx":3856
+ * # 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, 3856, __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":3857
+ * # if missing_value is a vector).
+ * fill_value = mval[0]
+ * totalmask += mvalmask # <<<<<<<<<<<<<<
+ * # set mask=True for missing data
* if hasattr(self, '_FillValue'):
- * fval = numpy.array(self._FillValue, self.dtype)
*/
- __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3776, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_5);
- __pyx_t_5 = 0;
+ __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mvalmask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3857, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_7);
+ __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":3774
- * else:
- * mask = None
- * if mask is not None: # <<<<<<<<<<<<<<
- * fill_value = mval
- * totalmask += mask
+ /* "netCDF4/_netCDF4.pyx":3852
+ * else:
+ * mvalmask += data==mval
+ * if mvalmask.any(): # <<<<<<<<<<<<<<
+ * # set fill_value for masked array
+ * # to missing_value (or 1st element
*/
}
- /* "netCDF4/_netCDF4.pyx":3752
+ /* "netCDF4/_netCDF4.pyx":3797
* totalmask = numpy.zeros(data.shape, numpy.bool)
* fill_value = None
* if hasattr(self, 'missing_value'): # <<<<<<<<<<<<<<
@@ -38586,62 +42118,82 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3777
- * fill_value = mval
- * totalmask += mask
+ /* "netCDF4/_netCDF4.pyx":3859
+ * 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_8 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3777, __pyx_L1_error)
- __pyx_t_9 = (__pyx_t_8 != 0);
+ __pyx_t_10 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 3859, __pyx_L1_error)
+ __pyx_t_9 = (__pyx_t_10 != 0);
if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":3778
- * totalmask += mask
+ /* "netCDF4/_netCDF4.pyx":3860
+ * # set mask=True for missing data
* if hasattr(self, '_FillValue'):
* fval = numpy.array(self._FillValue, self.dtype) # <<<<<<<<<<<<<<
* # is _FillValue a NaN?
* try:
*/
- __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3778, __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, 3778, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3860, __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_FillValue); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3778, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_3 = NULL;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3860, __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, 3860, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = NULL;
__pyx_t_6 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_3)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_3);
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_2, function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
__pyx_t_6 = 1;
}
}
- __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3778, __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;
+ #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, 3860, __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
+ #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, 3860, __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, 3860, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self->dtype);
+ __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, 3860, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_7);
- __Pyx_INCREF(__pyx_v_self->dtype);
- __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_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3778, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_fval = __pyx_t_5;
- __pyx_t_5 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_fval, __pyx_t_7);
+ __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":3780
+ /* "netCDF4/_netCDF4.pyx":3862
* fval = numpy.array(self._FillValue, self.dtype)
* # is _FillValue a NaN?
* try: # <<<<<<<<<<<<<<
@@ -38651,53 +42203,71 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
- __Pyx_XGOTREF(__pyx_t_12);
- __Pyx_XGOTREF(__pyx_t_11);
- __Pyx_XGOTREF(__pyx_t_10);
+ __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
+ __Pyx_XGOTREF(__pyx_t_15);
+ __Pyx_XGOTREF(__pyx_t_14);
+ __Pyx_XGOTREF(__pyx_t_13);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3781
+ /* "netCDF4/_netCDF4.pyx":3863
* # is _FillValue a NaN?
* try:
* fvalisnan = numpy.isnan(fval) # <<<<<<<<<<<<<<
* except: # isnan fails on some dtypes (issue 202)
* fvalisnan = False
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3781, __pyx_L22_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isnan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3781, __pyx_L22_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3863, __pyx_L38_error)
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
- if (likely(__pyx_t_2)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
- __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isnan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3863, __pyx_L38_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_4, function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
}
}
- if (!__pyx_t_2) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_fval); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3781, __pyx_L22_error)
- __Pyx_GOTREF(__pyx_t_5);
- } else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3781, __pyx_L22_error)
+ if (!__pyx_t_4) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_fval); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3863, __pyx_L38_error)
__Pyx_GOTREF(__pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
- __Pyx_INCREF(__pyx_v_fval);
- __Pyx_GIVEREF(__pyx_v_fval);
- PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_fval);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3781, __pyx_L22_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } 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, 3863, __pyx_L38_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #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, 3863, __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, 3863, __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, 3863, __pyx_L38_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_fvalisnan = __pyx_t_5;
- __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_fvalisnan = __pyx_t_7;
+ __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":3780
+ /* "netCDF4/_netCDF4.pyx":3862
* fval = numpy.array(self._FillValue, self.dtype)
* # is _FillValue a NaN?
* try: # <<<<<<<<<<<<<<
@@ -38705,20 +42275,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
* except: # isnan fails on some dtypes (issue 202)
*/
}
- __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
- goto __pyx_L29_try_end;
- __pyx_L22_error:;
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ goto __pyx_L45_try_end;
+ __pyx_L38_error:;
__Pyx_PyThreadState_assign
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3782
+ /* "netCDF4/_netCDF4.pyx":3864
* try:
* fvalisnan = numpy.isnan(fval)
* except: # isnan fails on some dtypes (issue 202) # <<<<<<<<<<<<<<
@@ -38727,12 +42297,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_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 3782, __pyx_L24_except_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GOTREF(__pyx_t_4);
+ if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 3864, __pyx_L40_except_error)
__Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_2);
- /* "netCDF4/_netCDF4.pyx":3783
+ /* "netCDF4/_netCDF4.pyx":3865
* fvalisnan = numpy.isnan(fval)
* except: # isnan fails on some dtypes (issue 202)
* fvalisnan = False # <<<<<<<<<<<<<<
@@ -38741,14 +42311,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
*/
__Pyx_INCREF(Py_False);
__Pyx_XDECREF_SET(__pyx_v_fvalisnan, Py_False);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- goto __pyx_L23_exception_handled;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L39_exception_handled;
}
- __pyx_L24_except_error:;
+ __pyx_L40_except_error:;
- /* "netCDF4/_netCDF4.pyx":3780
+ /* "netCDF4/_netCDF4.pyx":3862
* fval = numpy.array(self._FillValue, self.dtype)
* # is _FillValue a NaN?
* try: # <<<<<<<<<<<<<<
@@ -38756,135 +42326,153 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
* except: # isnan fails on some dtypes (issue 202)
*/
__Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_12);
- __Pyx_XGIVEREF(__pyx_t_11);
- __Pyx_XGIVEREF(__pyx_t_10);
- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
goto __pyx_L1_error;
- __pyx_L23_exception_handled:;
+ __pyx_L39_exception_handled:;
__Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_12);
- __Pyx_XGIVEREF(__pyx_t_11);
- __Pyx_XGIVEREF(__pyx_t_10);
- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
- __pyx_L29_try_end:;
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
+ __pyx_L45_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":3784
+ /* "netCDF4/_netCDF4.pyx":3866
* 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, 3784, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_fvalisnan); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3866, __pyx_L1_error)
if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":3785
+ /* "netCDF4/_netCDF4.pyx":3867
* fvalisnan = False
* if fvalisnan:
* mask = numpy.isnan(data) # <<<<<<<<<<<<<<
* elif (data == fval).any():
* mask = data==fval
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3785, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isnan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3785, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
- if (likely(__pyx_t_4)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3867, __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, 3867, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_5, function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
}
}
- if (!__pyx_t_4) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3785, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- } else {
- __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3785, __pyx_L1_error)
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3867, __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_INCREF(__pyx_v_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_data);
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3785, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } 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, 3867, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #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, 3867, __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, 3867, __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, 3867, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF_SET(__pyx_v_mask, __pyx_t_7);
- __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_v_mask = __pyx_t_2;
+ __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":3784
+ /* "netCDF4/_netCDF4.pyx":3866
* except: # isnan fails on some dtypes (issue 202)
* fvalisnan = False
* if fvalisnan: # <<<<<<<<<<<<<<
* mask = numpy.isnan(data)
* elif (data == fval).any():
*/
- goto __pyx_L32;
+ goto __pyx_L48;
}
- /* "netCDF4/_netCDF4.pyx":3786
+ /* "netCDF4/_netCDF4.pyx":3868
* if fvalisnan:
* mask = numpy.isnan(data)
* elif (data == fval).any(): # <<<<<<<<<<<<<<
* mask = data==fval
* else:
*/
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fval, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3786, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3786, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_5);
+ __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, 3868, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_any); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3868, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_7);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_2, function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
}
}
- if (__pyx_t_5) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3786, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3868, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
} else {
- __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3786, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3868, __pyx_L1_error)
}
- __Pyx_GOTREF(__pyx_t_7);
+ __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, 3868, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3786, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":3787
+ /* "netCDF4/_netCDF4.pyx":3869
* mask = numpy.isnan(data)
* elif (data == fval).any():
* mask = data==fval # <<<<<<<<<<<<<<
* else:
* mask = None
*/
- __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, 3787, __pyx_L1_error)
- __Pyx_XDECREF_SET(__pyx_v_mask, __pyx_t_7);
- __pyx_t_7 = 0;
+ __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, 3869, __pyx_L1_error)
+ __pyx_v_mask = __pyx_t_2;
+ __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":3786
+ /* "netCDF4/_netCDF4.pyx":3868
* if fvalisnan:
* mask = numpy.isnan(data)
* elif (data == fval).any(): # <<<<<<<<<<<<<<
* mask = data==fval
* else:
*/
- goto __pyx_L32;
+ goto __pyx_L48;
}
- /* "netCDF4/_netCDF4.pyx":3789
+ /* "netCDF4/_netCDF4.pyx":3871
* mask = data==fval
* else:
* mask = None # <<<<<<<<<<<<<<
@@ -38893,11 +42481,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
*/
/*else*/ {
__Pyx_INCREF(Py_None);
- __Pyx_XDECREF_SET(__pyx_v_mask, Py_None);
+ __pyx_v_mask = Py_None;
}
- __pyx_L32:;
+ __pyx_L48:;
- /* "netCDF4/_netCDF4.pyx":3790
+ /* "netCDF4/_netCDF4.pyx":3872
* else:
* mask = None
* if mask is not None: # <<<<<<<<<<<<<<
@@ -38905,21 +42493,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
* fill_value = fval
*/
__pyx_t_9 = (__pyx_v_mask != Py_None);
- __pyx_t_8 = (__pyx_t_9 != 0);
- if (__pyx_t_8) {
+ __pyx_t_10 = (__pyx_t_9 != 0);
+ if (__pyx_t_10) {
- /* "netCDF4/_netCDF4.pyx":3791
+ /* "netCDF4/_netCDF4.pyx":3873
* mask = None
* if mask is not None:
* if fill_value is None: # <<<<<<<<<<<<<<
* fill_value = fval
* totalmask += mask
*/
- __pyx_t_8 = (__pyx_v_fill_value == Py_None);
- __pyx_t_9 = (__pyx_t_8 != 0);
+ __pyx_t_10 = (__pyx_v_fill_value == Py_None);
+ __pyx_t_9 = (__pyx_t_10 != 0);
if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":3792
+ /* "netCDF4/_netCDF4.pyx":3874
* if mask is not None:
* if fill_value is None:
* fill_value = fval # <<<<<<<<<<<<<<
@@ -38929,7 +42517,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":3791
+ /* "netCDF4/_netCDF4.pyx":3873
* mask = None
* if mask is not None:
* if fill_value is None: # <<<<<<<<<<<<<<
@@ -38938,19 +42526,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3793
+ /* "netCDF4/_netCDF4.pyx":3875
* if fill_value is None:
* fill_value = fval
* totalmask += mask # <<<<<<<<<<<<<<
* # issue 209: don't return masked array if variable filling
* # is disabled.
*/
- __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3793, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_7);
- __pyx_t_7 = 0;
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3875, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_2);
+ __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":3790
+ /* "netCDF4/_netCDF4.pyx":3872
* else:
* mask = None
* if mask is not None: # <<<<<<<<<<<<<<
@@ -38959,17 +42547,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3777
- * fill_value = mval
- * totalmask += mask
+ /* "netCDF4/_netCDF4.pyx":3859
+ * totalmask += mvalmask
+ * # set mask=True for missing data
* if hasattr(self, '_FillValue'): # <<<<<<<<<<<<<<
* fval = numpy.array(self._FillValue, self.dtype)
* # is _FillValue a NaN?
*/
- goto __pyx_L21;
+ goto __pyx_L37;
}
- /* "netCDF4/_netCDF4.pyx":3797
+ /* "netCDF4/_netCDF4.pyx":3879
* # is disabled.
* else:
* with nogil: # <<<<<<<<<<<<<<
@@ -38984,7 +42572,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":3798
+ /* "netCDF4/_netCDF4.pyx":3880
* else:
* with nogil:
* ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL) # <<<<<<<<<<<<<<
@@ -38994,7 +42582,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":3797
+ /* "netCDF4/_netCDF4.pyx":3879
* # is disabled.
* else:
* with nogil: # <<<<<<<<<<<<<<
@@ -39006,13 +42594,13 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
#ifdef WITH_THREAD
Py_BLOCK_THREADS
#endif
- goto __pyx_L37;
+ goto __pyx_L53;
}
- __pyx_L37:;
+ __pyx_L53:;
}
}
- /* "netCDF4/_netCDF4.pyx":3799
+ /* "netCDF4/_netCDF4.pyx":3881
* with nogil:
* ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -39022,30 +42610,30 @@ 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":3800
+ /* "netCDF4/_netCDF4.pyx":3882
* ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
* # if no_fill is not 1, and not a byte variable, then use default fill value.
* # from http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/Fill-Values.html#Fill-Values
*/
- __pyx_t_15 = ((char *)nc_strerror(__pyx_v_ierr));
- __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_15, 0, strlen(__pyx_t_15), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3800, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3800, __pyx_L1_error)
+ __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, 3882, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3800, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3882, __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_Raise(__pyx_t_7, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __PYX_ERR(0, 3800, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3882, __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, 3882, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3799
+ /* "netCDF4/_netCDF4.pyx":3881
* with nogil:
* ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -39054,191 +42642,229 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3813
+ /* "netCDF4/_netCDF4.pyx":3895
* # 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_t_8 = ((__pyx_v_no_fill != 1) != 0);
- if (__pyx_t_8) {
+ __pyx_t_10 = ((__pyx_v_no_fill != 1) != 0);
+ if (__pyx_t_10) {
} else {
- __pyx_t_9 = __pyx_t_8;
- goto __pyx_L40_bool_binop_done;
+ __pyx_t_9 = __pyx_t_10;
+ goto __pyx_L56_bool_binop_done;
}
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3813, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_7, 1, 0, NULL, NULL, &__pyx_slice__56, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3813, __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, 3895, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_16 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_u1, Py_NE)); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 3813, __pyx_L1_error)
- if (__pyx_t_16) {
+ __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, 3895, __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, 3895, __pyx_L1_error)
+ if (__pyx_t_8) {
} else {
- __pyx_t_8 = __pyx_t_16;
- goto __pyx_L42_bool_binop_done;
+ __pyx_t_10 = __pyx_t_8;
+ goto __pyx_L58_bool_binop_done;
}
- __pyx_t_16 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_i1, Py_NE)); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 3813, __pyx_L1_error)
- __pyx_t_8 = __pyx_t_16;
- __pyx_L42_bool_binop_done:;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_16 = (__pyx_t_8 != 0);
- __pyx_t_9 = __pyx_t_16;
- __pyx_L40_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, 3895, __pyx_L1_error)
+ __pyx_t_10 = __pyx_t_8;
+ __pyx_L58_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = (__pyx_t_10 != 0);
+ __pyx_t_9 = __pyx_t_8;
+ __pyx_L56_bool_binop_done:;
if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":3814
+ /* "netCDF4/_netCDF4.pyx":3896
* # 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_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3814, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3896, __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, 3896, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3814, __pyx_L1_error)
+ __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, 3896, __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, 3896, __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, 3896, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3814, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3814, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__57, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3814, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_GetItem(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3814, __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_t_3 = NULL;
+ __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, 3896, __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;
+ __pyx_t_5 = NULL;
__pyx_t_6 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
- if (likely(__pyx_t_3)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_3);
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_5, function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
__pyx_t_6 = 1;
}
}
- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3814, __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;
+ #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, 3896, __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
+ #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, 3896, __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, 3896, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_t_1);
+ __Pyx_INCREF(__pyx_v_self->dtype);
+ __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, 3896, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
- __Pyx_INCREF(__pyx_v_self->dtype);
- __Pyx_GIVEREF(__pyx_v_self->dtype);
- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_self->dtype);
- __pyx_t_4 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3814, __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_v_fillval = __pyx_t_2;
- __pyx_t_2 = 0;
+ __pyx_v_fillval = __pyx_t_4;
+ __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":3815
+ /* "netCDF4/_netCDF4.pyx":3897
* 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_2 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fillval, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3815, __pyx_L1_error)
- __pyx_v_has_fillval = __pyx_t_2;
- __pyx_t_2 = 0;
+ __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, 3897, __pyx_L1_error)
+ __pyx_v_has_fillval = __pyx_t_4;
+ __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":3818
+ /* "netCDF4/_netCDF4.pyx":3900
* # 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_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_has_fillval)), ((PyObject*)&PyBool_Type), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3818, __pyx_L1_error)
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3818, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __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, 3900, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3900, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_9) {
- __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3818, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3818, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3900, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
- if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
- __Pyx_INCREF(__pyx_t_5);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3900, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
}
}
- if (!__pyx_t_5) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_has_fillval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3818, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- } else {
- __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3818, __pyx_L1_error)
+ 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, 3900, __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 = NULL;
- __Pyx_INCREF(__pyx_v_has_fillval);
- __Pyx_GIVEREF(__pyx_v_has_fillval);
- PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_has_fillval);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3818, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } 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, 3900, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #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, 3900, __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, 3900, __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, 3900, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF_SET(__pyx_v_has_fillval, __pyx_t_2);
- __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_has_fillval, __pyx_t_4);
+ __pyx_t_4 = 0;
}
- /* "netCDF4/_netCDF4.pyx":3819
+ /* "netCDF4/_netCDF4.pyx":3901
* # 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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_has_fillval, __pyx_n_s_any); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3819, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && 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_7);
- __Pyx_INCREF(__pyx_t_4);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_has_fillval, __pyx_n_s_any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3901, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
}
}
- if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3819, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_1) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3901, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3819, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3901, __pyx_L1_error)
}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3819, __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, 3901, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":3820
+ /* "netCDF4/_netCDF4.pyx":3902
* 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_2 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fillval, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3820, __pyx_L1_error)
- __Pyx_XDECREF_SET(__pyx_v_mask, __pyx_t_2);
- __pyx_t_2 = 0;
+ __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, 3902, __pyx_L1_error)
+ __pyx_v_mask = __pyx_t_4;
+ __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":3821
+ /* "netCDF4/_netCDF4.pyx":3903
* if has_fillval.any():
* mask=data==fillval
* if fill_value is None: # <<<<<<<<<<<<<<
@@ -39246,10 +42872,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
* totalmask += mask
*/
__pyx_t_9 = (__pyx_v_fill_value == Py_None);
- __pyx_t_16 = (__pyx_t_9 != 0);
- if (__pyx_t_16) {
+ __pyx_t_8 = (__pyx_t_9 != 0);
+ if (__pyx_t_8) {
- /* "netCDF4/_netCDF4.pyx":3822
+ /* "netCDF4/_netCDF4.pyx":3904
* mask=data==fillval
* if fill_value is None:
* fill_value = fillval # <<<<<<<<<<<<<<
@@ -39259,7 +42885,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":3821
+ /* "netCDF4/_netCDF4.pyx":3903
* if has_fillval.any():
* mask=data==fillval
* if fill_value is None: # <<<<<<<<<<<<<<
@@ -39268,19 +42894,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3823
+ /* "netCDF4/_netCDF4.pyx":3905
* 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_2 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3823, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_2);
- __pyx_t_2 = 0;
+ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3905, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_4);
+ __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":3819
+ /* "netCDF4/_netCDF4.pyx":3901
* # in that case convert to an array.
* if type(has_fillval) == bool: has_fillval=numpy.asarray(has_fillval)
* if has_fillval.any(): # <<<<<<<<<<<<<<
@@ -39289,7 +42915,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3813
+ /* "netCDF4/_netCDF4.pyx":3895
* # 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']: # <<<<<<<<<<<<<<
@@ -39298,108 +42924,108 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
*/
}
}
- __pyx_L21:;
+ __pyx_L37:;
- /* "netCDF4/_netCDF4.pyx":3827
+ /* "netCDF4/_netCDF4.pyx":3909
* # masked. fill_value set to missing_value if it exists,
* # 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
*/
- __pyx_t_16 = (__pyx_v_fill_value != Py_None);
- __pyx_t_9 = (__pyx_t_16 != 0);
+ __pyx_t_8 = (__pyx_v_fill_value != Py_None);
+ __pyx_t_9 = (__pyx_t_8 != 0);
if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":3828
+ /* "netCDF4/_netCDF4.pyx":3910
* # 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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3828, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_masked_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3828, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3828, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3910, __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, 3910, __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, 3910, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_data);
__Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data);
- __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3828, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_mask, __pyx_v_totalmask) < 0) __PYX_ERR(0, 3828, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) __PYX_ERR(0, 3828, __pyx_L1_error)
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3828, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_data);
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3910, __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, 3910, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) __PYX_ERR(0, 3910, __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, 3910, __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;
- __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
- __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_7);
+ __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":3832
+ /* "netCDF4/_netCDF4.pyx":3914
* # 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3832, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3832, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 3832, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_16) {
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3914, __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, 3914, __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, 3914, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_8) {
} else {
- __pyx_t_9 = __pyx_t_16;
- goto __pyx_L49_bool_binop_done;
+ __pyx_t_9 = __pyx_t_8;
+ goto __pyx_L65_bool_binop_done;
}
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3832, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_all); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3832, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_5);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3914, __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, 3914, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_7);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_2, function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
}
}
- if (__pyx_t_5) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3832, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_7) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3914, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
} else {
- __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3832, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3914, __pyx_L1_error)
}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 3832, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_9 = __pyx_t_16;
- __pyx_L49_bool_binop_done:;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3914, __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":3833
+ /* "netCDF4/_netCDF4.pyx":3915
* # behavior of masked arrays.
* if data.shape == () and data.mask.all():
* data = data[...] # <<<<<<<<<<<<<<
* return data
*
*/
- __pyx_t_4 = PyObject_GetItem(__pyx_v_data, Py_Ellipsis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3833, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4);
- __pyx_t_4 = 0;
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_data, Py_Ellipsis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1);
+ __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":3832
+ /* "netCDF4/_netCDF4.pyx":3914
* # to numpy.ma.MaskedConstant to be consistent with slicing
* # behavior of masked arrays.
* if data.shape == () and data.mask.all(): # <<<<<<<<<<<<<<
@@ -39408,7 +43034,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3827
+ /* "netCDF4/_netCDF4.pyx":3909
* # masked. fill_value set to missing_value if it exists,
* # otherwise _FillValue.
* if fill_value is not None: # <<<<<<<<<<<<<<
@@ -39417,7 +43043,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3834
+ /* "netCDF4/_netCDF4.pyx":3916
* if data.shape == () and data.mask.all():
* data = data[...]
* return data # <<<<<<<<<<<<<<
@@ -39429,7 +43055,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":3746
+ /* "netCDF4/_netCDF4.pyx":3791
* return data
*
* def _toma(self,data): # <<<<<<<<<<<<<<
@@ -39451,12 +43077,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
__Pyx_XDECREF(__pyx_v_totalmask);
__Pyx_XDECREF(__pyx_v_fill_value);
__Pyx_XDECREF(__pyx_v_mval);
- __Pyx_XDECREF(__pyx_v_hasmval);
- __Pyx_XDECREF(__pyx_v_mvalisnan);
- __Pyx_XDECREF(__pyx_v_m);
- __Pyx_XDECREF(__pyx_v_mask);
+ __Pyx_XDECREF(__pyx_v_mvalmask);
+ __Pyx_XDECREF(__pyx_v_validmin);
+ __Pyx_XDECREF(__pyx_v_validmax);
__Pyx_XDECREF(__pyx_v_fval);
+ __Pyx_XDECREF(__pyx_v_m);
+ __Pyx_XDECREF(__pyx_v_mvalisnan);
__Pyx_XDECREF(__pyx_v_fvalisnan);
+ __Pyx_XDECREF(__pyx_v_mask);
__Pyx_XDECREF(__pyx_v_fillval);
__Pyx_XDECREF(__pyx_v_has_fillval);
__Pyx_XDECREF(__pyx_v_data);
@@ -39465,7 +43093,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_toma(struct __pyx_obj_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3836
+/* "netCDF4/_netCDF4.pyx":3918
* return data
*
* def _assign_vlen(self, elem, data): # <<<<<<<<<<<<<<
@@ -39502,11 +43130,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, 3836, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_assign_vlen", 1, 2, 2, 1); __PYX_ERR(0, 3918, __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, 3836, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_assign_vlen") < 0)) __PYX_ERR(0, 3918, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -39519,7 +43147,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, 3836, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_assign_vlen", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3918, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4.Variable._assign_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -39564,31 +43192,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":3844
+ /* "netCDF4/_netCDF4.pyx":3926
* 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, 3844, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3926, __pyx_L1_error)
__pyx_t_2 = ((!__pyx_t_1) != 0);
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3845
+ /* "netCDF4/_netCDF4.pyx":3927
* 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__58, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3845, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3927, __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, 3845, __pyx_L1_error)
+ __PYX_ERR(0, 3927, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3844
+ /* "netCDF4/_netCDF4.pyx":3926
* cdef char **strdata
* cdef ndarray data2
* if not self._isvlen: # <<<<<<<<<<<<<<
@@ -39597,17 +43225,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":3846
+ /* "netCDF4/_netCDF4.pyx":3928
* 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, 3846, __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, 3928, __pyx_L1_error)
__pyx_v_ndims = __pyx_t_4;
- /* "netCDF4/_netCDF4.pyx":3847
+ /* "netCDF4/_netCDF4.pyx":3929
* 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" # <<<<<<<<<<<<<<
@@ -39617,7 +43245,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":3850
+ /* "netCDF4/_netCDF4.pyx":3932
* # check to see that elem is a tuple of integers.
* # handle negative integers.
* if isinstance(elem, int): # <<<<<<<<<<<<<<
@@ -39628,7 +43256,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":3851
+ /* "netCDF4/_netCDF4.pyx":3933
* # handle negative integers.
* if isinstance(elem, int):
* if ndims > 1: # <<<<<<<<<<<<<<
@@ -39638,26 +43266,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":3852
+ /* "netCDF4/_netCDF4.pyx":3934
* 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, 3852, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3934, __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, 3852, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3934, __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, 3852, __pyx_L1_error)
+ __PYX_ERR(0, 3934, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3851
+ /* "netCDF4/_netCDF4.pyx":3933
* # handle negative integers.
* if isinstance(elem, int):
* if ndims > 1: # <<<<<<<<<<<<<<
@@ -39666,58 +43294,58 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":3853
+ /* "netCDF4/_netCDF4.pyx":3935
* 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, 3853, __pyx_L1_error)
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3853, __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, 3935, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3935, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3854
+ /* "netCDF4/_netCDF4.pyx":3936
* 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, 3854, __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, 3936, __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, 3854, __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, 3936, __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, 3854, __pyx_L1_error)
+ __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_v_elem); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3936, __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, 3854, __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, 3936, __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, 3854, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3936, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3855
+ /* "netCDF4/_netCDF4.pyx":3937
* 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, 3855, __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, 3937, __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, 3855, __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, 3937, __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, 3855, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_v_elem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3937, __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":3854
+ /* "netCDF4/_netCDF4.pyx":3936
* raise IndexError(msg)
* if elem < 0:
* if self.shape[0]+elem >= 0: # <<<<<<<<<<<<<<
@@ -39727,7 +43355,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
goto __pyx_L7;
}
- /* "netCDF4/_netCDF4.pyx":3857
+ /* "netCDF4/_netCDF4.pyx":3939
* elem = self.shape[0]+elem
* else:
* raise IndexError("Illegal index") # <<<<<<<<<<<<<<
@@ -39735,15 +43363,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__59, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3857, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3939, __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, 3857, __pyx_L1_error)
+ __PYX_ERR(0, 3939, __pyx_L1_error)
}
__pyx_L7:;
- /* "netCDF4/_netCDF4.pyx":3853
+ /* "netCDF4/_netCDF4.pyx":3935
* if ndims > 1:
* raise IndexError(msg)
* if elem < 0: # <<<<<<<<<<<<<<
@@ -39752,7 +43380,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":3850
+ /* "netCDF4/_netCDF4.pyx":3932
* # check to see that elem is a tuple of integers.
* # handle negative integers.
* if isinstance(elem, int): # <<<<<<<<<<<<<<
@@ -39762,7 +43390,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
goto __pyx_L4;
}
- /* "netCDF4/_netCDF4.pyx":3858
+ /* "netCDF4/_netCDF4.pyx":3940
* else:
* raise IndexError("Illegal index")
* elif isinstance(elem, tuple): # <<<<<<<<<<<<<<
@@ -39773,31 +43401,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":3859
+ /* "netCDF4/_netCDF4.pyx":3941
* 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, 3859, __pyx_L1_error)
+ __pyx_t_6 = PyObject_Length(__pyx_v_elem); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 3941, __pyx_L1_error)
__pyx_t_2 = ((__pyx_t_6 != __pyx_v_ndims) != 0);
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3860
+ /* "netCDF4/_netCDF4.pyx":3942
* 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__60, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3860, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3942, __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, 3860, __pyx_L1_error)
+ __PYX_ERR(0, 3942, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3859
+ /* "netCDF4/_netCDF4.pyx":3941
* raise IndexError("Illegal index")
* elif isinstance(elem, tuple):
* if len(elem) != ndims: # <<<<<<<<<<<<<<
@@ -39806,19 +43434,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":3861
+ /* "netCDF4/_netCDF4.pyx":3943
* 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, 3861, __pyx_L1_error)
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3943, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_elemnew = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3862
+ /* "netCDF4/_netCDF4.pyx":3944
* raise IndexError("Illegal index")
* elemnew = []
* for n,e in enumerate(elem): # <<<<<<<<<<<<<<
@@ -39830,26 +43458,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, 3862, __pyx_L1_error)
+ __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_elem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3944, __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, 3862, __pyx_L1_error)
+ __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3944, __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_COMPILING_IN_CPYTHON
- __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, 3862, __pyx_L1_error)
+ #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, 3944, __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, 3862, __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, 3944, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
} else {
if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 3862, __pyx_L1_error)
+ #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, 3944, __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, 3862, __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, 3944, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
}
@@ -39859,7 +43487,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, 3862, __pyx_L1_error)
+ else __PYX_ERR(0, 3944, __pyx_L1_error)
}
break;
}
@@ -39870,7 +43498,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":3863
+ /* "netCDF4/_netCDF4.pyx":3945
* elemnew = []
* for n,e in enumerate(elem):
* if not isinstance(e, int): # <<<<<<<<<<<<<<
@@ -39881,26 +43509,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":3864
+ /* "netCDF4/_netCDF4.pyx":3946
* 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, 3864, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3946, __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, 3864, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3946, __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, 3864, __pyx_L1_error)
+ __PYX_ERR(0, 3946, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3863
+ /* "netCDF4/_netCDF4.pyx":3945
* elemnew = []
* for n,e in enumerate(elem):
* if not isinstance(e, int): # <<<<<<<<<<<<<<
@@ -39909,62 +43537,62 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":3865
+ /* "netCDF4/_netCDF4.pyx":3947
* 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, 3865, __pyx_L1_error)
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3865, __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, 3947, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3947, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3866
+ /* "netCDF4/_netCDF4.pyx":3948
* 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, 3866, __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, 3948, __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, 3866, __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, 3948, __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, 3866, __pyx_L1_error)
+ __pyx_t_8 = PyNumber_Add(__pyx_t_5, __pyx_v_e); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3948, __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":3867
+ /* "netCDF4/_netCDF4.pyx":3949
* 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, 3867, __pyx_L1_error)
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3867, __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, 3949, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3949, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3868
+ /* "netCDF4/_netCDF4.pyx":3950
* 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__61, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3868, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3950, __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, 3868, __pyx_L1_error)
+ __PYX_ERR(0, 3950, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3867
+ /* "netCDF4/_netCDF4.pyx":3949
* elif e < 0:
* enew = self.shape[n]+e
* if enew < 0: # <<<<<<<<<<<<<<
@@ -39973,7 +43601,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":3870
+ /* "netCDF4/_netCDF4.pyx":3952
* raise IndexError("Illegal index")
* else:
* elemnew.append(self.shape[n]+e) # <<<<<<<<<<<<<<
@@ -39981,19 +43609,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, 3870, __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, 3952, __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, 3870, __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, 3952, __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, 3870, __pyx_L1_error)
+ __pyx_t_8 = PyNumber_Add(__pyx_t_5, __pyx_v_e); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3952, __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, 3870, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_elemnew, __pyx_t_8); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3952, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
- /* "netCDF4/_netCDF4.pyx":3865
+ /* "netCDF4/_netCDF4.pyx":3947
* if not isinstance(e, int):
* raise IndexError(msg)
* elif e < 0: # <<<<<<<<<<<<<<
@@ -40003,7 +43631,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
goto __pyx_L11;
}
- /* "netCDF4/_netCDF4.pyx":3872
+ /* "netCDF4/_netCDF4.pyx":3954
* elemnew.append(self.shape[n]+e)
* else:
* elemnew.append(e) # <<<<<<<<<<<<<<
@@ -40011,11 +43639,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, 3872, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_elemnew, __pyx_v_e); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3954, __pyx_L1_error)
}
__pyx_L11:;
- /* "netCDF4/_netCDF4.pyx":3862
+ /* "netCDF4/_netCDF4.pyx":3944
* raise IndexError("Illegal index")
* elemnew = []
* for n,e in enumerate(elem): # <<<<<<<<<<<<<<
@@ -40025,19 +43653,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":3873
+ /* "netCDF4/_netCDF4.pyx":3955
* 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, 3873, __pyx_L1_error)
+ __pyx_t_3 = PyList_AsTuple(__pyx_v_elemnew); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3955, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF_SET(__pyx_v_elem, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":3858
+ /* "netCDF4/_netCDF4.pyx":3940
* else:
* raise IndexError("Illegal index")
* elif isinstance(elem, tuple): # <<<<<<<<<<<<<<
@@ -40047,7 +43675,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
goto __pyx_L4;
}
- /* "netCDF4/_netCDF4.pyx":3875
+ /* "netCDF4/_netCDF4.pyx":3957
* elem = tuple(elemnew)
* else:
* raise IndexError(msg) # <<<<<<<<<<<<<<
@@ -40055,21 +43683,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, 3875, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3957, __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, 3875, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3957, __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, 3875, __pyx_L1_error)
+ __PYX_ERR(0, 3957, __pyx_L1_error)
}
__pyx_L4:;
- /* "netCDF4/_netCDF4.pyx":3877
+ /* "netCDF4/_netCDF4.pyx":3959
* raise IndexError(msg)
* # set start, count
* if isinstance(elem, tuple): # <<<<<<<<<<<<<<
@@ -40080,19 +43708,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":3878
+ /* "netCDF4/_netCDF4.pyx":3960
* # 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, 3878, __pyx_L1_error)
+ __pyx_t_8 = PySequence_List(__pyx_v_elem); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3960, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_v_start = ((PyObject*)__pyx_t_8);
__pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":3877
+ /* "netCDF4/_netCDF4.pyx":3959
* raise IndexError(msg)
* # set start, count
* if isinstance(elem, tuple): # <<<<<<<<<<<<<<
@@ -40102,7 +43730,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
goto __pyx_L13;
}
- /* "netCDF4/_netCDF4.pyx":3880
+ /* "netCDF4/_netCDF4.pyx":3962
* start = list(elem)
* else:
* start = [elem] # <<<<<<<<<<<<<<
@@ -40110,7 +43738,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
* startp = <size_t *>malloc(sizeof(size_t) * ndims)
*/
/*else*/ {
- __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3880, __pyx_L1_error)
+ __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3962, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_elem);
__Pyx_GIVEREF(__pyx_v_elem);
@@ -40120,14 +43748,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
}
__pyx_L13:;
- /* "netCDF4/_netCDF4.pyx":3881
+ /* "netCDF4/_netCDF4.pyx":3963
* else:
* start = [elem]
* count = [1]*ndims # <<<<<<<<<<<<<<
* startp = <size_t *>malloc(sizeof(size_t) * ndims)
* countp = <size_t *>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, 3881, __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, 3963, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
{ Py_ssize_t __pyx_temp;
for (__pyx_temp=0; __pyx_temp < __pyx_v_ndims; __pyx_temp++) {
@@ -40139,7 +43767,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":3882
+ /* "netCDF4/_netCDF4.pyx":3964
* start = [elem]
* count = [1]*ndims
* startp = <size_t *>malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<<
@@ -40148,7 +43776,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":3883
+ /* "netCDF4/_netCDF4.pyx":3965
* count = [1]*ndims
* startp = <size_t *>malloc(sizeof(size_t) * ndims)
* countp = <size_t *>malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<<
@@ -40157,7 +43785,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":3884
+ /* "netCDF4/_netCDF4.pyx":3966
* startp = <size_t *>malloc(sizeof(size_t) * ndims)
* countp = <size_t *>malloc(sizeof(size_t) * ndims)
* for n from 0 <= n < ndims: # <<<<<<<<<<<<<<
@@ -40167,46 +43795,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":3885
+ /* "netCDF4/_netCDF4.pyx":3967
* countp = <size_t *>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, 3885, __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, 3967, __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, 3885, __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, 3967, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
(__pyx_v_startp[__pyx_v_n]) = __pyx_t_10;
- /* "netCDF4/_netCDF4.pyx":3886
+ /* "netCDF4/_netCDF4.pyx":3968
* for n from 0 <= n < ndims:
* startp[n] = start[n]
* countp[n] = count[n] # <<<<<<<<<<<<<<
* if self.dtype == str: # VLEN string
* strdata = <char **>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, 3886, __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, 3968, __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, 3886, __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, 3968, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
(__pyx_v_countp[__pyx_v_n]) = __pyx_t_10;
}
- /* "netCDF4/_netCDF4.pyx":3887
+ /* "netCDF4/_netCDF4.pyx":3969
* startp[n] = start[n]
* countp[n] = count[n]
* if self.dtype == str: # VLEN string # <<<<<<<<<<<<<<
* strdata = <char **>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, 3887, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3887, __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, 3969, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3969, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3888
+ /* "netCDF4/_netCDF4.pyx":3970
* countp[n] = count[n]
* if self.dtype == str: # VLEN string
* strdata = <char **>malloc(sizeof(char *)) # <<<<<<<<<<<<<<
@@ -40215,29 +43843,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
*/
__pyx_v_strdata = ((char **)malloc((sizeof(char *))));
- /* "netCDF4/_netCDF4.pyx":3889
+ /* "netCDF4/_netCDF4.pyx":3971
* if self.dtype == str: # VLEN string
* strdata = <char **>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, 3889, __pyx_L1_error)
+ __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_data, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3971, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_v_bytestr = __pyx_t_8;
__pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":3890
+ /* "netCDF4/_netCDF4.pyx":3972
* strdata = <char **>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, 3890, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 3972, __pyx_L1_error)
(__pyx_v_strdata[0]) = __pyx_t_11;
- /* "netCDF4/_netCDF4.pyx":3891
+ /* "netCDF4/_netCDF4.pyx":3973
* bytestr = _strencode(data)
* strdata[0] = bytestr
* ierr = nc_put_vara(self._grpid, self._varid, # <<<<<<<<<<<<<<
@@ -40246,7 +43874,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":3893
+ /* "netCDF4/_netCDF4.pyx":3975
* ierr = nc_put_vara(self._grpid, self._varid,
* startp, countp, strdata)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -40256,7 +43884,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":3894
+ /* "netCDF4/_netCDF4.pyx":3976
* startp, countp, strdata)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -40264,22 +43892,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, 3894, __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, 3976, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3894, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3976, __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, 3894, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3976, __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, 3894, __pyx_L1_error)
+ __PYX_ERR(0, 3976, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3893
+ /* "netCDF4/_netCDF4.pyx":3975
* ierr = nc_put_vara(self._grpid, self._varid,
* startp, countp, strdata)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -40288,7 +43916,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":3895
+ /* "netCDF4/_netCDF4.pyx":3977
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* free(strdata) # <<<<<<<<<<<<<<
@@ -40297,7 +43925,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
*/
free(__pyx_v_strdata);
- /* "netCDF4/_netCDF4.pyx":3887
+ /* "netCDF4/_netCDF4.pyx":3969
* startp[n] = start[n]
* countp[n] = count[n]
* if self.dtype == str: # VLEN string # <<<<<<<<<<<<<<
@@ -40307,7 +43935,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
goto __pyx_L16;
}
- /* "netCDF4/_netCDF4.pyx":3897
+ /* "netCDF4/_netCDF4.pyx":3979
* free(strdata)
* else: # regular VLEN
* if data.dtype != self.dtype: # <<<<<<<<<<<<<<
@@ -40315,24 +43943,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, 3897, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3979, __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, 3897, __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, 3979, __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, 3897, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3979, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":3898
+ /* "netCDF4/_netCDF4.pyx":3980
* 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 = <nc_vlen_t *>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, 3898, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3980, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3898, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3980, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_self->dtype);
__Pyx_GIVEREF(__pyx_v_self->dtype);
@@ -40340,22 +43968,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, 3898, __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, 3980, __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, 3898, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3980, __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, 3898, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3980, __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, 3898, __pyx_L1_error)
+ __PYX_ERR(0, 3980, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3897
+ /* "netCDF4/_netCDF4.pyx":3979
* free(strdata)
* else: # regular VLEN
* if data.dtype != self.dtype: # <<<<<<<<<<<<<<
@@ -40364,20 +43992,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":3899
+ /* "netCDF4/_netCDF4.pyx":3981
* if data.dtype != self.dtype:
* raise TypeError("wrong data type: should be %s, got %s" % (self.dtype,data.dtype))
* data2 = data # <<<<<<<<<<<<<<
* vldata = <nc_vlen_t *>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, 3899, __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, 3981, __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":3900
+ /* "netCDF4/_netCDF4.pyx":3982
* raise TypeError("wrong data type: should be %s, got %s" % (self.dtype,data.dtype))
* data2 = data
* vldata = <nc_vlen_t *>malloc(sizeof(nc_vlen_t)) # <<<<<<<<<<<<<<
@@ -40386,7 +44014,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":3901
+ /* "netCDF4/_netCDF4.pyx":3983
* data2 = data
* vldata = <nc_vlen_t *>malloc(sizeof(nc_vlen_t))
* vldata[0].len = PyArray_SIZE(data2) # <<<<<<<<<<<<<<
@@ -40395,7 +44023,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":3902
+ /* "netCDF4/_netCDF4.pyx":3984
* vldata = <nc_vlen_t *>malloc(sizeof(nc_vlen_t))
* vldata[0].len = PyArray_SIZE(data2)
* vldata[0].p = data2.data # <<<<<<<<<<<<<<
@@ -40405,7 +44033,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":3903
+ /* "netCDF4/_netCDF4.pyx":3985
* vldata[0].len = PyArray_SIZE(data2)
* vldata[0].p = data2.data
* ierr = nc_put_vara(self._grpid, self._varid, # <<<<<<<<<<<<<<
@@ -40414,7 +44042,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":3905
+ /* "netCDF4/_netCDF4.pyx":3987
* ierr = nc_put_vara(self._grpid, self._varid,
* startp, countp, vldata)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -40424,7 +44052,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":3906
+ /* "netCDF4/_netCDF4.pyx":3988
* startp, countp, vldata)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -40432,22 +44060,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, 3906, __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, 3988, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3906, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3988, __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, 3906, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3988, __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, 3906, __pyx_L1_error)
+ __PYX_ERR(0, 3988, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3905
+ /* "netCDF4/_netCDF4.pyx":3987
* ierr = nc_put_vara(self._grpid, self._varid,
* startp, countp, vldata)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -40456,7 +44084,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":3907
+ /* "netCDF4/_netCDF4.pyx":3989
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* free(vldata) # <<<<<<<<<<<<<<
@@ -40467,7 +44095,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
}
__pyx_L16:;
- /* "netCDF4/_netCDF4.pyx":3908
+ /* "netCDF4/_netCDF4.pyx":3990
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* free(vldata)
* free(startp) # <<<<<<<<<<<<<<
@@ -40476,7 +44104,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
*/
free(__pyx_v_startp);
- /* "netCDF4/_netCDF4.pyx":3909
+ /* "netCDF4/_netCDF4.pyx":3991
* free(vldata)
* free(startp)
* free(countp) # <<<<<<<<<<<<<<
@@ -40485,7 +44113,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
*/
free(__pyx_v_countp);
- /* "netCDF4/_netCDF4.pyx":3836
+ /* "netCDF4/_netCDF4.pyx":3918
* return data
*
* def _assign_vlen(self, elem, data): # <<<<<<<<<<<<<<
@@ -40517,7 +44145,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_48_assign_vlen(struct __p
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":3911
+/* "netCDF4/_netCDF4.pyx":3993
* free(countp)
*
* def __setitem__(self, elem, data): # <<<<<<<<<<<<<<
@@ -40561,61 +44189,62 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
Py_ssize_t __pyx_t_4;
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
- PyObject *__pyx_t_7 = NULL;
- int __pyx_t_8;
- PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
PyObject *__pyx_t_10 = NULL;
- PyObject *(*__pyx_t_11)(PyObject *);
+ PyObject *__pyx_t_11 = NULL;
PyObject *(*__pyx_t_12)(PyObject *);
- Py_ssize_t __pyx_t_13;
- PyObject *__pyx_t_14 = NULL;
+ PyObject *(*__pyx_t_13)(PyObject *);
+ Py_ssize_t __pyx_t_14;
PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
__Pyx_RefNannySetupContext("__setitem__", 0);
__Pyx_INCREF(__pyx_v_elem);
__Pyx_INCREF(__pyx_v_data);
- /* "netCDF4/_netCDF4.pyx":3918
+ /* "netCDF4/_netCDF4.pyx":4000
* # 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, 3918, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4000, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3919
+ /* "netCDF4/_netCDF4.pyx":4001
*
* 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, 3919, __pyx_L1_error)
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3919, __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, 4001, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4001, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3923
+ /* "netCDF4/_netCDF4.pyx":4005
* # assume it is a python string and raise an error
* # if it is an array, but not an object array.
* if not hasattr(data,'ndim'): # <<<<<<<<<<<<<<
* # issue 458, allow Ellipsis to be used for scalar var
* if type(elem) == type(Ellipsis) and not\
*/
- __pyx_t_1 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 3923, __pyx_L1_error)
+ __pyx_t_1 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4005, __pyx_L1_error)
__pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0);
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":3925
+ /* "netCDF4/_netCDF4.pyx":4007
* if not hasattr(data,'ndim'):
* # 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_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_elem)), ((PyObject *)Py_TYPE(__pyx_builtin_Ellipsis)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3925, __pyx_L1_error)
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3925, __pyx_L1_error)
+ __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_elem)), ((PyObject *)Py_TYPE(__pyx_builtin_Ellipsis)), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4007, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4007, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_1) {
} else {
@@ -40623,19 +44252,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
goto __pyx_L7_bool_binop_done;
}
- /* "netCDF4/_netCDF4.pyx":3926
+ /* "netCDF4/_netCDF4.pyx":4008
* # 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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3926, __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, 4008, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 3926, __pyx_L1_error)
+ __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4008, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":3925
+ /* "netCDF4/_netCDF4.pyx":4007
* if not hasattr(data,'ndim'):
* # issue 458, allow Ellipsis to be used for scalar var
* if type(elem) == type(Ellipsis) and not\ # <<<<<<<<<<<<<<
@@ -40647,7 +44276,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
__pyx_L7_bool_binop_done:;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":3926
+ /* "netCDF4/_netCDF4.pyx":4008
* # issue 458, allow Ellipsis to be used for scalar var
* if type(elem) == type(Ellipsis) and not\
* len(self.dimensions): elem = 0 # <<<<<<<<<<<<<<
@@ -40657,7 +44286,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":3925
+ /* "netCDF4/_netCDF4.pyx":4007
* if not hasattr(data,'ndim'):
* # issue 458, allow Ellipsis to be used for scalar var
* if type(elem) == type(Ellipsis) and not\ # <<<<<<<<<<<<<<
@@ -40666,45 +44295,63 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3927
+ /* "netCDF4/_netCDF4.pyx":4009
* 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_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_assign_vlen); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3927, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_assign_vlen); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4009, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- __pyx_t_4 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
__Pyx_INCREF(__pyx_t_6);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_5, function);
- __pyx_t_4 = 1;
+ __pyx_t_7 = 1;
}
}
- __pyx_t_7 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3927, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- if (__pyx_t_6) {
- __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_elem, __pyx_v_data};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4009, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_elem, __pyx_v_data};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4009, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4009, __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;
+ }
+ __Pyx_INCREF(__pyx_v_elem);
+ __Pyx_GIVEREF(__pyx_v_elem);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_elem);
+ __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_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4009, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
- __Pyx_INCREF(__pyx_v_elem);
- __Pyx_GIVEREF(__pyx_v_elem);
- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_4, __pyx_v_elem);
- __Pyx_INCREF(__pyx_v_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_4, __pyx_v_data);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3927, __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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":3928
+ /* "netCDF4/_netCDF4.pyx":4010
* len(self.dimensions): elem = 0
* self._assign_vlen(elem, data)
* return # <<<<<<<<<<<<<<
@@ -40714,7 +44361,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
__pyx_r = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3923
+ /* "netCDF4/_netCDF4.pyx":4005
* # assume it is a python string and raise an error
* # if it is an array, but not an object array.
* if not hasattr(data,'ndim'): # <<<<<<<<<<<<<<
@@ -40723,73 +44370,91 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3929
+ /* "netCDF4/_netCDF4.pyx":4011
* 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3929, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4011, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3929, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4011, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3929, __pyx_L1_error)
+ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4011, __pyx_L1_error)
if (!__pyx_t_1) {
} else {
__pyx_t_3 = __pyx_t_1;
goto __pyx_L9_bool_binop_done;
}
- __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3929, __pyx_L1_error)
+ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4011, __pyx_L1_error)
__pyx_t_3 = __pyx_t_1;
__pyx_L9_bool_binop_done:;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_1 = (__pyx_t_3 != 0);
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3930
+ /* "netCDF4/_netCDF4.pyx":4012
* 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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3930, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isMA); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3930, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isMA); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4012, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_2)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
__Pyx_INCREF(__pyx_t_2);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
}
}
if (!__pyx_t_2) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3930, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3930, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
- __Pyx_INCREF(__pyx_v_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_data);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3930, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_data};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4012, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_data};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4012, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4012, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_data);
+ __Pyx_GIVEREF(__pyx_v_data);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_data);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4012, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3930, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4012, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3931
+ /* "netCDF4/_netCDF4.pyx":4013
* elif data.dtype.kind in ['S', 'U']:
* if ma.isMA(data):
* msg='masked arrays cannot be assigned by VLEN str slices' # <<<<<<<<<<<<<<
@@ -40799,26 +44464,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":3932
+ /* "netCDF4/_netCDF4.pyx":4014
* 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_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3932, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4014, __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_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3932, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4014, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_Raise(__pyx_t_7, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __PYX_ERR(0, 3932, __pyx_L1_error)
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(0, 4014, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3930
+ /* "netCDF4/_netCDF4.pyx":4012
* return
* elif data.dtype.kind in ['S', 'U']:
* if ma.isMA(data): # <<<<<<<<<<<<<<
@@ -40827,17 +44492,17 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3933
+ /* "netCDF4/_netCDF4.pyx":4015
* 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3933, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4015, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -40847,24 +44512,42 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
}
}
if (!__pyx_t_6) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_builtin_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3933, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_builtin_object); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4015, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
} else {
- __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3933, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
- __Pyx_INCREF(__pyx_builtin_object);
- __Pyx_GIVEREF(__pyx_builtin_object);
- PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_builtin_object);
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3933, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_builtin_object};
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4015, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_builtin_object};
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4015, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4015, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_builtin_object);
+ __Pyx_GIVEREF(__pyx_builtin_object);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_builtin_object);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4015, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_7);
- __pyx_t_7 = 0;
+ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_8);
+ __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":3929
+ /* "netCDF4/_netCDF4.pyx":4011
* self._assign_vlen(elem, data)
* return
* elif data.dtype.kind in ['S', 'U']: # <<<<<<<<<<<<<<
@@ -40874,23 +44557,23 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
goto __pyx_L5;
}
- /* "netCDF4/_netCDF4.pyx":3934
+ /* "netCDF4/_netCDF4.pyx":4016
* 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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3934, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3934, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4016, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4016, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3934, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4016, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3935
+ /* "netCDF4/_netCDF4.pyx":4017
* data = data.astype(object)
* elif data.dtype.kind != 'O':
* msg = ('only numpy string, unicode or object arrays can ' # <<<<<<<<<<<<<<
@@ -40900,26 +44583,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":3937
+ /* "netCDF4/_netCDF4.pyx":4019
* 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_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3937, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4019, __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_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3937, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4019, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_Raise(__pyx_t_7, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __PYX_ERR(0, 3937, __pyx_L1_error)
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(0, 4019, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3934
+ /* "netCDF4/_netCDF4.pyx":4016
* raise TypeError(msg)
* data = data.astype(object)
* elif data.dtype.kind != 'O': # <<<<<<<<<<<<<<
@@ -40929,7 +44612,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
}
__pyx_L5:;
- /* "netCDF4/_netCDF4.pyx":3919
+ /* "netCDF4/_netCDF4.pyx":4001
*
* if self._isvlen: # if vlen, should be object array (don't try casting)
* if self.dtype == str: # <<<<<<<<<<<<<<
@@ -40939,7 +44622,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
goto __pyx_L4;
}
- /* "netCDF4/_netCDF4.pyx":3942
+ /* "netCDF4/_netCDF4.pyx":4024
* # not an object array, assume it represents a single element
* # of the vlen var.
* if not hasattr(data,'ndim') or data.dtype.kind != 'O': # <<<<<<<<<<<<<<
@@ -40947,65 +44630,65 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
* if type(elem) == type(Ellipsis) and not\
*/
/*else*/ {
- __pyx_t_3 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 3942, __pyx_L1_error)
- __pyx_t_8 = ((!(__pyx_t_3 != 0)) != 0);
- if (!__pyx_t_8) {
+ __pyx_t_3 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 4024, __pyx_L1_error)
+ __pyx_t_9 = ((!(__pyx_t_3 != 0)) != 0);
+ if (!__pyx_t_9) {
} else {
- __pyx_t_1 = __pyx_t_8;
+ __pyx_t_1 = __pyx_t_9;
goto __pyx_L13_bool_binop_done;
}
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3942, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3942, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4024, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4024, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3942, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4024, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_1 = __pyx_t_8;
+ __pyx_t_1 = __pyx_t_9;
__pyx_L13_bool_binop_done:;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3944
+ /* "netCDF4/_netCDF4.pyx":4026
* if not hasattr(data,'ndim') 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_5 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_elem)), ((PyObject *)Py_TYPE(__pyx_builtin_Ellipsis)), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3944, __pyx_L1_error)
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3944, __pyx_L1_error)
+ __pyx_t_5 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_elem)), ((PyObject *)Py_TYPE(__pyx_builtin_Ellipsis)), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4026, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4026, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (__pyx_t_8) {
+ if (__pyx_t_9) {
} else {
- __pyx_t_1 = __pyx_t_8;
+ __pyx_t_1 = __pyx_t_9;
goto __pyx_L16_bool_binop_done;
}
- /* "netCDF4/_netCDF4.pyx":3945
+ /* "netCDF4/_netCDF4.pyx":4027
* # 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_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3945, __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, 4027, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 3945, __pyx_L1_error)
+ __pyx_t_4 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4027, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3944
+ /* "netCDF4/_netCDF4.pyx":4026
* if not hasattr(data,'ndim') 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 = ((!(__pyx_t_4 != 0)) != 0);
- __pyx_t_1 = __pyx_t_8;
+ __pyx_t_9 = ((!(__pyx_t_4 != 0)) != 0);
+ __pyx_t_1 = __pyx_t_9;
__pyx_L16_bool_binop_done:;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":3945
+ /* "netCDF4/_netCDF4.pyx":4027
* # issue 458, allow Ellipsis to be used for scalar var
* if type(elem) == type(Ellipsis) and not\
* len(self.dimensions): elem = 0 # <<<<<<<<<<<<<<
@@ -41015,7 +44698,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":3944
+ /* "netCDF4/_netCDF4.pyx":4026
* if not hasattr(data,'ndim') or data.dtype.kind != 'O':
* # issue 458, allow Ellipsis to be used for scalar var
* if type(elem) == type(Ellipsis) and not\ # <<<<<<<<<<<<<<
@@ -41024,45 +44707,63 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3946
+ /* "netCDF4/_netCDF4.pyx":4028
* if type(elem) == type(Ellipsis) and not\
* len(self.dimensions): elem = 0
* self._assign_vlen(elem, data) # <<<<<<<<<<<<<<
* return
*
*/
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_assign_vlen); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3946, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_assign_vlen); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4028, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__pyx_t_2 = NULL;
- __pyx_t_4 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_2)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
__Pyx_INCREF(__pyx_t_2);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
- __pyx_t_4 = 1;
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ __pyx_t_7 = 1;
}
}
- __pyx_t_6 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3946, __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;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_elem, __pyx_v_data};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4028, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_elem, __pyx_v_data};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4028, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4028, __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;
+ }
+ __Pyx_INCREF(__pyx_v_elem);
+ __Pyx_GIVEREF(__pyx_v_elem);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_elem);
+ __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_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4028, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
- __Pyx_INCREF(__pyx_v_elem);
- __Pyx_GIVEREF(__pyx_v_elem);
- PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_4, __pyx_v_elem);
- __Pyx_INCREF(__pyx_v_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_4, __pyx_v_data);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3946, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3947
+ /* "netCDF4/_netCDF4.pyx":4029
* len(self.dimensions): elem = 0
* self._assign_vlen(elem, data)
* return # <<<<<<<<<<<<<<
@@ -41072,7 +44773,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
__pyx_r = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":3942
+ /* "netCDF4/_netCDF4.pyx":4024
* # not an object array, assume it represents a single element
* # of the vlen var.
* if not hasattr(data,'ndim') or data.dtype.kind != 'O': # <<<<<<<<<<<<<<
@@ -41083,7 +44784,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
}
__pyx_L4:;
- /* "netCDF4/_netCDF4.pyx":3918
+ /* "netCDF4/_netCDF4.pyx":4000
* # to use.
*
* if self._isvlen: # if vlen, should be object array (don't try casting) # <<<<<<<<<<<<<<
@@ -41092,32 +44793,32 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3951
+ /* "netCDF4/_netCDF4.pyx":4033
* # A numpy array is needed. Convert if necessary.
* # assume it's a numpy or masked array if it has an 'ndim' attribute.
* if not hasattr(data,'ndim'): # <<<<<<<<<<<<<<
* # 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_1 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 3951, __pyx_L1_error)
- __pyx_t_8 = ((!(__pyx_t_1 != 0)) != 0);
- if (__pyx_t_8) {
+ __pyx_t_1 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4033, __pyx_L1_error)
+ __pyx_t_9 = ((!(__pyx_t_1 != 0)) != 0);
+ if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":3953
+ /* "netCDF4/_netCDF4.pyx":4035
* if not hasattr(data,'ndim'):
* # 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_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3953, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4035, __pyx_L1_error)
if (!__pyx_t_1) {
goto __pyx_L21_next_or;
} else {
}
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3953, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4035, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3953, __pyx_L1_error)
+ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4035, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_3 = (__pyx_t_1 != 0);
if (!__pyx_t_3) {
@@ -41125,83 +44826,103 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
} else {
}
- /* "netCDF4/_netCDF4.pyx":3954
+ /* "netCDF4/_netCDF4.pyx":4036
* # 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_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 3954, __pyx_L1_error)
+ __pyx_t_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 4036, __pyx_L1_error)
__pyx_t_1 = (__pyx_t_3 != 0);
if (!__pyx_t_1) {
} else {
- __pyx_t_8 = __pyx_t_1;
+ __pyx_t_9 = __pyx_t_1;
goto __pyx_L20_bool_binop_done;
}
__pyx_L21_next_or:;
- __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 3954, __pyx_L1_error)
+ __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4036, __pyx_L1_error)
__pyx_t_3 = (__pyx_t_1 != 0);
- __pyx_t_8 = __pyx_t_3;
+ __pyx_t_9 = __pyx_t_3;
__pyx_L20_bool_binop_done:;
- /* "netCDF4/_netCDF4.pyx":3953
+ /* "netCDF4/_netCDF4.pyx":4035
* if not hasattr(data,'ndim'):
* # 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)
*/
- if (__pyx_t_8) {
+ if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":3955
+ /* "netCDF4/_netCDF4.pyx":4037
* 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_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3955, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3955, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4037, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4037, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3955, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_float); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3955, __pyx_L1_error)
+ __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, 4037, __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, 4037, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = NULL;
- __pyx_t_4 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
- if (likely(__pyx_t_7)) {
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
- __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_4 = 1;
+ __pyx_t_7 = 1;
}
}
- __pyx_t_9 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3955, __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;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_data, __pyx_t_2};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4037, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_data, __pyx_t_2};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4037, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4037, __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;
+ }
+ __Pyx_INCREF(__pyx_v_data);
+ __Pyx_GIVEREF(__pyx_v_data);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_7, __pyx_v_data);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_7, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4037, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
- __Pyx_INCREF(__pyx_v_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_4, __pyx_v_data);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_4, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3955, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3953
+ /* "netCDF4/_netCDF4.pyx":4035
* if not hasattr(data,'ndim'):
* # if auto scaling is to be done, don't cast to an integer yet.
* if self.scale and self.dtype.kind in 'iu' and \ # <<<<<<<<<<<<<<
@@ -41211,7 +44932,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
goto __pyx_L19;
}
- /* "netCDF4/_netCDF4.pyx":3957
+ /* "netCDF4/_netCDF4.pyx":4039
* data = numpy.array(data,numpy.float)
* else:
* data = numpy.array(data,self.dtype) # <<<<<<<<<<<<<<
@@ -41219,44 +44940,62 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
* # for Enum variable, make sure data is valid.
*/
/*else*/ {
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3957, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4039, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3957, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4039, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = NULL;
- __pyx_t_4 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
if (likely(__pyx_t_6)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
__Pyx_INCREF(__pyx_t_6);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_9, function);
- __pyx_t_4 = 1;
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ __pyx_t_7 = 1;
}
}
- __pyx_t_2 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3957, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (__pyx_t_6) {
- __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_data, __pyx_v_self->dtype};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4039, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_data, __pyx_v_self->dtype};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4039, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4039, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_data);
+ __Pyx_GIVEREF(__pyx_v_data);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_v_data);
+ __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_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4039, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- __Pyx_INCREF(__pyx_v_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_4, __pyx_v_data);
- __Pyx_INCREF(__pyx_v_self->dtype);
- __Pyx_GIVEREF(__pyx_v_self->dtype);
- PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_4, __pyx_v_self->dtype);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3957, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
__pyx_t_5 = 0;
}
__pyx_L19:;
- /* "netCDF4/_netCDF4.pyx":3951
+ /* "netCDF4/_netCDF4.pyx":4033
* # A numpy array is needed. Convert if necessary.
* # assume it's a numpy or masked array if it has an 'ndim' attribute.
* if not hasattr(data,'ndim'): # <<<<<<<<<<<<<<
@@ -41265,133 +45004,155 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3960
+ /* "netCDF4/_netCDF4.pyx":4042
*
* # 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_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3960, __pyx_L1_error)
- if (__pyx_t_8) {
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4042, __pyx_L1_error)
+ if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":3961
+ /* "netCDF4/_netCDF4.pyx":4043
* # 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_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3961, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3961, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4043, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4043, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3961, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3961, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4043, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4043, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bool); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3961, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bool); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4043, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = NULL;
- __pyx_t_4 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
__Pyx_INCREF(__pyx_t_6);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_2, function);
- __pyx_t_4 = 1;
+ __pyx_t_7 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3961, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- if (__pyx_t_6) {
- __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_10, __pyx_t_8};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4043, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_10, __pyx_t_8};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4043, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4043, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_7, __pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_7, __pyx_t_8);
+ __pyx_t_10 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4043, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
}
- __Pyx_GIVEREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_4, __pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_4, __pyx_t_7);
- __pyx_t_9 = 0;
- __pyx_t_7 = 0;
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3961, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_test = __pyx_t_5;
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3962
+ /* "netCDF4/_netCDF4.pyx":4044
* 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, 3962, __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, 4044, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_enum_dict); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3962, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_enum_dict); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4044, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3962, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4044, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_10)) {
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_11)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_11);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_2, function);
}
}
- if (__pyx_t_10) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3962, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ if (__pyx_t_11) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4044, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
} else {
- __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3962, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4044, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
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_4 = 0;
- __pyx_t_11 = NULL;
+ __pyx_t_12 = NULL;
} else {
- __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3962, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4044, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3962, __pyx_L1_error)
+ __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4044, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
for (;;) {
- if (likely(!__pyx_t_11)) {
+ if (likely(!__pyx_t_12)) {
if (likely(PyList_CheckExact(__pyx_t_2))) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3962, __pyx_L1_error)
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 4044, __pyx_L1_error)
#else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3962, __pyx_L1_error)
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4044, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3962, __pyx_L1_error)
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 4044, __pyx_L1_error)
#else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3962, __pyx_L1_error)
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4044, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
}
} else {
- __pyx_t_5 = __pyx_t_11(__pyx_t_2);
+ __pyx_t_5 = __pyx_t_12(__pyx_t_2);
if (unlikely(!__pyx_t_5)) {
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, 3962, __pyx_L1_error)
+ else __PYX_ERR(0, 4044, __pyx_L1_error)
}
break;
}
@@ -41400,21 +45161,21 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
__Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5);
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":3963
+ /* "netCDF4/_netCDF4.pyx":4045
* 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_5 = PyObject_RichCompare(__pyx_v_data, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3963, __pyx_L1_error)
- __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_v_test, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3963, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_data, __pyx_v_val, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4045, __pyx_L1_error)
+ __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_v_test, __pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4045, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF_SET(__pyx_v_test, __pyx_t_10);
- __pyx_t_10 = 0;
+ __Pyx_DECREF_SET(__pyx_v_test, __pyx_t_11);
+ __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":3962
+ /* "netCDF4/_netCDF4.pyx":4044
* if self._isenum:
* test = numpy.zeros(data.shape,numpy.bool)
* for val in self.datatype.enum_dict.values(): # <<<<<<<<<<<<<<
@@ -41424,49 +45185,67 @@ 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":3964
+ /* "netCDF4/_netCDF4.pyx":4046
* 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_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3964, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_all); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3964, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4046, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_all); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4046, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
- if (likely(__pyx_t_10)) {
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_11)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_11);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_5, function);
}
}
- if (!__pyx_t_10) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_test); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3964, __pyx_L1_error)
+ if (!__pyx_t_11) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_test); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4046, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3964, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_10); __pyx_t_10 = NULL;
- __Pyx_INCREF(__pyx_v_test);
- __Pyx_GIVEREF(__pyx_v_test);
- PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_test);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3964, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_test};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4046, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_test};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4046, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4046, __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_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_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4046, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3964, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4046, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_3 = ((!__pyx_t_8) != 0);
+ __pyx_t_3 = ((!__pyx_t_9) != 0);
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":3965
+ /* "netCDF4/_netCDF4.pyx":4047
* test += data == val
* if not numpy.all(test):
* msg="trying to assign illegal value to Enum variable" # <<<<<<<<<<<<<<
@@ -41476,26 +45255,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":3966
+ /* "netCDF4/_netCDF4.pyx":4048
* 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, 3966, __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_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3966, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4048, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __PYX_ERR(0, 3966, __pyx_L1_error)
+ __PYX_ERR(0, 4048, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":3964
+ /* "netCDF4/_netCDF4.pyx":4046
* for val in self.datatype.enum_dict.values():
* test += data == val
* if not numpy.all(test): # <<<<<<<<<<<<<<
@@ -41504,7 +45283,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3960
+ /* "netCDF4/_netCDF4.pyx":4042
*
* # for Enum variable, make sure data is valid.
* if self._isenum: # <<<<<<<<<<<<<<
@@ -41513,48 +45292,48 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3969
+ /* "netCDF4/_netCDF4.pyx":4051
*
* 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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3969, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4051, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3969, __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, 4051, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3969, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3969, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4051, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4051, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
__Pyx_INCREF(__pyx_v_elem);
__Pyx_GIVEREF(__pyx_v_elem);
- PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_elem);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_elem);
__Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_8);
__Pyx_INCREF(__pyx_v_self->_grp);
__Pyx_GIVEREF(__pyx_v_self->_grp);
- PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_v_self->_grp);
+ PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_v_self->_grp);
__pyx_t_2 = 0;
- __pyx_t_7 = 0;
- __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3969, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3969, __pyx_L1_error)
+ __pyx_t_8 = 0;
+ __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4051, __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, 4051, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_datashape, __pyx_t_2) < 0) __PYX_ERR(0, 3969, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_datashape, __pyx_t_2) < 0) __PYX_ERR(0, 4051, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_put, Py_True) < 0) __PYX_ERR(0, 3969, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3969, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_put, Py_True) < 0) __PYX_ERR(0, 4051, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4051, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
PyObject* sequence = __pyx_t_2;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -41562,30 +45341,30 @@ 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, 3968, __pyx_L1_error)
+ __PYX_ERR(0, 4050, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1);
__pyx_t_5 = PyTuple_GET_ITEM(sequence, 2);
- __pyx_t_9 = PyTuple_GET_ITEM(sequence, 3);
+ __pyx_t_10 = PyTuple_GET_ITEM(sequence, 3);
} else {
- __pyx_t_7 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_10 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_11 = PyList_GET_ITEM(sequence, 1);
__pyx_t_5 = PyList_GET_ITEM(sequence, 2);
- __pyx_t_9 = PyList_GET_ITEM(sequence, 3);
+ __pyx_t_10 = PyList_GET_ITEM(sequence, 3);
}
- __Pyx_INCREF(__pyx_t_7);
- __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_11);
__Pyx_INCREF(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_10);
#else
{
Py_ssize_t i;
- PyObject** temps[4] = {&__pyx_t_7,&__pyx_t_10,&__pyx_t_5,&__pyx_t_9};
+ PyObject** temps[4] = {&__pyx_t_8,&__pyx_t_11,&__pyx_t_5,&__pyx_t_10};
for (i=0; i < 4; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 3968, __pyx_L1_error)
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 4050, __pyx_L1_error)
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
@@ -41594,139 +45373,175 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
} else {
Py_ssize_t index = -1;
- PyObject** temps[4] = {&__pyx_t_7,&__pyx_t_10,&__pyx_t_5,&__pyx_t_9};
- __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3968, __pyx_L1_error)
+ PyObject** temps[4] = {&__pyx_t_8,&__pyx_t_11,&__pyx_t_5,&__pyx_t_10};
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4050, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_12 = Py_TYPE(__pyx_t_6)->tp_iternext;
+ __pyx_t_13 = Py_TYPE(__pyx_t_6)->tp_iternext;
for (index=0; index < 4; index++) {
- PyObject* item = __pyx_t_12(__pyx_t_6); if (unlikely(!item)) goto __pyx_L28_unpacking_failed;
+ PyObject* item = __pyx_t_13(__pyx_t_6); if (unlikely(!item)) goto __pyx_L28_unpacking_failed;
__Pyx_GOTREF(item);
*(temps[index]) = item;
}
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_6), 4) < 0) __PYX_ERR(0, 3968, __pyx_L1_error)
- __pyx_t_12 = NULL;
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_6), 4) < 0) __PYX_ERR(0, 4050, __pyx_L1_error)
+ __pyx_t_13 = NULL;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L29_unpacking_done;
__pyx_L28_unpacking_failed:;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_12 = NULL;
+ __pyx_t_13 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 3968, __pyx_L1_error)
+ __PYX_ERR(0, 4050, __pyx_L1_error)
__pyx_L29_unpacking_done:;
}
- /* "netCDF4/_netCDF4.pyx":3968
+ /* "netCDF4/_netCDF4.pyx":4050
* raise ValueError(msg)
*
* start, count, stride, put_ind =\ # <<<<<<<<<<<<<<
* _StartCountStride(elem,self.shape,self.dimensions,self._grp,datashape=data.shape,put=True)
* datashape = _out_array_shape(count)
*/
- __pyx_v_start = __pyx_t_7;
- __pyx_t_7 = 0;
- __pyx_v_count = __pyx_t_10;
- __pyx_t_10 = 0;
+ __pyx_v_start = __pyx_t_8;
+ __pyx_t_8 = 0;
+ __pyx_v_count = __pyx_t_11;
+ __pyx_t_11 = 0;
__pyx_v_stride = __pyx_t_5;
__pyx_t_5 = 0;
- __pyx_v_put_ind = __pyx_t_9;
- __pyx_t_9 = 0;
+ __pyx_v_put_ind = __pyx_t_10;
+ __pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":3970
+ /* "netCDF4/_netCDF4.pyx":4052
* 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_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3970, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4052, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_9, function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
}
}
if (!__pyx_t_5) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3970, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4052, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
} else {
- __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3970, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL;
- __Pyx_INCREF(__pyx_v_count);
- __Pyx_GIVEREF(__pyx_v_count);
- PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_count);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3970, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_count};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4052, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_count};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4052, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4052, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_count);
+ __Pyx_GIVEREF(__pyx_v_count);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_count);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4052, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_v_datashape = __pyx_t_2;
__pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":3974
+ /* "netCDF4/_netCDF4.pyx":4056
* # 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, 3974, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4056, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3974, __pyx_L1_error)
+ __pyx_t_10 = PyObject_RichCompare(__pyx_t_2, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4056, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3974, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4056, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":3975
+ /* "netCDF4/_netCDF4.pyx":4057
* # 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, 3975, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4057, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tile); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3975, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tile); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4057, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- __pyx_t_4 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
if (likely(__pyx_t_2)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
__Pyx_INCREF(__pyx_t_2);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_10, function);
- __pyx_t_4 = 1;
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_7 = 1;
}
}
- __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3975, __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;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_data, __pyx_v_datashape};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4057, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_data, __pyx_v_datashape};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4057, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4057, __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;
+ }
+ __Pyx_INCREF(__pyx_v_data);
+ __Pyx_GIVEREF(__pyx_v_data);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_v_data);
+ __Pyx_INCREF(__pyx_v_datashape);
+ __Pyx_GIVEREF(__pyx_v_datashape);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_datashape);
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4057, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
- __Pyx_INCREF(__pyx_v_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_data);
- __Pyx_INCREF(__pyx_v_datashape);
- __Pyx_GIVEREF(__pyx_v_datashape);
- PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_datashape);
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3975, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_9);
- __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_10);
+ __pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":3974
+ /* "netCDF4/_netCDF4.pyx":4056
* # if a numpy scalar, create an array of the right size
* # and fill with scalar values.
* if data.shape == (): # <<<<<<<<<<<<<<
@@ -41735,64 +45550,64 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3978
+ /* "netCDF4/_netCDF4.pyx":4060
* # 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_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3978, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_4 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 3978, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_13 = PyObject_Length(__pyx_v_datashape); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 3978, __pyx_L1_error)
- __pyx_t_3 = ((__pyx_t_4 != __pyx_t_13) != 0);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4060, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_4 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 4060, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_14 = PyObject_Length(__pyx_v_datashape); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 4060, __pyx_L1_error)
+ __pyx_t_3 = ((__pyx_t_4 != __pyx_t_14) != 0);
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":3980
+ /* "netCDF4/_netCDF4.pyx":4062
* 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_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_view); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3980, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_view); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4062, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_11);
if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_10, function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
}
}
if (__pyx_t_5) {
- __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3980, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4062, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else {
- __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3980, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4062, __pyx_L1_error)
}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_9);
- __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_10);
+ __pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":3981
+ /* "netCDF4/_netCDF4.pyx":4063
* # 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_9 = PySequence_Tuple(__pyx_v_datashape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3981, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_data, __pyx_n_s_shape, __pyx_t_9) < 0) __PYX_ERR(0, 3981, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_10 = PySequence_Tuple(__pyx_v_datashape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4063, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_data, __pyx_n_s_shape, __pyx_t_10) < 0) __PYX_ERR(0, 4063, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":3978
+ /* "netCDF4/_netCDF4.pyx":4060
* # reshape data array by adding extra singleton dimensions
* # if needed to conform with start,count,stride.
* if len(data.shape) != len(datashape): # <<<<<<<<<<<<<<
@@ -41801,28 +45616,28 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":3984
+ /* "netCDF4/_netCDF4.pyx":4066
*
* # 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_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3984, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3984, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4066, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4066, __pyx_L1_error)
if (!__pyx_t_3) {
} else {
__Pyx_INCREF(__pyx_v_self->ndim);
__pyx_t_5 = __pyx_v_self->ndim;
goto __pyx_L32_bool_binop_done;
}
- __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3984, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4066, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_5 = __pyx_t_2;
__pyx_t_2 = 0;
__pyx_L32_bool_binop_done:;
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3984, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4066, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
@@ -41831,114 +45646,154 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
__pyx_t_5 = 0;
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_11);
if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_10, function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
}
}
if (!__pyx_t_5) {
- __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3984, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4066, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GOTREF(__pyx_t_10);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3984, __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_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3984, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4066, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4066, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __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, 4066, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4066, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_9);
- __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_10);
+ __pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":3985
+ /* "netCDF4/_netCDF4.pyx":4067
* # 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_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3985, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3985, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4067, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4067, __pyx_L1_error)
if (!__pyx_t_3) {
} else {
__Pyx_INCREF(__pyx_v_self->ndim);
- __pyx_t_7 = __pyx_v_self->ndim;
+ __pyx_t_8 = __pyx_v_self->ndim;
goto __pyx_L34_bool_binop_done;
}
- __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3985, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4067, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = __pyx_t_2;
+ __pyx_t_8 = __pyx_t_2;
__pyx_t_2 = 0;
__pyx_L34_bool_binop_done:;
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3985, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4067, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_neg_1);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
- __pyx_t_7 = 0;
- __pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
- if (likely(__pyx_t_7)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
- __Pyx_INCREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_10, function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
}
}
- if (!__pyx_t_7) {
- __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3985, __pyx_L1_error)
+ if (!__pyx_t_8) {
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4067, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GOTREF(__pyx_t_10);
} else {
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3985, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3985, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4067, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4067, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __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, 4067, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4067, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF_SET(__pyx_v_count, __pyx_t_9);
- __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_v_count, __pyx_t_10);
+ __pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":3986
+ /* "netCDF4/_netCDF4.pyx":4068
* 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_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3986, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3986, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4068, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4068, __pyx_L1_error)
if (!__pyx_t_3) {
} else {
__Pyx_INCREF(__pyx_v_self->ndim);
__pyx_t_5 = __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, 3986, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4068, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_5 = __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, 3986, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4068, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
@@ -41947,144 +45802,204 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
__pyx_t_5 = 0;
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_11);
if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_10, function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
}
}
if (!__pyx_t_5) {
- __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3986, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4068, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GOTREF(__pyx_t_10);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3986, __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_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3986, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4068, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_2};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4068, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __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, 4068, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4068, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF_SET(__pyx_v_stride, __pyx_t_9);
- __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_v_stride, __pyx_t_10);
+ __pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":3987
+ /* "netCDF4/_netCDF4.pyx":4069
* 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_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3987, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3987, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4069, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4069, __pyx_L1_error)
if (!__pyx_t_3) {
} else {
__Pyx_INCREF(__pyx_v_self->ndim);
- __pyx_t_7 = __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, 3987, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4069, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = __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, 3987, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4069, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_neg_1);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
- __pyx_t_7 = 0;
- __pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
- if (likely(__pyx_t_7)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
- __Pyx_INCREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_10, function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
}
}
- if (!__pyx_t_7) {
- __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3987, __pyx_L1_error)
+ if (!__pyx_t_8) {
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4069, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GOTREF(__pyx_t_10);
} else {
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3987, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
- __pyx_t_2 = 0;
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3987, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4069, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4069, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __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, 4069, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4069, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF_SET(__pyx_v_put_ind, __pyx_t_9);
- __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_v_put_ind, __pyx_t_10);
+ __pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":3991
+ /* "netCDF4/_netCDF4.pyx":4073
* # 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_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->_has_lsd); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3991, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->_has_lsd); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4073, __pyx_L1_error)
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":3992
+ /* "netCDF4/_netCDF4.pyx":4074
* # 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_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_quantize); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3992, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_least_significant_digit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3992, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_quantize); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4074, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_least_significant_digit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4074, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_2 = NULL;
- __pyx_t_13 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
if (likely(__pyx_t_2)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
__Pyx_INCREF(__pyx_t_2);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_10, function);
- __pyx_t_13 = 1;
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_7 = 1;
}
}
- __pyx_t_7 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3992, __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;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_data, __pyx_t_5};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4074, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_data, __pyx_t_5};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4074, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4074, __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;
+ }
+ __Pyx_INCREF(__pyx_v_data);
+ __Pyx_GIVEREF(__pyx_v_data);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_data);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4074, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
- __Pyx_INCREF(__pyx_v_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_13, __pyx_v_data);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_13, __pyx_t_5);
- __pyx_t_5 = 0;
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3992, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_9);
- __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_10);
+ __pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":3991
+ /* "netCDF4/_netCDF4.pyx":4073
* # quantize data if least_significant_digit attribute
* # exists (improves compression).
* if self._has_lsd: # <<<<<<<<<<<<<<
@@ -42093,123 +46008,159 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":4001
- * # missing_value/_Fill_Value.
+ /* "netCDF4/_netCDF4.pyx":4083
+ * # 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_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 4001, __pyx_L1_error)
- if (__pyx_t_8) {
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4083, __pyx_L1_error)
+ if (__pyx_t_9) {
} else {
- __pyx_t_3 = __pyx_t_8;
+ __pyx_t_3 = __pyx_t_9;
goto __pyx_L42_bool_binop_done;
}
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 4001, __pyx_L1_error)
- if (!__pyx_t_8) {
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4083, __pyx_L1_error)
+ if (!__pyx_t_9) {
} else {
- __pyx_t_3 = __pyx_t_8;
+ __pyx_t_3 = __pyx_t_9;
goto __pyx_L42_bool_binop_done;
}
- __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 4001, __pyx_L1_error)
- __pyx_t_3 = __pyx_t_8;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4083, __pyx_L1_error)
+ __pyx_t_3 = __pyx_t_9;
__pyx_L42_bool_binop_done:;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4004
+ /* "netCDF4/_netCDF4.pyx":4086
* # 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_8 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 4004, __pyx_L1_error)
- __pyx_t_1 = (__pyx_t_8 != 0);
+ __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4086, __pyx_L1_error)
+ __pyx_t_1 = (__pyx_t_9 != 0);
if (!__pyx_t_1) {
} else {
__pyx_t_3 = __pyx_t_1;
goto __pyx_L46_bool_binop_done;
}
- __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4004, __pyx_L1_error)
- __pyx_t_8 = (__pyx_t_1 != 0);
- __pyx_t_3 = __pyx_t_8;
+ __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4086, __pyx_L1_error)
+ __pyx_t_9 = (__pyx_t_1 != 0);
+ __pyx_t_3 = __pyx_t_9;
__pyx_L46_bool_binop_done:;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4006
+ /* "netCDF4/_netCDF4.pyx":4088
* 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_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4006, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_isMA); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4006, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
- if (likely(__pyx_t_10)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
- __Pyx_INCREF(__pyx_t_10);
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_isMA); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_11);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
}
}
- if (!__pyx_t_10) {
- __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4006, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
+ if (!__pyx_t_11) {
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
} else {
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4006, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); __pyx_t_10 = NULL;
- __Pyx_INCREF(__pyx_v_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4006, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_data};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4088, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_data};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4088, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ __Pyx_INCREF(__pyx_v_data);
+ __Pyx_GIVEREF(__pyx_v_data);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4006, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_8 = ((!__pyx_t_3) != 0);
- if (__pyx_t_8) {
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toma); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4006, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4088, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_9 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_9) {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toma); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
}
}
if (!__pyx_t_5) {
- __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4006, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- } else {
- __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4006, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4088, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL;
- __Pyx_INCREF(__pyx_v_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_data);
- __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4006, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_data};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4088, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_data};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4088, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_data);
+ __Pyx_GIVEREF(__pyx_v_data);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_data);
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_9);
- __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_10);
+ __pyx_t_10 = 0;
}
- /* "netCDF4/_netCDF4.pyx":4004
+ /* "netCDF4/_netCDF4.pyx":4086
* # use missing_value as fill value.
* # if no missing value set, use _FillValue.
* if hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'): # <<<<<<<<<<<<<<
@@ -42218,8 +46169,8 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":4001
- * # missing_value/_Fill_Value.
+ /* "netCDF4/_netCDF4.pyx":4083
+ * # 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.
@@ -42227,113 +46178,131 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":4007
+ /* "netCDF4/_netCDF4.pyx":4089
* # 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_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4007, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4089, __pyx_L1_error)
if (__pyx_t_3) {
} else {
- __pyx_t_8 = __pyx_t_3;
+ __pyx_t_9 = __pyx_t_3;
goto __pyx_L50_bool_binop_done;
}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4007, __pyx_L1_error)
- __pyx_t_8 = __pyx_t_3;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4089, __pyx_L1_error)
+ __pyx_t_9 = __pyx_t_3;
__pyx_L50_bool_binop_done:;
- if (__pyx_t_8) {
+ if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":4009
+ /* "netCDF4/_netCDF4.pyx":4091
* 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_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 4009, __pyx_L1_error)
+ __pyx_t_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 4091, __pyx_L1_error)
__pyx_t_1 = (__pyx_t_3 != 0);
if (__pyx_t_1) {
} else {
- __pyx_t_8 = __pyx_t_1;
+ __pyx_t_9 = __pyx_t_1;
goto __pyx_L53_bool_binop_done;
}
- __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4009, __pyx_L1_error)
+ __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4091, __pyx_L1_error)
__pyx_t_3 = (__pyx_t_1 != 0);
- __pyx_t_8 = __pyx_t_3;
+ __pyx_t_9 = __pyx_t_3;
__pyx_L53_bool_binop_done:;
- if (__pyx_t_8) {
+ if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":4010
+ /* "netCDF4/_netCDF4.pyx":4092
* # 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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4010, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_7 = PyNumber_Subtract(__pyx_v_data, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4010, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4010, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_PyNumber_Divide(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4010, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4092, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_10);
- __pyx_t_10 = 0;
+ __pyx_t_8 = PyNumber_Subtract(__pyx_v_data, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_11);
+ __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":4011
+ /* "netCDF4/_netCDF4.pyx":4093
* 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_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4011, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_10, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 4011, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_3 = (__pyx_t_8 != 0);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_11, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4093, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_3 = (__pyx_t_9 != 0);
if (__pyx_t_3) {
- __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4011, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_around); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4011, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
- if (likely(__pyx_t_9)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
- __Pyx_INCREF(__pyx_t_9);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_around); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
}
}
- if (!__pyx_t_9) {
- __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_data); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4011, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
+ if (!__pyx_t_10) {
+ __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
} else {
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4011, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = NULL;
- __Pyx_INCREF(__pyx_v_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4011, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __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, 4093, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __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, 4093, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_INCREF(__pyx_v_data);
+ __Pyx_GIVEREF(__pyx_v_data);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_10);
- __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_11);
+ __pyx_t_11 = 0;
}
- /* "netCDF4/_netCDF4.pyx":4009
+ /* "netCDF4/_netCDF4.pyx":4091
* 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'): # <<<<<<<<<<<<<<
@@ -42343,80 +46312,98 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
goto __pyx_L52;
}
- /* "netCDF4/_netCDF4.pyx":4012
+ /* "netCDF4/_netCDF4.pyx":4094
* 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_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 4012, __pyx_L1_error)
- __pyx_t_8 = (__pyx_t_3 != 0);
- if (__pyx_t_8) {
+ __pyx_t_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 4094, __pyx_L1_error)
+ __pyx_t_9 = (__pyx_t_3 != 0);
+ if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":4013
+ /* "netCDF4/_netCDF4.pyx":4095
* 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_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4013, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_v_data, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4013, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_7);
- __pyx_t_7 = 0;
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_v_data, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_8);
+ __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":4014
+ /* "netCDF4/_netCDF4.pyx":4096
* 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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4014, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_7, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 4014, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_3 = (__pyx_t_8 != 0);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4096, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4096, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = (__pyx_t_9 != 0);
if (__pyx_t_3) {
- __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4014, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_around); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4014, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4096, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_around); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4096, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
- if (likely(__pyx_t_10)) {
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_11)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_11);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_5, function);
}
}
- if (!__pyx_t_10) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4014, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ if (!__pyx_t_11) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4096, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
} else {
- __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4014, __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_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_data);
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4014, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_data};
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4096, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_data};
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4096, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4096, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ __Pyx_INCREF(__pyx_v_data);
+ __Pyx_GIVEREF(__pyx_v_data);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_data);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4096, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_7);
- __pyx_t_7 = 0;
+ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_8);
+ __pyx_t_8 = 0;
}
- /* "netCDF4/_netCDF4.pyx":4012
+ /* "netCDF4/_netCDF4.pyx":4094
* data = (data - self.add_offset)/self.scale_factor
* if self.dtype.kind in 'iu': data = numpy.around(data)
* elif hasattr(self, 'scale_factor'): # <<<<<<<<<<<<<<
@@ -42426,80 +46413,98 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
goto __pyx_L52;
}
- /* "netCDF4/_netCDF4.pyx":4015
+ /* "netCDF4/_netCDF4.pyx":4097
* 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_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 4015, __pyx_L1_error)
- __pyx_t_8 = (__pyx_t_3 != 0);
- if (__pyx_t_8) {
+ __pyx_t_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 4097, __pyx_L1_error)
+ __pyx_t_9 = (__pyx_t_3 != 0);
+ if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":4016
+ /* "netCDF4/_netCDF4.pyx":4098
* 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_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4016, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_5 = PyNumber_Subtract(__pyx_v_data, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4016, __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, 4098, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = PyNumber_Subtract(__pyx_v_data, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4098, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":4017
+ /* "netCDF4/_netCDF4.pyx":4099
* 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4017, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4099, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 4017, __pyx_L1_error)
+ __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_n_s_iu, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 4099, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_3 = (__pyx_t_8 != 0);
+ __pyx_t_3 = (__pyx_t_9 != 0);
if (__pyx_t_3) {
- __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4017, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_around); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4017, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
- if (likely(__pyx_t_7)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
- __Pyx_INCREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4099, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_around); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4099, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_9, function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
}
}
- if (!__pyx_t_7) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4017, __pyx_L1_error)
+ if (!__pyx_t_8) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4099, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
} else {
- __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4017, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
- __Pyx_INCREF(__pyx_v_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_data);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4017, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_data};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4099, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_data};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4099, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4099, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_INCREF(__pyx_v_data);
+ __Pyx_GIVEREF(__pyx_v_data);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_data);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4099, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
__pyx_t_5 = 0;
}
- /* "netCDF4/_netCDF4.pyx":4015
+ /* "netCDF4/_netCDF4.pyx":4097
* data = data/self.scale_factor
* if self.dtype.kind in 'iu': data = numpy.around(data)
* elif hasattr(self, 'add_offset'): # <<<<<<<<<<<<<<
@@ -42509,148 +46514,208 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
}
__pyx_L52:;
- /* "netCDF4/_netCDF4.pyx":4018
+ /* "netCDF4/_netCDF4.pyx":4100
* 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_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4018, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_isMA); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4018, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4100, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
- if (likely(__pyx_t_9)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
- __Pyx_INCREF(__pyx_t_9);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_isMA); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4100, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_10, function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
}
}
- if (!__pyx_t_9) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4018, __pyx_L1_error)
+ if (!__pyx_t_10) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4100, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4018, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); __pyx_t_9 = NULL;
- __Pyx_INCREF(__pyx_v_data);
- __Pyx_GIVEREF(__pyx_v_data);
- PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_data);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4018, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_data};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4100, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_data};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4100, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __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_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_INCREF(__pyx_v_data);
+ __Pyx_GIVEREF(__pyx_v_data);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_data);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4100, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4018, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4100, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4022
+ /* "netCDF4/_netCDF4.pyx":4104
* # 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_8 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 4022, __pyx_L1_error)
- __pyx_t_1 = (__pyx_t_8 != 0);
+ __pyx_t_9 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4104, __pyx_L1_error)
+ __pyx_t_1 = (__pyx_t_9 != 0);
if (__pyx_t_1) {
} else {
__pyx_t_3 = __pyx_t_1;
goto __pyx_L60_bool_binop_done;
}
- /* "netCDF4/_netCDF4.pyx":4023
+ /* "netCDF4/_netCDF4.pyx":4105
* # 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_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4023, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4105, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_all); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4105, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4105, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_all); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4023, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4023, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_in1d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4023, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_in1d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4105, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4023, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4023, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4105, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4105, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_14 = PyObject_GetItem(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4023, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_15 = PyObject_GetItem(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4105, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4023, __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, 4105, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_9 = NULL;
- __pyx_t_13 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_9)) {
+ __pyx_t_10 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_2, function);
- __pyx_t_13 = 1;
+ __pyx_t_7 = 1;
}
}
- __pyx_t_15 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4023, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- if (__pyx_t_9) {
- __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_15, __pyx_t_6};
+ __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4105, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_15, __pyx_t_6};
+ __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4105, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_16 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4105, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ if (__pyx_t_10) {
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_7, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_7, __pyx_t_6);
+ __pyx_t_15 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_16, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4105, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
}
- __Pyx_GIVEREF(__pyx_t_14);
- PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_13, __pyx_t_14);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_13, __pyx_t_6);
- __pyx_t_14 = 0;
- __pyx_t_6 = 0;
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4023, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_2)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
__Pyx_INCREF(__pyx_t_2);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
}
}
if (!__pyx_t_2) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4023, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4105, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_GOTREF(__pyx_t_5);
} else {
- __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4023, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_2); __pyx_t_2 = NULL;
- __Pyx_GIVEREF(__pyx_t_10);
- PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_10);
- __pyx_t_10 = 0;
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_15, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4023, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_11};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4105, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_11};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4105, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4105, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_t_11);
+ __pyx_t_11 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_16, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4105, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4023, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4105, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_3 = __pyx_t_1;
__pyx_L60_bool_binop_done:;
- /* "netCDF4/_netCDF4.pyx":4022
+ /* "netCDF4/_netCDF4.pyx":4104
* # corresponds to missing values, don't fill masked array -
* # just use underlying data instead
* if hasattr(self, 'missing_value') and \ # <<<<<<<<<<<<<<
@@ -42659,19 +46724,19 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4024
+ /* "netCDF4/_netCDF4.pyx":4106
* 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4024, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4106, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":4022
+ /* "netCDF4/_netCDF4.pyx":4104
* # corresponds to missing values, don't fill masked array -
* # just use underlying data instead
* if hasattr(self, 'missing_value') and \ # <<<<<<<<<<<<<<
@@ -42681,7 +46746,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
goto __pyx_L59;
}
- /* "netCDF4/_netCDF4.pyx":4026
+ /* "netCDF4/_netCDF4.pyx":4108
* data = data.data
* else:
* if hasattr(self, 'missing_value'): # <<<<<<<<<<<<<<
@@ -42689,72 +46754,92 @@ 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_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 4026, __pyx_L1_error)
+ __pyx_t_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 4108, __pyx_L1_error)
__pyx_t_1 = (__pyx_t_3 != 0);
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":4030
+ /* "netCDF4/_netCDF4.pyx":4112
* # 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_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4030, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4030, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4030, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_10 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_15))) {
- __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_15);
- if (likely(__pyx_t_10)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
- __Pyx_INCREF(__pyx_t_10);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __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, 4112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_16);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
+ __Pyx_INCREF(__pyx_t_11);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_15, function);
+ __Pyx_DECREF_SET(__pyx_t_16, function);
}
}
- if (!__pyx_t_10) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4030, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (!__pyx_t_11) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4112, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_GOTREF(__pyx_t_5);
} else {
- __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4030, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10); __pyx_t_10 = NULL;
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_7);
- __pyx_t_7 = 0;
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4030, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_16)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_8};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4112, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_8};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4112, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __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, 4112, __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_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_shape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4030, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_shape); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyObject_RichCompare(__pyx_t_15, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4030, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4030, __pyx_L1_error)
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_16, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4112, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4112, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":4031
+ /* "netCDF4/_netCDF4.pyx":4113
* # 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_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4031, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4113, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_v_fillval = __pyx_t_5;
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":4030
+ /* "netCDF4/_netCDF4.pyx":4112
* # 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 == (): # <<<<<<<<<<<<<<
@@ -42764,7 +46849,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
goto __pyx_L63;
}
- /* "netCDF4/_netCDF4.pyx":4033
+ /* "netCDF4/_netCDF4.pyx":4115
* fillval = self.missing_value
* else:
* msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar" # <<<<<<<<<<<<<<
@@ -42775,41 +46860,41 @@ 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":4034
+ /* "netCDF4/_netCDF4.pyx":4116
* 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_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4034, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4116, __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_15 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4034, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4116, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_Raise(__pyx_t_15, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __PYX_ERR(0, 4034, __pyx_L1_error)
+ __Pyx_Raise(__pyx_t_16, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __PYX_ERR(0, 4116, __pyx_L1_error)
}
__pyx_L63:;
- /* "netCDF4/_netCDF4.pyx":4035
+ /* "netCDF4/_netCDF4.pyx":4117
* 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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4035, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4117, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4035, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4117, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -42819,42 +46904,60 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
}
}
if (!__pyx_t_5) {
- __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_fillval); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4035, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_fillval); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4117, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4035, __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_fillval);
- __Pyx_GIVEREF(__pyx_v_fillval);
- PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_fillval);
- __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4035, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_fillval};
+ __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4117, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_16);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_fillval};
+ __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4117, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_16);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4117, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_fillval);
+ __Pyx_GIVEREF(__pyx_v_fillval);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_fillval);
+ __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4117, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __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_15, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4035, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4117, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __pyx_t_15 = PyObject_RichCompare(__pyx_t_2, __pyx_empty_tuple, Py_NE); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4035, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __pyx_t_16 = PyObject_RichCompare(__pyx_t_2, __pyx_empty_tuple, Py_NE); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4117, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4035, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4117, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":4036
+ /* "netCDF4/_netCDF4.pyx":4118
* raise RuntimeError(msg)
* if numpy.array(fillval).shape != ():
* fillval = fillval[0] # <<<<<<<<<<<<<<
* elif hasattr(self, '_FillValue'):
* fillval = self._FillValue
*/
- __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_fillval, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4036, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_DECREF_SET(__pyx_v_fillval, __pyx_t_15);
- __pyx_t_15 = 0;
+ __pyx_t_16 = __Pyx_GetItemInt(__pyx_v_fillval, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4118, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_DECREF_SET(__pyx_v_fillval, __pyx_t_16);
+ __pyx_t_16 = 0;
- /* "netCDF4/_netCDF4.pyx":4035
+ /* "netCDF4/_netCDF4.pyx":4117
* msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar"
* raise RuntimeError(msg)
* if numpy.array(fillval).shape != (): # <<<<<<<<<<<<<<
@@ -42863,7 +46966,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":4026
+ /* "netCDF4/_netCDF4.pyx":4108
* data = data.data
* else:
* if hasattr(self, 'missing_value'): # <<<<<<<<<<<<<<
@@ -42873,30 +46976,30 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
goto __pyx_L62;
}
- /* "netCDF4/_netCDF4.pyx":4037
+ /* "netCDF4/_netCDF4.pyx":4119
* if numpy.array(fillval).shape != ():
* fillval = fillval[0]
* elif hasattr(self, '_FillValue'): # <<<<<<<<<<<<<<
* fillval = self._FillValue
* else:
*/
- __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4037, __pyx_L1_error)
+ __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 4119, __pyx_L1_error)
__pyx_t_3 = (__pyx_t_1 != 0);
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4038
+ /* "netCDF4/_netCDF4.pyx":4120
* fillval = fillval[0]
* elif hasattr(self, '_FillValue'):
* fillval = self._FillValue # <<<<<<<<<<<<<<
* else:
* fillval = default_fillvals[self.dtype.str[1:]]
*/
- __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4038, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __pyx_v_fillval = __pyx_t_15;
- __pyx_t_15 = 0;
+ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4120, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_v_fillval = __pyx_t_16;
+ __pyx_t_16 = 0;
- /* "netCDF4/_netCDF4.pyx":4037
+ /* "netCDF4/_netCDF4.pyx":4119
* if numpy.array(fillval).shape != ():
* fillval = fillval[0]
* elif hasattr(self, '_FillValue'): # <<<<<<<<<<<<<<
@@ -42906,7 +47009,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
goto __pyx_L62;
}
- /* "netCDF4/_netCDF4.pyx":4040
+ /* "netCDF4/_netCDF4.pyx":4122
* fillval = self._FillValue
* else:
* fillval = default_fillvals[self.dtype.str[1:]] # <<<<<<<<<<<<<<
@@ -42914,44 +47017,44 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*
*/
/*else*/ {
- __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4040, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4040, __pyx_L1_error)
+ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4122, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, 0, NULL, NULL, &__pyx_slice__62, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4040, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __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, 4122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_GetItem(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4040, __pyx_L1_error)
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_16, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4122, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_v_fillval = __pyx_t_2;
__pyx_t_2 = 0;
}
__pyx_L62:;
- /* "netCDF4/_netCDF4.pyx":4041
+ /* "netCDF4/_netCDF4.pyx":4123
* 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, 4041, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_filled); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4123, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4041, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_fill_value, __pyx_v_fillval) < 0) __PYX_ERR(0, 4041, __pyx_L1_error)
- __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4041, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4123, __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, 4123, __pyx_L1_error)
+ __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4123, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_15);
- __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_16);
+ __pyx_t_16 = 0;
}
__pyx_L59:;
- /* "netCDF4/_netCDF4.pyx":4018
+ /* "netCDF4/_netCDF4.pyx":4100
* data = data - self.add_offset
* if self.dtype.kind in 'iu': data = numpy.around(data)
* if ma.isMA(data): # <<<<<<<<<<<<<<
@@ -42960,7 +47063,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":4007
+ /* "netCDF4/_netCDF4.pyx":4089
* # if not masked, create a masked array.
* if not ma.isMA(data): data = self._toma(data)
* if self.scale and self._isprimitive: # <<<<<<<<<<<<<<
@@ -42969,91 +47072,109 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":4044
+ /* "netCDF4/_netCDF4.pyx":4126
*
* # 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_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4044, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
__pyx_t_2 = NULL;
- __pyx_t_13 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_2)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
__Pyx_INCREF(__pyx_t_2);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_7, function);
- __pyx_t_13 = 1;
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ __pyx_t_7 = 1;
}
}
- __pyx_t_5 = PyTuple_New(4+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4044, __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;
- }
- __Pyx_INCREF(__pyx_v_start);
- __Pyx_GIVEREF(__pyx_v_start);
- PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_13, __pyx_v_start);
- __Pyx_INCREF(__pyx_v_count);
- __Pyx_GIVEREF(__pyx_v_count);
- PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_13, __pyx_v_count);
- __Pyx_INCREF(__pyx_v_stride);
- __Pyx_GIVEREF(__pyx_v_stride);
- PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_13, __pyx_v_stride);
- __Pyx_INCREF(__pyx_v_put_ind);
- __Pyx_GIVEREF(__pyx_v_put_ind);
- PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_13, __pyx_v_put_ind);
- __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4044, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- if (likely(PyList_CheckExact(__pyx_t_15)) || PyTuple_CheckExact(__pyx_t_15)) {
- __pyx_t_7 = __pyx_t_15; __Pyx_INCREF(__pyx_t_7); __pyx_t_13 = 0;
- __pyx_t_11 = NULL;
+ #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_16 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4126, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_16);
+ } else
+ #endif
+ #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_16 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4126, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_16);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4126, __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;
+ }
+ __Pyx_INCREF(__pyx_v_start);
+ __Pyx_GIVEREF(__pyx_v_start);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_v_start);
+ __Pyx_INCREF(__pyx_v_count);
+ __Pyx_GIVEREF(__pyx_v_count);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_count);
+ __Pyx_INCREF(__pyx_v_stride);
+ __Pyx_GIVEREF(__pyx_v_stride);
+ PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_7, __pyx_v_stride);
+ __Pyx_INCREF(__pyx_v_put_ind);
+ __Pyx_GIVEREF(__pyx_v_put_ind);
+ PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_7, __pyx_v_put_ind);
+ __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_16)) || PyTuple_CheckExact(__pyx_t_16)) {
+ __pyx_t_8 = __pyx_t_16; __Pyx_INCREF(__pyx_t_8); __pyx_t_14 = 0;
+ __pyx_t_12 = NULL;
} else {
- __pyx_t_13 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4044, __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, 4044, __pyx_L1_error)
+ __pyx_t_14 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_12 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4126, __pyx_L1_error)
}
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
for (;;) {
- if (likely(!__pyx_t_11)) {
- if (likely(PyList_CheckExact(__pyx_t_7))) {
- if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_15 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 4044, __pyx_L1_error)
+ if (likely(!__pyx_t_12)) {
+ if (likely(PyList_CheckExact(__pyx_t_8))) {
+ if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_8)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_16 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_14); __Pyx_INCREF(__pyx_t_16); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 4126, __pyx_L1_error)
#else
- __pyx_t_15 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4044, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = PySequence_ITEM(__pyx_t_8, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
#endif
} else {
- if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 4044, __pyx_L1_error)
+ if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_16 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_14); __Pyx_INCREF(__pyx_t_16); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 4126, __pyx_L1_error)
#else
- __pyx_t_15 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4044, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = PySequence_ITEM(__pyx_t_8, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
#endif
}
} else {
- __pyx_t_15 = __pyx_t_11(__pyx_t_7);
- if (unlikely(!__pyx_t_15)) {
+ __pyx_t_16 = __pyx_t_12(__pyx_t_8);
+ if (unlikely(!__pyx_t_16)) {
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, 4044, __pyx_L1_error)
+ else __PYX_ERR(0, 4126, __pyx_L1_error)
}
break;
}
- __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_GOTREF(__pyx_t_16);
}
- if ((likely(PyTuple_CheckExact(__pyx_t_15))) || (PyList_CheckExact(__pyx_t_15))) {
- PyObject* sequence = __pyx_t_15;
- #if CYTHON_COMPILING_IN_CPYTHON
+ if ((likely(PyTuple_CheckExact(__pyx_t_16))) || (PyList_CheckExact(__pyx_t_16))) {
+ PyObject* sequence = __pyx_t_16;
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -43061,169 +47182,187 @@ 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, 4044, __pyx_L1_error)
+ __PYX_ERR(0, 4126, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
- __pyx_t_10 = PyTuple_GET_ITEM(sequence, 2);
+ __pyx_t_11 = PyTuple_GET_ITEM(sequence, 2);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 3);
} else {
__pyx_t_5 = PyList_GET_ITEM(sequence, 0);
__pyx_t_2 = PyList_GET_ITEM(sequence, 1);
- __pyx_t_10 = PyList_GET_ITEM(sequence, 2);
+ __pyx_t_11 = PyList_GET_ITEM(sequence, 2);
__pyx_t_6 = PyList_GET_ITEM(sequence, 3);
}
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_11);
__Pyx_INCREF(__pyx_t_6);
#else
{
Py_ssize_t i;
- PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_2,&__pyx_t_10,&__pyx_t_6};
+ PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_2,&__pyx_t_11,&__pyx_t_6};
for (i=0; i < 4; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 4044, __pyx_L1_error)
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 4126, __pyx_L1_error)
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
}
#endif
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
} else {
Py_ssize_t index = -1;
- PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_2,&__pyx_t_10,&__pyx_t_6};
- __pyx_t_14 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4044, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __pyx_t_12 = Py_TYPE(__pyx_t_14)->tp_iternext;
+ PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_2,&__pyx_t_11,&__pyx_t_6};
+ __pyx_t_15 = PyObject_GetIter(__pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __pyx_t_13 = Py_TYPE(__pyx_t_15)->tp_iternext;
for (index=0; index < 4; index++) {
- PyObject* item = __pyx_t_12(__pyx_t_14); if (unlikely(!item)) goto __pyx_L67_unpacking_failed;
+ PyObject* item = __pyx_t_13(__pyx_t_15); if (unlikely(!item)) goto __pyx_L67_unpacking_failed;
__Pyx_GOTREF(item);
*(temps[index]) = item;
}
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_14), 4) < 0) __PYX_ERR(0, 4044, __pyx_L1_error)
- __pyx_t_12 = NULL;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_15), 4) < 0) __PYX_ERR(0, 4126, __pyx_L1_error)
+ __pyx_t_13 = NULL;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
goto __pyx_L68_unpacking_done;
__pyx_L67_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __pyx_t_12 = NULL;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_13 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 4044, __pyx_L1_error)
+ __PYX_ERR(0, 4126, __pyx_L1_error)
__pyx_L68_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_5);
__pyx_t_5 = 0;
__Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2);
__pyx_t_2 = 0;
- __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_10);
- __pyx_t_10 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_11);
+ __pyx_t_11 = 0;
__Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":4045
+ /* "netCDF4/_netCDF4.pyx":4127
* # 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_15 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4045, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __pyx_t_6 = PyObject_GetItem(__pyx_v_data, __pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4045, __pyx_L1_error)
+ __pyx_t_16 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_data, __pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4127, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
__Pyx_XDECREF_SET(__pyx_v_dataput, __pyx_t_6);
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":4046
+ /* "netCDF4/_netCDF4.pyx":4128
* 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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4046, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4128, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_15 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4046, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4046, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4128, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
if (__pyx_t_3) {
goto __pyx_L65_continue;
}
- /* "netCDF4/_netCDF4.pyx":4048
+ /* "netCDF4/_netCDF4.pyx":4130
* 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_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_shape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4048, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __pyx_t_6 = PyObject_RichCompare(__pyx_t_15, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4048, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4048, __pyx_L1_error)
+ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_shape); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_6 = PyObject_RichCompare(__pyx_t_16, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4130, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4130, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4049
+ /* "netCDF4/_netCDF4.pyx":4131
* # convert array scalar to regular array with one element.
* if dataput.shape == ():
* if self._isvlen: # <<<<<<<<<<<<<<
* dataput=numpy.array(dataput,'O')
* else:
*/
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4049, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4131, __pyx_L1_error)
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4050
+ /* "netCDF4/_netCDF4.pyx":4132
* if dataput.shape == ():
* if self._isvlen:
* dataput=numpy.array(dataput,'O') # <<<<<<<<<<<<<<
* else:
* dataput=numpy.array(dataput,dataput.dtype)
*/
- __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4050, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4050, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __pyx_t_15 = NULL;
- __pyx_t_4 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_10);
- if (likely(__pyx_t_15)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
- __Pyx_INCREF(__pyx_t_15);
+ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __pyx_t_16 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_16)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_16);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_10, function);
- __pyx_t_4 = 1;
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_7 = 1;
}
}
- __pyx_t_2 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4050, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- if (__pyx_t_15) {
- __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_15); __pyx_t_15 = NULL;
- }
- __Pyx_INCREF(__pyx_v_dataput);
- __Pyx_GIVEREF(__pyx_v_dataput);
- PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_4, __pyx_v_dataput);
- __Pyx_INCREF(__pyx_n_s_O);
- __Pyx_GIVEREF(__pyx_n_s_O);
- PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_4, __pyx_n_s_O);
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4050, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_v_dataput, __pyx_n_s_O};
+ __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, 4132, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_v_dataput, __pyx_n_s_O};
+ __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, 4132, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 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, 4132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__pyx_t_16) {
+ __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_16); __pyx_t_16 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_dataput);
+ __Pyx_GIVEREF(__pyx_v_dataput);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_v_dataput);
+ __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_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF_SET(__pyx_v_dataput, __pyx_t_6);
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":4049
+ /* "netCDF4/_netCDF4.pyx":4131
* # convert array scalar to regular array with one element.
* if dataput.shape == ():
* if self._isvlen: # <<<<<<<<<<<<<<
@@ -43233,7 +47372,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
goto __pyx_L71;
}
- /* "netCDF4/_netCDF4.pyx":4052
+ /* "netCDF4/_netCDF4.pyx":4134
* dataput=numpy.array(dataput,'O')
* else:
* dataput=numpy.array(dataput,dataput.dtype) # <<<<<<<<<<<<<<
@@ -43241,46 +47380,66 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*
*/
/*else*/ {
- __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4052, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4052, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4134, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4052, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_15 = NULL;
- __pyx_t_4 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_15)) {
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_dtype); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_16 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_16)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_15);
+ __Pyx_INCREF(__pyx_t_16);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_2, function);
- __pyx_t_4 = 1;
+ __pyx_t_7 = 1;
}
}
- __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4052, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- if (__pyx_t_15) {
- __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_15); __pyx_t_15 = NULL;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_v_dataput, __pyx_t_11};
+ __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, 4134, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_v_dataput, __pyx_t_11};
+ __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, 4134, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_16) {
+ __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_16); __pyx_t_16 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_dataput);
+ __Pyx_GIVEREF(__pyx_v_dataput);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_v_dataput);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_11);
+ __pyx_t_11 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
- __Pyx_INCREF(__pyx_v_dataput);
- __Pyx_GIVEREF(__pyx_v_dataput);
- PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_dataput);
- __Pyx_GIVEREF(__pyx_t_10);
- PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_t_10);
- __pyx_t_10 = 0;
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4052, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF_SET(__pyx_v_dataput, __pyx_t_6);
__pyx_t_6 = 0;
}
__pyx_L71:;
- /* "netCDF4/_netCDF4.pyx":4048
+ /* "netCDF4/_netCDF4.pyx":4130
* if dataput.size == 0: continue # nothing to write
* # convert array scalar to regular array with one element.
* if dataput.shape == (): # <<<<<<<<<<<<<<
@@ -43289,51 +47448,69 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":4053
+ /* "netCDF4/_netCDF4.pyx":4135
* 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, 4053, __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, 4135, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_5 = NULL;
- __pyx_t_4 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_2, function);
- __pyx_t_4 = 1;
+ __pyx_t_7 = 1;
}
}
- __pyx_t_10 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4053, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- if (__pyx_t_5) {
- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL;
- }
- __Pyx_INCREF(__pyx_v_dataput);
- __Pyx_GIVEREF(__pyx_v_dataput);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_4, __pyx_v_dataput);
- __Pyx_INCREF(__pyx_v_a);
- __Pyx_GIVEREF(__pyx_v_a);
- PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_4, __pyx_v_a);
- __Pyx_INCREF(__pyx_v_b);
- __Pyx_GIVEREF(__pyx_v_b);
- PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_4, __pyx_v_b);
- __Pyx_INCREF(__pyx_v_c);
- __Pyx_GIVEREF(__pyx_v_c);
- PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_4, __pyx_v_c);
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4053, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_dataput, __pyx_v_a, __pyx_v_b, __pyx_v_c};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4135, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_dataput, __pyx_v_a, __pyx_v_b, __pyx_v_c};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4135, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_dataput);
+ __Pyx_GIVEREF(__pyx_v_dataput);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_7, __pyx_v_dataput);
+ __Pyx_INCREF(__pyx_v_a);
+ __Pyx_GIVEREF(__pyx_v_a);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_7, __pyx_v_a);
+ __Pyx_INCREF(__pyx_v_b);
+ __Pyx_GIVEREF(__pyx_v_b);
+ PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_7, __pyx_v_b);
+ __Pyx_INCREF(__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_7, __pyx_v_c);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":4044
+ /* "netCDF4/_netCDF4.pyx":4126
*
* # Fill output array with data chunks.
* for (a,b,c,i) in zip(start, count, stride, put_ind): # <<<<<<<<<<<<<<
@@ -43342,9 +47519,9 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
*/
__pyx_L65_continue:;
}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":3911
+ /* "netCDF4/_netCDF4.pyx":3993
* free(countp)
*
* def __setitem__(self, elem, data): # <<<<<<<<<<<<<<
@@ -43359,11 +47536,11 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
- __Pyx_XDECREF(__pyx_t_7);
- __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_10);
- __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
__Pyx_AddTraceback("netCDF4._netCDF4.Variable.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
@@ -43387,7 +47564,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__setitem__(struct __pyx_obj_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4056
+/* "netCDF4/_netCDF4.pyx":4138
*
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -43418,34 +47595,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":4057
+ /* "netCDF4/_netCDF4.pyx":4139
*
* 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, 4057, __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, 4139, __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, 4057, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4139, __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":4058
+ /* "netCDF4/_netCDF4.pyx":4140
* 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__63, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4058, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4140, __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, 4058, __pyx_L1_error)
+ __PYX_ERR(0, 4140, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4057
+ /* "netCDF4/_netCDF4.pyx":4139
*
* def __len__(self):
* if not self.shape: # <<<<<<<<<<<<<<
@@ -43454,7 +47631,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_8Variable_52__len__(struct __pyx_o
*/
}
- /* "netCDF4/_netCDF4.pyx":4060
+ /* "netCDF4/_netCDF4.pyx":4142
* raise TypeError('len() of unsized object')
* else:
* return self.shape[0] # <<<<<<<<<<<<<<
@@ -43462,18 +47639,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, 4060, __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, 4142, __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, 4060, __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, 4142, __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, 4060, __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, 4142, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_5;
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":4056
+ /* "netCDF4/_netCDF4.pyx":4138
*
*
* def __len__(self): # <<<<<<<<<<<<<<
@@ -43492,7 +47669,7 @@ static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_8Variable_52__len__(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4063
+/* "netCDF4/_netCDF4.pyx":4145
*
*
* def assignValue(self,val): # <<<<<<<<<<<<<<
@@ -43522,34 +47699,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_54assignValue(struct __py
int __pyx_t_3;
__Pyx_RefNannySetupContext("assignValue", 0);
- /* "netCDF4/_netCDF4.pyx":4069
+ /* "netCDF4/_netCDF4.pyx":4151
* 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, 4069, __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, 4151, __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, 4069, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4151, __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":4070
+ /* "netCDF4/_netCDF4.pyx":4152
* 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__64, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4070, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4152, __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, 4070, __pyx_L1_error)
+ __PYX_ERR(0, 4152, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4069
+ /* "netCDF4/_netCDF4.pyx":4151
* 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): # <<<<<<<<<<<<<<
@@ -43558,16 +47735,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_54assignValue(struct __py
*/
}
- /* "netCDF4/_netCDF4.pyx":4071
+ /* "netCDF4/_netCDF4.pyx":4153
* 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__65, 0, 0, 1) < 0) __PYX_ERR(0, 4071, __pyx_L1_error)
+ 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, 4153, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4063
+ /* "netCDF4/_netCDF4.pyx":4145
*
*
* def assignValue(self,val): # <<<<<<<<<<<<<<
@@ -43588,7 +47765,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_54assignValue(struct __py
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4073
+/* "netCDF4/_netCDF4.pyx":4155
* self[:]=val
*
* def getValue(self): # <<<<<<<<<<<<<<
@@ -43618,34 +47795,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_56getValue(struct __pyx_o
int __pyx_t_3;
__Pyx_RefNannySetupContext("getValue", 0);
- /* "netCDF4/_netCDF4.pyx":4079
+ /* "netCDF4/_netCDF4.pyx":4161
* 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, 4079, __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, 4161, __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, 4079, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4161, __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":4080
+ /* "netCDF4/_netCDF4.pyx":4162
* 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__66, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4080, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4162, __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, 4080, __pyx_L1_error)
+ __PYX_ERR(0, 4162, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4079
+ /* "netCDF4/_netCDF4.pyx":4161
* 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): # <<<<<<<<<<<<<<
@@ -43654,7 +47831,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_56getValue(struct __pyx_o
*/
}
- /* "netCDF4/_netCDF4.pyx":4081
+ /* "netCDF4/_netCDF4.pyx":4163
* if len(self.dimensions):
* raise IndexError('to retrieve values from a non-scalar variable, use slicing')
* return self[slice(None)] # <<<<<<<<<<<<<<
@@ -43662,13 +47839,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__67); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4081, __pyx_L1_error)
+ __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_slice__70); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4163, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4073
+ /* "netCDF4/_netCDF4.pyx":4155
* self[:]=val
*
* def getValue(self): # <<<<<<<<<<<<<<
@@ -43687,7 +47864,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_56getValue(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4083
+/* "netCDF4/_netCDF4.pyx":4165
* return self[slice(None)]
*
* def set_auto_maskandscale(self,maskandscale): # <<<<<<<<<<<<<<
@@ -43697,7 +47874,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_56getValue(struct __pyx_o
/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_59set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_maskandscale); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale[] = "\n**`set_auto_maskandscale(self,maskandscale)`**\n\nturn on or off automatic conversion of variable data to and\nfrom masked arrays and automatic packing/unpacking of variable\ndata using `scale_factor` and `add_offset` attributes.\n\nIf `maskandscale` is set to `True`, when data is read from a variable\nit is converted to a masked array if any of the values are exactly\nequal to the either the netCDF _FillVa [...]
+static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale[] = "\n**`set_auto_maskandscale(self,maskandscale)`**\n\nturn on or off automatic conversion of variable data to and\nfrom masked arrays and automatic packing/unpacking of variable\ndata using `scale_factor` and `add_offset` attributes.\n\nIf `maskandscale` is set to `True`, when data is read from a variable\nit is converted to a masked array if any of the values are exactly\nequal to the either the netCDF _FillVa [...]
static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_59set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_maskandscale) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
@@ -43715,17 +47892,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":4123
+ /* "netCDF4/_netCDF4.pyx":4207
* (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, 4123, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_maskandscale); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4207, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":4124
+ /* "netCDF4/_netCDF4.pyx":4208
* """
* if maskandscale:
* self.scale = True # <<<<<<<<<<<<<<
@@ -43738,7 +47915,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":4125
+ /* "netCDF4/_netCDF4.pyx":4209
* if maskandscale:
* self.scale = True
* self.mask = True # <<<<<<<<<<<<<<
@@ -43751,7 +47928,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":4123
+ /* "netCDF4/_netCDF4.pyx":4207
* (automatic conversions are performed).
* """
* if maskandscale: # <<<<<<<<<<<<<<
@@ -43761,7 +47938,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale(s
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":4127
+ /* "netCDF4/_netCDF4.pyx":4211
* self.mask = True
* else:
* self.scale = False # <<<<<<<<<<<<<<
@@ -43775,7 +47952,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":4128
+ /* "netCDF4/_netCDF4.pyx":4212
* else:
* self.scale = False
* self.mask = False # <<<<<<<<<<<<<<
@@ -43790,7 +47967,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale(s
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":4083
+ /* "netCDF4/_netCDF4.pyx":4165
* return self[slice(None)]
*
* def set_auto_maskandscale(self,maskandscale): # <<<<<<<<<<<<<<
@@ -43810,7 +47987,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_maskandscale(s
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4130
+/* "netCDF4/_netCDF4.pyx":4214
* self.mask = False
*
* def set_auto_scale(self,scale): # <<<<<<<<<<<<<<
@@ -43838,17 +48015,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":4157
+ /* "netCDF4/_netCDF4.pyx":4241
* (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, 4157, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_scale); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4241, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":4158
+ /* "netCDF4/_netCDF4.pyx":4242
* """
* if scale:
* self.scale = True # <<<<<<<<<<<<<<
@@ -43861,7 +48038,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":4157
+ /* "netCDF4/_netCDF4.pyx":4241
* (automatic conversions are performed).
* """
* if scale: # <<<<<<<<<<<<<<
@@ -43871,7 +48048,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_scale(struct _
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":4160
+ /* "netCDF4/_netCDF4.pyx":4244
* self.scale = True
* else:
* self.scale = False # <<<<<<<<<<<<<<
@@ -43887,7 +48064,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_scale(struct _
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":4130
+ /* "netCDF4/_netCDF4.pyx":4214
* self.mask = False
*
* def set_auto_scale(self,scale): # <<<<<<<<<<<<<<
@@ -43907,7 +48084,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_scale(struct _
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4162
+/* "netCDF4/_netCDF4.pyx":4246
* self.scale = False
*
* def set_auto_mask(self,mask): # <<<<<<<<<<<<<<
@@ -43917,7 +48094,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_scale(struct _
/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_63set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_mask); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_62set_auto_mask[] = "\n**`set_auto_mask(self,mask)`**\n\nturn on or off automatic conversion of variable data to and\nfrom masked arrays .\n\nIf `mask` is set to `True`, when data is read from a variable\nit is converted to a masked array if any of the values are exactly\nequal to the either the netCDF _FillValue or the value specified by the\nmissing_value variable attribute. The fill_value of the masked array\nis set to the missing_val [...]
+static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_62set_auto_mask[] = "\n**`set_auto_mask(self,mask)`**\n\nturn on or off automatic conversion of variable data to and\nfrom masked arrays .\n\nIf `mask` is set to `True`, when data is read from a variable\nit is converted to a masked array if any of the values are exactly\nequal to the either the netCDF _FillValue or the value specified by the\nmissing_value variable attribute. The fill_value of the masked array\nis set to the missing_val [...]
static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_63set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_mask) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
@@ -43935,17 +48112,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":4184
+ /* "netCDF4/_netCDF4.pyx":4270
* (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, 4184, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_mask); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 4270, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":4185
+ /* "netCDF4/_netCDF4.pyx":4271
* """
* if mask:
* self.mask = True # <<<<<<<<<<<<<<
@@ -43958,7 +48135,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":4184
+ /* "netCDF4/_netCDF4.pyx":4270
* (automatic conversions are performed).
* """
* if mask: # <<<<<<<<<<<<<<
@@ -43968,7 +48145,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_62set_auto_mask(struct __
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":4187
+ /* "netCDF4/_netCDF4.pyx":4273
* self.mask = True
* else:
* self.mask = False # <<<<<<<<<<<<<<
@@ -43984,7 +48161,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_62set_auto_mask(struct __
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":4162
+ /* "netCDF4/_netCDF4.pyx":4246
* self.scale = False
*
* def set_auto_mask(self,mask): # <<<<<<<<<<<<<<
@@ -44004,7 +48181,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_62set_auto_mask(struct __
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4190
+/* "netCDF4/_netCDF4.pyx":4276
*
*
* def _put(self,ndarray data,start,count,stride): # <<<<<<<<<<<<<<
@@ -44045,21 +48222,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, 4190, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 1); __PYX_ERR(0, 4276, __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, 4190, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 2); __PYX_ERR(0, 4276, __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, 4190, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 3); __PYX_ERR(0, 4276, __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, 4190, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_put") < 0)) __PYX_ERR(0, 4276, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
goto __pyx_L5_argtuple_error;
@@ -44076,13 +48253,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, 4190, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4276, __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, 4190, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_7netCDF4_8_netCDF4_ndarray, 1, "data", 0))) __PYX_ERR(0, 4276, __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 */
@@ -44131,20 +48308,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":4203
+ /* "netCDF4/_netCDF4.pyx":4289
* 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, 4203, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4289, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4203, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4289, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_ndims = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":4206
+ /* "netCDF4/_netCDF4.pyx":4292
* # make sure data is contiguous.
* # if not, make a local copy.
* if not PyArray_ISCONTIGUOUS(data): # <<<<<<<<<<<<<<
@@ -44154,17 +48331,17 @@ 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":4207
+ /* "netCDF4/_netCDF4.pyx":4293
* # 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, 4207, __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, 4293, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -44174,18 +48351,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, 4207, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4293, __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, 4207, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4293, __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, 4207, __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, 4293, __pyx_L1_error)
__Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_1));
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4206
+ /* "netCDF4/_netCDF4.pyx":4292
* # make sure data is contiguous.
* # if not, make a local copy.
* if not PyArray_ISCONTIGUOUS(data): # <<<<<<<<<<<<<<
@@ -44194,7 +48371,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4209
+ /* "netCDF4/_netCDF4.pyx":4295
* data = data.copy()
* # fill up startp,countp,stridep.
* totelem = 1 # <<<<<<<<<<<<<<
@@ -44203,7 +48380,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
__pyx_v_totelem = 1;
- /* "netCDF4/_netCDF4.pyx":4210
+ /* "netCDF4/_netCDF4.pyx":4296
* # fill up startp,countp,stridep.
* totelem = 1
* negstride = 0 # <<<<<<<<<<<<<<
@@ -44212,19 +48389,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
__pyx_v_negstride = 0;
- /* "netCDF4/_netCDF4.pyx":4211
+ /* "netCDF4/_netCDF4.pyx":4297
* totelem = 1
* negstride = 0
* sl = [] # <<<<<<<<<<<<<<
* startp = <size_t *>malloc(sizeof(size_t) * ndims)
* countp = <size_t *>malloc(sizeof(size_t) * ndims)
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4211, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4297, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_sl = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4212
+ /* "netCDF4/_netCDF4.pyx":4298
* negstride = 0
* sl = []
* startp = <size_t *>malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<<
@@ -44233,7 +48410,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":4213
+ /* "netCDF4/_netCDF4.pyx":4299
* sl = []
* startp = <size_t *>malloc(sizeof(size_t) * ndims)
* countp = <size_t *>malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<<
@@ -44242,7 +48419,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":4214
+ /* "netCDF4/_netCDF4.pyx":4300
* startp = <size_t *>malloc(sizeof(size_t) * ndims)
* countp = <size_t *>malloc(sizeof(size_t) * ndims)
* stridep = <ptrdiff_t *>malloc(sizeof(ptrdiff_t) * ndims) # <<<<<<<<<<<<<<
@@ -44251,7 +48428,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":4215
+ /* "netCDF4/_netCDF4.pyx":4301
* countp = <size_t *>malloc(sizeof(size_t) * ndims)
* stridep = <ptrdiff_t *>malloc(sizeof(ptrdiff_t) * ndims)
* for n from 0 <= n < ndims: # <<<<<<<<<<<<<<
@@ -44260,56 +48437,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, 4215, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4301, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4216
+ /* "netCDF4/_netCDF4.pyx":4302
* stridep = <ptrdiff_t *>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, 4216, __pyx_L1_error)
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4302, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4216, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4302, __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, 4216, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_count, __pyx_v_n, __pyx_t_4) < 0)) __PYX_ERR(0, 4302, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":4217
+ /* "netCDF4/_netCDF4.pyx":4303
* 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, 4217, __pyx_L1_error)
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4303, __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, 4217, __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, 4303, __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, 4217, __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, 4303, __pyx_L1_error)
(__pyx_v_countp[__pyx_t_2]) = __pyx_t_8;
- /* "netCDF4/_netCDF4.pyx":4219
+ /* "netCDF4/_netCDF4.pyx":4305
* 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, 4219, __pyx_L1_error)
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4305, __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, 4219, __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, 4305, __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, 4219, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4305, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4220
+ /* "netCDF4/_netCDF4.pyx":4306
* # for neg strides, reverse order (then flip that axis after data read in)
* if stride[n] < 0:
* negstride = 1 # <<<<<<<<<<<<<<
@@ -44318,77 +48495,77 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
__pyx_v_negstride = 1;
- /* "netCDF4/_netCDF4.pyx":4221
+ /* "netCDF4/_netCDF4.pyx":4307
* 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, 4221, __pyx_L1_error)
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4307, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4221, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4307, __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, 4221, __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, 4307, __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, 4221, __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, 4307, __pyx_L1_error)
(__pyx_v_stridep[__pyx_t_2]) = __pyx_t_9;
- /* "netCDF4/_netCDF4.pyx":4222
+ /* "netCDF4/_netCDF4.pyx":4308
* 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, 4222, __pyx_L1_error)
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4308, __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, 4222, __pyx_L1_error)
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4308, __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, 4222, __pyx_L1_error)
+ __pyx_t_5 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4308, __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, 4222, __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, 4308, __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, 4222, __pyx_L1_error)
+ __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4308, __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, 4222, __pyx_L1_error)
+ __pyx_t_10 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4308, __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, 4222, __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, 4308, __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, 4222, __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, 4308, __pyx_L1_error)
(__pyx_v_startp[__pyx_t_2]) = __pyx_t_8;
- /* "netCDF4/_netCDF4.pyx":4223
+ /* "netCDF4/_netCDF4.pyx":4309
* 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, 4223, __pyx_L1_error)
+ __pyx_t_10 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4309, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_5 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4223, __pyx_L1_error)
+ __pyx_t_5 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4309, __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, 4223, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_stride, __pyx_v_n, __pyx_t_5) < 0)) __PYX_ERR(0, 4309, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":4224
+ /* "netCDF4/_netCDF4.pyx":4310
* 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__68); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4224, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__71); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4310, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4219
+ /* "netCDF4/_netCDF4.pyx":4305
* countp[n] = count[n]
* # for neg strides, reverse order (then flip that axis after data read in)
* if stride[n] < 0: # <<<<<<<<<<<<<<
@@ -44398,7 +48575,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
goto __pyx_L6;
}
- /* "netCDF4/_netCDF4.pyx":4226
+ /* "netCDF4/_netCDF4.pyx":4312
* sl.append(slice(None, None, -1)) # this slice will reverse the data
* else:
* startp[n] = start[n] # <<<<<<<<<<<<<<
@@ -44406,63 +48583,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, 4226, __pyx_L1_error)
+ __pyx_t_5 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4312, __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, 4226, __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, 4312, __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, 4226, __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, 4312, __pyx_L1_error)
(__pyx_v_startp[__pyx_t_2]) = __pyx_t_8;
- /* "netCDF4/_netCDF4.pyx":4227
+ /* "netCDF4/_netCDF4.pyx":4313
* 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, 4227, __pyx_L1_error)
+ __pyx_t_5 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4313, __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, 4227, __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, 4313, __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, 4227, __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, 4313, __pyx_L1_error)
(__pyx_v_stridep[__pyx_t_2]) = __pyx_t_9;
- /* "netCDF4/_netCDF4.pyx":4228
+ /* "netCDF4/_netCDF4.pyx":4314
* 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__69); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4228, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__72); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4314, __pyx_L1_error)
}
__pyx_L6:;
- /* "netCDF4/_netCDF4.pyx":4229
+ /* "netCDF4/_netCDF4.pyx":4315
* 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, 4229, __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, 4315, __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, 4215, __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, 4301, __pyx_L1_error)
}
- /* "netCDF4/_netCDF4.pyx":4215
+ /* "netCDF4/_netCDF4.pyx":4301
* countp = <size_t *>malloc(sizeof(size_t) * ndims)
* stridep = <ptrdiff_t *>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, 4215, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4301, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_5);
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":4232
+ /* "netCDF4/_netCDF4.pyx":4318
* # check to see that size of data array is what is expected
* # for slice given.
* dataelem = PyArray_SIZE(data) # <<<<<<<<<<<<<<
@@ -44471,7 +48648,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":4233
+ /* "netCDF4/_netCDF4.pyx":4319
* # for slice given.
* dataelem = PyArray_SIZE(data)
* if totelem != dataelem: # <<<<<<<<<<<<<<
@@ -44481,20 +48658,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":4234
+ /* "netCDF4/_netCDF4.pyx":4320
* 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__70, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4234, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4320, __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, 4234, __pyx_L1_error)
+ __PYX_ERR(0, 4320, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4233
+ /* "netCDF4/_netCDF4.pyx":4319
* # for slice given.
* dataelem = PyArray_SIZE(data)
* if totelem != dataelem: # <<<<<<<<<<<<<<
@@ -44503,7 +48680,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4235
+ /* "netCDF4/_netCDF4.pyx":4321
* if totelem != dataelem:
* raise IndexError('size of data array does not conform to slice')
* if negstride: # <<<<<<<<<<<<<<
@@ -44513,20 +48690,20 @@ 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":4237
+ /* "netCDF4/_netCDF4.pyx":4323
* 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, 4237, __pyx_L1_error)
+ __pyx_t_10 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4323, __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, 4237, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4323, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -44536,18 +48713,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, 4237, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4323, __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, 4237, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4323, __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, 4237, __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, 4323, __pyx_L1_error)
__Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_5));
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":4235
+ /* "netCDF4/_netCDF4.pyx":4321
* if totelem != dataelem:
* raise IndexError('size of data array does not conform to slice')
* if negstride: # <<<<<<<<<<<<<<
@@ -44556,56 +48733,56 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4238
+ /* "netCDF4/_netCDF4.pyx":4324
* # 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, 4238, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4324, __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, 4238, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4324, __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, 4238, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4324, __pyx_L1_error)
__pyx_t_3 = __pyx_t_12;
__pyx_L10_bool_binop_done:;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4242
+ /* "netCDF4/_netCDF4.pyx":4328
* # 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, 4242, __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, 4328, __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, 4242, __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, 4328, __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, 4242, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4328, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4243
+ /* "netCDF4/_netCDF4.pyx":4329
* # 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, 4243, __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, 4329, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_10 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -44615,25 +48792,43 @@ 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, 4243, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_self->dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4329, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
} else {
- __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4243, __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, 4243, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ #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, 4329, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #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, 4329, __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, 4329, __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, 4329, __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, 4243, __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, 4329, __pyx_L1_error)
__Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_4));
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":4242
+ /* "netCDF4/_netCDF4.pyx":4328
* # if data type of array doesn't match variable,
* # try to cast the data.
* if self.dtype != data.dtype: # <<<<<<<<<<<<<<
@@ -44642,27 +48837,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4247
+ /* "netCDF4/_netCDF4.pyx":4333
* # endian byte order (this is what netcdf-c expects -
* # issue #554, pull request #555)
* if (is_native_little and data.dtype.byteorder == '>') or\ # <<<<<<<<<<<<<<
* (is_native_big and data.dtype.byteorder == '<'):
* data = data.byteswap() # don't do in-place, make a copy
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4247, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4333, __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, 4247, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4333, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!__pyx_t_12) {
goto __pyx_L16_next_or;
} else {
}
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4247, __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, 4333, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4247, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4333, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s__15, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4247, __pyx_L1_error)
+ __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s__14, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4333, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (!__pyx_t_12) {
} else {
@@ -44671,33 +48866,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
}
__pyx_L16_next_or:;
- /* "netCDF4/_netCDF4.pyx":4248
+ /* "netCDF4/_netCDF4.pyx":4334
* # issue #554, pull request #555)
* if (is_native_little and data.dtype.byteorder == '>') or\
* (is_native_big and data.dtype.byteorder == '<'): # <<<<<<<<<<<<<<
* data = data.byteswap() # don't do in-place, make a copy
* # strides all 1 or scalar variable, use put_vara (faster)
*/
- __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4248, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4334, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4248, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4334, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_12) {
} else {
__pyx_t_3 = __pyx_t_12;
goto __pyx_L15_bool_binop_done;
}
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4248, __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, 4334, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4248, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4334, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_kp_s__14, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4248, __pyx_L1_error)
+ __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_kp_s__13, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4334, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = __pyx_t_12;
__pyx_L15_bool_binop_done:;
- /* "netCDF4/_netCDF4.pyx":4247
+ /* "netCDF4/_netCDF4.pyx":4333
* # endian byte order (this is what netcdf-c expects -
* # issue #554, pull request #555)
* if (is_native_little and data.dtype.byteorder == '>') or\ # <<<<<<<<<<<<<<
@@ -44706,17 +48901,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4249
+ /* "netCDF4/_netCDF4.pyx":4335
* if (is_native_little and data.dtype.byteorder == '>') or\
* (is_native_big and data.dtype.byteorder == '<'):
* data = data.byteswap() # don't do in-place, make a copy # <<<<<<<<<<<<<<
* # strides all 1 or scalar variable, use put_vara (faster)
* if sum(stride) == ndims or ndims == 0:
*/
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4249, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4335, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ 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_5);
@@ -44726,18 +48921,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
}
}
if (__pyx_t_1) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4249, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4335, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else {
- __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4249, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4335, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_4);
__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, 4249, __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, 4335, __pyx_L1_error)
__Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_4));
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":4247
+ /* "netCDF4/_netCDF4.pyx":4333
* # endian byte order (this is what netcdf-c expects -
* # issue #554, pull request #555)
* if (is_native_little and data.dtype.byteorder == '>') or\ # <<<<<<<<<<<<<<
@@ -44746,27 +48941,27 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4251
+ /* "netCDF4/_netCDF4.pyx":4337
* data = data.byteswap() # don't do in-place, make a copy
* # 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_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4251, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4337, __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_5 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4251, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4337, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__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, 4251, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4337, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4251, __pyx_L1_error)
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4337, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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, 4251, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4337, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_12) {
} else {
@@ -44778,7 +48973,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
__pyx_L20_bool_binop_done:;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4252
+ /* "netCDF4/_netCDF4.pyx":4338
* # 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, # <<<<<<<<<<<<<<
@@ -44787,7 +48982,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":4251
+ /* "netCDF4/_netCDF4.pyx":4337
* data = data.byteswap() # don't do in-place, make a copy
* # strides all 1 or scalar variable, use put_vara (faster)
* if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<<
@@ -44797,7 +48992,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
goto __pyx_L19;
}
- /* "netCDF4/_netCDF4.pyx":4255
+ /* "netCDF4/_netCDF4.pyx":4341
* startp, countp, data.data)
* else:
* ierr = nc_put_vars(self._grpid, self._varid, # <<<<<<<<<<<<<<
@@ -44806,7 +49001,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
/*else*/ {
- /* "netCDF4/_netCDF4.pyx":4256
+ /* "netCDF4/_netCDF4.pyx":4342
* else:
* ierr = nc_put_vars(self._grpid, self._varid,
* startp, countp, stridep, data.data) # <<<<<<<<<<<<<<
@@ -44817,7 +49012,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
}
__pyx_L19:;
- /* "netCDF4/_netCDF4.pyx":4257
+ /* "netCDF4/_netCDF4.pyx":4343
* ierr = nc_put_vars(self._grpid, self._varid,
* startp, countp, stridep, data.data)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -44827,7 +49022,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
__pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4258
+ /* "netCDF4/_netCDF4.pyx":4344
* startp, countp, stridep, data.data)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -44835,22 +49030,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, 4258, __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, 4344, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4258, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4344, __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, 4258, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4344, __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, 4258, __pyx_L1_error)
+ __PYX_ERR(0, 4344, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4257
+ /* "netCDF4/_netCDF4.pyx":4343
* ierr = nc_put_vars(self._grpid, self._varid,
* startp, countp, stridep, data.data)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -44859,7 +49054,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4238
+ /* "netCDF4/_netCDF4.pyx":4324
* # 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: # <<<<<<<<<<<<<<
@@ -44869,46 +49064,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
goto __pyx_L9;
}
- /* "netCDF4/_netCDF4.pyx":4259
+ /* "netCDF4/_netCDF4.pyx":4345
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4259, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4345, __pyx_L1_error)
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4260
+ /* "netCDF4/_netCDF4.pyx":4346
* raise RuntimeError((<char *>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, 4260, __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, 4346, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_char); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4260, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_char); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4346, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4260, __pyx_L1_error)
+ __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4346, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4261
+ /* "netCDF4/_netCDF4.pyx":4347
* 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_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4261, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4347, __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, 4261, __pyx_L1_error)
+ __PYX_ERR(0, 4347, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4260
+ /* "netCDF4/_netCDF4.pyx":4346
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* elif self._isvlen:
* if data.dtype.char !='O': # <<<<<<<<<<<<<<
@@ -44917,17 +49112,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4263
+ /* "netCDF4/_netCDF4.pyx":4349
* 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, 4263, __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, 4349, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -44937,74 +49132,74 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
}
}
if (__pyx_t_5) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4263, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4349, __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, 4263, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4349, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4263, __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, 4349, __pyx_L1_error)
__Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_4));
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":4264
+ /* "netCDF4/_netCDF4.pyx":4350
* # 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_4 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4264, __pyx_L1_error)
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4264, __pyx_L1_error)
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4350, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4350, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4266
+ /* "netCDF4/_netCDF4.pyx":4352
* 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_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4266, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4352, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4266, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4352, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4266, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4352, __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, 4266, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4352, __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_2 = 0;
__pyx_t_14 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4266, __pyx_L1_error)
+ __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4352, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_14 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4266, __pyx_L1_error)
+ __pyx_t_14 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4352, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_14)) {
if (likely(PyList_CheckExact(__pyx_t_4))) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4266, __pyx_L1_error)
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4352, __pyx_L1_error)
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4266, __pyx_L1_error)
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4352, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4266, __pyx_L1_error)
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4352, __pyx_L1_error)
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4266, __pyx_L1_error)
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4352, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -45014,7 +49209,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, 4266, __pyx_L1_error)
+ else __PYX_ERR(0, 4352, __pyx_L1_error)
}
break;
}
@@ -45023,22 +49218,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":4267
+ /* "netCDF4/_netCDF4.pyx":4353
* # 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, 4267, __pyx_L1_error)
+ __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4353, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4267, __pyx_L1_error)
+ __pyx_t_5 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4353, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_data), __pyx_v_n, __pyx_t_5) < 0)) __PYX_ERR(0, 4267, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_data), __pyx_v_n, __pyx_t_5) < 0)) __PYX_ERR(0, 4353, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":4266
+ /* "netCDF4/_netCDF4.pyx":4352
* if self.dtype == str:
* # convert all elements from strings to bytes
* for n in range(data.shape[0]): # <<<<<<<<<<<<<<
@@ -45048,7 +49243,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":4272
+ /* "netCDF4/_netCDF4.pyx":4358
* # each element in struct.
* # allocate struct array to hold vlen data.
* strdata = <char **>malloc(sizeof(char *)*totelem) # <<<<<<<<<<<<<<
@@ -45057,7 +49252,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":4273
+ /* "netCDF4/_netCDF4.pyx":4359
* # allocate struct array to hold vlen data.
* strdata = <char **>malloc(sizeof(char *)*totelem)
* for i from 0<=i<totelem: # <<<<<<<<<<<<<<
@@ -45067,41 +49262,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
__pyx_t_15 = __pyx_v_totelem;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) {
- /* "netCDF4/_netCDF4.pyx":4274
+ /* "netCDF4/_netCDF4.pyx":4360
* strdata = <char **>malloc(sizeof(char *)*totelem)
* for i from 0<=i<totelem:
* strdata[i] = data[i] # <<<<<<<<<<<<<<
* # strides all 1 or scalar variable, use put_vara (faster)
* if sum(stride) == ndims or ndims == 0:
*/
- __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_data), __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4274, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_data), __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4360, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_13 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 4274, __pyx_L1_error)
+ __pyx_t_13 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 4360, __pyx_L1_error)
(__pyx_v_strdata[__pyx_v_i]) = __pyx_t_13;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
- /* "netCDF4/_netCDF4.pyx":4276
+ /* "netCDF4/_netCDF4.pyx":4362
* strdata[i] = data[i]
* # 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, strdata)
*/
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4276, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4362, __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_5 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4276, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4362, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__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, 4276, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4362, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4276, __pyx_L1_error)
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4362, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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, 4276, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4362, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_12) {
} else {
@@ -45113,7 +49308,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
__pyx_L30_bool_binop_done:;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4277
+ /* "netCDF4/_netCDF4.pyx":4363
* # 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, # <<<<<<<<<<<<<<
@@ -45122,7 +49317,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_strdata);
- /* "netCDF4/_netCDF4.pyx":4276
+ /* "netCDF4/_netCDF4.pyx":4362
* strdata[i] = data[i]
* # strides all 1 or scalar variable, use put_vara (faster)
* if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<<
@@ -45132,7 +49327,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
goto __pyx_L29;
}
- /* "netCDF4/_netCDF4.pyx":4280
+ /* "netCDF4/_netCDF4.pyx":4366
* startp, countp, strdata)
* else:
* raise IndexError('strides must all be 1 for string variables') # <<<<<<<<<<<<<<
@@ -45140,15 +49335,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__72, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4280, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4366, __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, 4280, __pyx_L1_error)
+ __PYX_ERR(0, 4366, __pyx_L1_error)
}
__pyx_L29:;
- /* "netCDF4/_netCDF4.pyx":4283
+ /* "netCDF4/_netCDF4.pyx":4369
* #ierr = nc_put_vars(self._grpid, self._varid,
* # startp, countp, stridep, strdata)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -45158,7 +49353,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
__pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4284
+ /* "netCDF4/_netCDF4.pyx":4370
* # startp, countp, stridep, strdata)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -45166,22 +49361,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, 4284, __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, 4370, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4284, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4370, __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, 4284, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4370, __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, 4284, __pyx_L1_error)
+ __PYX_ERR(0, 4370, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4283
+ /* "netCDF4/_netCDF4.pyx":4369
* #ierr = nc_put_vars(self._grpid, self._varid,
* # startp, countp, stridep, strdata)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -45190,7 +49385,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4285
+ /* "netCDF4/_netCDF4.pyx":4371
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* free(strdata) # <<<<<<<<<<<<<<
@@ -45199,7 +49394,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
free(__pyx_v_strdata);
- /* "netCDF4/_netCDF4.pyx":4264
+ /* "netCDF4/_netCDF4.pyx":4350
* # flatten data array.
* data = data.flatten()
* if self.dtype == str: # <<<<<<<<<<<<<<
@@ -45209,7 +49404,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
goto __pyx_L24;
}
- /* "netCDF4/_netCDF4.pyx":4290
+ /* "netCDF4/_netCDF4.pyx":4376
* # loop over elements of object array, put data buffer for
* # each element in struct.
* databuff = data.data # <<<<<<<<<<<<<<
@@ -45220,7 +49415,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":4292
+ /* "netCDF4/_netCDF4.pyx":4378
* databuff = data.data
* # allocate struct array to hold vlen data.
* vldata = <nc_vlen_t *>malloc(<size_t>totelem*sizeof(nc_vlen_t)) # <<<<<<<<<<<<<<
@@ -45229,7 +49424,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":4293
+ /* "netCDF4/_netCDF4.pyx":4379
* # allocate struct array to hold vlen data.
* vldata = <nc_vlen_t *>malloc(<size_t>totelem*sizeof(nc_vlen_t))
* for i from 0<=i<totelem: # <<<<<<<<<<<<<<
@@ -45239,7 +49434,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
__pyx_t_15 = __pyx_v_totelem;
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) {
- /* "netCDF4/_netCDF4.pyx":4294
+ /* "netCDF4/_netCDF4.pyx":4380
* vldata = <nc_vlen_t *>malloc(<size_t>totelem*sizeof(nc_vlen_t))
* for i from 0<=i<totelem:
* elptr = (<void**>databuff)[0] # <<<<<<<<<<<<<<
@@ -45248,7 +49443,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":4295
+ /* "netCDF4/_netCDF4.pyx":4381
* for i from 0<=i<totelem:
* elptr = (<void**>databuff)[0]
* dataarr = <ndarray>elptr # <<<<<<<<<<<<<<
@@ -45260,37 +49455,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":4296
+ /* "netCDF4/_netCDF4.pyx":4382
* elptr = (<void**>databuff)[0]
* dataarr = <ndarray>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, 4296, __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, 4382, __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, 4296, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4382, __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__73, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4296, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__76, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4382, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->dtype, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4296, __pyx_L1_error)
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->dtype, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4382, __pyx_L1_error)
__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, 4296, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4382, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4299
+ /* "netCDF4/_netCDF4.pyx":4385
* #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_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dataarr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4299, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dataarr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4385, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4299, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4385, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_self->dtype);
__Pyx_GIVEREF(__pyx_v_self->dtype);
@@ -45298,22 +49493,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(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_wrong_data_type_in_object_array, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4299, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_wrong_data_type_in_object_array, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4385, __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, 4299, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4385, __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_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4299, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4385, __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, 4299, __pyx_L1_error)
+ __PYX_ERR(0, 4385, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4296
+ /* "netCDF4/_netCDF4.pyx":4382
* elptr = (<void**>databuff)[0]
* dataarr = <ndarray>elptr
* if self.dtype != dataarr.dtype.str[1:]: # <<<<<<<<<<<<<<
@@ -45322,7 +49517,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4300
+ /* "netCDF4/_netCDF4.pyx":4386
* # 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) # <<<<<<<<<<<<<<
@@ -45331,7 +49526,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":4301
+ /* "netCDF4/_netCDF4.pyx":4387
* 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 # <<<<<<<<<<<<<<
@@ -45341,7 +49536,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":4302
+ /* "netCDF4/_netCDF4.pyx":4388
* vldata[i].len = PyArray_SIZE(dataarr)
* vldata[i].p = dataarr.data
* databuff = databuff + data.strides[0] # <<<<<<<<<<<<<<
@@ -45351,27 +49546,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":4304
+ /* "netCDF4/_netCDF4.pyx":4390
* 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_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4304, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4390, __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_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4304, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4390, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__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, 4304, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4390, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4304, __pyx_L1_error)
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4390, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4304, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4390, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (!__pyx_t_12) {
} else {
@@ -45383,7 +49578,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
__pyx_L37_bool_binop_done:;
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4305
+ /* "netCDF4/_netCDF4.pyx":4391
* # 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, # <<<<<<<<<<<<<<
@@ -45392,7 +49587,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":4304
+ /* "netCDF4/_netCDF4.pyx":4390
* databuff = databuff + data.strides[0]
* # strides all 1 or scalar variable, use put_vara (faster)
* if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<<
@@ -45402,7 +49597,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
goto __pyx_L36;
}
- /* "netCDF4/_netCDF4.pyx":4308
+ /* "netCDF4/_netCDF4.pyx":4394
* startp, countp, vldata)
* else:
* raise IndexError('strides must all be 1 for vlen variables') # <<<<<<<<<<<<<<
@@ -45410,15 +49605,15 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
* # startp, countp, stridep, vldata)
*/
/*else*/ {
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4308, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4394, __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, 4308, __pyx_L1_error)
+ __PYX_ERR(0, 4394, __pyx_L1_error)
}
__pyx_L36:;
- /* "netCDF4/_netCDF4.pyx":4311
+ /* "netCDF4/_netCDF4.pyx":4397
* #ierr = nc_put_vars(self._grpid, self._varid,
* # startp, countp, stridep, vldata)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -45428,7 +49623,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
__pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
if (__pyx_t_3) {
- /* "netCDF4/_netCDF4.pyx":4312
+ /* "netCDF4/_netCDF4.pyx":4398
* # startp, countp, stridep, vldata)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -45436,22 +49631,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_5 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4312, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_13, 0, strlen(__pyx_t_13), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4398, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4312, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4398, __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, 4312, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4398, __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, 4312, __pyx_L1_error)
+ __PYX_ERR(0, 4398, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4311
+ /* "netCDF4/_netCDF4.pyx":4397
* #ierr = nc_put_vars(self._grpid, self._varid,
* # startp, countp, stridep, vldata)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -45460,7 +49655,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4314
+ /* "netCDF4/_netCDF4.pyx":4400
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* # free the pointer array.
* free(vldata) # <<<<<<<<<<<<<<
@@ -45471,7 +49666,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
}
__pyx_L24:;
- /* "netCDF4/_netCDF4.pyx":4259
+ /* "netCDF4/_netCDF4.pyx":4345
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* elif self._isvlen: # <<<<<<<<<<<<<<
@@ -45481,7 +49676,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
}
__pyx_L9:;
- /* "netCDF4/_netCDF4.pyx":4315
+ /* "netCDF4/_netCDF4.pyx":4401
* # free the pointer array.
* free(vldata)
* free(startp) # <<<<<<<<<<<<<<
@@ -45490,7 +49685,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
free(__pyx_v_startp);
- /* "netCDF4/_netCDF4.pyx":4316
+ /* "netCDF4/_netCDF4.pyx":4402
* free(vldata)
* free(startp)
* free(countp) # <<<<<<<<<<<<<<
@@ -45499,7 +49694,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
free(__pyx_v_countp);
- /* "netCDF4/_netCDF4.pyx":4317
+ /* "netCDF4/_netCDF4.pyx":4403
* free(startp)
* free(countp)
* free(stridep) # <<<<<<<<<<<<<<
@@ -45508,7 +49703,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
*/
free(__pyx_v_stridep);
- /* "netCDF4/_netCDF4.pyx":4190
+ /* "netCDF4/_netCDF4.pyx":4276
*
*
* def _put(self,ndarray data,start,count,stride): # <<<<<<<<<<<<<<
@@ -45536,7 +49731,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_put(struct __pyx_obj_7
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4319
+/* "netCDF4/_netCDF4.pyx":4405
* free(stridep)
*
* def _get(self,start,count,stride): # <<<<<<<<<<<<<<
@@ -45575,16 +49770,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, 4319, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, 1); __PYX_ERR(0, 4405, __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, 4319, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, 2); __PYX_ERR(0, 4405, __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, 4319, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get") < 0)) __PYX_ERR(0, 4405, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
@@ -45599,7 +49794,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, 4319, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4405, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4.Variable._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -45629,7 +49824,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
PyObject *__pyx_v_sl = NULL;
long __pyx_v_n;
PyObject *__pyx_v_totelem = NULL;
- long __pyx_v_i;
+ PyObject *__pyx_v_i = NULL;
size_t __pyx_v_arrlen;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -45647,10 +49842,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
int __pyx_t_12;
char *__pyx_t_13;
long __pyx_t_14;
- PyObject *__pyx_t_15 = NULL;
+ long __pyx_t_15;
+ PyObject *__pyx_t_16 = NULL;
+ Py_ssize_t __pyx_t_17;
__Pyx_RefNannySetupContext("_get", 0);
- /* "netCDF4/_netCDF4.pyx":4332
+ /* "netCDF4/_netCDF4.pyx":4418
* # and not a slice so the resulting array
* # should be 'squeezed' to remove the singleton dimension.
* shapeout = () # <<<<<<<<<<<<<<
@@ -45660,7 +49857,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":4333
+ /* "netCDF4/_netCDF4.pyx":4419
* # should be 'squeezed' to remove the singleton dimension.
* shapeout = ()
* squeeze_out = False # <<<<<<<<<<<<<<
@@ -45669,7 +49866,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
__pyx_v_squeeze_out = 0;
- /* "netCDF4/_netCDF4.pyx":4334
+ /* "netCDF4/_netCDF4.pyx":4420
* shapeout = ()
* squeeze_out = False
* for lendim in count: # <<<<<<<<<<<<<<
@@ -45680,26 +49877,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, 4334, __pyx_L1_error)
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4420, __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, 4334, __pyx_L1_error)
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4420, __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_COMPILING_IN_CPYTHON
- __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, 4334, __pyx_L1_error)
+ #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, 4420, __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, 4334, __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, 4420, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 4334, __pyx_L1_error)
+ #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, 4420, __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, 4334, __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, 4420, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
@@ -45709,7 +49906,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, 4334, __pyx_L1_error)
+ else __PYX_ERR(0, 4420, __pyx_L1_error)
}
break;
}
@@ -45718,32 +49915,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":4335
+ /* "netCDF4/_netCDF4.pyx":4421
* 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, 4335, __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, 4421, __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, 4335, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4421, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_5) {
- /* "netCDF4/_netCDF4.pyx":4336
+ /* "netCDF4/_netCDF4.pyx":4422
* for lendim in count:
* if lendim == -1:
* shapeout = shapeout + (1,) # <<<<<<<<<<<<<<
* squeeze_out = True
* else:
*/
- __pyx_t_4 = PyNumber_Add(__pyx_v_shapeout, __pyx_tuple__75); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4336, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Add(__pyx_v_shapeout, __pyx_tuple__78); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4422, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF_SET(__pyx_v_shapeout, __pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":4337
+ /* "netCDF4/_netCDF4.pyx":4423
* if lendim == -1:
* shapeout = shapeout + (1,)
* squeeze_out = True # <<<<<<<<<<<<<<
@@ -45752,7 +49949,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
__pyx_v_squeeze_out = 1;
- /* "netCDF4/_netCDF4.pyx":4335
+ /* "netCDF4/_netCDF4.pyx":4421
* squeeze_out = False
* for lendim in count:
* if lendim == -1: # <<<<<<<<<<<<<<
@@ -45762,7 +49959,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
goto __pyx_L5;
}
- /* "netCDF4/_netCDF4.pyx":4339
+ /* "netCDF4/_netCDF4.pyx":4425
* squeeze_out = True
* else:
* shapeout = shapeout + (lendim,) # <<<<<<<<<<<<<<
@@ -45770,12 +49967,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, 4339, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4425, __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, 4339, __pyx_L1_error)
+ __pyx_t_6 = PyNumber_Add(__pyx_v_shapeout, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4425, __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);
@@ -45783,7 +49980,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
}
__pyx_L5:;
- /* "netCDF4/_netCDF4.pyx":4334
+ /* "netCDF4/_netCDF4.pyx":4420
* shapeout = ()
* squeeze_out = False
* for lendim in count: # <<<<<<<<<<<<<<
@@ -45793,20 +49990,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":4341
+ /* "netCDF4/_netCDF4.pyx":4427
* 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, 4341, __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, 4427, __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, 4341, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 4427, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_ndims = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":4343
+ /* "netCDF4/_netCDF4.pyx":4429
* ndims = len(self.dimensions)
* # fill up startp,countp,stridep.
* negstride = 0 # <<<<<<<<<<<<<<
@@ -45815,19 +50012,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
__pyx_v_negstride = 0;
- /* "netCDF4/_netCDF4.pyx":4344
+ /* "netCDF4/_netCDF4.pyx":4430
* # fill up startp,countp,stridep.
* negstride = 0
* sl = [] # <<<<<<<<<<<<<<
* startp = <size_t *>malloc(sizeof(size_t) * ndims)
* countp = <size_t *>malloc(sizeof(size_t) * ndims)
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4344, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4430, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_sl = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4345
+ /* "netCDF4/_netCDF4.pyx":4431
* negstride = 0
* sl = []
* startp = <size_t *>malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<<
@@ -45836,7 +50033,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":4346
+ /* "netCDF4/_netCDF4.pyx":4432
* sl = []
* startp = <size_t *>malloc(sizeof(size_t) * ndims)
* countp = <size_t *>malloc(sizeof(size_t) * ndims) # <<<<<<<<<<<<<<
@@ -45845,7 +50042,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":4347
+ /* "netCDF4/_netCDF4.pyx":4433
* startp = <size_t *>malloc(sizeof(size_t) * ndims)
* countp = <size_t *>malloc(sizeof(size_t) * ndims)
* stridep = <ptrdiff_t *>malloc(sizeof(ptrdiff_t) * ndims) # <<<<<<<<<<<<<<
@@ -45854,7 +50051,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":4348
+ /* "netCDF4/_netCDF4.pyx":4434
* countp = <size_t *>malloc(sizeof(size_t) * ndims)
* stridep = <ptrdiff_t *>malloc(sizeof(ptrdiff_t) * ndims)
* for n from 0 <= n < ndims: # <<<<<<<<<<<<<<
@@ -45864,50 +50061,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":4349
+ /* "netCDF4/_netCDF4.pyx":4435
* stridep = <ptrdiff_t *>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, 4349, __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, 4435, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4349, __pyx_L1_error)
+ __pyx_t_6 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4435, __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, 4349, __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, 4435, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":4350
+ /* "netCDF4/_netCDF4.pyx":4436
* 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, 4350, __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, 4436, __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, 4350, __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, 4436, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
(__pyx_v_countp[__pyx_v_n]) = __pyx_t_8;
- /* "netCDF4/_netCDF4.pyx":4352
+ /* "netCDF4/_netCDF4.pyx":4438
* 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, 4352, __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, 4438, __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, 4352, __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, 4438, __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, 4352, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4438, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_5) {
- /* "netCDF4/_netCDF4.pyx":4353
+ /* "netCDF4/_netCDF4.pyx":4439
* # for neg strides, reverse order (then flip that axis after data read in)
* if stride[n] < 0:
* negstride = 1 # <<<<<<<<<<<<<<
@@ -45916,75 +50113,75 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
__pyx_v_negstride = 1;
- /* "netCDF4/_netCDF4.pyx":4354
+ /* "netCDF4/_netCDF4.pyx":4440
* 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, 4354, __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, 4440, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4354, __pyx_L1_error)
+ __pyx_t_6 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4440, __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, 4354, __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, 4440, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
(__pyx_v_stridep[__pyx_v_n]) = __pyx_t_9;
- /* "netCDF4/_netCDF4.pyx":4355
+ /* "netCDF4/_netCDF4.pyx":4441
* 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, 4355, __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, 4441, __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, 4355, __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, 4441, __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, 4355, __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, 4441, __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, 4355, __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, 4441, __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, 4355, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4441, __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, 4355, __pyx_L1_error)
+ __pyx_t_10 = PyNumber_Add(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4441, __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, 4355, __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, 4441, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
(__pyx_v_startp[__pyx_v_n]) = __pyx_t_8;
- /* "netCDF4/_netCDF4.pyx":4356
+ /* "netCDF4/_netCDF4.pyx":4442
* 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, 4356, __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, 4442, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_4 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4356, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4442, __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, 4356, __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, 4442, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":4357
+ /* "netCDF4/_netCDF4.pyx":4443
* 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__76); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4357, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__79); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4443, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4352
+ /* "netCDF4/_netCDF4.pyx":4438
* countp[n] = count[n]
* # for neg strides, reverse order (then flip that axis after data read in)
* if stride[n] < 0: # <<<<<<<<<<<<<<
@@ -45994,7 +50191,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
goto __pyx_L8;
}
- /* "netCDF4/_netCDF4.pyx":4359
+ /* "netCDF4/_netCDF4.pyx":4445
* sl.append(slice(None, None, -1)) # this slice will reverse the data
* else:
* startp[n] = start[n] # <<<<<<<<<<<<<<
@@ -46002,125 +50199,143 @@ 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, 4359, __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, 4445, __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, 4359, __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, 4445, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
(__pyx_v_startp[__pyx_v_n]) = __pyx_t_8;
- /* "netCDF4/_netCDF4.pyx":4360
+ /* "netCDF4/_netCDF4.pyx":4446
* 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, 4360, __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, 4446, __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, 4360, __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, 4446, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
(__pyx_v_stridep[__pyx_v_n]) = __pyx_t_9;
- /* "netCDF4/_netCDF4.pyx":4361
+ /* "netCDF4/_netCDF4.pyx":4447
* 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__77); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4361, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__80); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4447, __pyx_L1_error)
}
__pyx_L8:;
}
- /* "netCDF4/_netCDF4.pyx":4362
+ /* "netCDF4/_netCDF4.pyx":4448
* 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, 4362, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4448, __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, 4362, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4448, __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, 4362, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isenum); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4448, __pyx_L1_error)
__pyx_t_5 = __pyx_t_12;
__pyx_L10_bool_binop_done:;
if (__pyx_t_5) {
- /* "netCDF4/_netCDF4.pyx":4363
+ /* "netCDF4/_netCDF4.pyx":4449
* 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, 4363, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4449, __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, 4363, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4449, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = NULL;
- __pyx_t_2 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_2 = 1;
+ __pyx_t_7 = 1;
}
}
- __pyx_t_1 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4363, __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;
+ #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, 4449, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #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, 4449, __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, 4449, __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;
+ }
+ __Pyx_INCREF(__pyx_v_shapeout);
+ __Pyx_GIVEREF(__pyx_v_shapeout);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_v_shapeout);
+ __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, 4449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- __Pyx_INCREF(__pyx_v_shapeout);
- __Pyx_GIVEREF(__pyx_v_shapeout);
- PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_2, __pyx_v_shapeout);
- __Pyx_INCREF(__pyx_v_self->dtype);
- __Pyx_GIVEREF(__pyx_v_self->dtype);
- PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_2, __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, 4363, __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, 4363, __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, 4449, __pyx_L1_error)
__pyx_v_data = ((PyArrayObject *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":4365
+ /* "netCDF4/_netCDF4.pyx":4451
* 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, 4365, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4451, __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, 4365, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4451, __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, 4365, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4451, __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, 4365, __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, 4451, __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, 4365, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4451, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (!__pyx_t_12) {
} else {
@@ -46132,7 +50347,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":4366
+ /* "netCDF4/_netCDF4.pyx":4452
* # strides all 1 or scalar variable, use get_vara (faster)
* if sum(stride) == ndims or ndims == 0:
* with nogil: # <<<<<<<<<<<<<<
@@ -46146,7 +50361,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4367
+ /* "netCDF4/_netCDF4.pyx":4453
* if sum(stride) == ndims or ndims == 0:
* with nogil:
* ierr = nc_get_vara(self._grpid, self._varid, # <<<<<<<<<<<<<<
@@ -46156,7 +50371,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":4366
+ /* "netCDF4/_netCDF4.pyx":4452
* # strides all 1 or scalar variable, use get_vara (faster)
* if sum(stride) == ndims or ndims == 0:
* with nogil: # <<<<<<<<<<<<<<
@@ -46174,7 +50389,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
}
}
- /* "netCDF4/_netCDF4.pyx":4365
+ /* "netCDF4/_netCDF4.pyx":4451
* data = numpy.empty(shapeout, self.dtype)
* # strides all 1 or scalar variable, use get_vara (faster)
* if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<<
@@ -46184,7 +50399,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
goto __pyx_L13;
}
- /* "netCDF4/_netCDF4.pyx":4370
+ /* "netCDF4/_netCDF4.pyx":4456
* startp, countp, data.data)
* else:
* with nogil: # <<<<<<<<<<<<<<
@@ -46199,7 +50414,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4371
+ /* "netCDF4/_netCDF4.pyx":4457
* else:
* with nogil:
* ierr = nc_get_vars(self._grpid, self._varid, # <<<<<<<<<<<<<<
@@ -46209,7 +50424,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":4370
+ /* "netCDF4/_netCDF4.pyx":4456
* startp, countp, data.data)
* else:
* with nogil: # <<<<<<<<<<<<<<
@@ -46229,7 +50444,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
}
__pyx_L13:;
- /* "netCDF4/_netCDF4.pyx":4373
+ /* "netCDF4/_netCDF4.pyx":4459
* ierr = nc_get_vars(self._grpid, self._varid,
* startp, countp, stridep, data.data)
* if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<<
@@ -46239,7 +50454,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":4374
+ /* "netCDF4/_netCDF4.pyx":4460
* startp, countp, stridep, data.data)
* if ierr == NC_EINVALCOORDS:
* raise IndexError # <<<<<<<<<<<<<<
@@ -46247,9 +50462,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*/
__Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
- __PYX_ERR(0, 4374, __pyx_L1_error)
+ __PYX_ERR(0, 4460, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4373
+ /* "netCDF4/_netCDF4.pyx":4459
* ierr = nc_get_vars(self._grpid, self._varid,
* startp, countp, stridep, data.data)
* if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<<
@@ -46258,7 +50473,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4375
+ /* "netCDF4/_netCDF4.pyx":4461
* if ierr == NC_EINVALCOORDS:
* raise IndexError
* elif ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -46268,7 +50483,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":4376
+ /* "netCDF4/_netCDF4.pyx":4462
* raise IndexError
* elif ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -46276,22 +50491,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, 4376, __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, 4462, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4376, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4462, __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, 4376, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4462, __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, 4376, __pyx_L1_error)
+ __PYX_ERR(0, 4462, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4375
+ /* "netCDF4/_netCDF4.pyx":4461
* if ierr == NC_EINVALCOORDS:
* raise IndexError
* elif ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -46300,7 +50515,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4362
+ /* "netCDF4/_netCDF4.pyx":4448
* stridep[n] = stride[n]
* sl.append(slice(None,None, 1))
* if self._isprimitive or self._iscompound or self._isenum: # <<<<<<<<<<<<<<
@@ -46310,70 +50525,88 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
goto __pyx_L9;
}
- /* "netCDF4/_netCDF4.pyx":4377
+ /* "netCDF4/_netCDF4.pyx":4463
* elif ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 4377, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4463, __pyx_L1_error)
if (__pyx_t_5) {
- /* "netCDF4/_netCDF4.pyx":4379
+ /* "netCDF4/_netCDF4.pyx":4465
* 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, 4379, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4465, __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, 4379, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4465, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = NULL;
- __pyx_t_2 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_2 = 1;
+ __pyx_t_7 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4379, __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;
- }
- __Pyx_INCREF(__pyx_v_shapeout);
- __Pyx_GIVEREF(__pyx_v_shapeout);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_2, __pyx_v_shapeout);
- __Pyx_INCREF(__pyx_n_s_O);
- __Pyx_GIVEREF(__pyx_n_s_O);
- PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_2, __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, 4379, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ #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, 4465, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 4465, __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, 4465, __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;
+ }
+ __Pyx_INCREF(__pyx_v_shapeout);
+ __Pyx_GIVEREF(__pyx_v_shapeout);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_7, __pyx_v_shapeout);
+ __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, 4465, __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, 4379, __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, 4465, __pyx_L1_error)
__pyx_v_data = ((PyArrayObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4381
+ /* "netCDF4/_netCDF4.pyx":4467
* 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, 4381, __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, 4467, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_10 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -46383,78 +50616,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, 4381, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4467, __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, 4381, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4467, __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, 4381, __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, 4467, __pyx_L1_error)
__Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_1));
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4382
+ /* "netCDF4/_netCDF4.pyx":4468
* # 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, 4382, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_npy_intp(PyArray_SIZE(__pyx_v_data)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4468, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_totelem = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4383
+ /* "netCDF4/_netCDF4.pyx":4469
* 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, 4383, __pyx_L1_error)
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4383, __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, 4469, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4469, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_5) {
- /* "netCDF4/_netCDF4.pyx":4386
+ /* "netCDF4/_netCDF4.pyx":4472
* # vlen string (NC_STRING)
* # allocate pointer array to hold string data.
* strdata = <char **>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, 4386, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(char *))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4472, __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, 4386, __pyx_L1_error)
+ __pyx_t_6 = PyNumber_Multiply(__pyx_t_1, __pyx_v_totelem); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4472, __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, 4386, __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, 4472, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_v_strdata = ((char **)malloc(__pyx_t_8));
- /* "netCDF4/_netCDF4.pyx":4388
+ /* "netCDF4/_netCDF4.pyx":4474
* strdata = <char **>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, 4388, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4474, __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, 4388, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4474, __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, 4388, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4474, __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, 4388, __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, 4474, __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, 4388, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4474, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (!__pyx_t_12) {
} else {
@@ -46466,7 +50699,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":4389
+ /* "netCDF4/_netCDF4.pyx":4475
* # strides all 1 or scalar variable, use get_vara (faster)
* if sum(stride) == ndims or ndims == 0:
* with nogil: # <<<<<<<<<<<<<<
@@ -46480,7 +50713,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4390
+ /* "netCDF4/_netCDF4.pyx":4476
* if sum(stride) == ndims or ndims == 0:
* with nogil:
* ierr = nc_get_vara(self._grpid, self._varid, # <<<<<<<<<<<<<<
@@ -46490,7 +50723,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":4389
+ /* "netCDF4/_netCDF4.pyx":4475
* # strides all 1 or scalar variable, use get_vara (faster)
* if sum(stride) == ndims or ndims == 0:
* with nogil: # <<<<<<<<<<<<<<
@@ -46508,7 +50741,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
}
}
- /* "netCDF4/_netCDF4.pyx":4388
+ /* "netCDF4/_netCDF4.pyx":4474
* strdata = <char **>malloc(sizeof(char *) * totelem)
* # strides all 1 or scalar variable, use get_vara (faster)
* if sum(stride) == ndims or ndims == 0: # <<<<<<<<<<<<<<
@@ -46518,7 +50751,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
goto __pyx_L24;
}
- /* "netCDF4/_netCDF4.pyx":4394
+ /* "netCDF4/_netCDF4.pyx":4480
* else:
* # FIXME: is this a bug in netCDF4?
* raise IndexError('strides must all be 1 for string variables') # <<<<<<<<<<<<<<
@@ -46526,15 +50759,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__78, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4394, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4480, __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, 4394, __pyx_L1_error)
+ __PYX_ERR(0, 4480, __pyx_L1_error)
}
__pyx_L24:;
- /* "netCDF4/_netCDF4.pyx":4397
+ /* "netCDF4/_netCDF4.pyx":4483
* #ierr = nc_get_vars(self._grpid, self._varid,
* # startp, countp, stridep, strdata)
* if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<<
@@ -46544,7 +50777,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":4398
+ /* "netCDF4/_netCDF4.pyx":4484
* # startp, countp, stridep, strdata)
* if ierr == NC_EINVALCOORDS:
* raise IndexError # <<<<<<<<<<<<<<
@@ -46552,9 +50785,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*/
__Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
- __PYX_ERR(0, 4398, __pyx_L1_error)
+ __PYX_ERR(0, 4484, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4397
+ /* "netCDF4/_netCDF4.pyx":4483
* #ierr = nc_get_vars(self._grpid, self._varid,
* # startp, countp, stridep, strdata)
* if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<<
@@ -46563,7 +50796,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4399
+ /* "netCDF4/_netCDF4.pyx":4485
* if ierr == NC_EINVALCOORDS:
* raise IndexError
* elif ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -46573,7 +50806,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":4400
+ /* "netCDF4/_netCDF4.pyx":4486
* raise IndexError
* elif ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -46581,22 +50814,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, 4400, __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, 4486, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4400, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4486, __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, 4400, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4486, __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, 4400, __pyx_L1_error)
+ __PYX_ERR(0, 4486, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4399
+ /* "netCDF4/_netCDF4.pyx":4485
* if ierr == NC_EINVALCOORDS:
* raise IndexError
* elif ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -46605,32 +50838,37 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4403
+ /* "netCDF4/_netCDF4.pyx":4489
* # loop over elements of object array, fill array with
* # contents of strdata.
* for i from 0<=i<totelem: # <<<<<<<<<<<<<<
* data[i] = strdata[i].decode(default_encoding)
* # reshape the output array
*/
- __pyx_t_14 = __Pyx_PyInt_As_long(__pyx_v_totelem); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4403, __pyx_L1_error)
- for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) {
+ __pyx_t_14 = __Pyx_PyInt_As_long(__pyx_v_totelem); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4489, __pyx_L1_error)
+ for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15++) {
+ __pyx_t_10 = __Pyx_PyInt_From_long(__pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4489, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_10);
+ __pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":4404
+ /* "netCDF4/_netCDF4.pyx":4490
* # contents of strdata.
* for i from 0<=i<totelem:
* data[i] = strdata[i].decode(default_encoding) # <<<<<<<<<<<<<<
* # reshape the output array
* data = numpy.reshape(data, shapeout)
*/
- __pyx_t_6 = __Pyx_PyBytes_FromString((__pyx_v_strdata[__pyx_v_i])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4404, __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, 4490, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyBytes_FromString((__pyx_v_strdata[__pyx_t_2])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4490, __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, 4404, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4490, __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, 4404, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4490, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -46640,79 +50878,130 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
}
}
if (!__pyx_t_4) {
- __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4404, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4490, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_10);
} else {
- __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4404, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4); __pyx_t_4 = NULL;
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_6);
- __pyx_t_6 = 0;
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4404, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4490, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4490, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4490, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_16, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4490, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_data), __pyx_v_i, __pyx_t_10, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) __PYX_ERR(0, 4404, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_data), __pyx_v_i, __pyx_t_10) < 0)) __PYX_ERR(0, 4490, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_15 = __Pyx_PyInt_As_long(__pyx_v_i); if (unlikely((__pyx_t_15 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4489, __pyx_L1_error)
}
- /* "netCDF4/_netCDF4.pyx":4406
+ /* "netCDF4/_netCDF4.pyx":4489
+ * # loop over elements of object array, fill array with
+ * # contents of strdata.
+ * for i from 0<=i<totelem: # <<<<<<<<<<<<<<
+ * data[i] = strdata[i].decode(default_encoding)
+ * # reshape the output array
+ */
+ __pyx_t_10 = __Pyx_PyInt_From_long(__pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4489, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_10);
+ __pyx_t_10 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":4492
* data[i] = strdata[i].decode(default_encoding)
* # reshape the output array
* data = numpy.reshape(data, shapeout) # <<<<<<<<<<<<<<
* # free string data internally allocated in netcdf C lib
* ierr = nc_free_string(totelem, strdata)
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4406, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4492, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_reshape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4406, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_reshape); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = NULL;
- __pyx_t_2 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_15))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_15);
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_16);
if (likely(__pyx_t_1)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_15, function);
- __pyx_t_2 = 1;
+ __Pyx_DECREF_SET(__pyx_t_16, function);
+ __pyx_t_7 = 1;
}
}
- __pyx_t_6 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4406, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- if (__pyx_t_1) {
- __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_16)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_data), __pyx_v_shapeout};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4492, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_data), __pyx_v_shapeout};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4492, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_1) {
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ }
+ __Pyx_INCREF(((PyObject *)__pyx_v_data));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, ((PyObject *)__pyx_v_data));
+ __Pyx_INCREF(__pyx_v_shapeout);
+ __Pyx_GIVEREF(__pyx_v_shapeout);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_shapeout);
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
- __Pyx_INCREF(((PyObject *)__pyx_v_data));
- __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
- PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_2, ((PyObject *)__pyx_v_data));
- __Pyx_INCREF(__pyx_v_shapeout);
- __Pyx_GIVEREF(__pyx_v_shapeout);
- PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_2, __pyx_v_shapeout);
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4406, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4406, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4492, __pyx_L1_error)
__Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_10));
__pyx_t_10 = 0;
- /* "netCDF4/_netCDF4.pyx":4408
+ /* "netCDF4/_netCDF4.pyx":4494
* data = numpy.reshape(data, shapeout)
* # free string data internally allocated in netcdf C lib
* ierr = nc_free_string(totelem, strdata) # <<<<<<<<<<<<<<
* # free the pointer array
* free(strdata)
*/
- __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_v_totelem); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4408, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_v_totelem); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4494, __pyx_L1_error)
__pyx_v_ierr = nc_free_string(__pyx_t_8, __pyx_v_strdata);
- /* "netCDF4/_netCDF4.pyx":4410
+ /* "netCDF4/_netCDF4.pyx":4496
* ierr = nc_free_string(totelem, strdata)
* # free the pointer array
* free(strdata) # <<<<<<<<<<<<<<
@@ -46721,7 +51010,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
free(__pyx_v_strdata);
- /* "netCDF4/_netCDF4.pyx":4383
+ /* "netCDF4/_netCDF4.pyx":4469
* data = data.flatten()
* totelem = PyArray_SIZE(data)
* if self.dtype == str: # <<<<<<<<<<<<<<
@@ -46731,56 +51020,144 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
goto __pyx_L23;
}
- /* "netCDF4/_netCDF4.pyx":4414
+ /* "netCDF4/_netCDF4.pyx":4500
* # regular vlen
* # allocate struct array to hold vlen data.
* vldata = <nc_vlen_t *>malloc(totelem*sizeof(nc_vlen_t)) # <<<<<<<<<<<<<<
- * # strides all 1 or scalar variable, use get_vara (faster)
- * if sum(stride) == ndims or ndims == 0:
+ * for i in range(totelem):
+ * vldata[i].len = 0
*/
/*else*/ {
- __pyx_t_10 = __Pyx_PyInt_FromSize_t((sizeof(nc_vlen_t))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4414, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyInt_FromSize_t((sizeof(nc_vlen_t))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4500, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_15 = PyNumber_Multiply(__pyx_v_totelem, __pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4414, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = PyNumber_Multiply(__pyx_v_totelem, __pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4500, __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_15); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4414, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 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, 4500, __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":4416
+ /* "netCDF4/_netCDF4.pyx":4501
+ * # allocate struct array to hold vlen data.
* vldata = <nc_vlen_t *>malloc(totelem*sizeof(nc_vlen_t))
+ * for i in range(totelem): # <<<<<<<<<<<<<<
+ * vldata[i].len = 0
+ * vldata[i].p = <void*>0
+ */
+ __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4501, __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, 4501, __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, 4501, __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, 4501, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_3)) {
+ 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, 4501, __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, 4501, __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, 4501, __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, 4501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ #endif
+ }
+ } else {
+ __pyx_t_10 = __pyx_t_3(__pyx_t_16);
+ if (unlikely(!__pyx_t_10)) {
+ 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, 4501, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_10);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_10);
+ __pyx_t_10 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":4502
+ * vldata = <nc_vlen_t *>malloc(totelem*sizeof(nc_vlen_t))
+ * for i in range(totelem):
+ * vldata[i].len = 0 # <<<<<<<<<<<<<<
+ * vldata[i].p = <void*>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, 4502, __pyx_L1_error)
+ (__pyx_v_vldata[__pyx_t_17]).len = 0;
+
+ /* "netCDF4/_netCDF4.pyx":4503
+ * for i in range(totelem):
+ * vldata[i].len = 0
+ * vldata[i].p = <void*>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, 4503, __pyx_L1_error)
+ (__pyx_v_vldata[__pyx_t_17]).p = ((void *)0);
+
+ /* "netCDF4/_netCDF4.pyx":4501
+ * # allocate struct array to hold vlen data.
+ * vldata = <nc_vlen_t *>malloc(totelem*sizeof(nc_vlen_t))
+ * for i in range(totelem): # <<<<<<<<<<<<<<
+ * vldata[i].len = 0
+ * vldata[i].p = <void*>0
+ */
+ }
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":4505
+ * vldata[i].p = <void*>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_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4416, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
__Pyx_INCREF(__pyx_v_stride);
__Pyx_GIVEREF(__pyx_v_stride);
- PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_stride);
- __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_15, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4416, __pyx_L1_error)
+ 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, 4505, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4416, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __pyx_t_6 = PyObject_RichCompare(__pyx_t_10, __pyx_t_15, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4416, __pyx_L1_error)
+ __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, 4505, __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, 4505, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4416, __pyx_L1_error)
+ __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, 4505, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (!__pyx_t_12) {
} else {
__pyx_t_5 = __pyx_t_12;
- goto __pyx_L34_bool_binop_done;
+ goto __pyx_L36_bool_binop_done;
}
__pyx_t_12 = ((__pyx_v_ndims == 0) != 0);
__pyx_t_5 = __pyx_t_12;
- __pyx_L34_bool_binop_done:;
+ __pyx_L36_bool_binop_done:;
if (__pyx_t_5) {
- /* "netCDF4/_netCDF4.pyx":4417
+ /* "netCDF4/_netCDF4.pyx":4506
* # strides all 1 or scalar variable, use get_vara (faster)
* if sum(stride) == ndims or ndims == 0:
* with nogil: # <<<<<<<<<<<<<<
@@ -46794,7 +51171,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4418
+ /* "netCDF4/_netCDF4.pyx":4507
* if sum(stride) == ndims or ndims == 0:
* with nogil:
* ierr = nc_get_vara(self._grpid, self._varid, # <<<<<<<<<<<<<<
@@ -46804,7 +51181,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":4417
+ /* "netCDF4/_netCDF4.pyx":4506
* # strides all 1 or scalar variable, use get_vara (faster)
* if sum(stride) == ndims or ndims == 0:
* with nogil: # <<<<<<<<<<<<<<
@@ -46816,23 +51193,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
#ifdef WITH_THREAD
Py_BLOCK_THREADS
#endif
- goto __pyx_L38;
+ goto __pyx_L40;
}
- __pyx_L38:;
+ __pyx_L40:;
}
}
- /* "netCDF4/_netCDF4.pyx":4416
- * vldata = <nc_vlen_t *>malloc(totelem*sizeof(nc_vlen_t))
+ /* "netCDF4/_netCDF4.pyx":4505
+ * vldata[i].p = <void*>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,
*/
- goto __pyx_L33;
+ goto __pyx_L35;
}
- /* "netCDF4/_netCDF4.pyx":4421
+ /* "netCDF4/_netCDF4.pyx":4510
* startp, countp, vldata)
* else:
* raise IndexError('strides must all be 1 for vlen variables') # <<<<<<<<<<<<<<
@@ -46840,15 +51217,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__79, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4421, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4510, __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, 4421, __pyx_L1_error)
+ __PYX_ERR(0, 4510, __pyx_L1_error)
}
- __pyx_L33:;
+ __pyx_L35:;
- /* "netCDF4/_netCDF4.pyx":4424
+ /* "netCDF4/_netCDF4.pyx":4513
* #ierr = nc_get_vars(self._grpid, self._varid,
* # startp, countp, stridep, vldata)
* if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<<
@@ -46858,7 +51235,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":4425
+ /* "netCDF4/_netCDF4.pyx":4514
* # startp, countp, stridep, vldata)
* if ierr == NC_EINVALCOORDS:
* raise IndexError # <<<<<<<<<<<<<<
@@ -46866,9 +51243,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
*/
__Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
- __PYX_ERR(0, 4425, __pyx_L1_error)
+ __PYX_ERR(0, 4514, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4424
+ /* "netCDF4/_netCDF4.pyx":4513
* #ierr = nc_get_vars(self._grpid, self._varid,
* # startp, countp, stridep, vldata)
* if ierr == NC_EINVALCOORDS: # <<<<<<<<<<<<<<
@@ -46877,7 +51254,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4426
+ /* "netCDF4/_netCDF4.pyx":4515
* if ierr == NC_EINVALCOORDS:
* raise IndexError
* elif ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -46887,7 +51264,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":4427
+ /* "netCDF4/_netCDF4.pyx":4516
* raise IndexError
* elif ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -46895,22 +51272,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, 4427, __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, 4516, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4427, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4516, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
__Pyx_INCREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_15, 0, __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_15, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4427, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_16, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4516, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __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, 4427, __pyx_L1_error)
+ __PYX_ERR(0, 4516, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4426
+ /* "netCDF4/_netCDF4.pyx":4515
* if ierr == NC_EINVALCOORDS:
* raise IndexError
* elif ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -46919,148 +51296,205 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4430
+ /* "netCDF4/_netCDF4.pyx":4519
* # loop over elements of object array, fill array with
* # contents of vlarray struct, put array in object array.
* for i from 0<=i<totelem: # <<<<<<<<<<<<<<
* arrlen = vldata[i].len
* dataarr = numpy.empty(arrlen, self.dtype)
*/
- __pyx_t_14 = __Pyx_PyInt_As_long(__pyx_v_totelem); if (unlikely((__pyx_t_14 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4430, __pyx_L1_error)
- for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) {
+ __pyx_t_15 = __Pyx_PyInt_As_long(__pyx_v_totelem); if (unlikely((__pyx_t_15 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 4519, __pyx_L1_error)
+ for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_15; __pyx_t_14++) {
+ __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4519, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
+ __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":4431
+ /* "netCDF4/_netCDF4.pyx":4520
* # contents of vlarray struct, put array in object array.
* for i from 0<=i<totelem:
* arrlen = vldata[i].len # <<<<<<<<<<<<<<
* dataarr = numpy.empty(arrlen, self.dtype)
* #dataarr.data = <char *>vldata[i].p
*/
- __pyx_t_8 = (__pyx_v_vldata[__pyx_v_i]).len;
+ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4520, __pyx_L1_error)
+ __pyx_t_8 = (__pyx_v_vldata[__pyx_t_2]).len;
__pyx_v_arrlen = __pyx_t_8;
- /* "netCDF4/_netCDF4.pyx":4432
+ /* "netCDF4/_netCDF4.pyx":4521
* for i from 0<=i<totelem:
* arrlen = vldata[i].len
* dataarr = numpy.empty(arrlen, self.dtype) # <<<<<<<<<<<<<<
* #dataarr.data = <char *>vldata[i].p
* memcpy(<void*>dataarr.data, vldata[i].p, dataarr.nbytes)
*/
- __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4432, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4432, __pyx_L1_error)
+ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4521, __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, 4521, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __pyx_t_15 = __Pyx_PyInt_FromSize_t(__pyx_v_arrlen); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4432, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __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, 4521, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
__pyx_t_1 = NULL;
- __pyx_t_2 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_10, function);
- __pyx_t_2 = 1;
+ __pyx_t_7 = 1;
}
}
- __pyx_t_4 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4432, __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;
+ #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, 4521, __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
+ #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, 4521, __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, 4521, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_t_16);
+ __Pyx_INCREF(__pyx_v_self->dtype);
+ __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, 4521, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
- __Pyx_GIVEREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_2, __pyx_t_15);
- __Pyx_INCREF(__pyx_v_self->dtype);
- __Pyx_GIVEREF(__pyx_v_self->dtype);
- PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_2, __pyx_v_self->dtype);
- __pyx_t_15 = 0;
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4432, __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, 4432, __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, 4521, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_dataarr, ((PyArrayObject *)__pyx_t_6));
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":4434
+ /* "netCDF4/_netCDF4.pyx":4523
* dataarr = numpy.empty(arrlen, self.dtype)
* #dataarr.data = <char *>vldata[i].p
* memcpy(<void*>dataarr.data, vldata[i].p, dataarr.nbytes) # <<<<<<<<<<<<<<
* data[i] = dataarr
* # reshape the output array
*/
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dataarr), __pyx_n_s_nbytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4434, __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, 4523, __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, 4523, __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, 4434, __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, 4523, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- memcpy(((void *)__pyx_v_dataarr->data), (__pyx_v_vldata[__pyx_v_i]).p, __pyx_t_8);
+ memcpy(((void *)__pyx_v_dataarr->data), (__pyx_v_vldata[__pyx_t_2]).p, __pyx_t_8);
- /* "netCDF4/_netCDF4.pyx":4435
+ /* "netCDF4/_netCDF4.pyx":4524
* #dataarr.data = <char *>vldata[i].p
* memcpy(<void*>dataarr.data, vldata[i].p, dataarr.nbytes)
* data[i] = dataarr # <<<<<<<<<<<<<<
* # reshape the output array
* data = numpy.reshape(data, shapeout)
*/
- if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_data), __pyx_v_i, ((PyObject *)__pyx_v_dataarr), long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) __PYX_ERR(0, 4435, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_data), __pyx_v_i, ((PyObject *)__pyx_v_dataarr)) < 0)) __PYX_ERR(0, 4524, __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, 4519, __pyx_L1_error)
}
- /* "netCDF4/_netCDF4.pyx":4437
+ /* "netCDF4/_netCDF4.pyx":4519
+ * # loop over elements of object array, fill array with
+ * # contents of vlarray struct, put array in object array.
+ * for i from 0<=i<totelem: # <<<<<<<<<<<<<<
+ * arrlen = vldata[i].len
+ * dataarr = numpy.empty(arrlen, self.dtype)
+ */
+ __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4519, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":4526
* data[i] = dataarr
* # reshape the output array
* data = numpy.reshape(data, shapeout) # <<<<<<<<<<<<<<
* # free vlen data internally allocated in netcdf C lib
* ierr = nc_free_vlens(totelem, vldata)
*/
- __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4437, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4526, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4437, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4526, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = NULL;
- __pyx_t_2 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
__Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_4, function);
- __pyx_t_2 = 1;
+ __pyx_t_7 = 1;
}
}
- __pyx_t_15 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4437, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- if (__pyx_t_10) {
- __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, ((PyObject *)__pyx_v_data), __pyx_v_shapeout};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4526, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, ((PyObject *)__pyx_v_data), __pyx_v_shapeout};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4526, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ {
+ __pyx_t_16 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4526, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ if (__pyx_t_10) {
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ }
+ __Pyx_INCREF(((PyObject *)__pyx_v_data));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
+ PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_7, ((PyObject *)__pyx_v_data));
+ __Pyx_INCREF(__pyx_v_shapeout);
+ __Pyx_GIVEREF(__pyx_v_shapeout);
+ PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_7, __pyx_v_shapeout);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_16, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4526, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
}
- __Pyx_INCREF(((PyObject *)__pyx_v_data));
- __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
- PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_2, ((PyObject *)__pyx_v_data));
- __Pyx_INCREF(__pyx_v_shapeout);
- __Pyx_GIVEREF(__pyx_v_shapeout);
- PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_2, __pyx_v_shapeout);
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4437, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4437, __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, 4526, __pyx_L1_error)
__Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_6));
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":4439
+ /* "netCDF4/_netCDF4.pyx":4528
* data = numpy.reshape(data, shapeout)
* # free vlen data internally allocated in netcdf C lib
* ierr = nc_free_vlens(totelem, vldata) # <<<<<<<<<<<<<<
* # free the pointer array
* free(vldata)
*/
- __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_v_totelem); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4439, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_v_totelem); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 4528, __pyx_L1_error)
__pyx_v_ierr = nc_free_vlens(__pyx_t_8, __pyx_v_vldata);
- /* "netCDF4/_netCDF4.pyx":4441
+ /* "netCDF4/_netCDF4.pyx":4530
* ierr = nc_free_vlens(totelem, vldata)
* # free the pointer array
* free(vldata) # <<<<<<<<<<<<<<
@@ -47071,7 +51505,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
}
__pyx_L23:;
- /* "netCDF4/_netCDF4.pyx":4377
+ /* "netCDF4/_netCDF4.pyx":4463
* elif ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* elif self._isvlen: # <<<<<<<<<<<<<<
@@ -47081,7 +51515,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
}
__pyx_L9:;
- /* "netCDF4/_netCDF4.pyx":4442
+ /* "netCDF4/_netCDF4.pyx":4531
* # free the pointer array
* free(vldata)
* free(startp) # <<<<<<<<<<<<<<
@@ -47090,7 +51524,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
free(__pyx_v_startp);
- /* "netCDF4/_netCDF4.pyx":4443
+ /* "netCDF4/_netCDF4.pyx":4532
* free(vldata)
* free(startp)
* free(countp) # <<<<<<<<<<<<<<
@@ -47099,7 +51533,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
free(__pyx_v_countp);
- /* "netCDF4/_netCDF4.pyx":4444
+ /* "netCDF4/_netCDF4.pyx":4533
* free(startp)
* free(countp)
* free(stridep) # <<<<<<<<<<<<<<
@@ -47108,7 +51542,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
free(__pyx_v_stridep);
- /* "netCDF4/_netCDF4.pyx":4445
+ /* "netCDF4/_netCDF4.pyx":4534
* free(countp)
* free(stridep)
* if negstride: # <<<<<<<<<<<<<<
@@ -47118,42 +51552,42 @@ 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":4447
+ /* "netCDF4/_netCDF4.pyx":4536
* 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, 4447, __pyx_L1_error) }
- __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4447, __pyx_L1_error)
+ if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4536, __pyx_L1_error) }
+ __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4536, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4447, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4536, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_15))) {
- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_16);
if (likely(__pyx_t_4)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
__Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_15, function);
+ __Pyx_DECREF_SET(__pyx_t_16, function);
}
}
if (__pyx_t_4) {
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4447, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4536, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4447, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4536, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) __PYX_ERR(0, 4447, __pyx_L1_error)
+ __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, 4536, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_6));
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":4445
+ /* "netCDF4/_netCDF4.pyx":4534
* free(countp)
* free(stridep)
* if negstride: # <<<<<<<<<<<<<<
@@ -47162,92 +51596,92 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4453
+ /* "netCDF4/_netCDF4.pyx":4542
* # dtype of the returned numpy array matches the variable dtype.
* # (pull request #555, issue #554).
* if (self.endian() == 'big' and is_native_little) or\ # <<<<<<<<<<<<<<
* (self.endian() == 'little' and is_native_big):
* data.byteswap(True) # in-place byteswap
*/
- __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4453, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4542, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_15))) {
- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_16);
if (likely(__pyx_t_4)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
__Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_15, function);
+ __Pyx_DECREF_SET(__pyx_t_16, function);
}
}
if (__pyx_t_4) {
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4453, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4542, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4453, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4542, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4453, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4542, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (!__pyx_t_12) {
- goto __pyx_L45_next_or;
+ goto __pyx_L47_next_or;
} else {
}
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4453, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4542, __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, 4453, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4542, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (!__pyx_t_12) {
} else {
__pyx_t_5 = __pyx_t_12;
- goto __pyx_L44_bool_binop_done;
+ goto __pyx_L46_bool_binop_done;
}
- __pyx_L45_next_or:;
+ __pyx_L47_next_or:;
- /* "netCDF4/_netCDF4.pyx":4454
+ /* "netCDF4/_netCDF4.pyx":4543
* # (pull request #555, issue #554).
* if (self.endian() == 'big' and is_native_little) or\
* (self.endian() == 'little' and is_native_big): # <<<<<<<<<<<<<<
* data.byteswap(True) # in-place byteswap
* if not self.dimensions:
*/
- __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4454, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4543, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_15))) {
- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_16);
if (likely(__pyx_t_4)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
__Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_15, function);
+ __Pyx_DECREF_SET(__pyx_t_16, function);
}
}
if (__pyx_t_4) {
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4454, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4543, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4454, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4543, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_little, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4454, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_little, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4543, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_12) {
} else {
__pyx_t_5 = __pyx_t_12;
- goto __pyx_L44_bool_binop_done;
+ goto __pyx_L46_bool_binop_done;
}
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4454, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4543, __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, 4454, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 4543, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_5 = __pyx_t_12;
- __pyx_L44_bool_binop_done:;
+ __pyx_L46_bool_binop_done:;
- /* "netCDF4/_netCDF4.pyx":4453
+ /* "netCDF4/_netCDF4.pyx":4542
* # dtype of the returned numpy array matches the variable dtype.
* # (pull request #555, issue #554).
* if (self.endian() == 'big' and is_native_little) or\ # <<<<<<<<<<<<<<
@@ -47256,22 +51690,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
if (__pyx_t_5) {
- /* "netCDF4/_netCDF4.pyx":4455
+ /* "netCDF4/_netCDF4.pyx":4544
* if (self.endian() == 'big' and is_native_little) or\
* (self.endian() == 'little' and is_native_big):
* 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, 4455, __pyx_L1_error) }
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4455, __pyx_L1_error)
+ if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4544, __pyx_L1_error) }
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4544, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4455, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- /* "netCDF4/_netCDF4.pyx":4453
+ /* "netCDF4/_netCDF4.pyx":4542
* # dtype of the returned numpy array matches the variable dtype.
* # (pull request #555, issue #554).
* if (self.endian() == 'big' and is_native_little) or\ # <<<<<<<<<<<<<<
@@ -47280,21 +51714,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4456
+ /* "netCDF4/_netCDF4.pyx":4545
* (self.endian() == 'little' and is_native_big):
* data.byteswap(True) # in-place byteswap
* if not self.dimensions: # <<<<<<<<<<<<<<
* return data[0] # a scalar
* elif squeeze_out:
*/
- __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4456, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4456, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4545, __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":4457
+ /* "netCDF4/_netCDF4.pyx":4546
* data.byteswap(True) # in-place byteswap
* if not self.dimensions:
* return data[0] # a scalar # <<<<<<<<<<<<<<
@@ -47302,14 +51736,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, 4457, __pyx_L1_error) }
- __pyx_t_15 = __Pyx_GetItemInt(((PyObject *)__pyx_v_data), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4457, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __pyx_r = __pyx_t_15;
- __pyx_t_15 = 0;
+ if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4546, __pyx_L1_error) }
+ __pyx_t_16 = __Pyx_GetItemInt(((PyObject *)__pyx_v_data), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_r = __pyx_t_16;
+ __pyx_t_16 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4456
+ /* "netCDF4/_netCDF4.pyx":4545
* (self.endian() == 'little' and is_native_big):
* data.byteswap(True) # in-place byteswap
* if not self.dimensions: # <<<<<<<<<<<<<<
@@ -47318,7 +51752,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4458
+ /* "netCDF4/_netCDF4.pyx":4547
* if not self.dimensions:
* return data[0] # a scalar
* elif squeeze_out: # <<<<<<<<<<<<<<
@@ -47328,7 +51762,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
__pyx_t_12 = (__pyx_v_squeeze_out != 0);
if (__pyx_t_12) {
- /* "netCDF4/_netCDF4.pyx":4459
+ /* "netCDF4/_netCDF4.pyx":4548
* return data[0] # a scalar
* elif squeeze_out:
* return numpy.squeeze(data) # <<<<<<<<<<<<<<
@@ -47336,14 +51770,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
* return data
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4459, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4548, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4459, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4548, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4459, __pyx_L1_error) }
+ if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4548, __pyx_L1_error) }
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -47353,25 +51787,43 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
}
}
if (!__pyx_t_6) {
- __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_data)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4459, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_data)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
} else {
- __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4459, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = 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_15 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4459, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, ((PyObject *)__pyx_v_data)};
+ __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4548, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_16);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, ((PyObject *)__pyx_v_data)};
+ __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4548, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_16);
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = 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_16 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_r = __pyx_t_15;
- __pyx_t_15 = 0;
+ __pyx_r = __pyx_t_16;
+ __pyx_t_16 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4458
+ /* "netCDF4/_netCDF4.pyx":4547
* if not self.dimensions:
* return data[0] # a scalar
* elif squeeze_out: # <<<<<<<<<<<<<<
@@ -47380,22 +51832,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
*/
}
- /* "netCDF4/_netCDF4.pyx":4461
+ /* "netCDF4/_netCDF4.pyx":4550
* return numpy.squeeze(data)
* else:
* return data # <<<<<<<<<<<<<<
*
- * # Compound datatype support.
+ * def __reduce__(self):
*/
/*else*/ {
__Pyx_XDECREF(__pyx_r);
- if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4461, __pyx_L1_error) }
+ if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 4550, __pyx_L1_error) }
__Pyx_INCREF(((PyObject *)__pyx_v_data));
__pyx_r = ((PyObject *)__pyx_v_data);
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":4319
+ /* "netCDF4/_netCDF4.pyx":4405
* free(stridep)
*
* def _get(self,start,count,stride): # <<<<<<<<<<<<<<
@@ -47409,7 +51861,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_10);
- __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
__Pyx_AddTraceback("netCDF4._netCDF4.Variable._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -47419,12 +51871,71 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_66_get(struct __pyx_obj_7
__Pyx_XDECREF(__pyx_v_lendim);
__Pyx_XDECREF(__pyx_v_sl);
__Pyx_XDECREF(__pyx_v_totelem);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":4552
+ * return data
+ *
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * # raise error is user tries to pickle a Variable object.
+ * raise NotImplementedError('Variable is not picklable')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_69__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_69__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_8Variable_68__reduce__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_68__reduce__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce__", 0);
+
+ /* "netCDF4/_netCDF4.pyx":4554
+ * 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, 4554, __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, 4554, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":4552
+ * return data
+ *
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * # raise error is user tries to pickle a Variable object.
+ * raise NotImplementedError('Variable is not picklable')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netCDF4._netCDF4.Variable.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2857
+/* "netCDF4/_netCDF4.pyx":2898
* **`size`**: The number of stored elements.
* """
* cdef public int _varid, _grpid, _nunlimdim # <<<<<<<<<<<<<<
@@ -47451,7 +51962,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, 2857, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_varid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2898, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -47486,7 +51997,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, 2857, __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, 2898, __pyx_L1_error)
__pyx_v_self->_varid = __pyx_t_1;
/* function exit code */
@@ -47519,7 +52030,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, 2857, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2898, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -47554,7 +52065,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, 2857, __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, 2898, __pyx_L1_error)
__pyx_v_self->_grpid = __pyx_t_1;
/* function exit code */
@@ -47587,7 +52098,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, 2857, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_nunlimdim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2898, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -47622,7 +52133,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, 2857, __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, 2898, __pyx_L1_error)
__pyx_v_self->_nunlimdim = __pyx_t_1;
/* function exit code */
@@ -47636,7 +52147,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_10_nunlimdim_2__set__(struct __
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2858
+/* "netCDF4/_netCDF4.pyx":2899
* """
* cdef public int _varid, _grpid, _nunlimdim
* cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\ # <<<<<<<<<<<<<<
@@ -48253,7 +52764,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_11_iscompound_4__del__(struct _
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2859
+/* "netCDF4/_netCDF4.pyx":2900
* cdef public int _varid, _grpid, _nunlimdim
* cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\
* _isvlen, _isenum, _grp, _cmptype, _vltype, _enumtype,\ # <<<<<<<<<<<<<<
@@ -48783,7 +53294,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_9_enumtype_4__del__(struct __py
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":2860
+/* "netCDF4/_netCDF4.pyx":2901
* cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\
* _isvlen, _isenum, _grp, _cmptype, _vltype, _enumtype,\
* __orthogonal_indexing__, _has_lsd # <<<<<<<<<<<<<<
@@ -48965,7 +53476,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_8_has_lsd_4__del__(struct __pyx
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4482
+/* "netCDF4/_netCDF4.pyx":4575
* __pdoc__['CompoundType.dtype'] = \
* """A numpy dtype object describing the compound data type."""
* def __init__(self, grp, object dt, object dtype_name, **kwargs): # <<<<<<<<<<<<<<
@@ -49010,16 +53521,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, 4482, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 4575, __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, 4482, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 4575, __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, 4482, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4575, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
@@ -49034,7 +53545,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, 4482, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4575, __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);
@@ -49063,27 +53574,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":4507
+ /* "netCDF4/_netCDF4.pyx":4600
* """
* 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, 4507, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4600, __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, 4507, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4600, __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, 4507, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4600, __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, 4507, __pyx_L1_error)
+ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4600, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_align, Py_True) < 0) __PYX_ERR(0, 4507, __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, 4507, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_align, Py_True) < 0) __PYX_ERR(0, 4600, __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, 4600, __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;
@@ -49091,31 +53602,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":4508
+ /* "netCDF4/_netCDF4.pyx":4601
* 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, 4508, __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, 4601, __pyx_L1_error)
__pyx_t_6 = (__pyx_t_5 != 0);
if (__pyx_t_6) {
- /* "netCDF4/_netCDF4.pyx":4509
+ /* "netCDF4/_netCDF4.pyx":4602
* 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, 4509, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4602, __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, 4509, __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, 4602, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_xtype = __pyx_t_7;
- /* "netCDF4/_netCDF4.pyx":4508
+ /* "netCDF4/_netCDF4.pyx":4601
* cdef nc_type xtype
* dt = numpy.dtype(dt,align=True)
* if 'typeid' in kwargs: # <<<<<<<<<<<<<<
@@ -49125,7 +53636,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":4511
+ /* "netCDF4/_netCDF4.pyx":4604
* xtype = kwargs['typeid']
* else:
* xtype = _def_compound(grp, dt, dtype_name) # <<<<<<<<<<<<<<
@@ -49133,15 +53644,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, 4511, __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, 4604, __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, 4511, __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, 4604, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_xtype = __pyx_t_7;
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":4512
+ /* "netCDF4/_netCDF4.pyx":4605
* else:
* xtype = _def_compound(grp, dt, dtype_name)
* self._nc_type = xtype # <<<<<<<<<<<<<<
@@ -49150,7 +53661,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_
*/
__pyx_v_self->_nc_type = __pyx_v_xtype;
- /* "netCDF4/_netCDF4.pyx":4513
+ /* "netCDF4/_netCDF4.pyx":4606
* xtype = _def_compound(grp, dt, dtype_name)
* self._nc_type = xtype
* self.dtype = dt # <<<<<<<<<<<<<<
@@ -49163,7 +53674,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":4514
+ /* "netCDF4/_netCDF4.pyx":4607
* self._nc_type = xtype
* self.dtype = dt
* self.name = dtype_name # <<<<<<<<<<<<<<
@@ -49176,7 +53687,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":4482
+ /* "netCDF4/_netCDF4.pyx":4575
* __pdoc__['CompoundType.dtype'] = \
* """A numpy dtype object describing the compound data type."""
* def __init__(self, grp, object dt, object dtype_name, **kwargs): # <<<<<<<<<<<<<<
@@ -49200,7 +53711,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4516
+/* "netCDF4/_netCDF4.pyx":4609
* self.name = dtype_name
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -49232,20 +53743,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":4517
+ /* "netCDF4/_netCDF4.pyx":4610
*
* 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, 4517, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4610, __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, 4517, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4610, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":4518
+ /* "netCDF4/_netCDF4.pyx":4611
* def __repr__(self):
* if python3:
* return self.__unicode__() # <<<<<<<<<<<<<<
@@ -49253,10 +53764,10 @@ 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, 4518, __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, 4611, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -49266,10 +53777,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, 4518, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4611, __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, 4518, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4611, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -49277,7 +53788,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4517
+ /* "netCDF4/_netCDF4.pyx":4610
*
* def __repr__(self):
* if python3: # <<<<<<<<<<<<<<
@@ -49286,7 +53797,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p
*/
}
- /* "netCDF4/_netCDF4.pyx":4520
+ /* "netCDF4/_netCDF4.pyx":4613
* return self.__unicode__()
* else:
* return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<<
@@ -49295,21 +53806,21 @@ 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, 4520, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4613, __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, 4520, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4613, __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, 4520, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4613, __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, 4520, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4613, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ 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);
@@ -49319,19 +53830,39 @@ 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, 4520, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4613, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4520, __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, 4520, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 4613, __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
+ #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, 4613, __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, 4613, __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, 4613, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_1;
@@ -49339,7 +53870,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":4516
+ /* "netCDF4/_netCDF4.pyx":4609
* self.name = dtype_name
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -49362,7 +53893,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __p
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4522
+/* "netCDF4/_netCDF4.pyx":4615
* return unicode(self).encode(default_encoding)
*
* def __unicode__(self): # <<<<<<<<<<<<<<
@@ -49391,7 +53922,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4__unicode__(struct
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("__unicode__", 0);
- /* "netCDF4/_netCDF4.pyx":4523
+ /* "netCDF4/_netCDF4.pyx":4616
*
* def __unicode__(self):
* return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\ # <<<<<<<<<<<<<<
@@ -49399,17 +53930,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, 4523, __pyx_L1_error)
+ __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4616, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- /* "netCDF4/_netCDF4.pyx":4524
+ /* "netCDF4/_netCDF4.pyx":4617
* def __unicode__(self):
* return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
* (self.name,self.dtype) # <<<<<<<<<<<<<<
*
- * cdef _def_compound(grp, object dt, object dtype_name):
+ * def __reduce__(self):
*/
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4524, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4617, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_self->name);
__Pyx_GIVEREF(__pyx_v_self->name);
@@ -49418,17 +53949,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":4523
+ /* "netCDF4/_netCDF4.pyx":4616
*
* 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, 4523, __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, 4616, __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, 4523, __pyx_L1_error)
+ __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4616, __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;
@@ -49436,7 +53967,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4__unicode__(struct
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4522
+ /* "netCDF4/_netCDF4.pyx":4615
* return unicode(self).encode(default_encoding)
*
* def __unicode__(self): # <<<<<<<<<<<<<<
@@ -49457,7 +53988,65 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4__unicode__(struct
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4476
+/* "netCDF4/_netCDF4.pyx":4619
+ * (self.name,self.dtype)
+ *
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * # raise error is user tries to pickle a CompoundType object.
+ * raise NotImplementedError('CompoundType is not picklable')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_12CompoundType_7__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_12CompoundType_7__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_12CompoundType_6__reduce__(((struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_6__reduce__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce__", 0);
+
+ /* "netCDF4/_netCDF4.pyx":4621
+ * 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, 4621, __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, 4621, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":4619
+ * (self.name,self.dtype)
+ *
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * # raise error is user tries to pickle a CompoundType object.
+ * raise NotImplementedError('CompoundType is not picklable')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netCDF4._netCDF4.CompoundType.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":4569
* the user.
* """
* cdef public nc_type _nc_type # <<<<<<<<<<<<<<
@@ -49484,7 +54073,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, 4476, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4569, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -49519,7 +54108,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, 4476, __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, 4569, __pyx_L1_error)
__pyx_v_self->_nc_type = __pyx_t_1;
/* function exit code */
@@ -49533,7 +54122,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_8_nc_type_2__set__(struct
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4477
+/* "netCDF4/_netCDF4.pyx":4570
* """
* cdef public nc_type _nc_type
* cdef public dtype, name # <<<<<<<<<<<<<<
@@ -49715,8 +54304,8 @@ static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4name_4__del__(struct __py
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4526
- * (self.name,self.dtype)
+/* "netCDF4/_netCDF4.pyx":4623
+ * raise NotImplementedError('CompoundType is not picklable')
*
* cdef _def_compound(grp, object dt, object dtype_name): # <<<<<<<<<<<<<<
* # private function used to construct a netcdf compound data type
@@ -49765,55 +54354,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":4535
+ /* "netCDF4/_netCDF4.pyx":4632
* 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, 4535, __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, 4632, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_bytestr = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4536
+ /* "netCDF4/_netCDF4.pyx":4633
* 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, 4536, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4633, __pyx_L1_error)
__pyx_v_namstring = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":4537
+ /* "netCDF4/_netCDF4.pyx":4634
* 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, 4537, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4634, __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, 4537, __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, 4634, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_size = __pyx_t_3;
- /* "netCDF4/_netCDF4.pyx":4538
+ /* "netCDF4/_netCDF4.pyx":4635
* namstring = bytestr
* size = dt.itemsize
* ierr = nc_def_compound(grp._grpid, size, namstring, &xtype) # <<<<<<<<<<<<<<
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 4538, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4635, __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, 4538, __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, 4635, __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":4539
+ /* "netCDF4/_netCDF4.pyx":4636
* size = dt.itemsize
* ierr = nc_def_compound(grp._grpid, size, namstring, &xtype)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -49823,7 +54412,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":4540
+ /* "netCDF4/_netCDF4.pyx":4637
* ierr = nc_def_compound(grp._grpid, size, namstring, &xtype)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -49831,22 +54420,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, 4540, __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, 4637, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4540, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4637, __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, 4540, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4637, __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, 4540, __pyx_L1_error)
+ __PYX_ERR(0, 4637, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4539
+ /* "netCDF4/_netCDF4.pyx":4636
* size = dt.itemsize
* ierr = nc_def_compound(grp._grpid, size, namstring, &xtype)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -49855,20 +54444,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
*/
}
- /* "netCDF4/_netCDF4.pyx":4541
+ /* "netCDF4/_netCDF4.pyx":4638
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 4541, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4638, __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, 4541, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_keys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4638, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -49878,35 +54467,35 @@ 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, 4541, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4638, __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, 4541, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4638, __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, 4541, __pyx_L1_error)
+ __pyx_t_7 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4638, __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":4542
+ /* "netCDF4/_netCDF4.pyx":4639
* raise RuntimeError((<char *>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, 4542, __pyx_L1_error)
+ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4639, __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, 4542, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4639, __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, 4542, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4639, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
@@ -49916,10 +54505,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, 4542, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4639, __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, 4542, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4639, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
@@ -49927,27 +54516,27 @@ 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, 4542, __pyx_L1_error)
+ __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4639, __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, 4542, __pyx_L1_error)
+ __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4639, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_10)) {
if (likely(PyList_CheckExact(__pyx_t_8))) {
if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 4542, __pyx_L1_error)
+ #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, 4639, __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, 4542, __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, 4639, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 4542, __pyx_L1_error)
+ #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, 4639, __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, 4542, __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, 4639, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -49957,7 +54546,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, 4542, __pyx_L1_error)
+ else __PYX_ERR(0, 4639, __pyx_L1_error)
}
break;
}
@@ -49965,31 +54554,31 @@ 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, 4542, __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, 4639, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 4542, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 4639, __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":4543
+ /* "netCDF4/_netCDF4.pyx":4640
* 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, 4543, __pyx_L1_error)
+ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4640, __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, 4543, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4640, __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, 4543, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4640, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -49999,10 +54588,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, 4543, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4640, __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, 4543, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4640, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -50010,27 +54599,27 @@ 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, 4543, __pyx_L1_error)
+ __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4640, __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, 4543, __pyx_L1_error)
+ __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4640, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
for (;;) {
if (likely(!__pyx_t_10)) {
if (likely(PyList_CheckExact(__pyx_t_6))) {
if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 4543, __pyx_L1_error)
+ #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, 4640, __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, 4543, __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, 4640, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
#endif
} else {
if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 4543, __pyx_L1_error)
+ #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, 4640, __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, 4543, __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, 4640, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
#endif
}
@@ -50040,7 +54629,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, 4543, __pyx_L1_error)
+ else __PYX_ERR(0, 4640, __pyx_L1_error)
}
break;
}
@@ -50048,166 +54637,220 @@ 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, 4543, __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, 4640, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 4543, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 4640, __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":4546
+ /* "netCDF4/_netCDF4.pyx":4643
* # 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, 4546, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4643, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_8 = NULL;
- __pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_4 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_9 = 1;
+ __pyx_t_4 = 1;
}
}
- __pyx_t_1 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4546, __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;
- }
- __Pyx_INCREF(__pyx_v_names);
- __Pyx_GIVEREF(__pyx_v_names);
- PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_9, __pyx_v_names);
- __Pyx_INCREF(__pyx_v_offsets);
- __Pyx_GIVEREF(__pyx_v_offsets);
- PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_9, __pyx_v_offsets);
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4546, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ #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, 4643, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #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, 4643, __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, 4643, __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;
+ }
+ __Pyx_INCREF(__pyx_v_names);
+ __Pyx_GIVEREF(__pyx_v_names);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_4, __pyx_v_names);
+ __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, 4643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF_SET(__pyx_v_names, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":4547
+ /* "netCDF4/_netCDF4.pyx":4644
* # (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, 4547, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4644, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_1 = NULL;
- __pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_4 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_9 = 1;
+ __pyx_t_4 = 1;
}
}
- __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4547, __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;
- }
- __Pyx_INCREF(__pyx_v_formats);
- __Pyx_GIVEREF(__pyx_v_formats);
- PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_v_formats);
- __Pyx_INCREF(__pyx_v_offsets);
- __Pyx_GIVEREF(__pyx_v_offsets);
- PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_v_offsets);
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4547, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ #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, 4644, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #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, 4644, __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, 4644, __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;
+ }
+ __Pyx_INCREF(__pyx_v_formats);
+ __Pyx_GIVEREF(__pyx_v_formats);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_4, __pyx_v_formats);
+ __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, 4644, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF_SET(__pyx_v_formats, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":4548
+ /* "netCDF4/_netCDF4.pyx":4645
* 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, 4548, __pyx_L1_error)
+ __pyx_t_11 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4645, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4549
+ /* "netCDF4/_netCDF4.pyx":4646
* 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, 4549, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4646, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_8 = NULL;
- __pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_4 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_9 = 1;
+ __pyx_t_4 = 1;
}
}
- __pyx_t_1 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4549, __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;
- }
- __Pyx_INCREF(__pyx_v_names);
- __Pyx_GIVEREF(__pyx_v_names);
- PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_9, __pyx_v_names);
- __Pyx_INCREF(__pyx_v_formats);
- __Pyx_GIVEREF(__pyx_v_formats);
- PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_9, __pyx_v_formats);
- __Pyx_INCREF(__pyx_v_offsets);
- __Pyx_GIVEREF(__pyx_v_offsets);
- PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_9, __pyx_v_offsets);
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4549, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ #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, 4646, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #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, 4646, __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, 4646, __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;
+ }
+ __Pyx_INCREF(__pyx_v_names);
+ __Pyx_GIVEREF(__pyx_v_names);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_4, __pyx_v_names);
+ __Pyx_INCREF(__pyx_v_formats);
+ __Pyx_GIVEREF(__pyx_v_formats);
+ PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_4, __pyx_v_formats);
+ __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, 4646, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
__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, 4549, __pyx_L1_error)
+ __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4646, __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, 4549, __pyx_L1_error)
+ __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4646, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
for (;;) {
if (likely(!__pyx_t_10)) {
if (likely(PyList_CheckExact(__pyx_t_6))) {
if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 4549, __pyx_L1_error)
+ #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, 4646, __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, 4549, __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, 4646, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
} else {
if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 4549, __pyx_L1_error)
+ #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, 4646, __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, 4549, __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, 4646, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
}
@@ -50217,7 +54860,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, 4549, __pyx_L1_error)
+ else __PYX_ERR(0, 4646, __pyx_L1_error)
}
break;
}
@@ -50225,7 +54868,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
}
if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
PyObject* sequence = __pyx_t_7;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -50233,9 +54876,9 @@ 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, 4549, __pyx_L1_error)
+ __PYX_ERR(0, 4646, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
@@ -50249,17 +54892,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, 4549, __pyx_L1_error)
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4646, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4549, __pyx_L1_error)
+ __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4646, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4549, __pyx_L1_error)
+ __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4646, __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, 4549, __pyx_L1_error)
+ __pyx_t_13 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4646, __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;
@@ -50269,7 +54912,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, 4549, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 3) < 0) __PYX_ERR(0, 4646, __pyx_L1_error)
__pyx_t_14 = NULL;
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
goto __pyx_L11_unpacking_done;
@@ -50277,10 +54920,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, 4549, __pyx_L1_error)
+ __PYX_ERR(0, 4646, __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, 4549, __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, 4646, __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;
@@ -50288,42 +54931,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":4550
+ /* "netCDF4/_netCDF4.pyx":4647
* 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, 4550, __pyx_L1_error)
+ __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4647, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":4551
+ /* "netCDF4/_netCDF4.pyx":4648
* 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, 4551, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4648, __pyx_L1_error)
__pyx_v_namstring = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":4552
+ /* "netCDF4/_netCDF4.pyx":4649
* 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, 4552, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_kind); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4649, __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, 4552, __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, 4649, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_5) {
- /* "netCDF4/_netCDF4.pyx":4553
+ /* "netCDF4/_netCDF4.pyx":4650
* namstring = bytestr
* if format.kind != 'V': # scalar primitive type
* try: # <<<<<<<<<<<<<<
@@ -50339,29 +54982,29 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
__Pyx_XGOTREF(__pyx_t_17);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4554
+ /* "netCDF4/_netCDF4.pyx":4651
* 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, 4554, __pyx_L13_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4651, __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, 4554, __pyx_L13_error)
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_str); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4651, __pyx_L13_error)
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_12, 1, 0, NULL, NULL, &__pyx_slice__81, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4554, __pyx_L13_error)
+ __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, 4651, __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, 4554, __pyx_L13_error)
+ __pyx_t_12 = PyObject_GetItem(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4651, __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, 4554, __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, 4651, __pyx_L13_error)
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_v_xtype_tmp = __pyx_t_18;
- /* "netCDF4/_netCDF4.pyx":4553
+ /* "netCDF4/_netCDF4.pyx":4650
* namstring = bytestr
* if format.kind != 'V': # scalar primitive type
* try: # <<<<<<<<<<<<<<
@@ -50381,7 +55024,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":4555
+ /* "netCDF4/_netCDF4.pyx":4652
* try:
* xtype_tmp = _nptonctype[format.str[1:]]
* except KeyError: # <<<<<<<<<<<<<<
@@ -50391,28 +55034,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, 4555, __pyx_L15_except_error)
+ if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 4652, __pyx_L15_except_error)
__Pyx_GOTREF(__pyx_t_12);
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GOTREF(__pyx_t_7);
- /* "netCDF4/_netCDF4.pyx":4556
+ /* "netCDF4/_netCDF4.pyx":4653
* 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__82, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4556, __pyx_L15_except_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4653, __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, 4556, __pyx_L15_except_error)
+ __PYX_ERR(0, 4653, __pyx_L15_except_error)
}
goto __pyx_L15_except_error;
__pyx_L15_except_error:;
- /* "netCDF4/_netCDF4.pyx":4553
+ /* "netCDF4/_netCDF4.pyx":4650
* namstring = bytestr
* if format.kind != 'V': # scalar primitive type
* try: # <<<<<<<<<<<<<<
@@ -50428,19 +55071,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
__pyx_L20_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":4557
+ /* "netCDF4/_netCDF4.pyx":4654
* 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, 4557, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4654, __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, 4557, __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, 4654, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":4558
+ /* "netCDF4/_netCDF4.pyx":4655
* raise ValueError('Unsupported compound type element')
* ierr = nc_insert_compound(grp._grpid, xtype, namstring,
* offset, xtype_tmp) # <<<<<<<<<<<<<<
@@ -50449,7 +55092,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":4559
+ /* "netCDF4/_netCDF4.pyx":4656
* ierr = nc_insert_compound(grp._grpid, xtype, namstring,
* offset, xtype_tmp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -50459,7 +55102,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":4560
+ /* "netCDF4/_netCDF4.pyx":4657
* offset, xtype_tmp)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -50467,22 +55110,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, 4560, __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, 4657, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4560, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4657, __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, 4560, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4657, __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, 4560, __pyx_L1_error)
+ __PYX_ERR(0, 4657, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4559
+ /* "netCDF4/_netCDF4.pyx":4656
* ierr = nc_insert_compound(grp._grpid, xtype, namstring,
* offset, xtype_tmp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -50491,7 +55134,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
*/
}
- /* "netCDF4/_netCDF4.pyx":4552
+ /* "netCDF4/_netCDF4.pyx":4649
* bytestr = _strencode(name)
* namstring = bytestr
* if format.kind != 'V': # scalar primitive type # <<<<<<<<<<<<<<
@@ -50501,7 +55144,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
goto __pyx_L12;
}
- /* "netCDF4/_netCDF4.pyx":4562
+ /* "netCDF4/_netCDF4.pyx":4659
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* else:
* if format.shape == (): # nested scalar compound type # <<<<<<<<<<<<<<
@@ -50509,62 +55152,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, 4562, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4659, __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, 4562, __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, 4659, __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, 4562, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 4659, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_5) {
- /* "netCDF4/_netCDF4.pyx":4564
+ /* "netCDF4/_netCDF4.pyx":4661
* 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, 4564, __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, 4661, __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, 4564, __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, 4661, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_v_xtype_tmp = __pyx_t_18;
- /* "netCDF4/_netCDF4.pyx":4565
+ /* "netCDF4/_netCDF4.pyx":4662
* # 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, 4565, __pyx_L1_error)
+ __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4662, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_8);
__pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":4566
+ /* "netCDF4/_netCDF4.pyx":4663
* 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, 4566, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4663, __pyx_L1_error)
__pyx_v_nested_namstring = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":4567
+ /* "netCDF4/_netCDF4.pyx":4664
* 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, 4567, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4664, __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, 4567, __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, 4664, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":4569
+ /* "netCDF4/_netCDF4.pyx":4666
* ierr = nc_insert_compound(grp._grpid, xtype,\
* nested_namstring,\
* offset, xtype_tmp) # <<<<<<<<<<<<<<
@@ -50573,7 +55216,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":4570
+ /* "netCDF4/_netCDF4.pyx":4667
* nested_namstring,\
* offset, xtype_tmp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -50583,7 +55226,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":4571
+ /* "netCDF4/_netCDF4.pyx":4668
* offset, xtype_tmp)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -50591,22 +55234,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, 4571, __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, 4668, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4571, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4668, __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, 4571, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4668, __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, 4571, __pyx_L1_error)
+ __PYX_ERR(0, 4668, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4570
+ /* "netCDF4/_netCDF4.pyx":4667
* nested_namstring,\
* offset, xtype_tmp)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -50615,7 +55258,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
*/
}
- /* "netCDF4/_netCDF4.pyx":4562
+ /* "netCDF4/_netCDF4.pyx":4659
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* else:
* if format.shape == (): # nested scalar compound type # <<<<<<<<<<<<<<
@@ -50625,7 +55268,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
goto __pyx_L24;
}
- /* "netCDF4/_netCDF4.pyx":4573
+ /* "netCDF4/_netCDF4.pyx":4670
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* else: # array compound element
* ndims = len(format.shape) # <<<<<<<<<<<<<<
@@ -50633,13 +55276,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, 4573, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4670, __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, 4573, __pyx_L1_error)
+ __pyx_t_19 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 4670, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_v_ndims = __pyx_t_19;
- /* "netCDF4/_netCDF4.pyx":4574
+ /* "netCDF4/_netCDF4.pyx":4671
* else: # array compound element
* ndims = len(format.shape)
* dim_sizes = <int *>malloc(sizeof(int) * ndims) # <<<<<<<<<<<<<<
@@ -50648,7 +55291,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":4575
+ /* "netCDF4/_netCDF4.pyx":4672
* ndims = len(format.shape)
* dim_sizes = <int *>malloc(sizeof(int) * ndims)
* for n from 0 <= n < ndims: # <<<<<<<<<<<<<<
@@ -50658,46 +55301,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":4576
+ /* "netCDF4/_netCDF4.pyx":4673
* dim_sizes = <int *>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, 4576, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4673, __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, 4576, __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, 4673, __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, 4576, __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, 4673, __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":4577
+ /* "netCDF4/_netCDF4.pyx":4674
* 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, 4577, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4674, __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, 4577, __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, 4674, __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, 4577, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_str); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4674, __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, 4577, __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, 4674, __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, 4577, __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, 4674, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_5) {
- /* "netCDF4/_netCDF4.pyx":4578
+ /* "netCDF4/_netCDF4.pyx":4675
* dim_sizes[n] = format.shape[n]
* if format.subdtype[0].str[1] != 'V': # primitive type.
* try: # <<<<<<<<<<<<<<
@@ -50713,35 +55356,35 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
__Pyx_XGOTREF(__pyx_t_15);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4579
+ /* "netCDF4/_netCDF4.pyx":4676
* 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, 4579, __pyx_L29_error)
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4676, __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, 4579, __pyx_L29_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4676, __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, 4579, __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, 4676, __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, 4579, __pyx_L29_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_str); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4676, __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__83, 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4579, __pyx_L29_error)
+ __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, 4676, __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, 4579, __pyx_L29_error)
+ __pyx_t_7 = PyObject_GetItem(__pyx_t_8, __pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4676, __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, 4579, __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, 4676, __pyx_L29_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_v_xtype_tmp = __pyx_t_18;
- /* "netCDF4/_netCDF4.pyx":4578
+ /* "netCDF4/_netCDF4.pyx":4675
* dim_sizes[n] = format.shape[n]
* if format.subdtype[0].str[1] != 'V': # primitive type.
* try: # <<<<<<<<<<<<<<
@@ -50761,7 +55404,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":4580
+ /* "netCDF4/_netCDF4.pyx":4677
* try:
* xtype_tmp = _nptonctype[format.subdtype[0].str[1:]]
* except KeyError: # <<<<<<<<<<<<<<
@@ -50771,28 +55414,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, 4580, __pyx_L31_except_error)
+ if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_12, &__pyx_t_8) < 0) __PYX_ERR(0, 4677, __pyx_L31_except_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GOTREF(__pyx_t_12);
__Pyx_GOTREF(__pyx_t_8);
- /* "netCDF4/_netCDF4.pyx":4581
+ /* "netCDF4/_netCDF4.pyx":4678
* 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__84, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4581, __pyx_L31_except_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4678, __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, 4581, __pyx_L31_except_error)
+ __PYX_ERR(0, 4678, __pyx_L31_except_error)
}
goto __pyx_L31_except_error;
__pyx_L31_except_error:;
- /* "netCDF4/_netCDF4.pyx":4578
+ /* "netCDF4/_netCDF4.pyx":4675
* dim_sizes[n] = format.shape[n]
* if format.subdtype[0].str[1] != 'V': # primitive type.
* try: # <<<<<<<<<<<<<<
@@ -50808,19 +55451,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
__pyx_L36_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":4582
+ /* "netCDF4/_netCDF4.pyx":4679
* 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, 4582, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4679, __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, 4582, __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, 4679, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":4583
+ /* "netCDF4/_netCDF4.pyx":4680
* raise ValueError('Unsupported compound type element')
* ierr = nc_insert_array_compound(grp._grpid,xtype,namstring,
* offset,xtype_tmp,ndims,dim_sizes) # <<<<<<<<<<<<<<
@@ -50829,7 +55472,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":4584
+ /* "netCDF4/_netCDF4.pyx":4681
* ierr = nc_insert_array_compound(grp._grpid,xtype,namstring,
* offset,xtype_tmp,ndims,dim_sizes)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -50839,7 +55482,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":4585
+ /* "netCDF4/_netCDF4.pyx":4682
* offset,xtype_tmp,ndims,dim_sizes)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -50847,22 +55490,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, 4585, __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, 4682, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4585, __pyx_L1_error)
+ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4682, __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, 4585, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4682, __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, 4585, __pyx_L1_error)
+ __PYX_ERR(0, 4682, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4584
+ /* "netCDF4/_netCDF4.pyx":4681
* ierr = nc_insert_array_compound(grp._grpid,xtype,namstring,
* offset,xtype_tmp,ndims,dim_sizes)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -50871,7 +55514,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
*/
}
- /* "netCDF4/_netCDF4.pyx":4577
+ /* "netCDF4/_netCDF4.pyx":4674
* for n from 0 <= n < ndims:
* dim_sizes[n] = format.shape[n]
* if format.subdtype[0].str[1] != 'V': # primitive type. # <<<<<<<<<<<<<<
@@ -50881,7 +55524,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
goto __pyx_L28;
}
- /* "netCDF4/_netCDF4.pyx":4588
+ /* "netCDF4/_netCDF4.pyx":4685
* else: # nested array compound type.
* # find this compound type in this group or it's parents.
* xtype_tmp = _find_cmptype(grp, format.subdtype[0]) # <<<<<<<<<<<<<<
@@ -50889,53 +55532,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, 4588, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4685, __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, 4588, __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, 4685, __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, 4588, __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, 4685, __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, 4588, __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, 4685, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_v_xtype_tmp = __pyx_t_18;
- /* "netCDF4/_netCDF4.pyx":4589
+ /* "netCDF4/_netCDF4.pyx":4686
* # 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, 4589, __pyx_L1_error)
+ __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4686, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_8);
__pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":4590
+ /* "netCDF4/_netCDF4.pyx":4687
* 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, 4590, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4687, __pyx_L1_error)
__pyx_v_nested_namstring = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":4591
+ /* "netCDF4/_netCDF4.pyx":4688
* 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, 4591, __pyx_L1_error)
+ __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_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, 4591, __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, 4688, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":4594
+ /* "netCDF4/_netCDF4.pyx":4691
* nested_namstring,\
* offset,xtype_tmp,\
* ndims,dim_sizes) # <<<<<<<<<<<<<<
@@ -50944,7 +55587,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":4595
+ /* "netCDF4/_netCDF4.pyx":4692
* offset,xtype_tmp,\
* ndims,dim_sizes)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -50954,7 +55597,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":4596
+ /* "netCDF4/_netCDF4.pyx":4693
* ndims,dim_sizes)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -50962,22 +55605,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, 4596, __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, 4693, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4596, __pyx_L1_error)
+ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4693, __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, 4596, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4693, __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, 4596, __pyx_L1_error)
+ __PYX_ERR(0, 4693, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4595
+ /* "netCDF4/_netCDF4.pyx":4692
* offset,xtype_tmp,\
* ndims,dim_sizes)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -50988,7 +55631,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
}
__pyx_L28:;
- /* "netCDF4/_netCDF4.pyx":4597
+ /* "netCDF4/_netCDF4.pyx":4694
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* free(dim_sizes) # <<<<<<<<<<<<<<
@@ -51001,7 +55644,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
}
__pyx_L12:;
- /* "netCDF4/_netCDF4.pyx":4549
+ /* "netCDF4/_netCDF4.pyx":4646
* formats = _sortbylist(formats, offsets)
* offsets.sort()
* for name, format, offset in zip(names, formats, offsets): # <<<<<<<<<<<<<<
@@ -51011,7 +55654,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":4598
+ /* "netCDF4/_netCDF4.pyx":4695
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* free(dim_sizes)
* return xtype # <<<<<<<<<<<<<<
@@ -51019,14 +55662,14 @@ 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, 4598, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4695, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_r = __pyx_t_6;
__pyx_t_6 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4526
- * (self.name,self.dtype)
+ /* "netCDF4/_netCDF4.pyx":4623
+ * raise NotImplementedError('CompoundType is not picklable')
*
* cdef _def_compound(grp, object dt, object dtype_name): # <<<<<<<<<<<<<<
* # private function used to construct a netcdf compound data type
@@ -51056,7 +55699,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *__pyx_v_grp,
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4600
+/* "netCDF4/_netCDF4.pyx":4697
* return xtype
*
* cdef _find_cmptype(grp, dtype): # <<<<<<<<<<<<<<
@@ -51096,7 +55739,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":4604
+ /* "netCDF4/_netCDF4.pyx":4701
* # return datatype id when found, if not found, raise exception.
* cdef nc_type xtype
* match = False # <<<<<<<<<<<<<<
@@ -51105,20 +55748,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp,
*/
__pyx_v_match = 0;
- /* "netCDF4/_netCDF4.pyx":4605
+ /* "netCDF4/_netCDF4.pyx":4702
* 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, 4605, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_cmptypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4702, __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, 4605, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4702, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -51128,10 +55771,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, 4605, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4702, __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, 4605, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4702, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -51139,27 +55782,27 @@ 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, 4605, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4702, __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, 4605, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4702, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_5)) {
if (likely(PyList_CheckExact(__pyx_t_3))) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 4605, __pyx_L1_error)
+ #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, 4702, __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, 4605, __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, 4702, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 4605, __pyx_L1_error)
+ #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, 4702, __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, 4605, __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, 4702, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -51169,7 +55812,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, 4605, __pyx_L1_error)
+ else __PYX_ERR(0, 4702, __pyx_L1_error)
}
break;
}
@@ -51177,7 +55820,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp,
}
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -51185,9 +55828,9 @@ 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, 4605, __pyx_L1_error)
+ __PYX_ERR(0, 4702, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
@@ -51198,15 +55841,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, 4605, __pyx_L1_error)
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4702, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4605, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4702, __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, 4605, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4702, __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;
@@ -51214,7 +55857,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, 4605, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 4702, __pyx_L1_error)
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L6_unpacking_done;
@@ -51222,7 +55865,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, 4605, __pyx_L1_error)
+ __PYX_ERR(0, 4702, __pyx_L1_error)
__pyx_L6_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_cmpname, __pyx_t_2);
@@ -51230,54 +55873,54 @@ 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":4606
+ /* "netCDF4/_netCDF4.pyx":4703
* 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, 4606, __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, 4703, __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, 4606, __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, 4703, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_xtype = __pyx_t_9;
- /* "netCDF4/_netCDF4.pyx":4607
+ /* "netCDF4/_netCDF4.pyx":4704
* 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, 4607, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4704, __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, 4607, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4704, __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, 4607, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_names); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4704, __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":4608
+ /* "netCDF4/_netCDF4.pyx":4705
* 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, 4608, __pyx_L1_error)
+ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4705, __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, 4608, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4705, __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, 4608, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4705, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -51287,10 +55930,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, 4608, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4705, __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, 4608, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4705, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
@@ -51298,27 +55941,27 @@ 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, 4608, __pyx_L1_error)
+ __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4705, __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, 4608, __pyx_L1_error)
+ __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4705, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_11)) {
if (likely(PyList_CheckExact(__pyx_t_7))) {
if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 4608, __pyx_L1_error)
+ #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, 4705, __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, 4608, __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, 4705, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 4608, __pyx_L1_error)
+ #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, 4705, __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, 4608, __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, 4705, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -51328,7 +55971,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, 4608, __pyx_L1_error)
+ else __PYX_ERR(0, 4705, __pyx_L1_error)
}
break;
}
@@ -51336,34 +55979,34 @@ 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, 4608, __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, 4705, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 4608, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 4705, __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":4609
+ /* "netCDF4/_netCDF4.pyx":4706
* 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, 4609, __pyx_L1_error)
+ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4706, __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, 4609, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4706, __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, 4609, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4706, __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, 4609, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4706, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -51373,10 +56016,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, 4609, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4706, __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, 4609, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4706, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -51384,27 +56027,27 @@ 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, 4609, __pyx_L1_error)
+ __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4706, __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, 4609, __pyx_L1_error)
+ __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4706, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
for (;;) {
if (likely(!__pyx_t_11)) {
if (likely(PyList_CheckExact(__pyx_t_1))) {
if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 4609, __pyx_L1_error)
+ #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, 4706, __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, 4609, __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, 4706, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
} else {
if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 4609, __pyx_L1_error)
+ #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, 4706, __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, 4609, __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, 4706, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
}
@@ -51414,7 +56057,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, 4609, __pyx_L1_error)
+ else __PYX_ERR(0, 4706, __pyx_L1_error)
}
break;
}
@@ -51422,38 +56065,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, 4609, __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, 4706, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 4609, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 4706, __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":4612
+ /* "netCDF4/_netCDF4.pyx":4709
* # 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, 4612, __pyx_L1_error)
- __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4612, __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, 4709, __pyx_L1_error)
+ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4709, __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, 4612, __pyx_L1_error)
- __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4612, __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, 4709, __pyx_L1_error)
+ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 4709, __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":4613
+ /* "netCDF4/_netCDF4.pyx":4710
* # by netcdf lib).
* if names1==names2 and formats1==formats2:
* match = True # <<<<<<<<<<<<<<
@@ -51462,7 +56105,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp,
*/
__pyx_v_match = 1;
- /* "netCDF4/_netCDF4.pyx":4614
+ /* "netCDF4/_netCDF4.pyx":4711
* if names1==names2 and formats1==formats2:
* match = True
* break # <<<<<<<<<<<<<<
@@ -51471,7 +56114,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp,
*/
goto __pyx_L4_break;
- /* "netCDF4/_netCDF4.pyx":4612
+ /* "netCDF4/_netCDF4.pyx":4709
* # match names, formats, but not offsets (they may be changed
* # by netcdf lib).
* if names1==names2 and formats1==formats2: # <<<<<<<<<<<<<<
@@ -51480,7 +56123,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp,
*/
}
- /* "netCDF4/_netCDF4.pyx":4605
+ /* "netCDF4/_netCDF4.pyx":4702
* cdef nc_type xtype
* match = False
* for cmpname, cmpdt in grp.cmptypes.items(): # <<<<<<<<<<<<<<
@@ -51491,7 +56134,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":4615
+ /* "netCDF4/_netCDF4.pyx":4712
* match = True
* break
* if not match: # <<<<<<<<<<<<<<
@@ -51501,7 +56144,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":4616
+ /* "netCDF4/_netCDF4.pyx":4713
* break
* if not match:
* try: # <<<<<<<<<<<<<<
@@ -51517,19 +56160,19 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp,
__Pyx_XGOTREF(__pyx_t_16);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4617
+ /* "netCDF4/_netCDF4.pyx":4714
* 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, 4617, __pyx_L15_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4714, __pyx_L15_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_parent_grp = __pyx_t_3;
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":4616
+ /* "netCDF4/_netCDF4.pyx":4713
* break
* if not match:
* try: # <<<<<<<<<<<<<<
@@ -51549,7 +56192,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":4618
+ /* "netCDF4/_netCDF4.pyx":4715
* try:
* parent_grp = grp.parent
* except AttributeError: # <<<<<<<<<<<<<<
@@ -51559,28 +56202,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, 4618, __pyx_L17_except_error)
+ if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 4715, __pyx_L17_except_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_1);
- /* "netCDF4/_netCDF4.pyx":4619
+ /* "netCDF4/_netCDF4.pyx":4716
* 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__85, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4619, __pyx_L17_except_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4716, __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, 4619, __pyx_L17_except_error)
+ __PYX_ERR(0, 4716, __pyx_L17_except_error)
}
goto __pyx_L17_except_error;
__pyx_L17_except_error:;
- /* "netCDF4/_netCDF4.pyx":4616
+ /* "netCDF4/_netCDF4.pyx":4713
* break
* if not match:
* try: # <<<<<<<<<<<<<<
@@ -51596,7 +56239,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp,
__pyx_L22_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":4620
+ /* "netCDF4/_netCDF4.pyx":4717
* except AttributeError:
* raise ValueError("cannot find compound type in this group or parent groups")
* if parent_grp is None: # <<<<<<<<<<<<<<
@@ -51607,20 +56250,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":4621
+ /* "netCDF4/_netCDF4.pyx":4718
* 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__86, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4621, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4718, __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, 4621, __pyx_L1_error)
+ __PYX_ERR(0, 4718, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4620
+ /* "netCDF4/_netCDF4.pyx":4717
* except AttributeError:
* raise ValueError("cannot find compound type in this group or parent groups")
* if parent_grp is None: # <<<<<<<<<<<<<<
@@ -51629,7 +56272,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp,
*/
}
- /* "netCDF4/_netCDF4.pyx":4623
+ /* "netCDF4/_netCDF4.pyx":4720
* raise ValueError("cannot find compound type in this group or parent groups")
* else:
* xtype = _find_cmptype(parent_grp,dtype) # <<<<<<<<<<<<<<
@@ -51637,14 +56280,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, 4623, __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, 4720, __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, 4623, __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, 4720, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_xtype = __pyx_t_9;
}
- /* "netCDF4/_netCDF4.pyx":4615
+ /* "netCDF4/_netCDF4.pyx":4712
* match = True
* break
* if not match: # <<<<<<<<<<<<<<
@@ -51653,7 +56296,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp,
*/
}
- /* "netCDF4/_netCDF4.pyx":4624
+ /* "netCDF4/_netCDF4.pyx":4721
* else:
* xtype = _find_cmptype(parent_grp,dtype)
* return xtype # <<<<<<<<<<<<<<
@@ -51661,13 +56304,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, 4624, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4721, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4600
+ /* "netCDF4/_netCDF4.pyx":4697
* return xtype
*
* cdef _find_cmptype(grp, dtype): # <<<<<<<<<<<<<<
@@ -51698,7 +56341,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *__pyx_v_grp,
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4626
+/* "netCDF4/_netCDF4.pyx":4723
* return xtype
*
* cdef _read_compound(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<<
@@ -51739,15 +56382,14 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
- Py_ssize_t __pyx_t_9;
- PyObject *__pyx_t_10 = NULL;
- size_t __pyx_t_11;
- int __pyx_t_12;
+ PyObject *__pyx_t_9 = NULL;
+ size_t __pyx_t_10;
+ int __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
PyObject *__pyx_t_13 = NULL;
PyObject *__pyx_t_14 = NULL;
- PyObject *__pyx_t_15 = NULL;
- int __pyx_t_16;
- struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound __pyx_t_17;
+ int __pyx_t_15;
+ struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound __pyx_t_16;
__Pyx_RefNannySetupContext("_read_compound", 0);
if (__pyx_optional_args) {
if (__pyx_optional_args->__pyx_n > 0) {
@@ -51755,20 +56397,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
}
}
- /* "netCDF4/_netCDF4.pyx":4639
+ /* "netCDF4/_netCDF4.pyx":4736
* 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, 4639, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4736, __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, 4639, __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, 4736, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v__grpid = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":4640
+ /* "netCDF4/_netCDF4.pyx":4737
* # get name and number of fields.
* _grpid = group._grpid
* with nogil: # <<<<<<<<<<<<<<
@@ -51782,7 +56424,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4641
+ /* "netCDF4/_netCDF4.pyx":4738
* _grpid = group._grpid
* with nogil:
* ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields) # <<<<<<<<<<<<<<
@@ -51792,7 +56434,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":4640
+ /* "netCDF4/_netCDF4.pyx":4737
* # get name and number of fields.
* _grpid = group._grpid
* with nogil: # <<<<<<<<<<<<<<
@@ -51810,7 +56452,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
}
}
- /* "netCDF4/_netCDF4.pyx":4642
+ /* "netCDF4/_netCDF4.pyx":4739
* with nogil:
* ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -51820,7 +56462,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":4643
+ /* "netCDF4/_netCDF4.pyx":4740
* ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -51828,22 +56470,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, 4643, __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, 4740, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4643, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4740, __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, 4643, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4740, __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, 4643, __pyx_L1_error)
+ __PYX_ERR(0, 4740, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4642
+ /* "netCDF4/_netCDF4.pyx":4739
* with nogil:
* ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -51852,99 +56494,121 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
*/
}
- /* "netCDF4/_netCDF4.pyx":4644
+ /* "netCDF4/_netCDF4.pyx":4741
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 4644, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_cmp_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4741, __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, 4644, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4741, __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, 4644, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4741, __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, 4644, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4741, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
- __pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_2 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_9 = 1;
+ __pyx_t_2 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4644, __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;
+ #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, 4741, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #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, 4741, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4741, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_2, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_7);
+ 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, 4741, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_7);
- 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, 4644, __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;
__pyx_v_name = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4646
+ /* "netCDF4/_netCDF4.pyx":4743
* 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, 4646, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4743, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_names = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4647
+ /* "netCDF4/_netCDF4.pyx":4744
* # 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, 4647, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4744, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_formats = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4648
+ /* "netCDF4/_netCDF4.pyx":4745
* 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, 4648, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4745, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_offsets = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4649
+ /* "netCDF4/_netCDF4.pyx":4746
* formats = []
* offsets = []
* for nf from 0 <= nf < nfields: # <<<<<<<<<<<<<<
* with nogil:
* ierr = nc_inq_compound_field(_grpid,
*/
- __pyx_t_11 = __pyx_v_nfields;
- for (__pyx_v_nf = 0; __pyx_v_nf < __pyx_t_11; __pyx_v_nf++) {
+ __pyx_t_10 = __pyx_v_nfields;
+ for (__pyx_v_nf = 0; __pyx_v_nf < __pyx_t_10; __pyx_v_nf++) {
- /* "netCDF4/_netCDF4.pyx":4650
+ /* "netCDF4/_netCDF4.pyx":4747
* offsets = []
* for nf from 0 <= nf < nfields:
* with nogil: # <<<<<<<<<<<<<<
@@ -51958,7 +56622,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4651
+ /* "netCDF4/_netCDF4.pyx":4748
* for nf from 0 <= nf < nfields:
* with nogil:
* ierr = nc_inq_compound_field(_grpid, # <<<<<<<<<<<<<<
@@ -51968,7 +56632,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":4650
+ /* "netCDF4/_netCDF4.pyx":4747
* offsets = []
* for nf from 0 <= nf < nfields:
* with nogil: # <<<<<<<<<<<<<<
@@ -51986,7 +56650,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
}
}
- /* "netCDF4/_netCDF4.pyx":4659
+ /* "netCDF4/_netCDF4.pyx":4756
* &numdims,
* NULL)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -51996,7 +56660,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":4660
+ /* "netCDF4/_netCDF4.pyx":4757
* NULL)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -52004,22 +56668,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, 4660, __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, 4757, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4660, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4757, __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, 4660, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4757, __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, 4660, __pyx_L1_error)
+ __PYX_ERR(0, 4757, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4659
+ /* "netCDF4/_netCDF4.pyx":4756
* &numdims,
* NULL)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -52028,7 +56692,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
*/
}
- /* "netCDF4/_netCDF4.pyx":4661
+ /* "netCDF4/_netCDF4.pyx":4758
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* dim_sizes = <int *>malloc(sizeof(int) * numdims) # <<<<<<<<<<<<<<
@@ -52037,7 +56701,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":4662
+ /* "netCDF4/_netCDF4.pyx":4759
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* dim_sizes = <int *>malloc(sizeof(int) * numdims)
* with nogil: # <<<<<<<<<<<<<<
@@ -52051,7 +56715,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4663
+ /* "netCDF4/_netCDF4.pyx":4760
* dim_sizes = <int *>malloc(sizeof(int) * numdims)
* with nogil:
* ierr = nc_inq_compound_field(_grpid, # <<<<<<<<<<<<<<
@@ -52061,7 +56725,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":4662
+ /* "netCDF4/_netCDF4.pyx":4759
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* dim_sizes = <int *>malloc(sizeof(int) * numdims)
* with nogil: # <<<<<<<<<<<<<<
@@ -52079,7 +56743,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
}
}
- /* "netCDF4/_netCDF4.pyx":4671
+ /* "netCDF4/_netCDF4.pyx":4768
* &numdims,
* dim_sizes)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -52089,7 +56753,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":4672
+ /* "netCDF4/_netCDF4.pyx":4769
* dim_sizes)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -52097,22 +56761,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, 4672, __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, 4769, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4672, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4769, __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, 4672, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4769, __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, 4672, __pyx_L1_error)
+ __PYX_ERR(0, 4769, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4671
+ /* "netCDF4/_netCDF4.pyx":4768
* &numdims,
* dim_sizes)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -52121,74 +56785,96 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
*/
}
- /* "netCDF4/_netCDF4.pyx":4673
+ /* "netCDF4/_netCDF4.pyx":4770
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 4673, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_FromString(__pyx_v_field_namstring); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4770, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4673, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4770, __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, 4673, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4770, __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, 4673, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4770, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_5 = NULL;
- __pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
+ __pyx_t_2 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_10, function);
- __pyx_t_9 = 1;
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ __pyx_t_2 = 1;
}
}
- __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4673, __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;
+ #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, 4770, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #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, 4770, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4770, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_2, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7);
+ 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, 4770, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_7);
- __pyx_t_6 = 0;
- __pyx_t_7 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4673, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4674
+ /* "netCDF4/_netCDF4.pyx":4771
* raise RuntimeError((<char *>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_12 = __Pyx_PyObject_Append(__pyx_v_names, __pyx_v_field_name); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 4674, __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, 4771, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4675
+ /* "netCDF4/_netCDF4.pyx":4772
* 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, 4675, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4772, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_offsets, __pyx_t_1); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 4675, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_offsets, __pyx_t_1); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4772, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4677
+ /* "netCDF4/_netCDF4.pyx":4774
* offsets.append(offset)
* # if numdims=0, not an array.
* field_shape = () # <<<<<<<<<<<<<<
@@ -52198,7 +56884,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":4678
+ /* "netCDF4/_netCDF4.pyx":4775
* # if numdims=0, not an array.
* field_shape = ()
* if numdims != 0: # <<<<<<<<<<<<<<
@@ -52208,7 +56894,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":4679
+ /* "netCDF4/_netCDF4.pyx":4776
* field_shape = ()
* if numdims != 0:
* for ndim from 0 <= ndim < numdims: # <<<<<<<<<<<<<<
@@ -52218,28 +56904,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":4680
+ /* "netCDF4/_netCDF4.pyx":4777
* 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, 4680, __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, 4777, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4680, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
__Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_10, 0, __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_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4680, __pyx_L1_error)
+ __pyx_t_1 = PyNumber_Add(__pyx_v_field_shape, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4777, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __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":4678
+ /* "netCDF4/_netCDF4.pyx":4775
* # if numdims=0, not an array.
* field_shape = ()
* if numdims != 0: # <<<<<<<<<<<<<<
@@ -52248,7 +56934,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
*/
}
- /* "netCDF4/_netCDF4.pyx":4681
+ /* "netCDF4/_netCDF4.pyx":4778
* for ndim from 0 <= ndim < numdims:
* field_shape = field_shape + (dim_sizes[ndim],)
* free(dim_sizes) # <<<<<<<<<<<<<<
@@ -52257,7 +56943,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
*/
free(__pyx_v_dim_sizes);
- /* "netCDF4/_netCDF4.pyx":4683
+ /* "netCDF4/_netCDF4.pyx":4780
* free(dim_sizes)
* # check to see if this field is a nested compound type.
* try: # <<<<<<<<<<<<<<
@@ -52267,28 +56953,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
+ __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
+ __Pyx_XGOTREF(__pyx_t_12);
__Pyx_XGOTREF(__pyx_t_13);
__Pyx_XGOTREF(__pyx_t_14);
- __Pyx_XGOTREF(__pyx_t_15);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4684
+ /* "netCDF4/_netCDF4.pyx":4781
* # 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, 4684, __pyx_L24_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4781, __pyx_L24_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_field_typeid, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4684, __pyx_L24_error)
- __Pyx_GOTREF(__pyx_t_10);
+ __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, 4781, __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_10);
- __pyx_t_10 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_field_type, __pyx_t_9);
+ __pyx_t_9 = 0;
- /* "netCDF4/_netCDF4.pyx":4685
+ /* "netCDF4/_netCDF4.pyx":4782
* try:
* field_type = _nctonptype[field_typeid]
* if endian is not None: # <<<<<<<<<<<<<<
@@ -52296,23 +56982,23 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
* except KeyError:
*/
__pyx_t_3 = (__pyx_v_endian != Py_None);
- __pyx_t_16 = (__pyx_t_3 != 0);
- if (__pyx_t_16) {
+ __pyx_t_15 = (__pyx_t_3 != 0);
+ if (__pyx_t_15) {
- /* "netCDF4/_netCDF4.pyx":4686
+ /* "netCDF4/_netCDF4.pyx":4783
* 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, 4686, __pyx_L24_error) }
- __pyx_t_10 = PyNumber_Add(__pyx_v_endian, __pyx_v_format); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4686, __pyx_L24_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_XDECREF_SET(__pyx_v_format, __pyx_t_10);
- __pyx_t_10 = 0;
+ if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 4783, __pyx_L24_error) }
+ __pyx_t_9 = PyNumber_Add(__pyx_v_endian, __pyx_v_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4783, __pyx_L24_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_XDECREF_SET(__pyx_v_format, __pyx_t_9);
+ __pyx_t_9 = 0;
- /* "netCDF4/_netCDF4.pyx":4685
+ /* "netCDF4/_netCDF4.pyx":4782
* try:
* field_type = _nctonptype[field_typeid]
* if endian is not None: # <<<<<<<<<<<<<<
@@ -52321,7 +57007,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
*/
}
- /* "netCDF4/_netCDF4.pyx":4683
+ /* "netCDF4/_netCDF4.pyx":4780
* free(dim_sizes)
* # check to see if this field is a nested compound type.
* try: # <<<<<<<<<<<<<<
@@ -52329,9 +57015,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
* if endian is not None:
*/
}
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
__Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
goto __pyx_L31_try_end;
__pyx_L24_error:;
__Pyx_PyThreadState_assign
@@ -52340,9 +57026,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- /* "netCDF4/_netCDF4.pyx":4687
+ /* "netCDF4/_netCDF4.pyx":4784
* if endian is not None:
* format = endian + format
* except KeyError: # <<<<<<<<<<<<<<
@@ -52352,12 +57038,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_10, &__pyx_t_1, &__pyx_t_8) < 0) __PYX_ERR(0, 4687, __pyx_L26_except_error)
- __Pyx_GOTREF(__pyx_t_10);
+ if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_1, &__pyx_t_8) < 0) __PYX_ERR(0, 4784, __pyx_L26_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_8);
- /* "netCDF4/_netCDF4.pyx":4688
+ /* "netCDF4/_netCDF4.pyx":4785
* format = endian + format
* except KeyError:
* with nogil: # <<<<<<<<<<<<<<
@@ -52371,7 +57057,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4689
+ /* "netCDF4/_netCDF4.pyx":4786
* except KeyError:
* with nogil:
* ierr = nc_inq_user_type(_grpid, # <<<<<<<<<<<<<<
@@ -52381,7 +57067,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":4688
+ /* "netCDF4/_netCDF4.pyx":4785
* format = endian + format
* except KeyError:
* with nogil: # <<<<<<<<<<<<<<
@@ -52399,31 +57085,31 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
}
}
- /* "netCDF4/_netCDF4.pyx":4691
+ /* "netCDF4/_netCDF4.pyx":4788
* ierr = nc_inq_user_type(_grpid,
* field_typeid,NULL,NULL,NULL,NULL,&classp)
* if classp == NC_COMPOUND: # a compound type # <<<<<<<<<<<<<<
* # recursively call this function?
* field_type = _read_compound(group, field_typeid, endian=endian)
*/
- __pyx_t_16 = ((__pyx_v_classp == NC_COMPOUND) != 0);
- if (__pyx_t_16) {
+ __pyx_t_15 = ((__pyx_v_classp == NC_COMPOUND) != 0);
+ if (__pyx_t_15) {
- /* "netCDF4/_netCDF4.pyx":4693
+ /* "netCDF4/_netCDF4.pyx":4790
* if classp == NC_COMPOUND: # a compound type
* # recursively call this function?
* field_type = _read_compound(group, field_typeid, endian=endian) # <<<<<<<<<<<<<<
* else:
* raise KeyError('compound field of an unsupported data type')
*/
- __pyx_t_17.__pyx_n = 1;
- __pyx_t_17.endian = __pyx_v_endian;
- __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_group, __pyx_v_field_typeid, &__pyx_t_17); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4693, __pyx_L26_except_error)
+ __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, 4790, __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":4691
+ /* "netCDF4/_netCDF4.pyx":4788
* ierr = nc_inq_user_type(_grpid,
* field_typeid,NULL,NULL,NULL,NULL,&classp)
* if classp == NC_COMPOUND: # a compound type # <<<<<<<<<<<<<<
@@ -52433,7 +57119,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
goto __pyx_L40;
}
- /* "netCDF4/_netCDF4.pyx":4695
+ /* "netCDF4/_netCDF4.pyx":4792
* field_type = _read_compound(group, field_typeid, endian=endian)
* else:
* raise KeyError('compound field of an unsupported data type') # <<<<<<<<<<<<<<
@@ -52441,14 +57127,14 @@ 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__87, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4695, __pyx_L26_except_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4792, __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, 4695, __pyx_L26_except_error)
+ __PYX_ERR(0, 4792, __pyx_L26_except_error)
}
__pyx_L40:;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
goto __pyx_L25_exception_handled;
@@ -52456,7 +57142,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":4683
+ /* "netCDF4/_netCDF4.pyx":4780
* free(dim_sizes)
* # check to see if this field is a nested compound type.
* try: # <<<<<<<<<<<<<<
@@ -52464,40 +57150,40 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
* if endian is not None:
*/
__Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_12);
__Pyx_XGIVEREF(__pyx_t_13);
__Pyx_XGIVEREF(__pyx_t_14);
- __Pyx_XGIVEREF(__pyx_t_15);
- __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
+ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
goto __pyx_L1_error;
__pyx_L25_exception_handled:;
__Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_12);
__Pyx_XGIVEREF(__pyx_t_13);
__Pyx_XGIVEREF(__pyx_t_14);
- __Pyx_XGIVEREF(__pyx_t_15);
- __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
+ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
__pyx_L31_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":4696
+ /* "netCDF4/_netCDF4.pyx":4793
* 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, 4696, __pyx_L1_error)
- __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_16 < 0)) __PYX_ERR(0, 4696, __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, 4793, __pyx_L1_error)
+ __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 4793, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- if (__pyx_t_16) {
+ if (__pyx_t_15) {
- /* "netCDF4/_netCDF4.pyx":4697
+ /* "netCDF4/_netCDF4.pyx":4794
* 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, 4697, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4794, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_field_type);
__Pyx_GIVEREF(__pyx_v_field_type);
@@ -52505,10 +57191,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_12 = __Pyx_PyObject_Append(__pyx_v_formats, __pyx_t_8); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 4697, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_formats, __pyx_t_8); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4794, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":4696
+ /* "netCDF4/_netCDF4.pyx":4793
* else:
* raise KeyError('compound field of an unsupported data type')
* if field_shape != (): # <<<<<<<<<<<<<<
@@ -52518,7 +57204,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
goto __pyx_L41;
}
- /* "netCDF4/_netCDF4.pyx":4699
+ /* "netCDF4/_netCDF4.pyx":4796
* formats.append((field_type,field_shape))
* else:
* formats.append(field_type) # <<<<<<<<<<<<<<
@@ -52526,114 +57212,150 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
* names = _sortbylist(names, offsets)
*/
/*else*/ {
- __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_formats, __pyx_v_field_type); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 4699, __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, 4796, __pyx_L1_error)
}
__pyx_L41:;
}
- /* "netCDF4/_netCDF4.pyx":4701
+ /* "netCDF4/_netCDF4.pyx":4798
* 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, 4701, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4798, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = NULL;
- __pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
- __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
- if (likely(__pyx_t_10)) {
+ __pyx_t_9 = NULL;
+ __pyx_t_2 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
- __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_9);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_1, function);
- __pyx_t_9 = 1;
+ __pyx_t_2 = 1;
}
}
- __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4701, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- if (__pyx_t_10) {
- __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_10); __pyx_t_10 = NULL;
- }
- __Pyx_INCREF(__pyx_v_names);
- __Pyx_GIVEREF(__pyx_v_names);
- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, __pyx_v_names);
- __Pyx_INCREF(__pyx_v_offsets);
- __Pyx_GIVEREF(__pyx_v_offsets);
- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_v_offsets);
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4701, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #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, 4798, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else
+ #endif
+ #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, 4798, __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, 4798, __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;
+ }
+ __Pyx_INCREF(__pyx_v_names);
+ __Pyx_GIVEREF(__pyx_v_names);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_2, __pyx_v_names);
+ __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, 4798, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF_SET(__pyx_v_names, __pyx_t_8);
__pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":4702
+ /* "netCDF4/_netCDF4.pyx":4799
* # 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, 4702, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4799, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_7 = NULL;
- __pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_2 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_7)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
__Pyx_INCREF(__pyx_t_7);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_1, function);
- __pyx_t_9 = 1;
+ __pyx_t_2 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4702, __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;
- }
- __Pyx_INCREF(__pyx_v_formats);
- __Pyx_GIVEREF(__pyx_v_formats);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_formats);
- __Pyx_INCREF(__pyx_v_offsets);
- __Pyx_GIVEREF(__pyx_v_offsets);
- PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_offsets);
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4702, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ #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, 4799, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else
+ #endif
+ #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, 4799, __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, 4799, __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_INCREF(__pyx_v_formats);
+ __Pyx_GIVEREF(__pyx_v_formats);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_2, __pyx_v_formats);
+ __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, 4799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF_SET(__pyx_v_formats, __pyx_t_8);
__pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":4703
+ /* "netCDF4/_netCDF4.pyx":4800
* 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_12 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 4703, __pyx_L1_error)
+ __pyx_t_11 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 4800, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4705
+ /* "netCDF4/_netCDF4.pyx":4802
* 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, 4705, __pyx_L1_error)
+ __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4802, __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, 4705, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_formats, __pyx_v_formats) < 0) __PYX_ERR(0, 4705, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_offsets, __pyx_v_offsets) < 0) __PYX_ERR(0, 4705, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_names, __pyx_v_names) < 0) __PYX_ERR(0, 4802, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_formats, __pyx_v_formats) < 0) __PYX_ERR(0, 4802, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_offsets, __pyx_v_offsets) < 0) __PYX_ERR(0, 4802, __pyx_L1_error)
__pyx_v_dtype_dict = ((PyObject*)__pyx_t_8);
__pyx_t_8 = 0;
- /* "netCDF4/_netCDF4.pyx":4706
+ /* "netCDF4/_netCDF4.pyx":4803
* # 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) # <<<<<<<<<<<<<<
@@ -52641,7 +57363,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, 4706, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4803, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_v_group);
__Pyx_GIVEREF(__pyx_v_group);
@@ -52652,21 +57374,21 @@ 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, 4706, __pyx_L1_error)
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4803, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4706, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_typeid, __pyx_t_10) < 0) __PYX_ERR(0, 4706, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7netCDF4_8_netCDF4_CompoundType), __pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4706, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_9 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4803, __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, 4803, __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, 4803, __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;
- __pyx_r = __pyx_t_10;
- __pyx_t_10 = 0;
+ __pyx_r = __pyx_t_9;
+ __pyx_t_9 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4626
+ /* "netCDF4/_netCDF4.pyx":4723
* return xtype
*
* cdef _read_compound(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<<
@@ -52681,7 +57403,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("netCDF4._netCDF4._read_compound", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
@@ -52699,7 +57421,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_gro
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4726
+/* "netCDF4/_netCDF4.pyx":4823
* __pdoc__['VLType.dtype'] = \
* """A numpy dtype object describing the component type for the VLEN."""
* def __init__(self, grp, object dt, object dtype_name, **kwargs): # <<<<<<<<<<<<<<
@@ -52744,16 +57466,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, 4726, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 4823, __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, 4726, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 4823, __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, 4726, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4823, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
goto __pyx_L5_argtuple_error;
@@ -52768,7 +57490,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, 4726, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4823, __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);
@@ -52798,31 +57520,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":4745
+ /* "netCDF4/_netCDF4.pyx":4842
* """
* 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, 4745, __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, 4842, __pyx_L1_error)
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":4746
+ /* "netCDF4/_netCDF4.pyx":4843
* 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, 4746, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4843, __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, 4746, __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, 4843, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_xtype = __pyx_t_4;
- /* "netCDF4/_netCDF4.pyx":4745
+ /* "netCDF4/_netCDF4.pyx":4842
* """
* cdef nc_type xtype
* if 'typeid' in kwargs: # <<<<<<<<<<<<<<
@@ -52832,7 +57554,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":4748
+ /* "netCDF4/_netCDF4.pyx":4845
* xtype = kwargs['typeid']
* else:
* xtype, dt = _def_vlen(grp, dt, dtype_name) # <<<<<<<<<<<<<<
@@ -52840,11 +57562,11 @@ 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, 4748, __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, 4845, __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_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -52852,9 +57574,9 @@ 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, 4748, __pyx_L1_error)
+ __PYX_ERR(0, 4845, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
@@ -52865,15 +57587,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, 4748, __pyx_L1_error)
+ __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4845, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4748, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4845, __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, 4748, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4845, __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;
@@ -52881,7 +57603,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, 4748, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 4845, __pyx_L1_error)
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L5_unpacking_done;
@@ -52889,10 +57611,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, 4748, __pyx_L1_error)
+ __PYX_ERR(0, 4845, __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, 4748, __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, 4845, __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);
@@ -52900,7 +57622,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":4749
+ /* "netCDF4/_netCDF4.pyx":4846
* else:
* xtype, dt = _def_vlen(grp, dt, dtype_name)
* self._nc_type = xtype # <<<<<<<<<<<<<<
@@ -52909,7 +57631,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":4750
+ /* "netCDF4/_netCDF4.pyx":4847
* xtype, dt = _def_vlen(grp, dt, dtype_name)
* self._nc_type = xtype
* self.dtype = dt # <<<<<<<<<<<<<<
@@ -52922,19 +57644,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":4751
+ /* "netCDF4/_netCDF4.pyx":4848
* 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, 4751, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4751, __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, 4848, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4848, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":4752
+ /* "netCDF4/_netCDF4.pyx":4849
* self.dtype = dt
* if dt == str:
* self.name = None # <<<<<<<<<<<<<<
@@ -52947,7 +57669,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":4751
+ /* "netCDF4/_netCDF4.pyx":4848
* self._nc_type = xtype
* self.dtype = dt
* if dt == str: # <<<<<<<<<<<<<<
@@ -52957,7 +57679,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF
goto __pyx_L6;
}
- /* "netCDF4/_netCDF4.pyx":4754
+ /* "netCDF4/_netCDF4.pyx":4851
* self.name = None
* else:
* self.name = dtype_name # <<<<<<<<<<<<<<
@@ -52973,7 +57695,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF
}
__pyx_L6:;
- /* "netCDF4/_netCDF4.pyx":4726
+ /* "netCDF4/_netCDF4.pyx":4823
* __pdoc__['VLType.dtype'] = \
* """A numpy dtype object describing the component type for the VLEN."""
* def __init__(self, grp, object dt, object dtype_name, **kwargs): # <<<<<<<<<<<<<<
@@ -52997,7 +57719,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4756
+/* "netCDF4/_netCDF4.pyx":4853
* self.name = dtype_name
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -53029,20 +57751,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":4757
+ /* "netCDF4/_netCDF4.pyx":4854
*
* 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, 4757, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4854, __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, 4757, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4854, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":4758
+ /* "netCDF4/_netCDF4.pyx":4855
* def __repr__(self):
* if python3:
* return self.__unicode__() # <<<<<<<<<<<<<<
@@ -53050,10 +57772,10 @@ 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, 4758, __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, 4855, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -53063,10 +57785,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, 4758, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4855, __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, 4758, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4855, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -53074,7 +57796,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4757
+ /* "netCDF4/_netCDF4.pyx":4854
*
* def __repr__(self):
* if python3: # <<<<<<<<<<<<<<
@@ -53083,7 +57805,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_
*/
}
- /* "netCDF4/_netCDF4.pyx":4760
+ /* "netCDF4/_netCDF4.pyx":4857
* return self.__unicode__()
* else:
* return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<<
@@ -53092,21 +57814,21 @@ 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, 4760, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4857, __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, 4760, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4857, __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, 4760, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4857, __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, 4760, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4857, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ 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);
@@ -53116,19 +57838,39 @@ 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, 4760, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4857, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4760, __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, 4760, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 4857, __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
+ #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, 4857, __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, 4857, __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, 4857, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_1;
@@ -53136,7 +57878,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":4756
+ /* "netCDF4/_netCDF4.pyx":4853
* self.name = dtype_name
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -53159,7 +57901,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4762
+/* "netCDF4/_netCDF4.pyx":4859
* return unicode(self).encode(default_encoding)
*
* def __unicode__(self): # <<<<<<<<<<<<<<
@@ -53189,19 +57931,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":4763
+ /* "netCDF4/_netCDF4.pyx":4860
*
* 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, 4763, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4763, __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, 4860, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4860, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":4764
+ /* "netCDF4/_netCDF4.pyx":4861
* def __unicode__(self):
* if self.dtype == str:
* return repr(type(self))+': string type' # <<<<<<<<<<<<<<
@@ -53209,16 +57951,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, 4764, __pyx_L1_error)
+ __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4861, __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, 4764, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_s_string_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4861, __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":4763
+ /* "netCDF4/_netCDF4.pyx":4860
*
* def __unicode__(self):
* if self.dtype == str: # <<<<<<<<<<<<<<
@@ -53227,7 +57969,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_o
*/
}
- /* "netCDF4/_netCDF4.pyx":4766
+ /* "netCDF4/_netCDF4.pyx":4863
* return repr(type(self))+': string type'
* else:
* return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\ # <<<<<<<<<<<<<<
@@ -53236,17 +57978,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, 4766, __pyx_L1_error)
+ __pyx_t_3 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4863, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- /* "netCDF4/_netCDF4.pyx":4767
+ /* "netCDF4/_netCDF4.pyx":4864
* else:
* return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
* (self.name, self.dtype) # <<<<<<<<<<<<<<
*
- * cdef _def_vlen(grp, object dt, object dtype_name):
+ * def __reduce__(self):
*/
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4767, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4864, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_self->name);
__Pyx_GIVEREF(__pyx_v_self->name);
@@ -53255,17 +57997,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":4766
+ /* "netCDF4/_netCDF4.pyx":4863
* 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, 4766, __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, 4863, __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, 4766, __pyx_L1_error)
+ __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4863, __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;
@@ -53274,7 +58016,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_o
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":4762
+ /* "netCDF4/_netCDF4.pyx":4859
* return unicode(self).encode(default_encoding)
*
* def __unicode__(self): # <<<<<<<<<<<<<<
@@ -53295,7 +58037,65 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4720
+/* "netCDF4/_netCDF4.pyx":4866
+ * (self.name, self.dtype)
+ *
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * # raise error is user tries to pickle a VLType object.
+ * raise NotImplementedError('VLType is not picklable')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6VLType_7__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6VLType_7__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_6VLType_6__reduce__(((struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_6__reduce__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce__", 0);
+
+ /* "netCDF4/_netCDF4.pyx":4868
+ * 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, 4868, __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, 4868, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":4866
+ * (self.name, self.dtype)
+ *
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * # raise error is user tries to pickle a VLType object.
+ * raise NotImplementedError('VLType is not picklable')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netCDF4._netCDF4.VLType.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":4817
* the user.
* """
* cdef public nc_type _nc_type # <<<<<<<<<<<<<<
@@ -53322,7 +58122,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, 4720, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4817, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -53357,7 +58157,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, 4720, __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, 4817, __pyx_L1_error)
__pyx_v_self->_nc_type = __pyx_t_1;
/* function exit code */
@@ -53371,7 +58171,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_8_nc_type_2__set__(struct __pyx_o
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4721
+/* "netCDF4/_netCDF4.pyx":4818
* """
* cdef public nc_type _nc_type
* cdef public dtype, name # <<<<<<<<<<<<<<
@@ -53553,8 +58353,8 @@ static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_4name_4__del__(struct __pyx_obj_7
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4769
- * (self.name, self.dtype)
+/* "netCDF4/_netCDF4.pyx":4870
+ * raise NotImplementedError('VLType is not picklable')
*
* cdef _def_vlen(grp, object dt, object dtype_name): # <<<<<<<<<<<<<<
* # private function used to construct a netcdf VLEN data type
@@ -53581,19 +58381,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":4777
+ /* "netCDF4/_netCDF4.pyx":4878
* 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, 4777, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4777, __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, 4878, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4878, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":4778
+ /* "netCDF4/_netCDF4.pyx":4879
* cdef char *nested_namstring
* if dt == str: # python string, use NC_STRING
* xtype = NC_STRING # <<<<<<<<<<<<<<
@@ -53602,7 +58402,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO
*/
__pyx_v_xtype = NC_STRING;
- /* "netCDF4/_netCDF4.pyx":4777
+ /* "netCDF4/_netCDF4.pyx":4878
* cdef char *namstring
* cdef char *nested_namstring
* if dt == str: # python string, use NC_STRING # <<<<<<<<<<<<<<
@@ -53612,7 +58412,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":4781
+ /* "netCDF4/_netCDF4.pyx":4882
* # dtype_name ignored
* else: # numpy datatype
* bytestr = _strencode(dtype_name) # <<<<<<<<<<<<<<
@@ -53620,35 +58420,35 @@ 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, 4781, __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, 4882, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_bytestr = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4782
+ /* "netCDF4/_netCDF4.pyx":4883
* 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, 4782, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 4883, __pyx_L1_error)
__pyx_v_namstring = __pyx_t_3;
- /* "netCDF4/_netCDF4.pyx":4783
+ /* "netCDF4/_netCDF4.pyx":4884
* 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, 4783, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4884, __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, 4783, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4884, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -53658,79 +58458,97 @@ 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, 4783, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4884, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4783, __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, 4783, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 4884, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 4884, __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, 4884, __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, 4884, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4784
+ /* "netCDF4/_netCDF4.pyx":4885
* 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, 4784, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4885, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__88, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4784, __pyx_L1_error)
+ __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, 4885, __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, 4784, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4885, __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, 4784, __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, 4885, __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":4787
+ /* "netCDF4/_netCDF4.pyx":4888
* # 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, 4787, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4888, __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, 4787, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4888, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__89, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4787, __pyx_L1_error)
+ __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, 4888, __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, 4787, __pyx_L1_error)
+ __pyx_t_5 = PyObject_GetItem(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4888, __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, 4787, __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, 4888, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_xtype_tmp = __pyx_t_8;
- /* "netCDF4/_netCDF4.pyx":4788
+ /* "netCDF4/_netCDF4.pyx":4889
* # 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((<char *>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, 4788, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4889, __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, 4788, __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, 4889, __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":4789
+ /* "netCDF4/_netCDF4.pyx":4890
* xtype_tmp = _nptonctype[dt.str[1:]]
* ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype);
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -53740,7 +58558,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":4790
+ /* "netCDF4/_netCDF4.pyx":4891
* ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype);
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -53748,22 +58566,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, 4790, __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, 4891, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4790, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4891, __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, 4790, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4891, __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, 4790, __pyx_L1_error)
+ __PYX_ERR(0, 4891, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4789
+ /* "netCDF4/_netCDF4.pyx":4890
* xtype_tmp = _nptonctype[dt.str[1:]]
* ierr = nc_def_vlen(grp._grpid, namstring, xtype_tmp, &xtype);
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -53772,7 +58590,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO
*/
}
- /* "netCDF4/_netCDF4.pyx":4784
+ /* "netCDF4/_netCDF4.pyx":4885
* namstring = bytestr
* dt = numpy.dtype(dt) # convert to numpy datatype.
* if dt.str[1:] in _supportedtypes: # <<<<<<<<<<<<<<
@@ -53782,7 +58600,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO
goto __pyx_L4;
}
- /* "netCDF4/_netCDF4.pyx":4792
+ /* "netCDF4/_netCDF4.pyx":4893
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* else:
* raise KeyError("unsupported datatype specified for VLEN") # <<<<<<<<<<<<<<
@@ -53790,17 +58608,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__90, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4792, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4893, __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, 4792, __pyx_L1_error)
+ __PYX_ERR(0, 4893, __pyx_L1_error)
}
__pyx_L4:;
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":4793
+ /* "netCDF4/_netCDF4.pyx":4894
* else:
* raise KeyError("unsupported datatype specified for VLEN")
* return xtype, dt # <<<<<<<<<<<<<<
@@ -53808,9 +58626,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, 4793, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4894, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4793, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4894, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
@@ -53822,8 +58640,8 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO
__pyx_t_6 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4769
- * (self.name, self.dtype)
+ /* "netCDF4/_netCDF4.pyx":4870
+ * raise NotImplementedError('VLType is not picklable')
*
* cdef _def_vlen(grp, object dt, object dtype_name): # <<<<<<<<<<<<<<
* # private function used to construct a netcdf VLEN data type
@@ -53846,7 +58664,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *__pyx_v_grp, PyO
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4795
+/* "netCDF4/_netCDF4.pyx":4896
* return xtype, dt
*
* cdef _read_vlen(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<<
@@ -53874,12 +58692,11 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group,
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
- Py_ssize_t __pyx_t_9;
+ PyObject *__pyx_t_9 = NULL;
PyObject *__pyx_t_10 = NULL;
PyObject *__pyx_t_11 = NULL;
PyObject *__pyx_t_12 = NULL;
- PyObject *__pyx_t_13 = NULL;
- int __pyx_t_14;
+ int __pyx_t_13;
__Pyx_RefNannySetupContext("_read_vlen", 0);
if (__pyx_optional_args) {
if (__pyx_optional_args->__pyx_n > 0) {
@@ -53887,20 +58704,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group,
}
}
- /* "netCDF4/_netCDF4.pyx":4804
+ /* "netCDF4/_netCDF4.pyx":4905
* 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, 4804, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4905, __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, 4804, __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, 4905, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v__grpid = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":4805
+ /* "netCDF4/_netCDF4.pyx":4906
* cdef char vl_namstring[NC_MAX_NAME+1]
* _grpid = group._grpid
* if xtype == NC_STRING: # <<<<<<<<<<<<<<
@@ -53910,7 +58727,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":4806
+ /* "netCDF4/_netCDF4.pyx":4907
* _grpid = group._grpid
* if xtype == NC_STRING:
* dt = str # <<<<<<<<<<<<<<
@@ -53920,7 +58737,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":4807
+ /* "netCDF4/_netCDF4.pyx":4908
* if xtype == NC_STRING:
* dt = str
* name = None # <<<<<<<<<<<<<<
@@ -53930,7 +58747,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":4805
+ /* "netCDF4/_netCDF4.pyx":4906
* cdef char vl_namstring[NC_MAX_NAME+1]
* _grpid = group._grpid
* if xtype == NC_STRING: # <<<<<<<<<<<<<<
@@ -53940,7 +58757,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group,
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":4809
+ /* "netCDF4/_netCDF4.pyx":4910
* name = None
* else:
* with nogil: # <<<<<<<<<<<<<<
@@ -53955,7 +58772,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group,
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4810
+ /* "netCDF4/_netCDF4.pyx":4911
* else:
* with nogil:
* ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype) # <<<<<<<<<<<<<<
@@ -53965,7 +58782,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":4809
+ /* "netCDF4/_netCDF4.pyx":4910
* name = None
* else:
* with nogil: # <<<<<<<<<<<<<<
@@ -53983,7 +58800,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group,
}
}
- /* "netCDF4/_netCDF4.pyx":4811
+ /* "netCDF4/_netCDF4.pyx":4912
* with nogil:
* ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -53993,7 +58810,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":4812
+ /* "netCDF4/_netCDF4.pyx":4913
* ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -54001,22 +58818,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, 4812, __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, 4913, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4812, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4913, __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, 4812, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4913, __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, 4812, __pyx_L1_error)
+ __PYX_ERR(0, 4913, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4811
+ /* "netCDF4/_netCDF4.pyx":4912
* with nogil:
* ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -54025,53 +58842,75 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group,
*/
}
- /* "netCDF4/_netCDF4.pyx":4813
+ /* "netCDF4/_netCDF4.pyx":4914
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 4813, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_vl_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4914, __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, 4813, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4914, __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, 4813, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4914, __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, 4813, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4914, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
- __pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_2 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_9 = 1;
+ __pyx_t_2 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4813, __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;
+ #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, 4914, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #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, 4914, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4914, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_2, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_7);
+ 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, 4914, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_7);
- 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, 4813, __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;
__pyx_v_name = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4814
+ /* "netCDF4/_netCDF4.pyx":4915
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* name = vl_namstring.decode(default_encoding,unicode_error)
* try: # <<<<<<<<<<<<<<
@@ -54081,28 +58920,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group,
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
+ __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
+ __Pyx_XGOTREF(__pyx_t_10);
__Pyx_XGOTREF(__pyx_t_11);
__Pyx_XGOTREF(__pyx_t_12);
- __Pyx_XGOTREF(__pyx_t_13);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4815
+ /* "netCDF4/_netCDF4.pyx":4916
* 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, 4815, __pyx_L8_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4916, __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, 4815, __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, 4916, __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":4816
+ /* "netCDF4/_netCDF4.pyx":4917
* try:
* datatype = _nctonptype[base_xtype]
* if endian is not None: datatype = endian + datatype # <<<<<<<<<<<<<<
@@ -54110,55 +58949,73 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group,
* except KeyError:
*/
__pyx_t_3 = (__pyx_v_endian != Py_None);
- __pyx_t_14 = (__pyx_t_3 != 0);
- if (__pyx_t_14) {
- __pyx_t_6 = PyNumber_Add(__pyx_v_endian, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4816, __pyx_L8_error)
+ __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, 4917, __pyx_L8_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_6);
__pyx_t_6 = 0;
}
- /* "netCDF4/_netCDF4.pyx":4817
+ /* "netCDF4/_netCDF4.pyx":4918
* 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, 4817, __pyx_L8_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4918, __pyx_L8_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4817, __pyx_L8_error)
- __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4918, __pyx_L8_error)
+ __Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
if (likely(__pyx_t_1)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_10, function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
}
}
if (!__pyx_t_1) {
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4817, __pyx_L8_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4918, __pyx_L8_error)
__Pyx_GOTREF(__pyx_t_6);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4817, __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_10, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4817, __pyx_L8_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #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, 4918, __pyx_L8_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #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, 4918, __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, 4918, __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, 4918, __pyx_L8_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_v_dt = __pyx_t_6;
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":4814
+ /* "netCDF4/_netCDF4.pyx":4915
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* name = vl_namstring.decode(default_encoding,unicode_error)
* try: # <<<<<<<<<<<<<<
@@ -54166,9 +59023,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group,
* if endian is not None: datatype = endian + datatype
*/
}
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
goto __pyx_L15_try_end;
__pyx_L8_error:;
__Pyx_PyThreadState_assign
@@ -54176,10 +59033,10 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group,
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":4818
+ /* "netCDF4/_netCDF4.pyx":4919
* if endian is not None: datatype = endian + datatype
* dt = numpy.dtype(datatype) # see if it is a primitive type
* except KeyError: # <<<<<<<<<<<<<<
@@ -54189,28 +59046,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_10, &__pyx_t_7) < 0) __PYX_ERR(0, 4818, __pyx_L10_except_error)
+ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 4919, __pyx_L10_except_error)
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GOTREF(__pyx_t_9);
__Pyx_GOTREF(__pyx_t_7);
- /* "netCDF4/_netCDF4.pyx":4819
+ /* "netCDF4/_netCDF4.pyx":4920
* 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__91, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4819, __pyx_L10_except_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4920, __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, 4819, __pyx_L10_except_error)
+ __PYX_ERR(0, 4920, __pyx_L10_except_error)
}
goto __pyx_L10_except_error;
__pyx_L10_except_error:;
- /* "netCDF4/_netCDF4.pyx":4814
+ /* "netCDF4/_netCDF4.pyx":4915
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* name = vl_namstring.decode(default_encoding,unicode_error)
* try: # <<<<<<<<<<<<<<
@@ -54218,17 +59075,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group,
* if endian is not None: datatype = endian + datatype
*/
__Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_10);
__Pyx_XGIVEREF(__pyx_t_11);
__Pyx_XGIVEREF(__pyx_t_12);
- __Pyx_XGIVEREF(__pyx_t_13);
- __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
+ __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
goto __pyx_L1_error;
__pyx_L15_try_end:;
}
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":4820
+ /* "netCDF4/_netCDF4.pyx":4921
* except KeyError:
* raise KeyError("unsupported component type for VLEN")
* return VLType(group, dt, name, typeid=xtype) # <<<<<<<<<<<<<<
@@ -54236,7 +59093,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, 4820, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4921, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_group);
__Pyx_GIVEREF(__pyx_v_group);
@@ -54247,21 +59104,21 @@ 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_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4820, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_6 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4820, __pyx_L1_error)
+ __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4921, __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, 4921, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_typeid, __pyx_t_6) < 0) __PYX_ERR(0, 4820, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_typeid, __pyx_t_6) < 0) __PYX_ERR(0, 4921, __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_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4820, __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, 4921, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_r = __pyx_t_6;
__pyx_t_6 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4795
+ /* "netCDF4/_netCDF4.pyx":4896
* return xtype, dt
*
* cdef _read_vlen(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<<
@@ -54276,7 +59133,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group,
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("netCDF4._netCDF4._read_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
@@ -54288,7 +59145,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group,
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4842
+/* "netCDF4/_netCDF4.pyx":4943
* __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): # <<<<<<<<<<<<<<
@@ -54335,21 +59192,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, 4842, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 4943, __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, 4842, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 4943, __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, 4842, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 4943, __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, 4842, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4943, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
goto __pyx_L5_argtuple_error;
@@ -54366,7 +59223,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, 4842, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4943, __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);
@@ -54396,31 +59253,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":4864
+ /* "netCDF4/_netCDF4.pyx":4965
* """
* 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, 4864, __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, 4965, __pyx_L1_error)
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":4865
+ /* "netCDF4/_netCDF4.pyx":4966
* 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, 4865, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4966, __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, 4865, __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, 4966, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_xtype = __pyx_t_4;
- /* "netCDF4/_netCDF4.pyx":4864
+ /* "netCDF4/_netCDF4.pyx":4965
* """
* cdef nc_type xtype
* if 'typeid' in kwargs: # <<<<<<<<<<<<<<
@@ -54430,7 +59287,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":4867
+ /* "netCDF4/_netCDF4.pyx":4968
* xtype = kwargs['typeid']
* else:
* xtype, dt = _def_enum(grp, dt, dtype_name, enum_dict) # <<<<<<<<<<<<<<
@@ -54438,11 +59295,11 @@ 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, 4867, __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, 4968, __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_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -54450,9 +59307,9 @@ 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, 4867, __pyx_L1_error)
+ __PYX_ERR(0, 4968, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
@@ -54463,15 +59320,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, 4867, __pyx_L1_error)
+ __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4968, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4867, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4968, __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, 4867, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4968, __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;
@@ -54479,7 +59336,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, 4867, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 4968, __pyx_L1_error)
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L5_unpacking_done;
@@ -54487,10 +59344,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, 4867, __pyx_L1_error)
+ __PYX_ERR(0, 4968, __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, 4867, __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, 4968, __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);
@@ -54498,7 +59355,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":4868
+ /* "netCDF4/_netCDF4.pyx":4969
* else:
* xtype, dt = _def_enum(grp, dt, dtype_name, enum_dict)
* self._nc_type = xtype # <<<<<<<<<<<<<<
@@ -54507,7 +59364,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":4869
+ /* "netCDF4/_netCDF4.pyx":4970
* xtype, dt = _def_enum(grp, dt, dtype_name, enum_dict)
* self._nc_type = xtype
* self.dtype = dt # <<<<<<<<<<<<<<
@@ -54520,7 +59377,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":4870
+ /* "netCDF4/_netCDF4.pyx":4971
* self._nc_type = xtype
* self.dtype = dt
* self.name = dtype_name # <<<<<<<<<<<<<<
@@ -54533,7 +59390,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":4871
+ /* "netCDF4/_netCDF4.pyx":4972
* self.dtype = dt
* self.name = dtype_name
* self.enum_dict = enum_dict # <<<<<<<<<<<<<<
@@ -54546,7 +59403,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":4842
+ /* "netCDF4/_netCDF4.pyx":4943
* __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): # <<<<<<<<<<<<<<
@@ -54570,7 +59427,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType___init__(struct __pyx_obj_7netC
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4873
+/* "netCDF4/_netCDF4.pyx":4974
* self.enum_dict = enum_dict
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -54602,20 +59459,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":4874
+ /* "netCDF4/_netCDF4.pyx":4975
*
* 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, 4874, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4975, __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, 4874, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 4975, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":4875
+ /* "netCDF4/_netCDF4.pyx":4976
* def __repr__(self):
* if python3:
* return self.__unicode__() # <<<<<<<<<<<<<<
@@ -54623,10 +59480,10 @@ 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, 4875, __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, 4976, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -54636,10 +59493,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, 4875, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4976, __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, 4875, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4976, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -54647,7 +59504,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4874
+ /* "netCDF4/_netCDF4.pyx":4975
*
* def __repr__(self):
* if python3: # <<<<<<<<<<<<<<
@@ -54656,7 +59513,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob
*/
}
- /* "netCDF4/_netCDF4.pyx":4877
+ /* "netCDF4/_netCDF4.pyx":4978
* return self.__unicode__()
* else:
* return unicode(self).encode(default_encoding) # <<<<<<<<<<<<<<
@@ -54665,21 +59522,21 @@ 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, 4877, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4978, __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, 4877, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4978, __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, 4877, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4978, __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, 4877, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4978, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ 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);
@@ -54689,19 +59546,39 @@ 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, 4877, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4978, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4877, __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, 4877, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 4978, __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
+ #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, 4978, __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, 4978, __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, 4978, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_1;
@@ -54709,7 +59586,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":4873
+ /* "netCDF4/_netCDF4.pyx":4974
* self.enum_dict = enum_dict
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -54732,7 +59609,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_2__repr__(struct __pyx_ob
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4879
+/* "netCDF4/_netCDF4.pyx":4980
* return unicode(self).encode(default_encoding)
*
* def __unicode__(self): # <<<<<<<<<<<<<<
@@ -54761,7 +59638,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":4880
+ /* "netCDF4/_netCDF4.pyx":4981
*
* def __unicode__(self):
* return repr(type(self))+\ # <<<<<<<<<<<<<<
@@ -54769,17 +59646,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, 4880, __pyx_L1_error)
+ __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4981, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- /* "netCDF4/_netCDF4.pyx":4882
+ /* "netCDF4/_netCDF4.pyx":4983
* return repr(type(self))+\
* ": name = '%s', numpy dtype = %s, fields/values =%s\n" %\
* (self.name, self.dtype, self.enum_dict) # <<<<<<<<<<<<<<
*
- * cdef _def_enum(grp, object dt, object dtype_name, object enum_dict):
+ * def __reduce__(self):
*/
- __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4882, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4983, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_self->name);
__Pyx_GIVEREF(__pyx_v_self->name);
@@ -54791,25 +59668,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":4881
+ /* "netCDF4/_netCDF4.pyx":4982
* 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, 4881, __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, 4982, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":4880
+ /* "netCDF4/_netCDF4.pyx":4981
*
* 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, 4880, __pyx_L1_error)
+ __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4981, __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;
@@ -54817,7 +59694,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_4__unicode__(struct __pyx
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4879
+ /* "netCDF4/_netCDF4.pyx":4980
* return unicode(self).encode(default_encoding)
*
* def __unicode__(self): # <<<<<<<<<<<<<<
@@ -54838,7 +59715,65 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_4__unicode__(struct __pyx
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4834
+/* "netCDF4/_netCDF4.pyx":4985
+ * (self.name, self.dtype, self.enum_dict)
+ *
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * # raise error is user tries to pickle a EnumType object.
+ * raise NotImplementedError('EnumType is not picklable')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8EnumType_7__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8EnumType_7__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_8EnumType_6__reduce__(((struct __pyx_obj_7netCDF4_8_netCDF4_EnumType *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8EnumType_6__reduce__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_EnumType *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce__", 0);
+
+ /* "netCDF4/_netCDF4.pyx":4987
+ * 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, 4987, __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, 4987, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":4985
+ * (self.name, self.dtype, self.enum_dict)
+ *
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * # raise error is user tries to pickle a EnumType object.
+ * raise NotImplementedError('EnumType is not picklable')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netCDF4._netCDF4.EnumType.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":4935
* the user.
* """
* cdef public nc_type _nc_type # <<<<<<<<<<<<<<
@@ -54865,7 +59800,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, 4834, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4935, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -54900,7 +59835,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, 4834, __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, 4935, __pyx_L1_error)
__pyx_v_self->_nc_type = __pyx_t_1;
/* function exit code */
@@ -54914,7 +59849,7 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType_8_nc_type_2__set__(struct __pyx
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4835
+/* "netCDF4/_netCDF4.pyx":4936
* """
* cdef public nc_type _nc_type
* cdef public dtype, name, enum_dict # <<<<<<<<<<<<<<
@@ -55183,8 +60118,8 @@ static int __pyx_pf_7netCDF4_8_netCDF4_8EnumType_9enum_dict_4__del__(struct __py
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4884
- * (self.name, self.dtype, self.enum_dict)
+/* "netCDF4/_netCDF4.pyx":4989
+ * raise NotImplementedError('EnumType is not picklable')
*
* cdef _def_enum(grp, object dt, object dtype_name, object enum_dict): # <<<<<<<<<<<<<<
* # private function used to construct a netCDF Enum data type
@@ -55217,42 +60152,42 @@ 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":4890
+ /* "netCDF4/_netCDF4.pyx":4995
* cdef int ierr, val
* cdef char *namstring
* 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, 4890, __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, 4995, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_bytestr = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4891
+ /* "netCDF4/_netCDF4.pyx":4996
* cdef char *namstring
* 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, 4891, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4996, __pyx_L1_error)
__pyx_v_namstring = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":4892
+ /* "netCDF4/_netCDF4.pyx":4997
* 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, 4892, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4997, __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, 4892, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4997, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -55262,42 +60197,60 @@ 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, 4892, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4997, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4892, __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, 4892, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ #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, 4997, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 4997, __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, 4997, __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, 4997, __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;
__Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4893
+ /* "netCDF4/_netCDF4.pyx":4998
* 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, 4893, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4998, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__92, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4893, __pyx_L1_error)
+ __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, 4998, __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, 4893, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_intnptonctype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4998, __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, 4893, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4998, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(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);
@@ -55307,55 +60260,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, 4893, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4998, __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, 4893, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4998, __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, 4893, __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, 4998, __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":4896
+ /* "netCDF4/_netCDF4.pyx":5001
* # 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, 4896, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_intnptonctype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5001, __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, 4896, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5001, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__93, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4896, __pyx_L1_error)
+ __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, 5001, __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, 4896, __pyx_L1_error)
+ __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5001, __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, 4896, __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, 5001, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_xtype_tmp = __pyx_t_8;
- /* "netCDF4/_netCDF4.pyx":4897
+ /* "netCDF4/_netCDF4.pyx":5002
* # 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((<char *>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, 4897, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5002, __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, 4897, __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, 5002, __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":4898
+ /* "netCDF4/_netCDF4.pyx":5003
* xtype_tmp = _intnptonctype[dt.str[1:]]
* ierr = nc_def_enum(grp._grpid, xtype_tmp, namstring, &xtype);
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -55365,7 +60318,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":4899
+ /* "netCDF4/_netCDF4.pyx":5004
* ierr = nc_def_enum(grp._grpid, xtype_tmp, namstring, &xtype);
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -55373,22 +60326,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, 4899, __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, 5004, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4899, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5004, __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, 4899, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5004, __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, 4899, __pyx_L1_error)
+ __PYX_ERR(0, 5004, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4898
+ /* "netCDF4/_netCDF4.pyx":5003
* xtype_tmp = _intnptonctype[dt.str[1:]]
* ierr = nc_def_enum(grp._grpid, xtype_tmp, namstring, &xtype);
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -55397,7 +60350,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO
*/
}
- /* "netCDF4/_netCDF4.pyx":4893
+ /* "netCDF4/_netCDF4.pyx":4998
* namstring = bytestr
* dt = numpy.dtype(dt) # convert to numpy datatype.
* if dt.str[1:] in _intnptonctype.keys(): # <<<<<<<<<<<<<<
@@ -55407,7 +60360,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO
goto __pyx_L3;
}
- /* "netCDF4/_netCDF4.pyx":4901
+ /* "netCDF4/_netCDF4.pyx":5006
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* else:
* msg="unsupported datatype specified for Enum (must be integer)" # <<<<<<<<<<<<<<
@@ -55418,28 +60371,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":4902
+ /* "netCDF4/_netCDF4.pyx":5007
* 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, 4902, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5007, __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, 4902, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5007, __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, 4902, __pyx_L1_error)
+ __PYX_ERR(0, 5007, __pyx_L1_error)
}
__pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":4904
+ /* "netCDF4/_netCDF4.pyx":5009
* raise KeyError(msg)
* # insert named members into enum type.
* for field in enum_dict: # <<<<<<<<<<<<<<
@@ -55450,26 +60403,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, 4904, __pyx_L1_error)
+ __pyx_t_10 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_enum_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5009, __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, 4904, __pyx_L1_error)
+ __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5009, __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_COMPILING_IN_CPYTHON
- __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, 4904, __pyx_L1_error)
+ #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, 5009, __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, 4904, __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, 5009, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 4904, __pyx_L1_error)
+ #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, 5009, __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, 4904, __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, 5009, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
@@ -55479,7 +60432,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, 4904, __pyx_L1_error)
+ else __PYX_ERR(0, 5009, __pyx_L1_error)
}
break;
}
@@ -55488,64 +60441,64 @@ 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":4905
+ /* "netCDF4/_netCDF4.pyx":5010
* # insert named members into enum type.
* for field in enum_dict:
* value = enum_dict[field] # <<<<<<<<<<<<<<
* bytestr = _strencode(field)
* namstring = bytestr
*/
- __pyx_t_4 = PyObject_GetItem(__pyx_v_enum_dict, __pyx_v_field); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4905, __pyx_L1_error)
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_enum_dict, __pyx_v_field); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5010, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":4906
+ /* "netCDF4/_netCDF4.pyx":5011
* for field in enum_dict:
* value = enum_dict[field]
* bytestr = _strencode(field) # <<<<<<<<<<<<<<
* namstring = bytestr
* val = value
*/
- __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_field, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4906, __pyx_L1_error)
+ __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_field, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5011, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":4907
+ /* "netCDF4/_netCDF4.pyx":5012
* value = enum_dict[field]
* bytestr = _strencode(field)
* namstring = bytestr # <<<<<<<<<<<<<<
* val = value
* ierr = nc_insert_enum(grp._grpid, xtype, namstring, &val)
*/
- __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 4907, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 5012, __pyx_L1_error)
__pyx_v_namstring = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":4908
+ /* "netCDF4/_netCDF4.pyx":5013
* bytestr = _strencode(field)
* namstring = bytestr
* val = value # <<<<<<<<<<<<<<
* ierr = nc_insert_enum(grp._grpid, xtype, namstring, &val)
* if ierr != NC_NOERR:
*/
- __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 4908, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 5013, __pyx_L1_error)
__pyx_v_val = __pyx_t_9;
- /* "netCDF4/_netCDF4.pyx":4909
+ /* "netCDF4/_netCDF4.pyx":5014
* namstring = bytestr
* val = value
* ierr = nc_insert_enum(grp._grpid, xtype, namstring, &val) # <<<<<<<<<<<<<<
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 4909, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5014, __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, 4909, __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, 5014, __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_val));
- /* "netCDF4/_netCDF4.pyx":4910
+ /* "netCDF4/_netCDF4.pyx":5015
* val = value
* ierr = nc_insert_enum(grp._grpid, xtype, namstring, &val)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -55555,7 +60508,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":4911
+ /* "netCDF4/_netCDF4.pyx":5016
* ierr = nc_insert_enum(grp._grpid, xtype, namstring, &val)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -55563,22 +60516,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, 4911, __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, 5016, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4911, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5016, __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_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4911, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5016, __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, 4911, __pyx_L1_error)
+ __PYX_ERR(0, 5016, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4910
+ /* "netCDF4/_netCDF4.pyx":5015
* val = value
* ierr = nc_insert_enum(grp._grpid, xtype, namstring, &val)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -55587,7 +60540,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO
*/
}
- /* "netCDF4/_netCDF4.pyx":4904
+ /* "netCDF4/_netCDF4.pyx":5009
* raise KeyError(msg)
* # insert named members into enum type.
* for field in enum_dict: # <<<<<<<<<<<<<<
@@ -55597,7 +60550,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":4912
+ /* "netCDF4/_netCDF4.pyx":5017
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* return xtype, dt # <<<<<<<<<<<<<<
@@ -55605,9 +60558,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, 4912, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5017, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4912, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5017, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
@@ -55619,8 +60572,8 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO
__pyx_t_4 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4884
- * (self.name, self.dtype, self.enum_dict)
+ /* "netCDF4/_netCDF4.pyx":4989
+ * raise NotImplementedError('EnumType is not picklable')
*
* cdef _def_enum(grp, object dt, object dtype_name, object enum_dict): # <<<<<<<<<<<<<<
* # private function used to construct a netCDF Enum data type
@@ -55646,7 +60599,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_enum(PyObject *__pyx_v_grp, PyO
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4914
+/* "netCDF4/_netCDF4.pyx":5019
* return xtype, dt
*
* cdef _read_enum(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<<
@@ -55677,13 +60630,12 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
- Py_ssize_t __pyx_t_9;
+ PyObject *__pyx_t_9 = NULL;
PyObject *__pyx_t_10 = NULL;
PyObject *__pyx_t_11 = NULL;
PyObject *__pyx_t_12 = NULL;
- PyObject *__pyx_t_13 = NULL;
- int __pyx_t_14;
- size_t __pyx_t_15;
+ int __pyx_t_13;
+ size_t __pyx_t_14;
__Pyx_RefNannySetupContext("_read_enum", 0);
if (__pyx_optional_args) {
if (__pyx_optional_args->__pyx_n > 0) {
@@ -55691,20 +60643,20 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
}
}
- /* "netCDF4/_netCDF4.pyx":4924
+ /* "netCDF4/_netCDF4.pyx":5029
* 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, 4924, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5029, __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, 4924, __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, 5029, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v__grpid = __pyx_t_2;
- /* "netCDF4/_netCDF4.pyx":4926
+ /* "netCDF4/_netCDF4.pyx":5031
* _grpid = group._grpid
* # get name, datatype, and number of members.
* with nogil: # <<<<<<<<<<<<<<
@@ -55718,7 +60670,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4927
+ /* "netCDF4/_netCDF4.pyx":5032
* # get name, datatype, and number of members.
* with nogil:
* ierr = nc_inq_enum(_grpid, xtype, enum_namstring, &base_xtype, NULL,\ # <<<<<<<<<<<<<<
@@ -55728,7 +60680,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":4926
+ /* "netCDF4/_netCDF4.pyx":5031
* _grpid = group._grpid
* # get name, datatype, and number of members.
* with nogil: # <<<<<<<<<<<<<<
@@ -55746,7 +60698,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
}
}
- /* "netCDF4/_netCDF4.pyx":4929
+ /* "netCDF4/_netCDF4.pyx":5034
* ierr = nc_inq_enum(_grpid, xtype, enum_namstring, &base_xtype, NULL,\
* &nmembers)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -55756,7 +60708,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":4930
+ /* "netCDF4/_netCDF4.pyx":5035
* &nmembers)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -55764,22 +60716,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, 4930, __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, 5035, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4930, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5035, __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, 4930, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5035, __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, 4930, __pyx_L1_error)
+ __PYX_ERR(0, 5035, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4929
+ /* "netCDF4/_netCDF4.pyx":5034
* ierr = nc_inq_enum(_grpid, xtype, enum_namstring, &base_xtype, NULL,\
* &nmembers)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -55788,53 +60740,75 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
*/
}
- /* "netCDF4/_netCDF4.pyx":4931
+ /* "netCDF4/_netCDF4.pyx":5036
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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, 4931, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_enum_namstring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5036, __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, 4931, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5036, __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, 4931, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5036, __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, 4931, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5036, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
- __pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_2 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_9 = 1;
+ __pyx_t_2 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4931, __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;
+ #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, 5036, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #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, 5036, __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;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5036, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_2, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_7);
+ 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, 5036, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_7);
- 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, 4931, __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;
__pyx_v_name = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4932
+ /* "netCDF4/_netCDF4.pyx":5037
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* name = enum_namstring.decode(default_encoding,unicode_error)
* try: # <<<<<<<<<<<<<<
@@ -55844,28 +60818,28 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
+ __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
+ __Pyx_XGOTREF(__pyx_t_10);
__Pyx_XGOTREF(__pyx_t_11);
__Pyx_XGOTREF(__pyx_t_12);
- __Pyx_XGOTREF(__pyx_t_13);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4933
+ /* "netCDF4/_netCDF4.pyx":5038
* 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, 4933, __pyx_L7_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5038, __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, 4933, __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, 5038, __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":4934
+ /* "netCDF4/_netCDF4.pyx":5039
* try:
* datatype = _nctonptype[base_xtype]
* if endian is not None: datatype = endian + datatype # <<<<<<<<<<<<<<
@@ -55873,55 +60847,73 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
* except KeyError:
*/
__pyx_t_3 = (__pyx_v_endian != Py_None);
- __pyx_t_14 = (__pyx_t_3 != 0);
- if (__pyx_t_14) {
- __pyx_t_6 = PyNumber_Add(__pyx_v_endian, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4934, __pyx_L7_error)
+ __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, 5039, __pyx_L7_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_6);
__pyx_t_6 = 0;
}
- /* "netCDF4/_netCDF4.pyx":4935
+ /* "netCDF4/_netCDF4.pyx":5040
* 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, 4935, __pyx_L7_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5040, __pyx_L7_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4935, __pyx_L7_error)
- __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5040, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
if (likely(__pyx_t_1)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_10, function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
}
}
if (!__pyx_t_1) {
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4935, __pyx_L7_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5040, __pyx_L7_error)
__Pyx_GOTREF(__pyx_t_6);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4935, __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_10, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4935, __pyx_L7_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #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, 5040, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #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, 5040, __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, 5040, __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, 5040, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_v_dt = __pyx_t_6;
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":4932
+ /* "netCDF4/_netCDF4.pyx":5037
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* name = enum_namstring.decode(default_encoding,unicode_error)
* try: # <<<<<<<<<<<<<<
@@ -55929,9 +60921,9 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
* if endian is not None: datatype = endian + datatype
*/
}
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
goto __pyx_L14_try_end;
__pyx_L7_error:;
__Pyx_PyThreadState_assign
@@ -55939,10 +60931,10 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":4936
+ /* "netCDF4/_netCDF4.pyx":5041
* if endian is not None: datatype = endian + datatype
* dt = numpy.dtype(datatype) # see if it is a primitive type
* except KeyError: # <<<<<<<<<<<<<<
@@ -55952,28 +60944,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_10, &__pyx_t_7) < 0) __PYX_ERR(0, 4936, __pyx_L9_except_error)
+ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 5041, __pyx_L9_except_error)
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GOTREF(__pyx_t_9);
__Pyx_GOTREF(__pyx_t_7);
- /* "netCDF4/_netCDF4.pyx":4937
+ /* "netCDF4/_netCDF4.pyx":5042
* 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__94, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4937, __pyx_L9_except_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5042, __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, 4937, __pyx_L9_except_error)
+ __PYX_ERR(0, 5042, __pyx_L9_except_error)
}
goto __pyx_L9_except_error;
__pyx_L9_except_error:;
- /* "netCDF4/_netCDF4.pyx":4932
+ /* "netCDF4/_netCDF4.pyx":5037
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* name = enum_namstring.decode(default_encoding,unicode_error)
* try: # <<<<<<<<<<<<<<
@@ -55981,37 +60973,37 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
* if endian is not None: datatype = endian + datatype
*/
__Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_10);
__Pyx_XGIVEREF(__pyx_t_11);
__Pyx_XGIVEREF(__pyx_t_12);
- __Pyx_XGIVEREF(__pyx_t_13);
- __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
+ __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
goto __pyx_L1_error;
__pyx_L14_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":4939
+ /* "netCDF4/_netCDF4.pyx":5044
* 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, 4939, __pyx_L1_error)
+ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5044, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_v_enum_dict = ((PyObject*)__pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":4940
+ /* "netCDF4/_netCDF4.pyx":5045
* # loop over members, build dict.
* enum_dict = {}
* for nmem from 0 <= nmem < nmembers: # <<<<<<<<<<<<<<
* with nogil:
* ierr = nc_inq_enum_member(_grpid, xtype, nmem, \
*/
- __pyx_t_15 = __pyx_v_nmembers;
- for (__pyx_v_nmem = 0; __pyx_v_nmem < __pyx_t_15; __pyx_v_nmem++) {
+ __pyx_t_14 = __pyx_v_nmembers;
+ for (__pyx_v_nmem = 0; __pyx_v_nmem < __pyx_t_14; __pyx_v_nmem++) {
- /* "netCDF4/_netCDF4.pyx":4941
+ /* "netCDF4/_netCDF4.pyx":5046
* enum_dict = {}
* for nmem from 0 <= nmem < nmembers:
* with nogil: # <<<<<<<<<<<<<<
@@ -56025,7 +61017,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
#endif
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4942
+ /* "netCDF4/_netCDF4.pyx":5047
* for nmem from 0 <= nmem < nmembers:
* with nogil:
* ierr = nc_inq_enum_member(_grpid, xtype, nmem, \ # <<<<<<<<<<<<<<
@@ -56035,7 +61027,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":4941
+ /* "netCDF4/_netCDF4.pyx":5046
* enum_dict = {}
* for nmem from 0 <= nmem < nmembers:
* with nogil: # <<<<<<<<<<<<<<
@@ -56053,17 +61045,17 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
}
}
- /* "netCDF4/_netCDF4.pyx":4944
+ /* "netCDF4/_netCDF4.pyx":5049
* ierr = nc_inq_enum_member(_grpid, xtype, nmem, \
* enum_namstring, &enum_val)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* name = enum_namstring.decode(default_encoding,unicode_error)
*/
- __pyx_t_14 = ((__pyx_v_ierr != NC_NOERR) != 0);
- if (__pyx_t_14) {
+ __pyx_t_13 = ((__pyx_v_ierr != NC_NOERR) != 0);
+ if (__pyx_t_13) {
- /* "netCDF4/_netCDF4.pyx":4945
+ /* "netCDF4/_netCDF4.pyx":5050
* enum_namstring, &enum_val)
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii')) # <<<<<<<<<<<<<<
@@ -56071,22 +61063,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, 4945, __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, 5050, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4945, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5050, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
__Pyx_INCREF(__pyx_t_7);
__Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_10, 0, __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_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4945, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5050, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __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, 4945, __pyx_L1_error)
+ __PYX_ERR(0, 5050, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4944
+ /* "netCDF4/_netCDF4.pyx":5049
* ierr = nc_inq_enum_member(_grpid, xtype, nmem, \
* enum_namstring, &enum_val)
* if ierr != NC_NOERR: # <<<<<<<<<<<<<<
@@ -56095,74 +61087,96 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
*/
}
- /* "netCDF4/_netCDF4.pyx":4946
+ /* "netCDF4/_netCDF4.pyx":5051
* if ierr != NC_NOERR:
* raise RuntimeError((<char *>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_10 = __Pyx_PyObject_FromString(__pyx_v_enum_namstring); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4946, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4946, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_FromString(__pyx_v_enum_namstring); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5051, __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, 5051, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __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, 4946, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4946, __pyx_L1_error)
+ __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, 5051, __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, 5051, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_5 = NULL;
- __pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_2 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_9 = 1;
+ __pyx_t_2 = 1;
}
}
- __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4946, __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;
+ #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, 5051, __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;
+ __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[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, 5051, __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;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5051, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_2, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_1);
+ 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, 5051, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
- __Pyx_GIVEREF(__pyx_t_10);
- PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_1);
- __pyx_t_10 = 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, 4946, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF_SET(__pyx_v_name, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":4947
+ /* "netCDF4/_netCDF4.pyx":5052
* raise RuntimeError((<char *>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, 4947, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_From_char(__pyx_v_enum_val); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5052, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4947, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5052, __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, 4947, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyInt_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5052, __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, 4947, __pyx_L1_error)
+ if (unlikely(PyDict_SetItem(__pyx_v_enum_dict, __pyx_v_name, __pyx_t_7) < 0)) __PYX_ERR(0, 5052, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
- /* "netCDF4/_netCDF4.pyx":4948
+ /* "netCDF4/_netCDF4.pyx":5053
* name = enum_namstring.decode(default_encoding,unicode_error)
* enum_dict[name] = int(enum_val)
* return EnumType(group, dt, name, enum_dict, typeid=xtype) # <<<<<<<<<<<<<<
@@ -56170,7 +61184,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, 4948, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5053, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_group);
__Pyx_GIVEREF(__pyx_v_group);
@@ -56184,13 +61198,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, 4948, __pyx_L1_error)
+ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5053, __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, 4948, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5053, __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, 4948, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_typeid, __pyx_t_8) < 0) __PYX_ERR(0, 5053, __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, 4948, __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, 5053, __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;
@@ -56198,7 +61212,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
__pyx_t_8 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4914
+ /* "netCDF4/_netCDF4.pyx":5019
* return xtype, dt
*
* cdef _read_enum(group, nc_type xtype, endian=None): # <<<<<<<<<<<<<<
@@ -56213,7 +61227,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("netCDF4._netCDF4._read_enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
@@ -56226,7 +61240,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_enum(PyObject *__pyx_v_group,
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4950
+/* "netCDF4/_netCDF4.pyx":5055
* return EnumType(group, dt, name, enum_dict, typeid=xtype)
*
* cdef _strencode(pystr,encoding=None): # <<<<<<<<<<<<<<
@@ -56256,7 +61270,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr,
}
__Pyx_INCREF(__pyx_v_encoding);
- /* "netCDF4/_netCDF4.pyx":4953
+ /* "netCDF4/_netCDF4.pyx":5058
* # encode a string into bytes. If already bytes, do nothing.
* # uses default_encoding module variable for default encoding.
* if encoding is None: # <<<<<<<<<<<<<<
@@ -56267,19 +61281,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":4954
+ /* "netCDF4/_netCDF4.pyx":5059
* # 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, 4954, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5059, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":4953
+ /* "netCDF4/_netCDF4.pyx":5058
* # encode a string into bytes. If already bytes, do nothing.
* # uses default_encoding module variable for default encoding.
* if encoding is None: # <<<<<<<<<<<<<<
@@ -56288,7 +61302,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr,
*/
}
- /* "netCDF4/_netCDF4.pyx":4955
+ /* "netCDF4/_netCDF4.pyx":5060
* if encoding is None:
* encoding = default_encoding
* try: # <<<<<<<<<<<<<<
@@ -56304,7 +61318,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr,
__Pyx_XGOTREF(__pyx_t_6);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":4956
+ /* "netCDF4/_netCDF4.pyx":5061
* encoding = default_encoding
* try:
* return pystr.encode(encoding) # <<<<<<<<<<<<<<
@@ -56312,10 +61326,10 @@ 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, 4956, __pyx_L4_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_pystr, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5061, __pyx_L4_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -56325,25 +61339,43 @@ 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, 4956, __pyx_L4_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_encoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5061, __pyx_L4_error)
__Pyx_GOTREF(__pyx_t_3);
} else {
- __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4956, __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, 4956, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ #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, 5061, __pyx_L4_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #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, 5061, __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, 5061, __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, 5061, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L8_try_return;
- /* "netCDF4/_netCDF4.pyx":4955
+ /* "netCDF4/_netCDF4.pyx":5060
* if encoding is None:
* encoding = default_encoding
* try: # <<<<<<<<<<<<<<
@@ -56358,7 +61390,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":4957
+ /* "netCDF4/_netCDF4.pyx":5062
* try:
* return pystr.encode(encoding)
* except (AttributeError, UnicodeDecodeError): # <<<<<<<<<<<<<<
@@ -56368,12 +61400,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, 4957, __pyx_L6_except_error)
+ if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_7, &__pyx_t_9) < 0) __PYX_ERR(0, 5062, __pyx_L6_except_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GOTREF(__pyx_t_9);
- /* "netCDF4/_netCDF4.pyx":4958
+ /* "netCDF4/_netCDF4.pyx":5063
* return pystr.encode(encoding)
* except (AttributeError, UnicodeDecodeError):
* return pystr # already bytes or unicode? # <<<<<<<<<<<<<<
@@ -56391,7 +61423,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":4955
+ /* "netCDF4/_netCDF4.pyx":5060
* if encoding is None:
* encoding = default_encoding
* try: # <<<<<<<<<<<<<<
@@ -56420,7 +61452,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr,
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":4950
+ /* "netCDF4/_netCDF4.pyx":5055
* return EnumType(group, dt, name, enum_dict, typeid=xtype)
*
* cdef _strencode(pystr,encoding=None): # <<<<<<<<<<<<<<
@@ -56443,7 +61475,7 @@ static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr,
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4960
+/* "netCDF4/_netCDF4.pyx":5065
* return pystr # already bytes or unicode?
*
* def _to_ascii(bytestr): # <<<<<<<<<<<<<<
@@ -56474,20 +61506,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":4962
+ /* "netCDF4/_netCDF4.pyx":5067
* 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, 4962, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5067, __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, 4962, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5067, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":4963
+ /* "netCDF4/_netCDF4.pyx":5068
* # encode a byte string to an ascii encoded string.
* if python3:
* return str(bytestr,encoding='ascii') # <<<<<<<<<<<<<<
@@ -56495,15 +61527,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, 4963, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5068, __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, 4963, __pyx_L1_error)
+ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5068, __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, 4963, __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, 4963, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_n_s_ascii) < 0) __PYX_ERR(0, 5068, __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, 5068, __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;
@@ -56511,7 +61543,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject *
__pyx_t_4 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4962
+ /* "netCDF4/_netCDF4.pyx":5067
* def _to_ascii(bytestr):
* # encode a byte string to an ascii encoded string.
* if python3: # <<<<<<<<<<<<<<
@@ -56520,7 +61552,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject *
*/
}
- /* "netCDF4/_netCDF4.pyx":4965
+ /* "netCDF4/_netCDF4.pyx":5070
* return str(bytestr,encoding='ascii')
* else:
* return bytestr.encode('ascii') # <<<<<<<<<<<<<<
@@ -56529,9 +61561,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, 4965, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytestr, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5070, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4965, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5070, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_3;
@@ -56539,7 +61571,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject *
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":4960
+ /* "netCDF4/_netCDF4.pyx":5065
* return pystr # already bytes or unicode?
*
* def _to_ascii(bytestr): # <<<<<<<<<<<<<<
@@ -56560,7 +61592,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_to_ascii(CYTHON_UNUSED PyObject *
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":4977
+/* "netCDF4/_netCDF4.pyx":5082
* gregorian = datetime(1582,10,15)
*
* def _dateparse(timestr): # <<<<<<<<<<<<<<
@@ -56609,21 +61641,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject
PyObject *__pyx_t_9 = NULL;
PyObject *__pyx_t_10 = NULL;
PyObject *(*__pyx_t_11)(PyObject *);
- Py_ssize_t __pyx_t_12;
+ int __pyx_t_12;
int __pyx_t_13;
__Pyx_RefNannySetupContext("_dateparse", 0);
- /* "netCDF4/_netCDF4.pyx":4982
+ /* "netCDF4/_netCDF4.pyx":5087
* # 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, 4982, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5087, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -56633,30 +61665,30 @@ 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, 4982, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5087, __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, 4982, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5087, __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":4983
+ /* "netCDF4/_netCDF4.pyx":5088
* # 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, 4983, __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, 5088, __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, 4983, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5088, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -56666,30 +61698,30 @@ 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, 4983, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5088, __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, 4983, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5088, __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":4984
+ /* "netCDF4/_netCDF4.pyx":5089
* 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, 4984, __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, 5089, __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, 4984, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5089, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -56699,31 +61731,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, 4984, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5089, __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, 4984, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5089, __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, 4984, __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, 5089, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":4985
+ /* "netCDF4/_netCDF4.pyx":5090
* 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__96, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4985, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5090, __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, 4985, __pyx_L1_error)
+ __PYX_ERR(0, 5090, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4984
+ /* "netCDF4/_netCDF4.pyx":5089
* timestr_split = timestr.split()
* units = timestr_split[0].lower()
* if timestr_split[1].lower() != 'since': # <<<<<<<<<<<<<<
@@ -56732,49 +61764,49 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject
*/
}
- /* "netCDF4/_netCDF4.pyx":4987
+ /* "netCDF4/_netCDF4.pyx":5092
* 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, 4987, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_find); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5092, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4987, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5092, __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, 4987, __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, 5092, __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":4988
+ /* "netCDF4/_netCDF4.pyx":5093
* # 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, 4988, __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, 5093, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_isostring = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4990
+ /* "netCDF4/_netCDF4.pyx":5095
* 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, 4990, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5095, __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, 4990, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_isostring, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5095, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -56784,15 +61816,15 @@ 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, 4990, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5095, __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, 4990, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5095, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -56802,24 +61834,44 @@ 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, 4990, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5095, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4990, __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, 4990, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 5095, __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
+ #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, 5095, __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, 5095, __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, 5095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -56827,9 +61879,9 @@ 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, 4989, __pyx_L1_error)
+ __PYX_ERR(0, 5094, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
@@ -56859,7 +61911,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, 4989, __pyx_L1_error)
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 5094, __pyx_L1_error)
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
@@ -56869,7 +61921,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, 4989, __pyx_L1_error)
+ __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5094, __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;
@@ -56878,7 +61930,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, 4989, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 7) < 0) __PYX_ERR(0, 5094, __pyx_L1_error)
__pyx_t_11 = NULL;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L5_unpacking_done;
@@ -56886,11 +61938,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, 4989, __pyx_L1_error)
+ __PYX_ERR(0, 5094, __pyx_L1_error)
__pyx_L5_unpacking_done:;
}
- /* "netCDF4/_netCDF4.pyx":4989
+ /* "netCDF4/_netCDF4.pyx":5094
* n = timestr.find('since')+6
* isostring = timestr[n:]
* year, month, day, hour, minute, second, utc_offset =\ # <<<<<<<<<<<<<<
@@ -56912,33 +61964,33 @@ 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":4991
+ /* "netCDF4/_netCDF4.pyx":5096
* 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, 4991, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5096, __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, 4991, __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, 5096, __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, 4991, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5096, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":4992
+ /* "netCDF4/_netCDF4.pyx":5097
* _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, 4992, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5097, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_8 = NULL;
__pyx_t_12 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -56948,62 +62000,80 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject
__pyx_t_12 = 1;
}
}
- __pyx_t_7 = PyTuple_New(6+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4992, __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;
- }
- __Pyx_INCREF(__pyx_v_year);
- __Pyx_GIVEREF(__pyx_v_year);
- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_12, __pyx_v_year);
- __Pyx_INCREF(__pyx_v_month);
- __Pyx_GIVEREF(__pyx_v_month);
- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_12, __pyx_v_month);
- __Pyx_INCREF(__pyx_v_day);
- __Pyx_GIVEREF(__pyx_v_day);
- PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_12, __pyx_v_day);
- __Pyx_INCREF(__pyx_v_hour);
- __Pyx_GIVEREF(__pyx_v_hour);
- PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_12, __pyx_v_hour);
- __Pyx_INCREF(__pyx_v_minute);
- __Pyx_GIVEREF(__pyx_v_minute);
- PyTuple_SET_ITEM(__pyx_t_7, 4+__pyx_t_12, __pyx_v_minute);
- __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, 4992, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #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, 5097, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ } else
+ #endif
+ #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, 5097, __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, 5097, __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;
+ }
+ __Pyx_INCREF(__pyx_v_year);
+ __Pyx_GIVEREF(__pyx_v_year);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_12, __pyx_v_year);
+ __Pyx_INCREF(__pyx_v_month);
+ __Pyx_GIVEREF(__pyx_v_month);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_12, __pyx_v_month);
+ __Pyx_INCREF(__pyx_v_day);
+ __Pyx_GIVEREF(__pyx_v_day);
+ PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_12, __pyx_v_day);
+ __Pyx_INCREF(__pyx_v_hour);
+ __Pyx_GIVEREF(__pyx_v_hour);
+ PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_12, __pyx_v_hour);
+ __Pyx_INCREF(__pyx_v_minute);
+ __Pyx_GIVEREF(__pyx_v_minute);
+ PyTuple_SET_ITEM(__pyx_t_7, 4+__pyx_t_12, __pyx_v_minute);
+ __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, 5097, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_basedate = __pyx_t_9;
__pyx_t_9 = 0;
- /* "netCDF4/_netCDF4.pyx":4994
+ /* "netCDF4/_netCDF4.pyx":5099
* 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, 4994, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5099, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4994, __pyx_L1_error)
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5099, __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, 4994, __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, 5099, __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, 4994, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_days, __pyx_t_7) < 0) __PYX_ERR(0, 5099, __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, 4994, __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, 5099, __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, 4994, __pyx_L1_error)
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_basedate, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5099, __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":4991
+ /* "netCDF4/_netCDF4.pyx":5096
* year, month, day, hour, minute, second, utc_offset =\
* _parse_date( isostring.strip() )
* if year >= MINYEAR: # <<<<<<<<<<<<<<
@@ -57013,7 +62083,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject
goto __pyx_L6;
}
- /* "netCDF4/_netCDF4.pyx":4996
+ /* "netCDF4/_netCDF4.pyx":5101
* basedate += timedelta(days=utc_offset/1440.)
* else:
* if not utc_offset: # <<<<<<<<<<<<<<
@@ -57021,25 +62091,25 @@ 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, 4996, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_utc_offset); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5101, __pyx_L1_error)
__pyx_t_13 = ((!__pyx_t_4) != 0);
if (__pyx_t_13) {
- /* "netCDF4/_netCDF4.pyx":4997
+ /* "netCDF4/_netCDF4.pyx":5102
* 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, 4997, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5102, __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, 4997, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5102, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_7 = NULL;
__pyx_t_12 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
if (likely(__pyx_t_7)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
@@ -57049,37 +62119,55 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject
__pyx_t_12 = 1;
}
}
- __pyx_t_8 = PyTuple_New(6+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4997, __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;
+ #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, 5102, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 5102, __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, 5102, __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;
+ }
+ __Pyx_INCREF(__pyx_v_year);
+ __Pyx_GIVEREF(__pyx_v_year);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_12, __pyx_v_year);
+ __Pyx_INCREF(__pyx_v_month);
+ __Pyx_GIVEREF(__pyx_v_month);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_12, __pyx_v_month);
+ __Pyx_INCREF(__pyx_v_day);
+ __Pyx_GIVEREF(__pyx_v_day);
+ PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_12, __pyx_v_day);
+ __Pyx_INCREF(__pyx_v_hour);
+ __Pyx_GIVEREF(__pyx_v_hour);
+ PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_12, __pyx_v_hour);
+ __Pyx_INCREF(__pyx_v_minute);
+ __Pyx_GIVEREF(__pyx_v_minute);
+ PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_12, __pyx_v_minute);
+ __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, 5102, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
- __Pyx_INCREF(__pyx_v_year);
- __Pyx_GIVEREF(__pyx_v_year);
- PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_12, __pyx_v_year);
- __Pyx_INCREF(__pyx_v_month);
- __Pyx_GIVEREF(__pyx_v_month);
- PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_12, __pyx_v_month);
- __Pyx_INCREF(__pyx_v_day);
- __Pyx_GIVEREF(__pyx_v_day);
- PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_12, __pyx_v_day);
- __Pyx_INCREF(__pyx_v_hour);
- __Pyx_GIVEREF(__pyx_v_hour);
- PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_12, __pyx_v_hour);
- __Pyx_INCREF(__pyx_v_minute);
- __Pyx_GIVEREF(__pyx_v_minute);
- PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_12, __pyx_v_minute);
- __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, 4997, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_v_basedate = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":4996
+ /* "netCDF4/_netCDF4.pyx":5101
* basedate += timedelta(days=utc_offset/1440.)
* else:
* if not utc_offset: # <<<<<<<<<<<<<<
@@ -57089,7 +62177,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject
goto __pyx_L7;
}
- /* "netCDF4/_netCDF4.pyx":4999
+ /* "netCDF4/_netCDF4.pyx":5104
* basedate = netcdftime.datetime(year, month, day, hour, minute, second)
* else:
* raise ValueError('cannot use utc_offset for reference years <= 0') # <<<<<<<<<<<<<<
@@ -57097,17 +62185,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__98, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4999, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5104, __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, 4999, __pyx_L1_error)
+ __PYX_ERR(0, 5104, __pyx_L1_error)
}
__pyx_L7:;
}
__pyx_L6:;
- /* "netCDF4/_netCDF4.pyx":5000
+ /* "netCDF4/_netCDF4.pyx":5105
* else:
* raise ValueError('cannot use utc_offset for reference years <= 0')
* return basedate # <<<<<<<<<<<<<<
@@ -57119,7 +62207,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject
__pyx_r = __pyx_v_basedate;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":4977
+ /* "netCDF4/_netCDF4.pyx":5082
* gregorian = datetime(1582,10,15)
*
* def _dateparse(timestr): # <<<<<<<<<<<<<<
@@ -57158,7 +62246,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8_dateparse(CYTHON_UNUSED PyObject
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5002
+/* "netCDF4/_netCDF4.pyx":5107
* return basedate
*
* def stringtoarr(string,NUMCHARS,dtype='S'): # <<<<<<<<<<<<<<
@@ -57199,7 +62287,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, 5002, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("stringtoarr", 0, 2, 3, 1); __PYX_ERR(0, 5107, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
@@ -57208,7 +62296,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, 5002, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "stringtoarr") < 0)) __PYX_ERR(0, 5107, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -57225,7 +62313,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, 5002, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("stringtoarr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5107, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4.stringtoarr", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -57248,11 +62336,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec
PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
- Py_ssize_t __pyx_t_7;
+ int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
+ Py_ssize_t __pyx_t_9;
__Pyx_RefNannySetupContext("stringtoarr", 0);
- /* "netCDF4/_netCDF4.pyx":5019
+ /* "netCDF4/_netCDF4.pyx":5124
* 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"]: # <<<<<<<<<<<<<<
@@ -57261,33 +62350,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, 5019, __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, 5124, __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, 5019, __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, 5124, __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":5020
+ /* "netCDF4/_netCDF4.pyx":5125
* (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__99, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5020, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5125, __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, 5020, __pyx_L1_error)
+ __PYX_ERR(0, 5125, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5019
+ /* "netCDF4/_netCDF4.pyx":5124
* 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"]: # <<<<<<<<<<<<<<
@@ -57296,23 +62385,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec
*/
}
- /* "netCDF4/_netCDF4.pyx":5021
+ /* "netCDF4/_netCDF4.pyx":5126
* 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, 5021, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5126, __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, 5021, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5126, __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, 5021, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Add(__pyx_v_dtype, __pyx_kp_s_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5126, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_6 = NULL;
__pyx_t_7 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -57322,38 +62411,58 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec
__pyx_t_7 = 1;
}
}
- __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5021, __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;
+ #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, 5126, __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
+ #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, 5126, __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, 5126, __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;
+ }
+ __Pyx_INCREF(__pyx_v_NUMCHARS);
+ __Pyx_GIVEREF(__pyx_v_NUMCHARS);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_NUMCHARS);
+ __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, 5126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
- __Pyx_INCREF(__pyx_v_NUMCHARS);
- __Pyx_GIVEREF(__pyx_v_NUMCHARS);
- PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_NUMCHARS);
- __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, 5021, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_arr = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5022
+ /* "netCDF4/_netCDF4.pyx":5127
* 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, 5022, __pyx_L1_error)
+ __pyx_t_1 = PySequence_Tuple(__pyx_v_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5127, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = PyObject_Length(__pyx_v_string); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 5022, __pyx_L1_error)
- if (__Pyx_PyObject_SetSlice(__pyx_v_arr, __pyx_t_1, 0, __pyx_t_7, NULL, NULL, NULL, 1, 1, 1) < 0) __PYX_ERR(0, 5022, __pyx_L1_error)
+ __pyx_t_9 = PyObject_Length(__pyx_v_string); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5127, __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, 5127, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5023
+ /* "netCDF4/_netCDF4.pyx":5128
* arr = numpy.zeros(NUMCHARS,dtype+'1')
* arr[0:len(string)] = tuple(string)
* return arr # <<<<<<<<<<<<<<
@@ -57365,7 +62474,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec
__pyx_r = __pyx_v_arr;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5002
+ /* "netCDF4/_netCDF4.pyx":5107
* return basedate
*
* def stringtoarr(string,NUMCHARS,dtype='S'): # <<<<<<<<<<<<<<
@@ -57389,7 +62498,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtoarr(CYTHON_UNUSED PyObjec
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5025
+/* "netCDF4/_netCDF4.pyx":5130
* return arr
*
* def stringtochar(a): # <<<<<<<<<<<<<<
@@ -57426,25 +62535,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje
PyObject *__pyx_t_7 = NULL;
PyObject *__pyx_t_8 = NULL;
PyObject *__pyx_t_9 = NULL;
- Py_ssize_t __pyx_t_10;
+ int __pyx_t_10;
__Pyx_RefNannySetupContext("stringtochar", 0);
- /* "netCDF4/_netCDF4.pyx":5037
+ /* "netCDF4/_netCDF4.pyx":5142
* 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, 5037, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5142, __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, 5037, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5142, __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":5038
+ /* "netCDF4/_netCDF4.pyx":5143
* 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"]: # <<<<<<<<<<<<<<
@@ -57453,33 +62562,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, 5038, __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, 5143, __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, 5038, __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, 5143, __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":5039
+ /* "netCDF4/_netCDF4.pyx":5144
* 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__100, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5039, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5144, __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, 5039, __pyx_L1_error)
+ __PYX_ERR(0, 5144, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5038
+ /* "netCDF4/_netCDF4.pyx":5143
* 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"]: # <<<<<<<<<<<<<<
@@ -57488,22 +62597,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje
*/
}
- /* "netCDF4/_netCDF4.pyx":5040
+ /* "netCDF4/_netCDF4.pyx":5145
* 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, 5040, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5145, __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, 5040, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5145, __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, 5040, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_tostring); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5145, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -57513,20 +62622,20 @@ 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, 5040, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5145, __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, 5040, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5145, __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, 5040, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5145, __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, 5040, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5145, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_8 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -57536,29 +62645,49 @@ 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, 5040, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5145, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5040, __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, 5040, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ #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, 5145, __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
+ #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, 5145, __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, 5145, __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, 5145, __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, 5040, __pyx_L1_error)
+ __pyx_t_7 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5145, __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, 5040, __pyx_L1_error)
+ __pyx_t_1 = PyNumber_Add(__pyx_v_dtype, __pyx_kp_s_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5145, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_9 = NULL;
__pyx_t_10 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_9)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -57568,48 +62697,70 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje
__pyx_t_10 = 1;
}
}
- __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5040, __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;
+ #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, 5145, __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;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #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, 5145, __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;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5145, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_10, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_1);
+ 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, 5145, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_10, __pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_1);
- 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, 5040, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_b = __pyx_t_2;
__pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5041
+ /* "netCDF4/_netCDF4.pyx":5146
* 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, 5041, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5146, __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, 5041, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5146, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5041, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5146, __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, 5041, __pyx_L1_error)
+ __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5146, __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, 5041, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_b, __pyx_n_s_shape, __pyx_t_5) < 0) __PYX_ERR(0, 5146, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":5042
+ /* "netCDF4/_netCDF4.pyx":5147
* b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1')
* b.shape = a.shape + (a.itemsize,)
* return b # <<<<<<<<<<<<<<
@@ -57621,7 +62772,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje
__pyx_r = __pyx_v_b;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5025
+ /* "netCDF4/_netCDF4.pyx":5130
* return arr
*
* def stringtochar(a): # <<<<<<<<<<<<<<
@@ -57648,7 +62799,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12stringtochar(CYTHON_UNUSED PyObje
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5044
+/* "netCDF4/_netCDF4.pyx":5149
* return b
*
* def chartostring(b): # <<<<<<<<<<<<<<
@@ -57689,24 +62840,25 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje
Py_ssize_t __pyx_t_8;
PyObject *(*__pyx_t_9)(PyObject *);
PyObject *__pyx_t_10 = NULL;
+ int __pyx_t_11;
__Pyx_RefNannySetupContext("chartostring", 0);
- /* "netCDF4/_netCDF4.pyx":5056
+ /* "netCDF4/_netCDF4.pyx":5161
* 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, 5056, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5161, __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, 5056, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5161, __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":5057
+ /* "netCDF4/_netCDF4.pyx":5162
* `b.shape[:-1]` where where `N=b.shape[-1]`."""
* dtype = b.dtype.kind
* if dtype not in ["S","U"]: # <<<<<<<<<<<<<<
@@ -57715,33 +62867,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, 5057, __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, 5162, __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, 5057, __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, 5162, __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":5058
+ /* "netCDF4/_netCDF4.pyx":5163
* 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__101, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5058, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__108, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5163, __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, 5058, __pyx_L1_error)
+ __PYX_ERR(0, 5163, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5057
+ /* "netCDF4/_netCDF4.pyx":5162
* `b.shape[:-1]` where where `N=b.shape[-1]`."""
* dtype = b.dtype.kind
* if dtype not in ["S","U"]: # <<<<<<<<<<<<<<
@@ -57750,17 +62902,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje
*/
}
- /* "netCDF4/_netCDF4.pyx":5059
+ /* "netCDF4/_netCDF4.pyx":5164
* 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, 5059, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_tostring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5164, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -57770,20 +62922,20 @@ 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, 5059, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5164, __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, 5059, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5164, __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, 5059, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5164, __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, 5059, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5164, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -57793,60 +62945,80 @@ 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, 5059, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5164, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5059, __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, 5059, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #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, 5164, __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
+ #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, 5164, __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, 5164, __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, 5164, __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_v_bs = __pyx_t_2;
__pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5060
+ /* "netCDF4/_netCDF4.pyx":5165
* 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, 5060, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5165, __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, 5060, __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, 5165, __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, 5060, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5165, __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":5061
+ /* "netCDF4/_netCDF4.pyx":5166
* 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, 5061, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5166, __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, 5061, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5166, __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, 5061, __pyx_L1_error)
+ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5166, __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, 5061, __pyx_L1_error)
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5061, __pyx_L1_error)
+ __pyx_t_8 = PyObject_Length(__pyx_v_bs); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5166, __pyx_L1_error)
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5166, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5061, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5166, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_int_0);
__Pyx_GIVEREF(__pyx_int_0);
@@ -57857,34 +63029,34 @@ 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, 5061, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5166, __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, 5061, __pyx_L1_error)
+ __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5166, __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, 5061, __pyx_L1_error)
+ __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5166, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_9)) {
if (likely(PyList_CheckExact(__pyx_t_6))) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5061, __pyx_L1_error)
+ #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, 5166, __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, 5061, __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, 5166, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5061, __pyx_L1_error)
+ #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, 5166, __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, 5061, __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, 5166, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -57894,7 +63066,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, 5061, __pyx_L1_error)
+ else __PYX_ERR(0, 5166, __pyx_L1_error)
}
break;
}
@@ -57902,66 +63074,88 @@ 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, 5061, __pyx_L1_error)
+ __pyx_t_1 = PyNumber_Add(__pyx_v_n1, __pyx_v_slen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5166, __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, 5061, __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, 5166, __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, 5061, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 5166, __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, 5061, __pyx_L1_error)
+ __pyx_t_6 = PyObject_Repr(__pyx_v_slen); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5166, __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, 5061, __pyx_L1_error)
+ __pyx_t_10 = PyNumber_Add(__pyx_v_dtype, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5166, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = NULL;
- __pyx_t_8 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
__Pyx_INCREF(__pyx_t_6);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_7, function);
- __pyx_t_8 = 1;
+ __pyx_t_11 = 1;
}
}
- __pyx_t_1 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5061, __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;
+ #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, 5166, __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;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #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, 5166, __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;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5166, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_11, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_10);
+ 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, 5166, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_8, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_10);
- PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_8, __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, 5061, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_v_a = __pyx_t_2;
__pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5062
+ /* "netCDF4/_netCDF4.pyx":5167
* 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, 5062, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5167, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, -1L, NULL, NULL, &__pyx_slice__102, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5062, __pyx_L1_error)
+ __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, 5167, __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, 5062, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_shape, __pyx_t_7) < 0) __PYX_ERR(0, 5167, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5063
+ /* "netCDF4/_netCDF4.pyx":5168
* 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 # <<<<<<<<<<<<<<
@@ -57973,7 +63167,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje
__pyx_r = __pyx_v_a;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5044
+ /* "netCDF4/_netCDF4.pyx":5149
* return b
*
* def chartostring(b): # <<<<<<<<<<<<<<
@@ -58002,7 +63196,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5065
+/* "netCDF4/_netCDF4.pyx":5170
* return a
*
* def date2num(dates,units,calendar='standard'): # <<<<<<<<<<<<<<
@@ -58012,7 +63206,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14chartostring(CYTHON_UNUSED PyObje
/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8_netCDF4_17date2num(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_16date2num[] = "\n**`date2num(dates,units,calendar='standard')`**\n\nReturn numeric time values given datetime objects. The units\nof the numeric time values are described by the `netCDF4.units` argument\nand the `netCDF4.calendar` keyword. The datetime objects must\nbe in UTC with no time-zone offset. If there is a\ntime-zone offset in `units`, it will be applied to the\nreturned numeric values.\n\n**`dates`**: A datetime object or a sequence of [...]
+static char __pyx_doc_7netCDF4_8_netCDF4_16date2num[] = "\n**`date2num(dates,units,calendar='standard')`**\n\nReturn numeric time values given datetime objects. The units\nof the numeric time values are described by the `netCDF4.units` argument\nand the `netCDF4.calendar` keyword. The datetime objects must\nbe in UTC with no time-zone offset. If there is a\ntime-zone offset in `units`, it will be applied to the\nreturned numeric values.\n\n**`dates`**: A datetime object or a sequence of [...]
static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_17date2num = {"date2num", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_17date2num, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_16date2num};
static PyObject *__pyx_pw_7netCDF4_8_netCDF4_17date2num(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_dates = 0;
@@ -58043,7 +63237,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, 5065, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("date2num", 0, 2, 3, 1); __PYX_ERR(0, 5170, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
@@ -58052,7 +63246,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, 5065, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date2num") < 0)) __PYX_ERR(0, 5170, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -58069,7 +63263,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, 5065, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("date2num", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5170, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -58112,21 +63306,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
PyObject *(*__pyx_t_13)(PyObject *);
int __pyx_t_14;
PyObject *__pyx_t_15 = NULL;
+ int __pyx_t_16;
__Pyx_RefNannySetupContext("date2num", 0);
__Pyx_INCREF(__pyx_v_dates);
__Pyx_INCREF(__pyx_v_calendar);
- /* "netCDF4/_netCDF4.pyx":5094
- * returns a numeric time value, or an array of numeric time values.
+ /* "netCDF4/_netCDF4.pyx":5199
+ * 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, 5094, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5199, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -58136,27 +63331,27 @@ 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, 5094, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5199, __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, 5094, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5199, __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":5095
+ /* "netCDF4/_netCDF4.pyx":5200
* """
* 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, 5095, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5200, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -58166,34 +63361,52 @@ 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, 5095, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5200, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5095, __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, 5095, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ #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, 5200, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 5200, __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, 5200, __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, 5200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_basedate = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5096
+ /* "netCDF4/_netCDF4.pyx":5201
* 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, 5096, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5201, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -58203,21 +63416,21 @@ 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, 5096, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5201, __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, 5096, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5201, __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, 5096, __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, 5201, __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, 5096, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5201, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -58227,17 +63440,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, 5096, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5201, __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, 5096, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5201, __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":5098
+ /* "netCDF4/_netCDF4.pyx":5203
* unit = units.split()[0].lower()
* # real-world calendars limited to positive reference years.
* if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<<
@@ -58246,48 +63459,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, 5098, __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, 5203, __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, 5098, __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, 5203, __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, 5098, __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, 5203, __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, 5098, __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, 5203, __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":5099
+ /* "netCDF4/_netCDF4.pyx":5204
* # 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, 5099, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5204, __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, 5099, __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, 5204, __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, 5099, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5204, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_6) {
- /* "netCDF4/_netCDF4.pyx":5100
+ /* "netCDF4/_netCDF4.pyx":5205
* 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' # <<<<<<<<<<<<<<
@@ -58297,26 +63510,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":5101
+ /* "netCDF4/_netCDF4.pyx":5206
* 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, 5101, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5206, __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, 5101, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5206, __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, 5101, __pyx_L1_error)
+ __PYX_ERR(0, 5206, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5099
+ /* "netCDF4/_netCDF4.pyx":5204
* # real-world calendars limited to positive reference years.
* if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
* if basedate.year == 0: # <<<<<<<<<<<<<<
@@ -58325,22 +63538,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
*/
}
- /* "netCDF4/_netCDF4.pyx":5102
+ /* "netCDF4/_netCDF4.pyx":5207
* 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, 5102, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5207, __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, 5102, __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, 5207, __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, 5102, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5207, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_6) {
- /* "netCDF4/_netCDF4.pyx":5103
+ /* "netCDF4/_netCDF4.pyx":5208
* raise ValueError(msg)
* elif basedate.year < 0:
* msg='negative reference year in time units, must be >= 1' # <<<<<<<<<<<<<<
@@ -58350,26 +63563,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":5104
+ /* "netCDF4/_netCDF4.pyx":5209
* 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, 5104, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5209, __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, 5104, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5209, __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, 5104, __pyx_L1_error)
+ __PYX_ERR(0, 5209, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5102
+ /* "netCDF4/_netCDF4.pyx":5207
* msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars'
* raise ValueError(msg)
* elif basedate.year < 0: # <<<<<<<<<<<<<<
@@ -58378,7 +63591,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
*/
}
- /* "netCDF4/_netCDF4.pyx":5098
+ /* "netCDF4/_netCDF4.pyx":5203
* unit = units.split()[0].lower()
* # real-world calendars limited to positive reference years.
* if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<<
@@ -58387,26 +63600,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
*/
}
- /* "netCDF4/_netCDF4.pyx":5106
+ /* "netCDF4/_netCDF4.pyx":5211
* 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, 5106, __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, 5211, __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, 5106, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5211, __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, 5106, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5211, __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, 5106, __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, 5211, __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, 5106, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5211, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!__pyx_t_5) {
} else {
@@ -58415,7 +63628,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
}
__pyx_L11_next_or:;
- /* "netCDF4/_netCDF4.pyx":5107
+ /* "netCDF4/_netCDF4.pyx":5212
*
* if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
* (calendar in ['gregorian','standard'] and basedate > gregorian): # <<<<<<<<<<<<<<
@@ -58424,13 +63637,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, 5107, __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, 5212, __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, 5107, __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, 5212, __pyx_L1_error)
__pyx_t_5 = __pyx_t_7;
__pyx_L14_bool_binop_done:;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -58440,16 +63653,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, 5107, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5212, __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, 5107, __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, 5212, __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, 5107, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5212, __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":5106
+ /* "netCDF4/_netCDF4.pyx":5211
* raise ValueError(msg)
*
* if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<<
@@ -58458,7 +63671,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
*/
if (__pyx_t_6) {
- /* "netCDF4/_netCDF4.pyx":5109
+ /* "netCDF4/_netCDF4.pyx":5214
* (calendar in ['gregorian','standard'] and basedate > gregorian):
* # use python datetime module,
* isscalar = False # <<<<<<<<<<<<<<
@@ -58467,7 +63680,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
*/
__pyx_v_isscalar = 0;
- /* "netCDF4/_netCDF4.pyx":5110
+ /* "netCDF4/_netCDF4.pyx":5215
* # use python datetime module,
* isscalar = False
* try: # <<<<<<<<<<<<<<
@@ -58483,18 +63696,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
__Pyx_XGOTREF(__pyx_t_10);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":5111
+ /* "netCDF4/_netCDF4.pyx":5216
* 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, 5111, __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, 5216, __pyx_L16_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5110
+ /* "netCDF4/_netCDF4.pyx":5215
* # use python datetime module,
* isscalar = False
* try: # <<<<<<<<<<<<<<
@@ -58513,7 +63726,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":5112
+ /* "netCDF4/_netCDF4.pyx":5217
* try:
* dates[0]
* except: # <<<<<<<<<<<<<<
@@ -58522,12 +63735,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, 5112, __pyx_L18_except_error)
+ if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 5217, __pyx_L18_except_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_1);
- /* "netCDF4/_netCDF4.pyx":5113
+ /* "netCDF4/_netCDF4.pyx":5218
* dates[0]
* except:
* isscalar = True # <<<<<<<<<<<<<<
@@ -58542,7 +63755,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
}
__pyx_L18_except_error:;
- /* "netCDF4/_netCDF4.pyx":5110
+ /* "netCDF4/_netCDF4.pyx":5215
* # use python datetime module,
* isscalar = False
* try: # <<<<<<<<<<<<<<
@@ -58564,7 +63777,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
__pyx_L23_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":5114
+ /* "netCDF4/_netCDF4.pyx":5219
* except:
* isscalar = True
* if isscalar: # <<<<<<<<<<<<<<
@@ -58574,25 +63787,25 @@ 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":5115
+ /* "netCDF4/_netCDF4.pyx":5220
* 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, 5115, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5220, __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, 5115, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5220, __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, 5115, __pyx_L1_error)
+ __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5220, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_dates);
__Pyx_GIVEREF(__pyx_v_dates);
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_dates);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -58602,25 +63815,45 @@ 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, 5115, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5220, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5115, __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, 5115, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ #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, 5220, __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
+ #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, 5220, __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, 5220, __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, 5220, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF_SET(__pyx_v_dates, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5114
+ /* "netCDF4/_netCDF4.pyx":5219
* except:
* isscalar = True
* if isscalar: # <<<<<<<<<<<<<<
@@ -58630,7 +63863,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
goto __pyx_L26;
}
- /* "netCDF4/_netCDF4.pyx":5117
+ /* "netCDF4/_netCDF4.pyx":5222
* dates = numpy.array([dates])
* else:
* dates = numpy.array(dates) # <<<<<<<<<<<<<<
@@ -58638,13 +63871,13 @@ 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, 5117, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5222, __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, 5117, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5222, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
@@ -58654,38 +63887,56 @@ 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, 5117, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_dates); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5222, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5117, __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, 5117, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ #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, 5222, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 5222, __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, 5222, __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, 5222, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF_SET(__pyx_v_dates, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5118
+ /* "netCDF4/_netCDF4.pyx":5223
* 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, 5118, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5223, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_shape = __pyx_t_1;
__pyx_t_1 = 0;
}
__pyx_L26:;
- /* "netCDF4/_netCDF4.pyx":5119
+ /* "netCDF4/_netCDF4.pyx":5224
* dates = numpy.array(dates)
* shape = dates.shape
* ismasked = False # <<<<<<<<<<<<<<
@@ -58694,30 +63945,30 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
*/
__pyx_v_ismasked = 0;
- /* "netCDF4/_netCDF4.pyx":5120
+ /* "netCDF4/_netCDF4.pyx":5225
* 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, 5120, __pyx_L1_error)
+ __pyx_t_6 = PyObject_HasAttr(__pyx_v_dates, __pyx_n_s_mask); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 5225, __pyx_L1_error)
__pyx_t_7 = (__pyx_t_6 != 0);
if (__pyx_t_7) {
- /* "netCDF4/_netCDF4.pyx":5121
+ /* "netCDF4/_netCDF4.pyx":5226
* 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, 5121, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5226, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_mask = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5122
+ /* "netCDF4/_netCDF4.pyx":5227
* if hasattr(dates,'mask'):
* mask = dates.mask
* ismasked = True # <<<<<<<<<<<<<<
@@ -58726,7 +63977,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
*/
__pyx_v_ismasked = 1;
- /* "netCDF4/_netCDF4.pyx":5120
+ /* "netCDF4/_netCDF4.pyx":5225
* shape = dates.shape
* ismasked = False
* if hasattr(dates,'mask'): # <<<<<<<<<<<<<<
@@ -58735,52 +63986,52 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
*/
}
- /* "netCDF4/_netCDF4.pyx":5123
+ /* "netCDF4/_netCDF4.pyx":5228
* 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, 5123, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5228, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_times = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5124
+ /* "netCDF4/_netCDF4.pyx":5229
* 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, 5124, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5229, __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, 5124, __pyx_L1_error)
+ __pyx_t_12 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5229, __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, 5124, __pyx_L1_error)
+ __pyx_t_13 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5229, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_13)) {
if (likely(PyList_CheckExact(__pyx_t_11))) {
if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_11)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5124, __pyx_L1_error)
+ #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, 5229, __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, 5124, __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, 5229, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5124, __pyx_L1_error)
+ #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, 5229, __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, 5124, __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, 5229, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -58790,7 +64041,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, 5124, __pyx_L1_error)
+ else __PYX_ERR(0, 5229, __pyx_L1_error)
}
break;
}
@@ -58799,7 +64050,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":5125
+ /* "netCDF4/_netCDF4.pyx":5230
* times = []
* for date in dates.flat:
* if ismasked and not date: # <<<<<<<<<<<<<<
@@ -58812,22 +64063,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, 5125, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_date); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5230, __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":5126
+ /* "netCDF4/_netCDF4.pyx":5231
* 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, 5126, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, Py_None); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5231, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5125
+ /* "netCDF4/_netCDF4.pyx":5230
* times = []
* for date in dates.flat:
* if ismasked and not date: # <<<<<<<<<<<<<<
@@ -58837,7 +64088,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
goto __pyx_L30;
}
- /* "netCDF4/_netCDF4.pyx":5128
+ /* "netCDF4/_netCDF4.pyx":5233
* times.append(None)
* else:
* td = date - basedate # <<<<<<<<<<<<<<
@@ -58845,68 +64096,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, 5128, __pyx_L1_error)
+ __pyx_t_1 = PyNumber_Subtract(__pyx_v_date, __pyx_v_basedate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5233, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5130
+ /* "netCDF4/_netCDF4.pyx":5235
* 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, 5130, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5235, __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, 5130, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_seconds); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5235, __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, 5130, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_days); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5235, __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, 5130, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_int_24); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5235, __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, 5130, __pyx_L1_error)
+ __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_int_3600); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5235, __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, 5130, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5235, __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, 5130, __pyx_L1_error)
+ __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5235, __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, 5130, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5235, __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":5131
+ /* "netCDF4/_netCDF4.pyx":5236
* # 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, 5131, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_microsec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5236, __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, 5131, __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, 5236, __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":5132
+ /* "netCDF4/_netCDF4.pyx":5237
* 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, 5132, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_v_totaltime); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5237, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5131
+ /* "netCDF4/_netCDF4.pyx":5236
* # total time in microseconds.
* totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
* if unit in microsec_units: # <<<<<<<<<<<<<<
@@ -58916,33 +64167,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
goto __pyx_L33;
}
- /* "netCDF4/_netCDF4.pyx":5133
+ /* "netCDF4/_netCDF4.pyx":5238
* 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, 5133, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_millisec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5238, __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, 5133, __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, 5238, __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":5134
+ /* "netCDF4/_netCDF4.pyx":5239
* 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, 5134, __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, 5239, __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, 5134, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5239, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5133
+ /* "netCDF4/_netCDF4.pyx":5238
* if unit in microsec_units:
* times.append(totaltime)
* elif unit in millisec_units: # <<<<<<<<<<<<<<
@@ -58952,33 +64203,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
goto __pyx_L33;
}
- /* "netCDF4/_netCDF4.pyx":5135
+ /* "netCDF4/_netCDF4.pyx":5240
* 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, 5135, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sec_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5240, __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, 5135, __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, 5240, __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":5136
+ /* "netCDF4/_netCDF4.pyx":5241
* 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, 5136, __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, 5241, __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, 5136, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5241, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5135
+ /* "netCDF4/_netCDF4.pyx":5240
* elif unit in millisec_units:
* times.append(totaltime/1.e3)
* elif unit in sec_units: # <<<<<<<<<<<<<<
@@ -58988,36 +64239,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
goto __pyx_L33;
}
- /* "netCDF4/_netCDF4.pyx":5137
+ /* "netCDF4/_netCDF4.pyx":5242
* 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, 5137, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_min_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5242, __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, 5137, __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, 5242, __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":5138
+ /* "netCDF4/_netCDF4.pyx":5243
* 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, 5138, __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, 5243, __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, 5138, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_int_60); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5243, __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, 5138, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_2); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5243, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5137
+ /* "netCDF4/_netCDF4.pyx":5242
* elif unit in sec_units:
* times.append(totaltime/1.e6)
* elif unit in min_units: # <<<<<<<<<<<<<<
@@ -59027,36 +64278,36 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
goto __pyx_L33;
}
- /* "netCDF4/_netCDF4.pyx":5139
+ /* "netCDF4/_netCDF4.pyx":5244
* 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, 5139, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hr_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5244, __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, 5139, __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, 5244, __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":5140
+ /* "netCDF4/_netCDF4.pyx":5245
* 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, 5140, __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, 5245, __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, 5140, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_int_3600); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5245, __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, 5140, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5245, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5139
+ /* "netCDF4/_netCDF4.pyx":5244
* elif unit in min_units:
* times.append(totaltime/1.e6/60)
* elif unit in hr_units: # <<<<<<<<<<<<<<
@@ -59066,39 +64317,39 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
goto __pyx_L33;
}
- /* "netCDF4/_netCDF4.pyx":5141
+ /* "netCDF4/_netCDF4.pyx":5246
* 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, 5141, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_day_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5246, __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, 5141, __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, 5246, __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":5142
+ /* "netCDF4/_netCDF4.pyx":5247
* 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, 5142, __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, 5247, __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, 5142, __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, 5247, __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, 5142, __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, 5247, __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, 5142, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5247, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5141
+ /* "netCDF4/_netCDF4.pyx":5246
* elif unit in hr_units:
* times.append(totaltime/1.e6/3600)
* elif unit in day_units: # <<<<<<<<<<<<<<
@@ -59108,7 +64359,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
goto __pyx_L33;
}
- /* "netCDF4/_netCDF4.pyx":5144
+ /* "netCDF4/_netCDF4.pyx":5249
* times.append(totaltime/1.e6/3600./24.)
* else:
* raise ValueError('unsupported time units') # <<<<<<<<<<<<<<
@@ -59116,17 +64367,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__103, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5144, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__110, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5249, __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, 5144, __pyx_L1_error)
+ __PYX_ERR(0, 5249, __pyx_L1_error)
}
__pyx_L33:;
}
__pyx_L30:;
- /* "netCDF4/_netCDF4.pyx":5124
+ /* "netCDF4/_netCDF4.pyx":5229
* ismasked = True
* times = []
* for date in dates.flat: # <<<<<<<<<<<<<<
@@ -59136,7 +64387,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":5145
+ /* "netCDF4/_netCDF4.pyx":5250
* else:
* raise ValueError('unsupported time units')
* if isscalar: # <<<<<<<<<<<<<<
@@ -59146,7 +64397,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":5146
+ /* "netCDF4/_netCDF4.pyx":5251
* raise ValueError('unsupported time units')
* if isscalar:
* return times[0] # <<<<<<<<<<<<<<
@@ -59154,13 +64405,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, 5146, __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, 5251, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
__pyx_r = __pyx_t_11;
__pyx_t_11 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5145
+ /* "netCDF4/_netCDF4.pyx":5250
* else:
* raise ValueError('unsupported time units')
* if isscalar: # <<<<<<<<<<<<<<
@@ -59169,7 +64420,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
*/
}
- /* "netCDF4/_netCDF4.pyx":5148
+ /* "netCDF4/_netCDF4.pyx":5253
* return times[0]
* else:
* return numpy.reshape(numpy.array(times), shape) # <<<<<<<<<<<<<<
@@ -59178,18 +64429,18 @@ 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, 5148, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5253, __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, 5148, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5253, __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, 5148, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5253, __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, 5148, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5253, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -59199,54 +64450,92 @@ 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, 5148, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_times); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5253, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
} else {
- __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5148, __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, 5148, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ #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, 5253, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #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, 5253, __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, 5253, __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, 5253, __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, 5148, __pyx_L1_error) }
+ if (unlikely(!__pyx_v_shape)) { __Pyx_RaiseUnboundLocalError("shape"); __PYX_ERR(0, 5253, __pyx_L1_error) }
__pyx_t_4 = NULL;
- __pyx_t_12 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_16 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
__Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_2, function);
- __pyx_t_12 = 1;
+ __pyx_t_16 = 1;
}
}
- __pyx_t_15 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5148, __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;
+ #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, 5253, __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
+ #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, 5253, __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, 5253, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_16, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_shape);
+ __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, 5253, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
}
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_12, __pyx_t_3);
- __Pyx_INCREF(__pyx_v_shape);
- __Pyx_GIVEREF(__pyx_v_shape);
- PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_12, __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, 5148, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_11;
__pyx_t_11 = 0;
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":5106
+ /* "netCDF4/_netCDF4.pyx":5211
* raise ValueError(msg)
*
* if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<<
@@ -59255,7 +64544,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
*/
}
- /* "netCDF4/_netCDF4.pyx":5150
+ /* "netCDF4/_netCDF4.pyx":5255
* return numpy.reshape(numpy.array(times), shape)
* else: # use netcdftime module for other calendars
* cdftime = netcdftime.utime(units,calendar=calendar) # <<<<<<<<<<<<<<
@@ -59263,20 +64552,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, 5150, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5255, __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, 5150, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_utime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5255, __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, 5150, __pyx_L1_error)
+ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5255, __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, 5150, __pyx_L1_error)
+ __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5255, __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, 5150, __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, 5150, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_calendar, __pyx_v_calendar) < 0) __PYX_ERR(0, 5255, __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, 5255, __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;
@@ -59284,7 +64573,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":5151
+ /* "netCDF4/_netCDF4.pyx":5256
* else: # use netcdftime module for other calendars
* cdftime = netcdftime.utime(units,calendar=calendar)
* return cdftime.date2num(dates) # <<<<<<<<<<<<<<
@@ -59292,10 +64581,10 @@ 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, 5151, __pyx_L1_error)
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_date2num); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5256, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_15);
__pyx_t_11 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_15))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
__pyx_t_11 = PyMethod_GET_SELF(__pyx_t_15);
if (likely(__pyx_t_11)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
@@ -59305,18 +64594,36 @@ 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, 5151, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_v_dates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5256, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
} else {
- __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5151, __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, 5151, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ #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, 5256, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #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, 5256, __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, 5256, __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, 5256, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__pyx_r = __pyx_t_3;
@@ -59324,7 +64631,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":5065
+ /* "netCDF4/_netCDF4.pyx":5170
* return a
*
* def date2num(dates,units,calendar='standard'): # <<<<<<<<<<<<<<
@@ -59360,7 +64667,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5153
+/* "netCDF4/_netCDF4.pyx":5258
* return cdftime.date2num(dates)
*
* def num2date(times,units,calendar='standard'): # <<<<<<<<<<<<<<
@@ -59370,7 +64677,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16date2num(CYTHON_UNUSED PyObject *
/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8_netCDF4_19num2date(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_18num2date[] = "\n**`num2date(times,units,calendar='standard')`**\n\nReturn datetime objects given numeric time values. The units\nof the numeric time values are described by the `units` argument\nand the `calendar` keyword. The returned datetime objects represent\nUTC with no time-zone offset, even if the specified\n`units` contain a time-zone offset.\n\n**`times`**: numeric time values.\n\n**`units`**: a string of the form `<time units> since <r [...]
+static char __pyx_doc_7netCDF4_8_netCDF4_18num2date[] = "\n**`num2date(times,units,calendar='standard')`**\n\nReturn datetime objects given numeric time values. The units\nof the numeric time values are described by the `units` argument\nand the `calendar` keyword. The returned datetime objects represent\nUTC with no time-zone offset, even if the specified\n`units` contain a time-zone offset.\n\n**`times`**: numeric time values.\n\n**`units`**: a string of the form `<time units> since <r [...]
static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_19num2date = {"num2date", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_19num2date, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_18num2date};
static PyObject *__pyx_pw_7netCDF4_8_netCDF4_19num2date(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_times = 0;
@@ -59401,7 +64708,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, 5153, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("num2date", 0, 2, 3, 1); __PYX_ERR(0, 5258, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
@@ -59410,7 +64717,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, 5153, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "num2date") < 0)) __PYX_ERR(0, 5258, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -59427,7 +64734,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, 5153, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("num2date", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5258, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -59475,21 +64782,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
int __pyx_t_13;
PyObject *__pyx_t_14 = NULL;
PyObject *__pyx_t_15 = NULL;
+ int __pyx_t_16;
__Pyx_RefNannySetupContext("num2date", 0);
__Pyx_INCREF(__pyx_v_times);
__Pyx_INCREF(__pyx_v_calendar);
- /* "netCDF4/_netCDF4.pyx":5190
+ /* "netCDF4/_netCDF4.pyx":5295
* 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, 5190, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5295, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -59499,27 +64807,27 @@ 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, 5190, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5295, __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, 5190, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5295, __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":5191
+ /* "netCDF4/_netCDF4.pyx":5296
* """
* 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, 5191, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5296, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -59529,34 +64837,52 @@ 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, 5191, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5296, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5191, __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, 5191, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ #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, 5296, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 5296, __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, 5296, __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, 5296, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_basedate = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5192
+ /* "netCDF4/_netCDF4.pyx":5297
* 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, 5192, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5297, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -59566,21 +64892,21 @@ 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, 5192, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5297, __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, 5192, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5297, __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, 5192, __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, 5297, __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, 5192, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5297, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -59590,17 +64916,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, 5192, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5297, __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, 5192, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5297, __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":5194
+ /* "netCDF4/_netCDF4.pyx":5299
* unit = units.split()[0].lower()
* # real-world calendars limited to positive reference years.
* if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<<
@@ -59609,48 +64935,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, 5194, __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, 5299, __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, 5194, __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, 5299, __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, 5194, __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, 5299, __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, 5194, __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, 5299, __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":5195
+ /* "netCDF4/_netCDF4.pyx":5300
* # 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, 5195, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5300, __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, 5195, __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, 5300, __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, 5195, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5300, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_6) {
- /* "netCDF4/_netCDF4.pyx":5196
+ /* "netCDF4/_netCDF4.pyx":5301
* 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' # <<<<<<<<<<<<<<
@@ -59660,26 +64986,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":5197
+ /* "netCDF4/_netCDF4.pyx":5302
* 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, 5197, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5302, __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, 5197, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5302, __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, 5197, __pyx_L1_error)
+ __PYX_ERR(0, 5302, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5195
+ /* "netCDF4/_netCDF4.pyx":5300
* # real-world calendars limited to positive reference years.
* if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
* if basedate.year == 0: # <<<<<<<<<<<<<<
@@ -59688,22 +65014,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
*/
}
- /* "netCDF4/_netCDF4.pyx":5198
+ /* "netCDF4/_netCDF4.pyx":5303
* 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, 5198, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5303, __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, 5198, __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, 5303, __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, 5198, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5303, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_6) {
- /* "netCDF4/_netCDF4.pyx":5199
+ /* "netCDF4/_netCDF4.pyx":5304
* raise ValueError(msg)
* elif basedate.year < 0:
* msg='negative reference year in time units, must be >= 1' # <<<<<<<<<<<<<<
@@ -59713,26 +65039,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":5200
+ /* "netCDF4/_netCDF4.pyx":5305
* 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, 5200, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5305, __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, 5200, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5305, __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, 5200, __pyx_L1_error)
+ __PYX_ERR(0, 5305, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5198
+ /* "netCDF4/_netCDF4.pyx":5303
* msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars'
* raise ValueError(msg)
* elif basedate.year < 0: # <<<<<<<<<<<<<<
@@ -59741,7 +65067,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
*/
}
- /* "netCDF4/_netCDF4.pyx":5194
+ /* "netCDF4/_netCDF4.pyx":5299
* unit = units.split()[0].lower()
* # real-world calendars limited to positive reference years.
* if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<<
@@ -59750,26 +65076,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
*/
}
- /* "netCDF4/_netCDF4.pyx":5202
+ /* "netCDF4/_netCDF4.pyx":5307
* 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, 5202, __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, 5307, __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, 5202, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5307, __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, 5202, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5307, __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, 5202, __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, 5307, __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, 5202, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 5307, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!__pyx_t_5) {
} else {
@@ -59778,7 +65104,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
}
__pyx_L11_next_or:;
- /* "netCDF4/_netCDF4.pyx":5203
+ /* "netCDF4/_netCDF4.pyx":5308
*
* if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
* (calendar in ['gregorian','standard'] and basedate > gregorian): # <<<<<<<<<<<<<<
@@ -59787,13 +65113,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, 5203, __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, 5308, __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, 5203, __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, 5308, __pyx_L1_error)
__pyx_t_5 = __pyx_t_7;
__pyx_L14_bool_binop_done:;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -59803,16 +65129,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, 5203, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5308, __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, 5203, __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, 5308, __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, 5203, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5308, __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":5202
+ /* "netCDF4/_netCDF4.pyx":5307
* raise ValueError(msg)
*
* if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<<
@@ -59821,7 +65147,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
*/
if (__pyx_t_6) {
- /* "netCDF4/_netCDF4.pyx":5205
+ /* "netCDF4/_netCDF4.pyx":5310
* (calendar in ['gregorian','standard'] and basedate > gregorian):
* # use python datetime module,
* isscalar = False # <<<<<<<<<<<<<<
@@ -59830,7 +65156,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
*/
__pyx_v_isscalar = 0;
- /* "netCDF4/_netCDF4.pyx":5206
+ /* "netCDF4/_netCDF4.pyx":5311
* # use python datetime module,
* isscalar = False
* try: # <<<<<<<<<<<<<<
@@ -59846,18 +65172,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
__Pyx_XGOTREF(__pyx_t_10);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":5207
+ /* "netCDF4/_netCDF4.pyx":5312
* 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, 5207, __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, 5312, __pyx_L16_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5206
+ /* "netCDF4/_netCDF4.pyx":5311
* # use python datetime module,
* isscalar = False
* try: # <<<<<<<<<<<<<<
@@ -59876,7 +65202,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":5208
+ /* "netCDF4/_netCDF4.pyx":5313
* try:
* times[0]
* except: # <<<<<<<<<<<<<<
@@ -59885,12 +65211,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, 5208, __pyx_L18_except_error)
+ if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 5313, __pyx_L18_except_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_1);
- /* "netCDF4/_netCDF4.pyx":5209
+ /* "netCDF4/_netCDF4.pyx":5314
* times[0]
* except:
* isscalar = True # <<<<<<<<<<<<<<
@@ -59905,7 +65231,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
}
__pyx_L18_except_error:;
- /* "netCDF4/_netCDF4.pyx":5206
+ /* "netCDF4/_netCDF4.pyx":5311
* # use python datetime module,
* isscalar = False
* try: # <<<<<<<<<<<<<<
@@ -59927,7 +65253,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
__pyx_L23_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":5210
+ /* "netCDF4/_netCDF4.pyx":5315
* except:
* isscalar = True
* if isscalar: # <<<<<<<<<<<<<<
@@ -59937,32 +65263,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":5211
+ /* "netCDF4/_netCDF4.pyx":5316
* 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, 5211, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5316, __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, 5211, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5316, __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, 5211, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5316, __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, 5211, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5316, __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, 5211, __pyx_L1_error)
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5316, __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, 5211, __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, 5211, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_d) < 0) __PYX_ERR(0, 5316, __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, 5316, __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;
@@ -59970,7 +65296,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":5210
+ /* "netCDF4/_netCDF4.pyx":5315
* except:
* isscalar = True
* if isscalar: # <<<<<<<<<<<<<<
@@ -59980,7 +65306,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
goto __pyx_L26;
}
- /* "netCDF4/_netCDF4.pyx":5213
+ /* "netCDF4/_netCDF4.pyx":5318
* times = numpy.array([times],dtype='d')
* else:
* times = numpy.array(times, dtype='d') # <<<<<<<<<<<<<<
@@ -59988,20 +65314,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, 5213, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5318, __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, 5213, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5318, __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, 5213, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5318, __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, 5213, __pyx_L1_error)
+ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5318, __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, 5213, __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, 5213, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_d) < 0) __PYX_ERR(0, 5318, __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, 5318, __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;
@@ -60009,21 +65335,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":5214
+ /* "netCDF4/_netCDF4.pyx":5319
* 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, 5214, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5319, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_v_shape = __pyx_t_4;
__pyx_t_4 = 0;
}
__pyx_L26:;
- /* "netCDF4/_netCDF4.pyx":5215
+ /* "netCDF4/_netCDF4.pyx":5320
* times = numpy.array(times, dtype='d')
* shape = times.shape
* ismasked = False # <<<<<<<<<<<<<<
@@ -60032,30 +65358,30 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
*/
__pyx_v_ismasked = 0;
- /* "netCDF4/_netCDF4.pyx":5216
+ /* "netCDF4/_netCDF4.pyx":5321
* 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, 5216, __pyx_L1_error)
+ __pyx_t_6 = PyObject_HasAttr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 5321, __pyx_L1_error)
__pyx_t_7 = (__pyx_t_6 != 0);
if (__pyx_t_7) {
- /* "netCDF4/_netCDF4.pyx":5217
+ /* "netCDF4/_netCDF4.pyx":5322
* 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, 5217, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_v_mask = __pyx_t_4;
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5218
+ /* "netCDF4/_netCDF4.pyx":5323
* if hasattr(times,'mask'):
* mask = times.mask
* ismasked = True # <<<<<<<<<<<<<<
@@ -60064,7 +65390,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
*/
__pyx_v_ismasked = 1;
- /* "netCDF4/_netCDF4.pyx":5216
+ /* "netCDF4/_netCDF4.pyx":5321
* shape = times.shape
* ismasked = False
* if hasattr(times,'mask'): # <<<<<<<<<<<<<<
@@ -60073,52 +65399,52 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
*/
}
- /* "netCDF4/_netCDF4.pyx":5219
+ /* "netCDF4/_netCDF4.pyx":5324
* 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, 5219, __pyx_L1_error)
+ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5324, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_v_dates = ((PyObject*)__pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5220
+ /* "netCDF4/_netCDF4.pyx":5325
* 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, 5220, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_flat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5325, __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, 5220, __pyx_L1_error)
+ __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5325, __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, 5220, __pyx_L1_error)
+ __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5325, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
for (;;) {
if (likely(!__pyx_t_12)) {
if (likely(PyList_CheckExact(__pyx_t_2))) {
if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5220, __pyx_L1_error)
+ #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, 5325, __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, 5220, __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, 5325, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5220, __pyx_L1_error)
+ #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, 5325, __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, 5220, __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, 5325, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
@@ -60128,7 +65454,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, 5220, __pyx_L1_error)
+ else __PYX_ERR(0, 5325, __pyx_L1_error)
}
break;
}
@@ -60137,7 +65463,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":5221
+ /* "netCDF4/_netCDF4.pyx":5326
* dates = []
* for time in times.flat:
* if ismasked and not time: # <<<<<<<<<<<<<<
@@ -60150,22 +65476,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, 5221, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 5326, __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":5222
+ /* "netCDF4/_netCDF4.pyx":5327
* 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, 5222, __pyx_L1_error)
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_dates, Py_None); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 5327, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5221
+ /* "netCDF4/_netCDF4.pyx":5326
* dates = []
* for time in times.flat:
* if ismasked and not time: # <<<<<<<<<<<<<<
@@ -60175,7 +65501,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
goto __pyx_L30;
}
- /* "netCDF4/_netCDF4.pyx":5225
+ /* "netCDF4/_netCDF4.pyx":5330
* else:
* # convert to total seconds
* if unit in microsec_units: # <<<<<<<<<<<<<<
@@ -60183,26 +65509,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, 5225, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_microsec_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5330, __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, 5225, __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, 5330, __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":5226
+ /* "netCDF4/_netCDF4.pyx":5331
* # 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, 5226, __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, 5331, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5225
+ /* "netCDF4/_netCDF4.pyx":5330
* else:
* # convert to total seconds
* if unit in microsec_units: # <<<<<<<<<<<<<<
@@ -60212,33 +65538,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
goto __pyx_L33;
}
- /* "netCDF4/_netCDF4.pyx":5227
+ /* "netCDF4/_netCDF4.pyx":5332
* 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, 5227, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_millisec_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5332, __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, 5227, __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, 5332, __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":5228
+ /* "netCDF4/_netCDF4.pyx":5333
* 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, 5228, __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, 5333, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5227
+ /* "netCDF4/_netCDF4.pyx":5332
* if unit in microsec_units:
* tsecs = time/1.e6
* elif unit in millisec_units: # <<<<<<<<<<<<<<
@@ -60248,21 +65574,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
goto __pyx_L33;
}
- /* "netCDF4/_netCDF4.pyx":5229
+ /* "netCDF4/_netCDF4.pyx":5334
* 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, 5229, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sec_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5334, __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, 5229, __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, 5334, __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":5230
+ /* "netCDF4/_netCDF4.pyx":5335
* tsecs = time/1.e3
* elif unit in sec_units:
* tsecs = time # <<<<<<<<<<<<<<
@@ -60272,7 +65598,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":5229
+ /* "netCDF4/_netCDF4.pyx":5334
* elif unit in millisec_units:
* tsecs = time/1.e3
* elif unit in sec_units: # <<<<<<<<<<<<<<
@@ -60282,33 +65608,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
goto __pyx_L33;
}
- /* "netCDF4/_netCDF4.pyx":5231
+ /* "netCDF4/_netCDF4.pyx":5336
* 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, 5231, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_min_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5336, __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, 5231, __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, 5336, __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":5232
+ /* "netCDF4/_netCDF4.pyx":5337
* 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, 5232, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_60_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5337, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5231
+ /* "netCDF4/_netCDF4.pyx":5336
* elif unit in sec_units:
* tsecs = time
* elif unit in min_units: # <<<<<<<<<<<<<<
@@ -60318,33 +65644,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
goto __pyx_L33;
}
- /* "netCDF4/_netCDF4.pyx":5233
+ /* "netCDF4/_netCDF4.pyx":5338
* 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, 5233, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_hr_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5338, __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, 5233, __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, 5338, __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":5234
+ /* "netCDF4/_netCDF4.pyx":5339
* 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, 5234, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_3600_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5339, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5233
+ /* "netCDF4/_netCDF4.pyx":5338
* elif unit in min_units:
* tsecs = time*60.
* elif unit in hr_units: # <<<<<<<<<<<<<<
@@ -60354,33 +65680,33 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
goto __pyx_L33;
}
- /* "netCDF4/_netCDF4.pyx":5235
+ /* "netCDF4/_netCDF4.pyx":5340
* 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, 5235, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_day_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5340, __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, 5235, __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, 5340, __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":5236
+ /* "netCDF4/_netCDF4.pyx":5341
* 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, 5236, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_86400_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5341, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5235
+ /* "netCDF4/_netCDF4.pyx":5340
* elif unit in hr_units:
* tsecs = time*3600.
* elif unit in day_units: # <<<<<<<<<<<<<<
@@ -60390,7 +65716,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
goto __pyx_L33;
}
- /* "netCDF4/_netCDF4.pyx":5238
+ /* "netCDF4/_netCDF4.pyx":5343
* tsecs = time*86400.
* else:
* raise ValueError('unsupported time units') # <<<<<<<<<<<<<<
@@ -60398,78 +65724,78 @@ 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__104, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5238, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5343, __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, 5238, __pyx_L1_error)
+ __PYX_ERR(0, 5343, __pyx_L1_error)
}
__pyx_L33:;
- /* "netCDF4/_netCDF4.pyx":5240
+ /* "netCDF4/_netCDF4.pyx":5345
* 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, 5240, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_FloorDivide(__pyx_v_tsecs, __pyx_float_86400_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5345, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_XDECREF_SET(__pyx_v_days, __pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5241
+ /* "netCDF4/_netCDF4.pyx":5346
* # 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, 5241, __pyx_L1_error)
+ __pyx_t_4 = PyNumber_Multiply(__pyx_v_tsecs, __pyx_float_1_e6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5346, __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, 5241, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_Multiply(__pyx_v_days, __pyx_float_86400_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5346, __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, 5241, __pyx_L1_error)
+ __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_float_1_e6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5346, __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, 5241, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5346, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF_SET(__pyx_v_msecsd, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5242
+ /* "netCDF4/_netCDF4.pyx":5347
* 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, 5242, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_FloorDivide(__pyx_v_msecsd, __pyx_float_1_e6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5347, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XDECREF_SET(__pyx_v_secs, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5243
+ /* "netCDF4/_netCDF4.pyx":5348
* 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, 5243, __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_round); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5243, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_round); 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 = PyNumber_Multiply(__pyx_v_secs, __pyx_float_1_e6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5243, __pyx_L1_error)
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_secs, __pyx_float_1_e6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5348, __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, 5243, __pyx_L1_error)
+ __pyx_t_14 = PyNumber_Subtract(__pyx_v_msecsd, __pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5348, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -60479,69 +65805,89 @@ 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, 5243, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5348, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else {
- __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5243, __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, 5243, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ #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, 5348, __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
+ #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, 5348, __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, 5348, __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, 5348, __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;
__Pyx_XDECREF_SET(__pyx_v_msecs, __pyx_t_3);
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5244
+ /* "netCDF4/_netCDF4.pyx":5349
* 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, 5244, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5349, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5244, __pyx_L1_error)
+ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5349, __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, 5244, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_seconds, __pyx_v_secs) < 0) __PYX_ERR(0, 5244, __pyx_L1_error)
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_microseconds, __pyx_v_msecs) < 0) __PYX_ERR(0, 5244, __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, 5244, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_days, __pyx_v_days) < 0) __PYX_ERR(0, 5349, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_seconds, __pyx_v_secs) < 0) __PYX_ERR(0, 5349, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_microseconds, __pyx_v_msecs) < 0) __PYX_ERR(0, 5349, __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, 5349, __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":5246
+ /* "netCDF4/_netCDF4.pyx":5351
* 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, 5246, __pyx_L1_error)
+ __pyx_t_15 = PyNumber_Add(__pyx_v_basedate, __pyx_v_td); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5351, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_15);
__Pyx_XDECREF_SET(__pyx_v_date, __pyx_t_15);
__pyx_t_15 = 0;
- /* "netCDF4/_netCDF4.pyx":5247
+ /* "netCDF4/_netCDF4.pyx":5352
* # 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, 5247, __pyx_L1_error)
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_dates, __pyx_v_date); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 5352, __pyx_L1_error)
}
__pyx_L30:;
- /* "netCDF4/_netCDF4.pyx":5220
+ /* "netCDF4/_netCDF4.pyx":5325
* ismasked = True
* dates = []
* for time in times.flat: # <<<<<<<<<<<<<<
@@ -60551,7 +65897,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5248
+ /* "netCDF4/_netCDF4.pyx":5353
* date = basedate + td
* dates.append(date)
* if isscalar: # <<<<<<<<<<<<<<
@@ -60561,7 +65907,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":5249
+ /* "netCDF4/_netCDF4.pyx":5354
* dates.append(date)
* if isscalar:
* return dates[0] # <<<<<<<<<<<<<<
@@ -60569,13 +65915,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, 5249, __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, 5354, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5248
+ /* "netCDF4/_netCDF4.pyx":5353
* date = basedate + td
* dates.append(date)
* if isscalar: # <<<<<<<<<<<<<<
@@ -60584,7 +65930,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
*/
}
- /* "netCDF4/_netCDF4.pyx":5251
+ /* "netCDF4/_netCDF4.pyx":5356
* return dates[0]
* else:
* return numpy.reshape(numpy.array(dates), shape) # <<<<<<<<<<<<<<
@@ -60593,18 +65939,18 @@ 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, 5251, __pyx_L1_error)
+ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5356, __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, 5251, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5356, __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, 5251, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5356, __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, 5251, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5356, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_14))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_14);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
@@ -60614,54 +65960,92 @@ 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, 5251, __pyx_L1_error)
+ __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_dates); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5356, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_15);
} else {
- __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5251, __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, 5251, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ #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, 5356, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_15);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_dates};
+ __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5356, __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, 5356, __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, 5356, __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, 5251, __pyx_L1_error) }
+ if (unlikely(!__pyx_v_shape)) { __Pyx_RaiseUnboundLocalError("shape"); __PYX_ERR(0, 5356, __pyx_L1_error) }
__pyx_t_14 = NULL;
- __pyx_t_11 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_16 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_14 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_14)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
__Pyx_INCREF(__pyx_t_14);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_4, function);
- __pyx_t_11 = 1;
+ __pyx_t_16 = 1;
}
}
- __pyx_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5251, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- if (__pyx_t_14) {
- __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_14); __pyx_t_14 = NULL;
+ #if 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, 5356, __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
+ #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, 5356, __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, 5356, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_16, __pyx_t_15);
+ __Pyx_INCREF(__pyx_v_shape);
+ __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, 5356, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- __Pyx_GIVEREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_11, __pyx_t_15);
- __Pyx_INCREF(__pyx_v_shape);
- __Pyx_GIVEREF(__pyx_v_shape);
- PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_11, __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, 5251, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":5202
+ /* "netCDF4/_netCDF4.pyx":5307
* raise ValueError(msg)
*
* if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<<
@@ -60670,7 +66054,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
*/
}
- /* "netCDF4/_netCDF4.pyx":5253
+ /* "netCDF4/_netCDF4.pyx":5358
* return numpy.reshape(numpy.array(dates), shape)
* else: # use netcdftime for other calendars
* cdftime = netcdftime.utime(units,calendar=calendar) # <<<<<<<<<<<<<<
@@ -60678,20 +66062,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, 5253, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5358, __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, 5253, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_utime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5358, __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, 5253, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5358, __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, 5253, __pyx_L1_error)
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5358, __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, 5253, __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, 5253, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_calendar, __pyx_v_calendar) < 0) __PYX_ERR(0, 5358, __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, 5358, __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;
@@ -60699,7 +66083,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":5254
+ /* "netCDF4/_netCDF4.pyx":5359
* else: # use netcdftime for other calendars
* cdftime = netcdftime.utime(units,calendar=calendar)
* return cdftime.num2date(times) # <<<<<<<<<<<<<<
@@ -60707,10 +66091,10 @@ 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, 5254, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_num2date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5359, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -60720,18 +66104,36 @@ 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, 5254, __pyx_L1_error)
+ __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_times); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5359, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_15);
} else {
- __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_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, 5254, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ #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, 5359, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_15);
+ } else
+ #endif
+ #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, 5359, __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, 5359, __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, 5359, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_15;
@@ -60739,7 +66141,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":5153
+ /* "netCDF4/_netCDF4.pyx":5258
* return cdftime.date2num(dates)
*
* def num2date(times,units,calendar='standard'): # <<<<<<<<<<<<<<
@@ -60780,7 +66182,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18num2date(CYTHON_UNUSED PyObject *
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5256
+/* "netCDF4/_netCDF4.pyx":5361
* return cdftime.num2date(times)
*
* def date2index(dates, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<<
@@ -60824,7 +66226,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, 5256, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("date2index", 0, 2, 4, 1); __PYX_ERR(0, 5361, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
@@ -60838,7 +66240,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, 5256, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date2index") < 0)) __PYX_ERR(0, 5361, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -60857,7 +66259,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, 5256, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("date2index", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5361, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4.date2index", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -60888,11 +66290,10 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject
PyObject *__pyx_t_10 = NULL;
int __pyx_t_11;
int __pyx_t_12;
- Py_ssize_t __pyx_t_13;
__Pyx_RefNannySetupContext("date2index", 0);
__Pyx_INCREF(__pyx_v_calendar);
- /* "netCDF4/_netCDF4.pyx":5287
+ /* "netCDF4/_netCDF4.pyx":5392
* to the given datetime object(s).
* """
* try: # <<<<<<<<<<<<<<
@@ -60908,18 +66309,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":5288
+ /* "netCDF4/_netCDF4.pyx":5393
* """
* 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, 5288, __pyx_L3_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5393, __pyx_L3_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5287
+ /* "netCDF4/_netCDF4.pyx":5392
* to the given datetime object(s).
* """
* try: # <<<<<<<<<<<<<<
@@ -60935,7 +66336,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":5289
+ /* "netCDF4/_netCDF4.pyx":5394
* try:
* nctime.units
* except AttributeError: # <<<<<<<<<<<<<<
@@ -60945,28 +66346,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, 5289, __pyx_L5_except_error)
+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 5394, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
- /* "netCDF4/_netCDF4.pyx":5290
+ /* "netCDF4/_netCDF4.pyx":5395
* 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__105, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5290, __pyx_L5_except_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5395, __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, 5290, __pyx_L5_except_error)
+ __PYX_ERR(0, 5395, __pyx_L5_except_error)
}
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "netCDF4/_netCDF4.pyx":5287
+ /* "netCDF4/_netCDF4.pyx":5392
* to the given datetime object(s).
* """
* try: # <<<<<<<<<<<<<<
@@ -60982,31 +66383,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject
__pyx_L10_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":5291
+ /* "netCDF4/_netCDF4.pyx":5396
* 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, 5291, __pyx_L1_error)
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 5291, __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, 5396, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 5396, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_9) {
- /* "netCDF4/_netCDF4.pyx":5292
+ /* "netCDF4/_netCDF4.pyx":5397
* 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, 5292, __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, 5397, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF_SET(__pyx_v_calendar, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5291
+ /* "netCDF4/_netCDF4.pyx":5396
* except AttributeError:
* raise AttributeError("netcdf time variable is missing a 'units' attribute")
* if calendar == None: # <<<<<<<<<<<<<<
@@ -61015,17 +66416,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject
*/
}
- /* "netCDF4/_netCDF4.pyx":5293
+ /* "netCDF4/_netCDF4.pyx":5398
* 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, 5293, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5398, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -61035,29 +66436,29 @@ 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, 5293, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5398, __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, 5293, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5398, __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":5294
+ /* "netCDF4/_netCDF4.pyx":5399
* 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, 5294, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5399, __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, 5294, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5399, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_8 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -61067,25 +66468,45 @@ 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, 5294, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5399, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_7);
} else {
- __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5294, __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, 5294, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ #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, 5399, __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
+ #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, 5399, __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, 5399, __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, 5399, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_v_basedate = __pyx_t_7;
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5296
+ /* "netCDF4/_netCDF4.pyx":5401
* basedate = _dateparse(nctime.units)
* # real-world calendars limited to positive reference years.
* if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<<
@@ -61094,48 +66515,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, 5296, __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, 5401, __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, 5296, __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, 5401, __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, 5296, __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, 5401, __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, 5296, __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, 5401, __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":5297
+ /* "netCDF4/_netCDF4.pyx":5402
* # 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, 5297, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5402, __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, 5297, __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, 5402, __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, 5297, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5402, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_11) {
- /* "netCDF4/_netCDF4.pyx":5298
+ /* "netCDF4/_netCDF4.pyx":5403
* 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' # <<<<<<<<<<<<<<
@@ -61145,26 +66566,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":5299
+ /* "netCDF4/_netCDF4.pyx":5404
* 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, 5299, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5404, __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, 5299, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5404, __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, 5299, __pyx_L1_error)
+ __PYX_ERR(0, 5404, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5297
+ /* "netCDF4/_netCDF4.pyx":5402
* # real-world calendars limited to positive reference years.
* if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
* if basedate.year == 0: # <<<<<<<<<<<<<<
@@ -61173,22 +66594,22 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject
*/
}
- /* "netCDF4/_netCDF4.pyx":5300
+ /* "netCDF4/_netCDF4.pyx":5405
* 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, 5300, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5405, __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, 5300, __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, 5405, __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, 5300, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5405, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_11) {
- /* "netCDF4/_netCDF4.pyx":5301
+ /* "netCDF4/_netCDF4.pyx":5406
* raise ValueError(msg)
* elif basedate.year < 0:
* msg='negative reference year in time units, must be >= 1' # <<<<<<<<<<<<<<
@@ -61198,26 +66619,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":5302
+ /* "netCDF4/_netCDF4.pyx":5407
* 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, 5302, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5407, __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, 5302, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5407, __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, 5302, __pyx_L1_error)
+ __PYX_ERR(0, 5407, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5300
+ /* "netCDF4/_netCDF4.pyx":5405
* msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars'
* raise ValueError(msg)
* elif basedate.year < 0: # <<<<<<<<<<<<<<
@@ -61226,7 +66647,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject
*/
}
- /* "netCDF4/_netCDF4.pyx":5296
+ /* "netCDF4/_netCDF4.pyx":5401
* basedate = _dateparse(nctime.units)
* # real-world calendars limited to positive reference years.
* if calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<<
@@ -61235,26 +66656,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject
*/
}
- /* "netCDF4/_netCDF4.pyx":5304
+ /* "netCDF4/_netCDF4.pyx":5409
* 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, 5304, __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, 5409, __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, 5304, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5409, __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, 5304, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5409, __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, 5304, __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, 5409, __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, 5304, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 5409, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (!__pyx_t_9) {
} else {
@@ -61263,7 +66684,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject
}
__pyx_L22_next_or:;
- /* "netCDF4/_netCDF4.pyx":5305
+ /* "netCDF4/_netCDF4.pyx":5410
*
* if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
* (calendar in ['gregorian','standard'] and basedate > gregorian): # <<<<<<<<<<<<<<
@@ -61272,13 +66693,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, 5305, __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, 5410, __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, 5305, __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, 5410, __pyx_L1_error)
__pyx_t_9 = __pyx_t_12;
__pyx_L25_bool_binop_done:;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
@@ -61288,16 +66709,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, 5305, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5410, __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, 5305, __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, 5410, __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, 5305, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5410, __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":5304
+ /* "netCDF4/_netCDF4.pyx":5409
* raise ValueError(msg)
*
* if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<<
@@ -61306,18 +66727,18 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject
*/
if (__pyx_t_11) {
- /* "netCDF4/_netCDF4.pyx":5307
+ /* "netCDF4/_netCDF4.pyx":5412
* (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, 5307, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5412, __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, 5307, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5412, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5307, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5412, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_dates);
__Pyx_GIVEREF(__pyx_v_dates);
@@ -61325,10 +66746,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, 5307, __pyx_L1_error)
+ __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5412, __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, 5307, __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, 5307, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_calendar, __pyx_v_calendar) < 0) __PYX_ERR(0, 5412, __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, 5412, __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;
@@ -61336,7 +66757,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":5308
+ /* "netCDF4/_netCDF4.pyx":5413
* # use python datetime
* times = date2num(dates,nctime.units,calendar=calendar)
* return netcdftime.time2index(times, nctime, calendar, select) # <<<<<<<<<<<<<<
@@ -61344,49 +66765,67 @@ 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, 5308, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5413, __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, 5308, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_time2index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5413, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = NULL;
- __pyx_t_13 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
__Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_7, function);
- __pyx_t_13 = 1;
+ __pyx_t_5 = 1;
}
}
- __pyx_t_6 = PyTuple_New(4+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5308, __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;
- }
- __Pyx_INCREF(__pyx_v_times);
- __Pyx_GIVEREF(__pyx_v_times);
- PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_13, __pyx_v_times);
- __Pyx_INCREF(__pyx_v_nctime);
- __Pyx_GIVEREF(__pyx_v_nctime);
- PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_13, __pyx_v_nctime);
- __Pyx_INCREF(__pyx_v_calendar);
- __Pyx_GIVEREF(__pyx_v_calendar);
- PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_13, __pyx_v_calendar);
- __Pyx_INCREF(__pyx_v_select);
- __Pyx_GIVEREF(__pyx_v_select);
- PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_13, __pyx_v_select);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5308, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 5413, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #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, 5413, __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, 5413, __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;
+ }
+ __Pyx_INCREF(__pyx_v_times);
+ __Pyx_GIVEREF(__pyx_v_times);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_times);
+ __Pyx_INCREF(__pyx_v_nctime);
+ __Pyx_GIVEREF(__pyx_v_nctime);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_nctime);
+ __Pyx_INCREF(__pyx_v_calendar);
+ __Pyx_GIVEREF(__pyx_v_calendar);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_calendar);
+ __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, 5413, __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;
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5304
+ /* "netCDF4/_netCDF4.pyx":5409
* raise ValueError(msg)
*
* if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \ # <<<<<<<<<<<<<<
@@ -61395,7 +66834,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject
*/
}
- /* "netCDF4/_netCDF4.pyx":5310
+ /* "netCDF4/_netCDF4.pyx":5415
* return netcdftime.time2index(times, nctime, calendar, select)
* else: # use netcdftime module for other cases
* return netcdftime.date2index(dates, nctime, calendar, select) # <<<<<<<<<<<<<<
@@ -61404,50 +66843,68 @@ 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, 5310, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5415, __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, 5310, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_date2index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5415, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_7 = NULL;
- __pyx_t_13 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_5 = 0;
+ 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);
- __pyx_t_13 = 1;
+ __pyx_t_5 = 1;
}
}
- __pyx_t_10 = PyTuple_New(4+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5310, __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;
+ #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, 5415, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #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, 5415, __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, 5415, __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;
+ }
+ __Pyx_INCREF(__pyx_v_dates);
+ __Pyx_GIVEREF(__pyx_v_dates);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_5, __pyx_v_dates);
+ __Pyx_INCREF(__pyx_v_nctime);
+ __Pyx_GIVEREF(__pyx_v_nctime);
+ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_5, __pyx_v_nctime);
+ __Pyx_INCREF(__pyx_v_calendar);
+ __Pyx_GIVEREF(__pyx_v_calendar);
+ PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_5, __pyx_v_calendar);
+ __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, 5415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
- __Pyx_INCREF(__pyx_v_dates);
- __Pyx_GIVEREF(__pyx_v_dates);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_dates);
- __Pyx_INCREF(__pyx_v_nctime);
- __Pyx_GIVEREF(__pyx_v_nctime);
- PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_v_nctime);
- __Pyx_INCREF(__pyx_v_calendar);
- __Pyx_GIVEREF(__pyx_v_calendar);
- PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_13, __pyx_v_calendar);
- __Pyx_INCREF(__pyx_v_select);
- __Pyx_GIVEREF(__pyx_v_select);
- PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_13, __pyx_v_select);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5310, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":5256
+ /* "netCDF4/_netCDF4.pyx":5361
* return cdftime.num2date(times)
*
* def date2index(dates, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<<
@@ -61474,7 +66931,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5342
+/* "netCDF4/_netCDF4.pyx":5447
* """
*
* def __init__(self, files, check=False, aggdim=None, exclude=[]): # <<<<<<<<<<<<<<
@@ -61482,14 +66939,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_20date2index(CYTHON_UNUSED PyObject
* **`__init__(self, files, check=False, aggdim=None, exclude=[])`**
*/
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_25__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
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, 5342, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5447, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)Py_False));
__Pyx_GIVEREF(((PyObject *)Py_False));
@@ -61500,7 +66957,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_12__defaults__(CYTHON_UN
__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, 5342, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5447, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
@@ -61516,7 +66973,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_12__defaults__(CYTHON_UN
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("netCDF4._netCDF4.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -61564,7 +67021,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, 5342, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, 1); __PYX_ERR(0, 5447, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
@@ -61583,7 +67040,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, 5342, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5447, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -61604,7 +67061,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, 5342, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5447, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -61668,10 +67125,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
PyObject *__pyx_t_15 = NULL;
Py_ssize_t __pyx_t_16;
Py_ssize_t __pyx_t_17;
+ int __pyx_t_18;
__Pyx_RefNannySetupContext("__init__", 0);
__Pyx_INCREF(__pyx_v_files);
- /* "netCDF4/_netCDF4.pyx":5375
+ /* "netCDF4/_netCDF4.pyx":5480
* # Open the master file in the base class, so that the CDFMF instance
* # can be used like a CDF instance.
* if isinstance(files, str): # <<<<<<<<<<<<<<
@@ -61682,23 +67140,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":5376
+ /* "netCDF4/_netCDF4.pyx":5481
* # 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, 5376, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_files, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5481, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5376, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5481, __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, 5376, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5481, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":5377
+ /* "netCDF4/_netCDF4.pyx":5482
* if isinstance(files, str):
* if files.startswith('http'):
* msg='cannot using file globbing for remote (OPeNDAP) datasets' # <<<<<<<<<<<<<<
@@ -61708,26 +67166,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":5378
+ /* "netCDF4/_netCDF4.pyx":5483
* 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, 5378, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5483, __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, 5378, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5483, __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, 5378, __pyx_L1_error)
+ __PYX_ERR(0, 5483, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5376
+ /* "netCDF4/_netCDF4.pyx":5481
* # can be used like a CDF instance.
* if isinstance(files, str):
* if files.startswith('http'): # <<<<<<<<<<<<<<
@@ -61736,7 +67194,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
*/
}
- /* "netCDF4/_netCDF4.pyx":5380
+ /* "netCDF4/_netCDF4.pyx":5485
* raise ValueError(msg)
* else:
* files = sorted(glob(files)) # <<<<<<<<<<<<<<
@@ -61744,10 +67202,10 @@ 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, 5380, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_glob); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5485, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -61757,31 +67215,49 @@ 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, 5380, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_files); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5485, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5380, __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, 5380, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #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, 5485, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #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, 5485, __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, 5485, __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, 5485, __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, 5380, __pyx_L1_error)
+ __pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5485, __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, 5380, __pyx_L1_error)
+ __pyx_t_8 = PyList_Sort(__pyx_t_3); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5485, __pyx_L1_error)
__Pyx_DECREF_SET(__pyx_v_files, __pyx_t_3);
__pyx_t_3 = 0;
}
- /* "netCDF4/_netCDF4.pyx":5375
+ /* "netCDF4/_netCDF4.pyx":5480
* # Open the master file in the base class, so that the CDFMF instance
* # can be used like a CDF instance.
* if isinstance(files, str): # <<<<<<<<<<<<<<
@@ -61790,50 +67266,50 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
*/
}
- /* "netCDF4/_netCDF4.pyx":5382
+ /* "netCDF4/_netCDF4.pyx":5487
* 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, 5382, __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, 5487, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_master = __pyx_t_3;
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5386
+ /* "netCDF4/_netCDF4.pyx":5491
* # 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, 5386, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5491, __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, 5386, __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, 5491, __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":5388
+ /* "netCDF4/_netCDF4.pyx":5493
* 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, 5388, __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, 5493, __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, 5388, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5493, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -61843,10 +67319,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, 5388, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5493, __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, 5388, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5493, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -61854,27 +67330,27 @@ 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, 5388, __pyx_L1_error)
+ __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5493, __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, 5388, __pyx_L1_error)
+ __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5493, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
for (;;) {
if (likely(!__pyx_t_10)) {
if (likely(PyList_CheckExact(__pyx_t_4))) {
if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5388, __pyx_L1_error)
+ #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, 5493, __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, 5388, __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, 5493, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
} else {
if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5388, __pyx_L1_error)
+ #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, 5493, __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, 5388, __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, 5493, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
}
@@ -61884,7 +67360,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, 5388, __pyx_L1_error)
+ else __PYX_ERR(0, 5493, __pyx_L1_error)
}
break;
}
@@ -61892,7 +67368,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
}
if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
PyObject* sequence = __pyx_t_5;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -61900,9 +67376,9 @@ 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, 5388, __pyx_L1_error)
+ __PYX_ERR(0, 5493, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
@@ -61913,15 +67389,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, 5388, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5493, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5388, __pyx_L1_error)
+ __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5493, __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, 5388, __pyx_L1_error)
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5493, __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;
@@ -61929,7 +67405,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, 5388, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 5493, __pyx_L1_error)
__pyx_t_11 = NULL;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L8_unpacking_done;
@@ -61937,7 +67413,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, 5388, __pyx_L1_error)
+ __PYX_ERR(0, 5493, __pyx_L1_error)
__pyx_L8_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
@@ -61945,19 +67421,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":5389
+ /* "netCDF4/_netCDF4.pyx":5494
* # 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, 5389, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5494, __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, 5389, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 5494, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":5388
+ /* "netCDF4/_netCDF4.pyx":5493
* cdfm = Dataset(master)
* # copy attributes from master.
* for name, value in cdfm.__dict__.items(): # <<<<<<<<<<<<<<
@@ -61967,7 +67443,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":5393
+ /* "netCDF4/_netCDF4.pyx":5498
* # Make sure the master defines a dim with name aggdim,
* # or an unlimited dimension.
* aggDimId = None # <<<<<<<<<<<<<<
@@ -61977,17 +67453,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
__Pyx_INCREF(Py_None);
__pyx_v_aggDimId = Py_None;
- /* "netCDF4/_netCDF4.pyx":5394
+ /* "netCDF4/_netCDF4.pyx":5499
* # 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, 5394, __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, 5499, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ 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);
@@ -61997,10 +67473,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, 5394, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5499, __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, 5394, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5499, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
@@ -62008,27 +67484,27 @@ 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, 5394, __pyx_L1_error)
+ __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5499, __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, 5394, __pyx_L1_error)
+ __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5499, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
for (;;) {
if (likely(!__pyx_t_10)) {
if (likely(PyList_CheckExact(__pyx_t_5))) {
if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5394, __pyx_L1_error)
+ #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, 5499, __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, 5394, __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, 5499, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5394, __pyx_L1_error)
+ #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, 5499, __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, 5394, __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, 5499, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
@@ -62038,7 +67514,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, 5394, __pyx_L1_error)
+ else __PYX_ERR(0, 5499, __pyx_L1_error)
}
break;
}
@@ -62046,7 +67522,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
}
if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
PyObject* sequence = __pyx_t_4;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -62054,9 +67530,9 @@ 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, 5394, __pyx_L1_error)
+ __PYX_ERR(0, 5499, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
@@ -62067,15 +67543,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, 5394, __pyx_L1_error)
+ __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5499, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5394, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5499, __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, 5394, __pyx_L1_error)
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5499, __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;
@@ -62083,7 +67559,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, 5394, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 5499, __pyx_L1_error)
__pyx_t_11 = NULL;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L12_unpacking_done;
@@ -62091,7 +67567,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, 5394, __pyx_L1_error)
+ __PYX_ERR(0, 5499, __pyx_L1_error)
__pyx_L12_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_7);
@@ -62099,7 +67575,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":5395
+ /* "netCDF4/_netCDF4.pyx":5500
* aggDimId = None
* for dimname,dim in cdfm.dimensions.items():
* if aggdim is None: # <<<<<<<<<<<<<<
@@ -62110,17 +67586,17 @@ 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":5396
+ /* "netCDF4/_netCDF4.pyx":5501
* 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, 5396, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5501, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_7)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -62130,18 +67606,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, 5396, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5501, __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, 5396, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5501, __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, 5396, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5501, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":5397
+ /* "netCDF4/_netCDF4.pyx":5502
* if aggdim is None:
* if dim.isunlimited():
* aggDimId = dim # <<<<<<<<<<<<<<
@@ -62151,7 +67627,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":5398
+ /* "netCDF4/_netCDF4.pyx":5503
* if dim.isunlimited():
* aggDimId = dim
* aggDimName = dimname # <<<<<<<<<<<<<<
@@ -62161,7 +67637,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":5396
+ /* "netCDF4/_netCDF4.pyx":5501
* for dimname,dim in cdfm.dimensions.items():
* if aggdim is None:
* if dim.isunlimited(): # <<<<<<<<<<<<<<
@@ -62170,7 +67646,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
*/
}
- /* "netCDF4/_netCDF4.pyx":5395
+ /* "netCDF4/_netCDF4.pyx":5500
* aggDimId = None
* for dimname,dim in cdfm.dimensions.items():
* if aggdim is None: # <<<<<<<<<<<<<<
@@ -62180,7 +67656,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
goto __pyx_L13;
}
- /* "netCDF4/_netCDF4.pyx":5400
+ /* "netCDF4/_netCDF4.pyx":5505
* aggDimName = dimname
* else:
* if dimname == aggdim: # <<<<<<<<<<<<<<
@@ -62188,12 +67664,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, 5400, __pyx_L1_error)
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5400, __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, 5505, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5505, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":5401
+ /* "netCDF4/_netCDF4.pyx":5506
* else:
* if dimname == aggdim:
* aggDimId = dim # <<<<<<<<<<<<<<
@@ -62203,7 +67679,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":5402
+ /* "netCDF4/_netCDF4.pyx":5507
* if dimname == aggdim:
* aggDimId = dim
* aggDimName = dimname # <<<<<<<<<<<<<<
@@ -62213,7 +67689,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":5400
+ /* "netCDF4/_netCDF4.pyx":5505
* aggDimName = dimname
* else:
* if dimname == aggdim: # <<<<<<<<<<<<<<
@@ -62224,7 +67700,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
}
__pyx_L13:;
- /* "netCDF4/_netCDF4.pyx":5394
+ /* "netCDF4/_netCDF4.pyx":5499
* # or an unlimited dimension.
* aggDimId = None
* for dimname,dim in cdfm.dimensions.items(): # <<<<<<<<<<<<<<
@@ -62234,7 +67710,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":5403
+ /* "netCDF4/_netCDF4.pyx":5508
* aggDimId = dim
* aggDimName = dimname
* if aggDimId is None: # <<<<<<<<<<<<<<
@@ -62245,28 +67721,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":5404
+ /* "netCDF4/_netCDF4.pyx":5509
* 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, 5404, __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, 5509, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5404, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5509, __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, 5404, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5509, __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, 5404, __pyx_L1_error)
+ __PYX_ERR(0, 5509, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5403
+ /* "netCDF4/_netCDF4.pyx":5508
* aggDimId = dim
* aggDimName = dimname
* if aggDimId is None: # <<<<<<<<<<<<<<
@@ -62275,29 +67751,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
*/
}
- /* "netCDF4/_netCDF4.pyx":5408
+ /* "netCDF4/_netCDF4.pyx":5513
* # 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, 5408, __pyx_L1_error)
+ __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5513, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_v_masterRecVar = ((PyObject*)__pyx_t_5);
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":5409
+ /* "netCDF4/_netCDF4.pyx":5514
* # 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, 5409, __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, 5514, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -62307,10 +67783,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, 5409, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5514, __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, 5409, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5514, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -62318,27 +67794,27 @@ 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, 5409, __pyx_L1_error)
+ __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5514, __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, 5409, __pyx_L1_error)
+ __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5514, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
for (;;) {
if (likely(!__pyx_t_10)) {
if (likely(PyList_CheckExact(__pyx_t_4))) {
if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5409, __pyx_L1_error)
+ #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, 5514, __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, 5409, __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, 5514, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
} else {
if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5409, __pyx_L1_error)
+ #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, 5514, __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, 5409, __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, 5514, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
}
@@ -62348,7 +67824,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, 5409, __pyx_L1_error)
+ else __PYX_ERR(0, 5514, __pyx_L1_error)
}
break;
}
@@ -62356,7 +67832,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
}
if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
PyObject* sequence = __pyx_t_5;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -62364,9 +67840,9 @@ 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, 5409, __pyx_L1_error)
+ __PYX_ERR(0, 5514, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
@@ -62377,15 +67853,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, 5409, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5514, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5409, __pyx_L1_error)
+ __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5514, __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, 5409, __pyx_L1_error)
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5514, __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;
@@ -62393,7 +67869,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, 5409, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 5514, __pyx_L1_error)
__pyx_t_11 = NULL;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L20_unpacking_done;
@@ -62401,7 +67877,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, 5409, __pyx_L1_error)
+ __PYX_ERR(0, 5514, __pyx_L1_error)
__pyx_L20_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_vName, __pyx_t_3);
@@ -62409,88 +67885,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":5411
+ /* "netCDF4/_netCDF4.pyx":5516
* 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, 5411, __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, 5516, __pyx_L1_error)
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
goto __pyx_L17_continue;
}
- /* "netCDF4/_netCDF4.pyx":5412
+ /* "netCDF4/_netCDF4.pyx":5517
* # 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, 5412, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5517, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XDECREF_SET(__pyx_v_dims, __pyx_t_5);
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":5413
+ /* "netCDF4/_netCDF4.pyx":5518
* if vName in exclude: continue
* dims = v.dimensions
* shape = v.shape # <<<<<<<<<<<<<<
* dtype = v.dtype
- * # Be carefull: we may deal with a scalar (dimensionless) variable.
+ * # 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, 5413, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5518, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XDECREF_SET(__pyx_v_shape, __pyx_t_5);
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":5414
+ /* "netCDF4/_netCDF4.pyx":5519
* dims = v.dimensions
* shape = v.shape
* dtype = v.dtype # <<<<<<<<<<<<<<
- * # Be carefull: we may deal with a scalar (dimensionless) variable.
+ * # 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, 5414, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5519, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_5);
__pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":5417
- * # Be carefull: we may deal with a scalar (dimensionless) variable.
+ /* "netCDF4/_netCDF4.pyx":5522
+ * # 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, 5417, __pyx_L1_error)
+ __pyx_t_12 = PyObject_Length(__pyx_v_dims); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 5522, __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, 5417, __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, 5417, __pyx_L1_error)
+ if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); __PYX_ERR(0, 5522, __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, 5522, __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, 5417, __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, 5522, __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, 5417, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5522, __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":5418
+ /* "netCDF4/_netCDF4.pyx":5523
* # 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, 5418, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5523, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_dims);
__Pyx_GIVEREF(__pyx_v_dims);
@@ -62501,11 +67977,11 @@ 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, 5418, __pyx_L1_error)
+ if (unlikely(PyDict_SetItem(__pyx_v_masterRecVar, __pyx_v_vName, __pyx_t_7) < 0)) __PYX_ERR(0, 5523, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5417
- * # Be carefull: we may deal with a scalar (dimensionless) variable.
+ /* "netCDF4/_netCDF4.pyx":5522
+ * # 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)
@@ -62513,7 +67989,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
*/
}
- /* "netCDF4/_netCDF4.pyx":5409
+ /* "netCDF4/_netCDF4.pyx":5514
* # Make sure the master defines at least one aggregation variable.
* masterRecVar = {}
* for vName,v in cdfm.variables.items(): # <<<<<<<<<<<<<<
@@ -62524,39 +68000,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":5419
+ /* "netCDF4/_netCDF4.pyx":5524
* 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, 5419, __pyx_L1_error)
+ __pyx_t_9 = PyDict_Size(__pyx_v_masterRecVar); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5524, __pyx_L1_error)
__pyx_t_1 = ((__pyx_t_9 == 0) != 0);
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":5420
+ /* "netCDF4/_netCDF4.pyx":5525
* 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, 5420, __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, 5525, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5420, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5525, __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, 5420, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5525, __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, 5420, __pyx_L1_error)
+ __PYX_ERR(0, 5525, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5419
+ /* "netCDF4/_netCDF4.pyx":5524
* if (len(dims) > 0 and aggDimName == dims[0]):
* masterRecVar[vName] = (dims, shape, dtype)
* if len(masterRecVar) == 0: # <<<<<<<<<<<<<<
@@ -62565,14 +68041,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
*/
}
- /* "netCDF4/_netCDF4.pyx":5428
+ /* "netCDF4/_netCDF4.pyx":5533
* # 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, 5428, __pyx_L1_error)
+ __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5533, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_v_cdfm));
__Pyx_GIVEREF(((PyObject *)__pyx_v_cdfm));
@@ -62580,26 +68056,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":5429
+ /* "netCDF4/_netCDF4.pyx":5534
* # 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, 5429, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdf, __pyx_v_cdf) < 0) __PYX_ERR(0, 5534, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5430
+ /* "netCDF4/_netCDF4.pyx":5535
* 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, 5430, __pyx_L1_error)
- __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5430, __pyx_L1_error)
+ __pyx_t_9 = PyObject_Length(__pyx_v_aggDimId); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5535, __pyx_L1_error)
+ __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5535, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5430, __pyx_L1_error)
+ __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5535, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GIVEREF(__pyx_t_4);
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
@@ -62607,52 +68083,52 @@ 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":5431
+ /* "netCDF4/_netCDF4.pyx":5536
* 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, 5431, __pyx_L1_error)
+ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5536, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_v_cdfRecVar = ((PyObject*)__pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5432
+ /* "netCDF4/_netCDF4.pyx":5537
* 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, 5432, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_masterRecVar); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5537, __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, 5432, __pyx_L1_error)
+ __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5537, __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, 5432, __pyx_L1_error)
+ __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5537, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
for (;;) {
if (likely(!__pyx_t_10)) {
if (likely(PyList_CheckExact(__pyx_t_4))) {
if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5432, __pyx_L1_error)
+ #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, 5537, __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, 5432, __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, 5537, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
} else {
if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5432, __pyx_L1_error)
+ #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, 5537, __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, 5432, __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, 5537, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
}
@@ -62662,7 +68138,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, 5432, __pyx_L1_error)
+ else __PYX_ERR(0, 5537, __pyx_L1_error)
}
break;
}
@@ -62671,24 +68147,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":5433
+ /* "netCDF4/_netCDF4.pyx":5538
* 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, 5433, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_cdfm->variables, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5538, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5433, __pyx_L1_error)
+ __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5538, __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, 5433, __pyx_L1_error)
+ if (unlikely(PyDict_SetItem(__pyx_v_cdfRecVar, __pyx_v_v, __pyx_t_5) < 0)) __PYX_ERR(0, 5538, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "netCDF4/_netCDF4.pyx":5432
+ /* "netCDF4/_netCDF4.pyx":5537
* cdfVLen = [len(aggDimId)]
* cdfRecVar = {}
* for v in masterRecVar.keys(): # <<<<<<<<<<<<<<
@@ -62698,40 +68174,40 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5438
+ /* "netCDF4/_netCDF4.pyx":5543
* # 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__107, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5438, __pyx_L1_error)
+ __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, 5543, __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, 5438, __pyx_L1_error)
+ __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5543, __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, 5438, __pyx_L1_error)
+ __pyx_t_10 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5543, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
for (;;) {
if (likely(!__pyx_t_10)) {
if (likely(PyList_CheckExact(__pyx_t_5))) {
if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5438, __pyx_L1_error)
+ #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, 5543, __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, 5438, __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, 5543, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5438, __pyx_L1_error)
+ #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, 5543, __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, 5438, __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, 5543, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
@@ -62741,7 +68217,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, 5438, __pyx_L1_error)
+ else __PYX_ERR(0, 5543, __pyx_L1_error)
}
break;
}
@@ -62750,25 +68226,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":5439
+ /* "netCDF4/_netCDF4.pyx":5544
* # 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, 5439, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5544, __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, 5439, __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, 5544, __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":5440
+ /* "netCDF4/_netCDF4.pyx":5545
* for f in files[1:]:
* part = Dataset(f)
* varInfo = part.variables # <<<<<<<<<<<<<<
@@ -62780,40 +68256,40 @@ 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":5441
+ /* "netCDF4/_netCDF4.pyx":5546
* 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, 5441, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_masterRecVar); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5546, __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, 5441, __pyx_L1_error)
+ __pyx_t_12 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5546, __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, 5441, __pyx_L1_error)
+ __pyx_t_13 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5546, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
for (;;) {
if (likely(!__pyx_t_13)) {
if (likely(PyList_CheckExact(__pyx_t_4))) {
if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5441, __pyx_L1_error)
+ #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, 5546, __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, 5441, __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, 5546, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
} else {
if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5441, __pyx_L1_error)
+ #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, 5546, __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, 5441, __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, 5546, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
}
@@ -62823,7 +68299,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, 5441, __pyx_L1_error)
+ else __PYX_ERR(0, 5546, __pyx_L1_error)
}
break;
}
@@ -62832,27 +68308,27 @@ 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":5442
+ /* "netCDF4/_netCDF4.pyx":5547
* 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, 5442, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_check); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 5547, __pyx_L1_error)
if (__pyx_t_1) {
- /* "netCDF4/_netCDF4.pyx":5444
+ /* "netCDF4/_netCDF4.pyx":5549
* 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, 5444, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_varInfo, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5549, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -62862,26 +68338,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, 5444, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5549, __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, 5444, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5549, __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, 5444, __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, 5549, __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":5445
+ /* "netCDF4/_netCDF4.pyx":5550
* # 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, 5445, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5550, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_v);
__Pyx_GIVEREF(__pyx_v_v);
@@ -62889,22 +68365,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, 5445, __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, 5550, __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, 5445, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5550, __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, 5445, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5550, __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, 5445, __pyx_L1_error)
+ __PYX_ERR(0, 5550, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5444
+ /* "netCDF4/_netCDF4.pyx":5549
* if check:
* # Make sure master rec var is also defined here.
* if v not in varInfo.keys(): # <<<<<<<<<<<<<<
@@ -62913,21 +68389,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
*/
}
- /* "netCDF4/_netCDF4.pyx":5449
+ /* "netCDF4/_netCDF4.pyx":5554
* #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, 5449, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_masterRecVar, __pyx_v_v); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5554, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 3, NULL, NULL, &__pyx_slice__108, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5449, __pyx_L1_error)
+ __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, 5554, __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))) {
PyObject* sequence = __pyx_t_7;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -62935,9 +68411,9 @@ 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, 5449, __pyx_L1_error)
+ __PYX_ERR(0, 5554, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
@@ -62951,17 +68427,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, 5449, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5554, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5449, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5554, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_14 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5449, __pyx_L1_error)
+ __pyx_t_14 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5554, __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, 5449, __pyx_L1_error)
+ __pyx_t_15 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5554, __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;
@@ -62971,7 +68447,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, 5449, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_15), 3) < 0) __PYX_ERR(0, 5554, __pyx_L1_error)
__pyx_t_11 = NULL;
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
goto __pyx_L35_unpacking_done;
@@ -62979,7 +68455,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, 5449, __pyx_L1_error)
+ __PYX_ERR(0, 5554, __pyx_L1_error)
__pyx_L35_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_masterDims, __pyx_t_3);
@@ -62989,71 +68465,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":5450
+ /* "netCDF4/_netCDF4.pyx":5555
*
* 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, 5450, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5555, __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, 5450, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5555, __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":5451
+ /* "netCDF4/_netCDF4.pyx":5556
* 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, 5451, __pyx_L1_error)
+ __pyx_t_14 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5556, __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, 5451, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5556, __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":5452
+ /* "netCDF4/_netCDF4.pyx":5557
* 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, 5452, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5557, __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, 5452, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dtype); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5557, __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":5454
+ /* "netCDF4/_netCDF4.pyx":5559
* 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, 5454, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5454, __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, 5559, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5559, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":5457
+ /* "netCDF4/_netCDF4.pyx":5562
* 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, 5457, __pyx_L1_error)
+ __pyx_t_14 = PyTuple_New(5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5562, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_14);
__Pyx_INCREF(__pyx_v_v);
__Pyx_GIVEREF(__pyx_v_v);
@@ -63071,37 +68547,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":5456
+ /* "netCDF4/_netCDF4.pyx":5561
* 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, 5456, __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, 5561, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- /* "netCDF4/_netCDF4.pyx":5455
+ /* "netCDF4/_netCDF4.pyx":5560
* # 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, 5455, __pyx_L1_error)
+ __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5560, __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, 5455, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5560, __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, 5455, __pyx_L1_error)
+ __PYX_ERR(0, 5560, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5454
+ /* "netCDF4/_netCDF4.pyx":5559
* extType = varInfo[v].dtype
* # Check that dimension names are identical.
* if masterDims != extDims: # <<<<<<<<<<<<<<
@@ -63110,32 +68586,32 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
*/
}
- /* "netCDF4/_netCDF4.pyx":5462
+ /* "netCDF4/_netCDF4.pyx":5567
* # 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, 5462, __pyx_L1_error)
- __pyx_t_17 = PyObject_Length(__pyx_v_extShape); if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 5462, __pyx_L1_error)
+ __pyx_t_16 = PyObject_Length(__pyx_v_masterShape); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5567, __pyx_L1_error)
+ __pyx_t_17 = PyObject_Length(__pyx_v_extShape); if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 5567, __pyx_L1_error)
__pyx_t_2 = ((__pyx_t_16 != __pyx_t_17) != 0);
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":5465
+ /* "netCDF4/_netCDF4.pyx":5570
* 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, 5465, __pyx_L1_error)
- __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5465, __pyx_L1_error)
+ __pyx_t_17 = PyObject_Length(__pyx_v_masterShape); if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 5570, __pyx_L1_error)
+ __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5570, __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, 5465, __pyx_L1_error)
- __pyx_t_14 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5465, __pyx_L1_error)
+ __pyx_t_17 = PyObject_Length(__pyx_v_extShape); if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 5570, __pyx_L1_error)
+ __pyx_t_14 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5570, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5465, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5570, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_v);
__Pyx_GIVEREF(__pyx_v_v);
@@ -63153,37 +68629,37 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
__pyx_t_7 = 0;
__pyx_t_14 = 0;
- /* "netCDF4/_netCDF4.pyx":5464
+ /* "netCDF4/_netCDF4.pyx":5569
* 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, 5464, __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, 5569, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":5463
+ /* "netCDF4/_netCDF4.pyx":5568
* # 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, 5463, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5568, __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, 5463, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5568, __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, 5463, __pyx_L1_error)
+ __PYX_ERR(0, 5568, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5462
+ /* "netCDF4/_netCDF4.pyx":5567
* # identical (except for that of the unlimited dimension, which of
* # course may vary.
* if len(masterShape) != len(extShape): # <<<<<<<<<<<<<<
@@ -63192,32 +68668,32 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
*/
}
- /* "netCDF4/_netCDF4.pyx":5466
+ /* "netCDF4/_netCDF4.pyx":5571
* "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__109, 1, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5466, __pyx_L1_error)
+ __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, 5571, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_extShape, 1, 0, NULL, NULL, &__pyx_slice__110, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5466, __pyx_L1_error)
+ __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, 5571, __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, 5466, __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, 5571, __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, 5466, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5571, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":5469
+ /* "netCDF4/_netCDF4.pyx":5574
* 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, 5469, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5574, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_v);
__Pyx_GIVEREF(__pyx_v_v);
@@ -63235,37 +68711,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":5468
+ /* "netCDF4/_netCDF4.pyx":5573
* 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, 5468, __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, 5573, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5467
+ /* "netCDF4/_netCDF4.pyx":5572
* (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, 5467, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5572, __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, 5467, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5572, __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, 5467, __pyx_L1_error)
+ __PYX_ERR(0, 5572, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5466
+ /* "netCDF4/_netCDF4.pyx":5571
* "master %s (%s) and extension %s (%s)" %
* (v, master, len(masterShape), f, len(extShape)))
* if masterShape[1:] != extShape[1:]: # <<<<<<<<<<<<<<
@@ -63274,26 +68750,26 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
*/
}
- /* "netCDF4/_netCDF4.pyx":5472
+ /* "netCDF4/_netCDF4.pyx":5577
*
* # 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, 5472, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5472, __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, 5577, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5577, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":5475
+ /* "netCDF4/_netCDF4.pyx":5580
* raise IOError("variable %s : data type mismatch between "
* "master %s (%s) and extension %s (%s)" %
* (v, master, masterType, f, extType)) # <<<<<<<<<<<<<<
*
- * # Everythig ok.
+ * # Everything ok.
*/
- __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5475, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5580, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_v);
__Pyx_GIVEREF(__pyx_v_v);
@@ -63311,37 +68787,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":5474
+ /* "netCDF4/_netCDF4.pyx":5579
* 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, 5474, __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, 5579, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":5473
+ /* "netCDF4/_netCDF4.pyx":5578
* # 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, 5473, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5578, __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, 5473, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5578, __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, 5473, __pyx_L1_error)
+ __PYX_ERR(0, 5578, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5472
+ /* "netCDF4/_netCDF4.pyx":5577
*
* # Check that the data types are identical.
* if masterType != extType: # <<<<<<<<<<<<<<
@@ -63350,31 +68826,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
*/
}
- /* "netCDF4/_netCDF4.pyx":5478
+ /* "netCDF4/_netCDF4.pyx":5583
*
- * # Everythig ok.
+ * # 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, 5478, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_part->variables, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5583, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_XDECREF_SET(__pyx_v_vInst, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5479
- * # Everythig ok.
+ /* "netCDF4/_netCDF4.pyx":5584
+ * # 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, 5479, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_cdfRecVar, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5584, __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, 5479, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_vInst); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5584, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5442
+ /* "netCDF4/_netCDF4.pyx":5547
* varInfo = part.variables
* for v in masterRecVar.keys():
* if check: # <<<<<<<<<<<<<<
@@ -63384,7 +68860,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
goto __pyx_L32;
}
- /* "netCDF4/_netCDF4.pyx":5482
+ /* "netCDF4/_netCDF4.pyx":5587
* else:
* # No making sure of anything -- assume this is ok..
* vInst = part.variables[v] # <<<<<<<<<<<<<<
@@ -63392,26 +68868,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, 5482, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_part->variables, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5587, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_XDECREF_SET(__pyx_v_vInst, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5483
+ /* "netCDF4/_netCDF4.pyx":5588
* # 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, 5483, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_cdfRecVar, __pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5588, __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, 5483, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_vInst); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5588, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
__pyx_L32:;
- /* "netCDF4/_netCDF4.pyx":5441
+ /* "netCDF4/_netCDF4.pyx":5546
* part = Dataset(f)
* varInfo = part.variables
* for v in masterRecVar.keys(): # <<<<<<<<<<<<<<
@@ -63421,33 +68897,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":5485
+ /* "netCDF4/_netCDF4.pyx":5590
* 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, 5485, __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, 5590, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5486
+ /* "netCDF4/_netCDF4.pyx":5591
*
* 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, 5486, __pyx_L1_error) }
- __pyx_t_4 = PyObject_GetItem(__pyx_v_part->dimensions, __pyx_v_aggDimName); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5486, __pyx_L1_error)
+ if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); __PYX_ERR(0, 5591, __pyx_L1_error) }
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_part->dimensions, __pyx_v_aggDimName); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5591, __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, 5486, __pyx_L1_error)
+ __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 5591, __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, 5486, __pyx_L1_error)
+ __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5591, __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, 5486, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_cdfVLen, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5591, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5438
+ /* "netCDF4/_netCDF4.pyx":5543
* # 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:]: # <<<<<<<<<<<<<<
@@ -63457,52 +68933,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":5490
+ /* "netCDF4/_netCDF4.pyx":5595
* # 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, 5490, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_files_2, __pyx_v_files) < 0) __PYX_ERR(0, 5595, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5491
+ /* "netCDF4/_netCDF4.pyx":5596
* # 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, 5491, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfVLen, __pyx_v_cdfVLen) < 0) __PYX_ERR(0, 5596, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5492
+ /* "netCDF4/_netCDF4.pyx":5597
* 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, 5492, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5597, __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, 5492, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5597, __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, 5492, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfTLen, __pyx_t_4) < 0) __PYX_ERR(0, 5597, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5493
+ /* "netCDF4/_netCDF4.pyx":5598
* 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, 5493, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfRecVar, __pyx_v_cdfRecVar) < 0) __PYX_ERR(0, 5598, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5495
+ /* "netCDF4/_netCDF4.pyx":5600
* self._cdfRecVar = cdfRecVar # dictionary of Variable instances for all
* # the aggregation variables
* self._dims = cdfm.dimensions # <<<<<<<<<<<<<<
@@ -63511,10 +68987,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, 5495, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dims, __pyx_t_4) < 0) __PYX_ERR(0, 5600, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5496
+ /* "netCDF4/_netCDF4.pyx":5601
* # the aggregation variables
* self._dims = cdfm.dimensions
* self._grps = cdfm.groups # <<<<<<<<<<<<<<
@@ -63523,23 +68999,23 @@ 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, 5496, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_grps, __pyx_t_4) < 0) __PYX_ERR(0, 5601, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5497
+ /* "netCDF4/_netCDF4.pyx":5602
* 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, 5497, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dims); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5602, __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, 5497, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5602, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -63549,10 +69025,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, 5497, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5602, __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, 5497, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5602, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
@@ -63560,27 +69036,27 @@ 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, 5497, __pyx_L1_error)
+ __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5602, __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, 5497, __pyx_L1_error)
+ __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5602, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
for (;;) {
if (likely(!__pyx_t_10)) {
if (likely(PyList_CheckExact(__pyx_t_7))) {
if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5497, __pyx_L1_error)
+ #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, 5602, __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, 5497, __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, 5602, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5497, __pyx_L1_error)
+ #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, 5602, __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, 5497, __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, 5602, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
@@ -63590,7 +69066,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, 5497, __pyx_L1_error)
+ else __PYX_ERR(0, 5602, __pyx_L1_error)
}
break;
}
@@ -63598,7 +69074,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
}
if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
PyObject* sequence = __pyx_t_4;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -63606,9 +69082,9 @@ 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, 5497, __pyx_L1_error)
+ __PYX_ERR(0, 5602, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
@@ -63619,15 +69095,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, 5497, __pyx_L1_error)
+ __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5602, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5497, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5602, __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, 5497, __pyx_L1_error)
+ __pyx_t_14 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5602, __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;
@@ -63635,7 +69111,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, 5497, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_14), 2) < 0) __PYX_ERR(0, 5602, __pyx_L1_error)
__pyx_t_11 = NULL;
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
goto __pyx_L43_unpacking_done;
@@ -63643,7 +69119,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, 5497, __pyx_L1_error)
+ __PYX_ERR(0, 5602, __pyx_L1_error)
__pyx_L43_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_5);
@@ -63651,72 +69127,94 @@ 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":5498
+ /* "netCDF4/_netCDF4.pyx":5603
* 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, 5498, __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, 5498, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5498, __pyx_L1_error)
+ if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); __PYX_ERR(0, 5603, __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, 5603, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5603, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_2) {
- /* "netCDF4/_netCDF4.pyx":5499
+ /* "netCDF4/_netCDF4.pyx":5604
* 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, 5499, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Dimension); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5604, __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, 5499, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfVLen); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5604, __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, 5499, __pyx_L1_error)
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfTLen); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5604, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_14);
__pyx_t_3 = NULL;
- __pyx_t_12 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_18 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
__Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_6, function);
- __pyx_t_12 = 1;
+ __pyx_t_18 = 1;
}
}
- __pyx_t_15 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5499, __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;
+ #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, 5604, __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;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else
+ #endif
+ #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, 5604, __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;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_15 = PyTuple_New(4+__pyx_t_18); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5604, __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;
+ }
+ __Pyx_INCREF(__pyx_v_dimname);
+ __Pyx_GIVEREF(__pyx_v_dimname);
+ PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_18, __pyx_v_dimname);
+ __Pyx_INCREF(__pyx_v_dim);
+ __Pyx_GIVEREF(__pyx_v_dim);
+ PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_18, __pyx_v_dim);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_18, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_14);
+ 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, 5604, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
}
- __Pyx_INCREF(__pyx_v_dimname);
- __Pyx_GIVEREF(__pyx_v_dimname);
- PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_12, __pyx_v_dimname);
- __Pyx_INCREF(__pyx_v_dim);
- __Pyx_GIVEREF(__pyx_v_dim);
- PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_12, __pyx_v_dim);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_12, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_14);
- PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_12, __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, 5499, __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, 5499, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dims); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5604, __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, 5499, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_dimname, __pyx_t_4) < 0)) __PYX_ERR(0, 5604, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5498
+ /* "netCDF4/_netCDF4.pyx":5603
* self._grps = cdfm.groups
* for dimname, dim in self._dims.items():
* if dimname == aggDimName: # <<<<<<<<<<<<<<
@@ -63725,7 +69223,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
*/
}
- /* "netCDF4/_netCDF4.pyx":5497
+ /* "netCDF4/_netCDF4.pyx":5602
* self._dims = cdfm.dimensions
* self._grps = cdfm.groups
* for dimname, dim in self._dims.items(): # <<<<<<<<<<<<<<
@@ -63735,7 +69233,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":5500
+ /* "netCDF4/_netCDF4.pyx":5605
* if dimname == aggDimName:
* self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)
* self._vars = cdfm.variables # <<<<<<<<<<<<<<
@@ -63744,23 +69242,23 @@ 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, 5500, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_vars, __pyx_t_7) < 0) __PYX_ERR(0, 5605, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5501
+ /* "netCDF4/_netCDF4.pyx":5606
* 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, 5501, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5606, __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, 5501, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5606, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -63770,10 +69268,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, 5501, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5606, __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, 5501, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5606, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -63781,27 +69279,27 @@ 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, 5501, __pyx_L1_error)
+ __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5606, __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, 5501, __pyx_L1_error)
+ __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5606, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
for (;;) {
if (likely(!__pyx_t_10)) {
if (likely(PyList_CheckExact(__pyx_t_6))) {
if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5501, __pyx_L1_error)
+ #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, 5606, __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, 5501, __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, 5606, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
} else {
if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5501, __pyx_L1_error)
+ #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, 5606, __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, 5501, __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, 5606, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
}
@@ -63811,7 +69309,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, 5501, __pyx_L1_error)
+ else __PYX_ERR(0, 5606, __pyx_L1_error)
}
break;
}
@@ -63819,7 +69317,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
}
if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
PyObject* sequence = __pyx_t_7;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -63827,9 +69325,9 @@ 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, 5501, __pyx_L1_error)
+ __PYX_ERR(0, 5606, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_15 = PyTuple_GET_ITEM(sequence, 1);
@@ -63840,15 +69338,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, 5501, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5606, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5501, __pyx_L1_error)
+ __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5606, __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, 5501, __pyx_L1_error)
+ __pyx_t_14 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5606, __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;
@@ -63856,7 +69354,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, 5501, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_14), 2) < 0) __PYX_ERR(0, 5606, __pyx_L1_error)
__pyx_t_11 = NULL;
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
goto __pyx_L48_unpacking_done;
@@ -63864,7 +69362,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, 5501, __pyx_L1_error)
+ __PYX_ERR(0, 5606, __pyx_L1_error)
__pyx_L48_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_varname, __pyx_t_4);
@@ -63872,20 +69370,20 @@ 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":5502
+ /* "netCDF4/_netCDF4.pyx":5607
* 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, 5502, __pyx_L1_error)
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfRecVar); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5607, __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, 5502, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5607, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__pyx_t_15 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_15 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_15)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -63895,68 +69393,86 @@ 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, 5502, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5607, __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, 5502, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5607, __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, 5502, __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, 5607, __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":5503
+ /* "netCDF4/_netCDF4.pyx":5608
* 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, 5503, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5608, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); __PYX_ERR(0, 5503, __pyx_L1_error) }
+ if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); __PYX_ERR(0, 5608, __pyx_L1_error) }
__pyx_t_15 = NULL;
- __pyx_t_12 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_18 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_15 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_15)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
__Pyx_INCREF(__pyx_t_15);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_4, function);
- __pyx_t_12 = 1;
+ __pyx_t_18 = 1;
}
}
- __pyx_t_14 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5503, __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;
+ #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, 5608, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #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, 5608, __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, 5608, __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;
+ }
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_18, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_varname);
+ __Pyx_GIVEREF(__pyx_v_varname);
+ PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_18, __pyx_v_varname);
+ __Pyx_INCREF(__pyx_v_var);
+ __Pyx_GIVEREF(__pyx_v_var);
+ PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_18, __pyx_v_var);
+ __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, 5608, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
}
- __Pyx_INCREF(__pyx_v_self);
- __Pyx_GIVEREF(__pyx_v_self);
- PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_12, __pyx_v_self);
- __Pyx_INCREF(__pyx_v_varname);
- __Pyx_GIVEREF(__pyx_v_varname);
- PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_12, __pyx_v_varname);
- __Pyx_INCREF(__pyx_v_var);
- __Pyx_GIVEREF(__pyx_v_var);
- PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_12, __pyx_v_var);
- __Pyx_INCREF(__pyx_v_aggDimName);
- __Pyx_GIVEREF(__pyx_v_aggDimName);
- PyTuple_SET_ITEM(__pyx_t_14, 3+__pyx_t_12, __pyx_v_aggDimName);
- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5503, __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, 5503, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5608, __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, 5503, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_varname, __pyx_t_7) < 0)) __PYX_ERR(0, 5608, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5502
+ /* "netCDF4/_netCDF4.pyx":5607
* self._vars = cdfm.variables
* for varname,var in self._vars.items():
* if varname in self._cdfRecVar.keys(): # <<<<<<<<<<<<<<
@@ -63965,7 +69481,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
*/
}
- /* "netCDF4/_netCDF4.pyx":5501
+ /* "netCDF4/_netCDF4.pyx":5606
* self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)
* self._vars = cdfm.variables
* for varname,var in self._vars.items(): # <<<<<<<<<<<<<<
@@ -63975,290 +69491,843 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(CYTHON_UNUSED P
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":5504
+ /* "netCDF4/_netCDF4.pyx":5609
* 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, 5504, __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, 5504, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5609, __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, 5609, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5610
+ * 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, 5610, __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, 5610, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5611
+ * 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, 5611, __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, 5611, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5612
+ * 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, 5612, __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, 5612, __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, 5612, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_10)) {
+ 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, 5612, __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, 5612, __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, 5612, __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, 5612, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ }
+ } else {
+ __pyx_t_6 = __pyx_t_10(__pyx_t_7);
+ if (unlikely(!__pyx_t_6)) {
+ 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, 5612, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_dset, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5613
+ * 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, 5613, __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, 5613, __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, 5613, __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, 5613, __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":5614
+ * 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, 5614, __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, 5614, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":5613
+ * 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)
+ */
+ }
+
+ /* "netCDF4/_netCDF4.pyx":5615
+ * 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, 5615, __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, 5615, __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, 5615, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5616
+ * 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, 5616, __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, 5616, __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, 5616, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5617
+ * 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, 5617, __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, 5617, __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, 5617, __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
+ * 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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5618
+ * 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, 5618, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":5447
+ * """
+ *
+ * def __init__(self, files, check=False, aggdim=None, exclude=[]): # <<<<<<<<<<<<<<
+ * """
+ * **`__init__(self, files, check=False, aggdim=None, exclude=[])`**
+ */
+
+ /* function exit code */
+ __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_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_msg);
+ __Pyx_XDECREF(__pyx_v_master);
+ __Pyx_XDECREF((PyObject *)__pyx_v_cdfm);
+ __Pyx_XDECREF(__pyx_v_name);
+ __Pyx_XDECREF(__pyx_v_value);
+ __Pyx_XDECREF(__pyx_v_aggDimId);
+ __Pyx_XDECREF(__pyx_v_dimname);
+ __Pyx_XDECREF(__pyx_v_dim);
+ __Pyx_XDECREF(__pyx_v_aggDimName);
+ __Pyx_XDECREF(__pyx_v_masterRecVar);
+ __Pyx_XDECREF(__pyx_v_vName);
+ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XDECREF(__pyx_v_dims);
+ __Pyx_XDECREF(__pyx_v_shape);
+ __Pyx_XDECREF(__pyx_v_dtype);
+ __Pyx_XDECREF(__pyx_v_cdf);
+ __Pyx_XDECREF(__pyx_v_cdfVLen);
+ __Pyx_XDECREF(__pyx_v_cdfRecVar);
+ __Pyx_XDECREF(__pyx_v_f);
+ __Pyx_XDECREF((PyObject *)__pyx_v_part);
+ __Pyx_XDECREF(__pyx_v_varInfo);
+ __Pyx_XDECREF(__pyx_v_masterDims);
+ __Pyx_XDECREF(__pyx_v_masterShape);
+ __Pyx_XDECREF(__pyx_v_masterType);
+ __Pyx_XDECREF(__pyx_v_extDims);
+ __Pyx_XDECREF(__pyx_v_extShape);
+ __Pyx_XDECREF(__pyx_v_extType);
+ __Pyx_XDECREF(__pyx_v_vInst);
+ __Pyx_XDECREF(__pyx_v_varname);
+ __Pyx_XDECREF(__pyx_v_var);
+ __Pyx_XDECREF(__pyx_v_dset);
+ __Pyx_XDECREF(__pyx_v_files);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":5620
+ * self._path = '/'
+ *
+ * def __setattr__(self, name, value): # <<<<<<<<<<<<<<
+ * """override base class attribute creation"""
+ * self.__dict__[name] = value
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_3__setattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_2__setattr__[] = "override base class attribute creation";
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_3__setattr__ = {"__setattr__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_3__setattr__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_2__setattr__};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_3__setattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_name = 0;
+ PyObject *__pyx_v_value = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,&__pyx_n_s_value,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ 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, 5620, __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, 5620, __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, 5620, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_name = values[1];
+ __pyx_v_value = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5620, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_2__setattr__(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_value);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_2__setattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__setattr__", 0);
+
+ /* "netCDF4/_netCDF4.pyx":5622
+ * 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, 5622, __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, 5622, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5620
+ * self._path = '/'
+ *
+ * def __setattr__(self, name, value): # <<<<<<<<<<<<<<
+ * """override base class attribute creation"""
+ * self.__dict__[name] = value
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":5624
+ * self.__dict__[name] = value
+ *
+ * def __getattribute__(self, name): # <<<<<<<<<<<<<<
+ * if name in ['variables','dimensions','file_format','groups',\
+ * 'data_model','disk_format','path']:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__ = {"__getattribute__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_name = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getattribute__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ 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, 5624, __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, 5624, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_name = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__getattribute__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5624, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__getattribute__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(__pyx_self, __pyx_v_self, __pyx_v_name);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("__getattribute__", 0);
+
+ /* "netCDF4/_netCDF4.pyx":5625
+ *
+ * def __getattribute__(self, name):
+ * if name in ['variables','dimensions','file_format','groups',\ # <<<<<<<<<<<<<<
+ * 'data_model','disk_format','path']:
+ * if name == 'dimensions': return self._dims
+ */
+ __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, 5625, __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, 5625, __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, 5625, __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, 5625, __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, 5625, __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, 5625, __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, 5625, __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":5627
+ * 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, 5627, __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, 5627, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+ }
- /* "netCDF4/_netCDF4.pyx":5505
- * self._vars[varname] = _Variable(self, varname, var, aggDimName)
- * self._file_format = []
- * self._data_model = [] # <<<<<<<<<<<<<<
- * self._disk_format = []
- * for dset in self._cdf:
+ /* "netCDF4/_netCDF4.pyx":5628
+ * '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_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5505, __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, 5505, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_variables, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5628, __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, 5628, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+ }
- /* "netCDF4/_netCDF4.pyx":5506
- * self._file_format = []
- * self._data_model = []
- * self._disk_format = [] # <<<<<<<<<<<<<<
- * for dset in self._cdf:
- * if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4':
+ /* "netCDF4/_netCDF4.pyx":5629
+ * 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_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5506, __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, 5506, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __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, 5629, __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, 5629, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+ }
- /* "netCDF4/_netCDF4.pyx":5507
- * 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')
+ /* "netCDF4/_netCDF4.pyx":5630
+ * 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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5507, __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, 5507, __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, 5507, __pyx_L1_error)
- }
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- for (;;) {
- if (likely(!__pyx_t_10)) {
- if (likely(PyList_CheckExact(__pyx_t_7))) {
- if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5507, __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, 5507, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- #endif
- } else {
- if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5507, __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, 5507, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- #endif
- }
- } else {
- __pyx_t_6 = __pyx_t_10(__pyx_t_7);
- if (unlikely(!__pyx_t_6)) {
- 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, 5507, __pyx_L1_error)
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_6);
+ __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, 5630, __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, 5630, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
}
- __Pyx_XDECREF_SET(__pyx_v_dset, __pyx_t_6);
- __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":5508
- * 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)
+ /* "netCDF4/_netCDF4.pyx":5631
+ * 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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_file_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5508, __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, 5508, __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_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_disk_format_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5631, __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, 5631, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
}
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_data_model); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5508, __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, 5508, __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":5509
- * 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)
+ /* "netCDF4/_netCDF4.pyx":5632
+ * 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_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5509, __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, 5509, __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, 5632, __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, 5632, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+ }
- /* "netCDF4/_netCDF4.pyx":5508
- * 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)
+ /* "netCDF4/_netCDF4.pyx":5633
+ * 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, 5633, __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, 5633, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":5510
- * 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)
+ /* "netCDF4/_netCDF4.pyx":5625
+ *
+ * def __getattribute__(self, name):
+ * if name in ['variables','dimensions','file_format','groups',\ # <<<<<<<<<<<<<<
+ * 'data_model','disk_format','path']:
+ * if name == 'dimensions': return self._dims
*/
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_format_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5510, __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, 5510, __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, 5510, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L3;
+ }
- /* "netCDF4/_netCDF4.pyx":5511
- * 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 = '/'
+ /* "netCDF4/_netCDF4.pyx":5635
+ * if name == 'groups': return self._grps
+ * else:
+ * return Dataset.__getattribute__(self, name) # <<<<<<<<<<<<<<
+ *
+ * def ncattrs(self):
*/
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_model_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5511, __pyx_L1_error)
+ /*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, 5635, __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, 5511, __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, 5511, __pyx_L1_error)
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #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, 5635, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 5635, __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, 5635, __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_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self);
+ __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, 5635, __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_6); __pyx_t_6 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+ }
+ __pyx_L3:;
- /* "netCDF4/_netCDF4.pyx":5512
- * self._file_format.append(dset.file_format)
- * self._data_model.append(dset.data_model)
- * self._disk_format.append(dset.disk_format) # <<<<<<<<<<<<<<
- * self._path = '/'
+ /* "netCDF4/_netCDF4.pyx":5624
+ * self.__dict__[name] = value
*
+ * def __getattribute__(self, name): # <<<<<<<<<<<<<<
+ * if name in ['variables','dimensions','file_format','groups',\
+ * 'data_model','disk_format','path']:
*/
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_disk_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5512, __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, 5512, __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, 5512, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5507
- * 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')
+ /* 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_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__getattribute__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":5637
+ * return Dataset.__getattribute__(self, name)
+ *
+ * def ncattrs(self): # <<<<<<<<<<<<<<
+ * """
+ * **`ncattrs(self)`**
*/
- }
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5513
- * self._data_model.append(dset.data_model)
- * self._disk_format.append(dset.disk_format)
- * self._path = '/' # <<<<<<<<<<<<<<
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_7ncattrs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_6ncattrs[] = "\n **`ncattrs(self)`**\n\n return the netcdf attribute names from the master file.\n ";
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_7ncattrs = {"ncattrs", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_7ncattrs, METH_O, __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_6ncattrs};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_7ncattrs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("ncattrs (wrapper)", 0);
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_6ncattrs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("ncattrs", 0);
+
+ /* "netCDF4/_netCDF4.pyx":5643
+ * return the netcdf attribute names from the master file.
+ * """
+ * return self._cdf[0].__dict__.keys() # <<<<<<<<<<<<<<
*
- * def __setattr__(self, name, value):
+ * def set_auto_maskandscale(self, value):
*/
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_path_2, __pyx_kp_s__16) < 0) __PYX_ERR(0, 5513, __pyx_L1_error)
+ __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, 5643, __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, 5643, __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, 5643, __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, 5643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5643, __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, 5643, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5342
- * """
+ /* "netCDF4/_netCDF4.pyx":5637
+ * return Dataset.__getattribute__(self, name)
*
- * def __init__(self, files, check=False, aggdim=None, exclude=[]): # <<<<<<<<<<<<<<
+ * def ncattrs(self): # <<<<<<<<<<<<<<
* """
- * **`__init__(self, files, check=False, aggdim=None, exclude=[])`**
+ * **`ncattrs(self)`**
*/
/* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
__pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_6);
- __Pyx_XDECREF(__pyx_t_7);
- __Pyx_XDECREF(__pyx_t_14);
- __Pyx_XDECREF(__pyx_t_15);
- __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.ncattrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
- __Pyx_XDECREF(__pyx_v_msg);
- __Pyx_XDECREF(__pyx_v_master);
- __Pyx_XDECREF((PyObject *)__pyx_v_cdfm);
- __Pyx_XDECREF(__pyx_v_name);
- __Pyx_XDECREF(__pyx_v_value);
- __Pyx_XDECREF(__pyx_v_aggDimId);
- __Pyx_XDECREF(__pyx_v_dimname);
- __Pyx_XDECREF(__pyx_v_dim);
- __Pyx_XDECREF(__pyx_v_aggDimName);
- __Pyx_XDECREF(__pyx_v_masterRecVar);
- __Pyx_XDECREF(__pyx_v_vName);
- __Pyx_XDECREF(__pyx_v_v);
- __Pyx_XDECREF(__pyx_v_dims);
- __Pyx_XDECREF(__pyx_v_shape);
- __Pyx_XDECREF(__pyx_v_dtype);
- __Pyx_XDECREF(__pyx_v_cdf);
- __Pyx_XDECREF(__pyx_v_cdfVLen);
- __Pyx_XDECREF(__pyx_v_cdfRecVar);
- __Pyx_XDECREF(__pyx_v_f);
- __Pyx_XDECREF((PyObject *)__pyx_v_part);
- __Pyx_XDECREF(__pyx_v_varInfo);
- __Pyx_XDECREF(__pyx_v_masterDims);
- __Pyx_XDECREF(__pyx_v_masterShape);
- __Pyx_XDECREF(__pyx_v_masterType);
- __Pyx_XDECREF(__pyx_v_extDims);
- __Pyx_XDECREF(__pyx_v_extShape);
- __Pyx_XDECREF(__pyx_v_extType);
- __Pyx_XDECREF(__pyx_v_vInst);
- __Pyx_XDECREF(__pyx_v_varname);
- __Pyx_XDECREF(__pyx_v_var);
- __Pyx_XDECREF(__pyx_v_dset);
- __Pyx_XDECREF(__pyx_v_files);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5515
- * self._path = '/'
+/* "netCDF4/_netCDF4.pyx":5645
+ * return self._cdf[0].__dict__.keys()
*
- * def __setattr__(self, name, value): # <<<<<<<<<<<<<<
- * """override base class attribute creation"""
- * self.__dict__[name] = value
+ * def set_auto_maskandscale(self, value): # <<<<<<<<<<<<<<
+ * """
+ * **`set_auto_maskandscale(self, True_or_False)`**
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_3__setattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_2__setattr__[] = "override base class attribute creation";
-static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_3__setattr__ = {"__setattr__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_3__setattr__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_2__setattr__};
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_3__setattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_9set_auto_maskandscale(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_8set_auto_maskandscale[] = "\n **`set_auto_maskandscale(self, True_or_False)`**\n \n Call `Variable.set_auto_maskandscale` for all variables contained in this\n `MFDataset`.\n \n **`True_or_False`**: Boolean determining if automatic conversion to masked arrays\n and variable scaling shall be applied for all variables.\n ";
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_9set_auto_maskandscale = {"set_auto_maskandscale", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_9set_auto_maskandscale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_8set_auto_maskandscale};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_9set_auto_maskandscale(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
- PyObject *__pyx_v_name = 0;
PyObject *__pyx_v_value = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
+ __Pyx_RefNannySetupContext("set_auto_maskandscale (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,&__pyx_n_s_value,0};
- PyObject* values[3] = {0,0,0};
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
+ PyObject* values[2] = {0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
case 0: break;
@@ -64270,69 +70339,194 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_3__setattr__(PyObject *_
if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
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, 5515, __pyx_L3_error)
- }
- case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 2); __PYX_ERR(0, 5515, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_auto_maskandscale", 1, 2, 2, 1); __PYX_ERR(0, 5645, __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, 5515, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_auto_maskandscale") < 0)) __PYX_ERR(0, 5645, __pyx_L3_error)
}
- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
}
__pyx_v_self = values[0];
- __pyx_v_name = values[1];
- __pyx_v_value = values[2];
+ __pyx_v_value = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5515, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_auto_maskandscale", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5645, __pyx_L3_error)
__pyx_L3_error:;
- __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_2__setattr__(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_value);
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8set_auto_maskandscale(__pyx_self, __pyx_v_self, __pyx_v_value);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_2__setattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8set_auto_maskandscale(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ PyObject *__pyx_v_var = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
- __Pyx_RefNannySetupContext("__setattr__", 0);
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("set_auto_maskandscale", 0);
+
+ /* "netCDF4/_netCDF4.pyx":5656
+ * """
+ *
+ * for var in self.variables.values(): # <<<<<<<<<<<<<<
+ * var.set_auto_maskandscale(value)
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5656, __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, 5656, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ 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, 5656, __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, 5656, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ 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, 5656, __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, 5656, __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, 5656, __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, 5656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_5(__pyx_t_3);
+ if (unlikely(!__pyx_t_1)) {
+ 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, 5656, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5657
+ *
+ * for var in self.variables.values():
+ * var.set_auto_maskandscale(value) # <<<<<<<<<<<<<<
+ *
+ * def set_auto_mask(self, value):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5657, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5657, __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_6, __pyx_v_value};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5657, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_value};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5657, __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, 5657, __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_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5657, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __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":5517
- * def __setattr__(self, name, value):
- * """override base class attribute creation"""
- * self.__dict__[name] = value # <<<<<<<<<<<<<<
+ /* "netCDF4/_netCDF4.pyx":5656
+ * """
+ *
+ * for var in self.variables.values(): # <<<<<<<<<<<<<<
+ * var.set_auto_maskandscale(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, 5517, __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, 5517, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5515
- * self._path = '/'
+ /* "netCDF4/_netCDF4.pyx":5645
+ * return self._cdf[0].__dict__.keys()
*
- * def __setattr__(self, name, value): # <<<<<<<<<<<<<<
- * """override base class attribute creation"""
- * self.__dict__[name] = value
+ * def set_auto_maskandscale(self, value): # <<<<<<<<<<<<<<
+ * """
+ * **`set_auto_maskandscale(self, True_or_False)`**
*/
/* function exit code */
@@ -64340,33 +70534,39 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_2__setattr__(CYTHON_UNUS
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_var);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5519
- * self.__dict__[name] = value
+/* "netCDF4/_netCDF4.pyx":5659
+ * var.set_auto_maskandscale(value)
*
- * def __getattribute__(self, name): # <<<<<<<<<<<<<<
- * if name in ['variables','dimensions','file_format','groups',\
- * 'data_model','disk_format','path']:
+ * def set_auto_mask(self, value): # <<<<<<<<<<<<<<
+ * """
+ * **`set_auto_mask(self, True_or_False)`**
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__ = {"__getattribute__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__, METH_VARARGS|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_11set_auto_mask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_10set_auto_mask[] = "\n **`set_auto_mask(self, True_or_False)`**\n \n Call `Variable.set_auto_mask` for all variables contained in this `MFDataset`.\n \n **`True_or_False`**: Boolean determining if automatic conversion to masked arrays\n shall be applied for all variables.\n ";
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_11set_auto_mask = {"set_auto_mask", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_11set_auto_mask, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_10set_auto_mask};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_11set_auto_mask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
- PyObject *__pyx_v_name = 0;
+ PyObject *__pyx_v_value = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__getattribute__ (wrapper)", 0);
+ __Pyx_RefNannySetupContext("set_auto_mask (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,0};
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
PyObject* values[2] = {0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
@@ -64383,13 +70583,13 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__(PyObje
if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__getattribute__", 1, 2, 2, 1); __PYX_ERR(0, 5519, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_auto_mask", 1, 2, 2, 1); __PYX_ERR(0, 5659, __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, 5519, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_auto_mask") < 0)) __PYX_ERR(0, 5659, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -64398,266 +70598,179 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__(PyObje
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
}
__pyx_v_self = values[0];
- __pyx_v_name = values[1];
+ __pyx_v_value = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__getattribute__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5519, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_auto_mask", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5659, __pyx_L3_error)
__pyx_L3_error:;
- __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__getattribute__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.set_auto_mask", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(__pyx_self, __pyx_v_self, __pyx_v_name);
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10set_auto_mask(__pyx_self, __pyx_v_self, __pyx_v_value);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10set_auto_mask(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ PyObject *__pyx_v_var = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
- int __pyx_t_2;
- int __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- Py_ssize_t __pyx_t_6;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
- __Pyx_RefNannySetupContext("__getattribute__", 0);
+ __Pyx_RefNannySetupContext("set_auto_mask", 0);
- /* "netCDF4/_netCDF4.pyx":5520
+ /* "netCDF4/_netCDF4.pyx":5669
+ * """
+ *
+ * for var in self.variables.values(): # <<<<<<<<<<<<<<
+ * var.set_auto_mask(value)
*
- * def __getattribute__(self, name):
- * if name in ['variables','dimensions','file_format','groups',\ # <<<<<<<<<<<<<<
- * 'data_model','disk_format','path']:
- * if name == 'dimensions': return self._dims
*/
- __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, 5520, __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, 5520, __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, 5520, __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, 5520, __pyx_L1_error)
- if (!__pyx_t_3) {
- } else {
- __pyx_t_2 = __pyx_t_3;
- goto __pyx_L4_bool_binop_done;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5669, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5669, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
}
- __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, 5520, __pyx_L1_error)
- if (!__pyx_t_3) {
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5669, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
} else {
- __pyx_t_2 = __pyx_t_3;
- goto __pyx_L4_bool_binop_done;
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5669, __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, 5520, __pyx_L1_error)
- if (!__pyx_t_3) {
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ 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_2 = __pyx_t_3;
- goto __pyx_L4_bool_binop_done;
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5669, __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, 5669, __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, 5520, __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":5522
- * 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, 5522, __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, 5522, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
- }
-
- /* "netCDF4/_netCDF4.pyx":5523
- * '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, 5523, __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, 5523, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
- }
-
- /* "netCDF4/_netCDF4.pyx":5524
- * 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, 5524, __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, 5524, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
- }
-
- /* "netCDF4/_netCDF4.pyx":5525
- * 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, 5525, __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, 5525, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
- }
-
- /* "netCDF4/_netCDF4.pyx":5526
- * 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, 5526, __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, 5526, __pyx_L1_error)
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ 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, 5669, __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, 5669, __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, 5669, __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, 5669, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_5(__pyx_t_3);
+ if (unlikely(!__pyx_t_1)) {
+ 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, 5669, __pyx_L1_error)
+ }
+ break;
+ }
__Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
}
+ __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1);
+ __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5527
- * 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:
+ /* "netCDF4/_netCDF4.pyx":5670
+ *
+ * for var in self.variables.values():
+ * var.set_auto_mask(value) # <<<<<<<<<<<<<<
+ *
+ * def set_auto_scale(self, value):
*/
- __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_path, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 5527, __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, 5527, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_mask); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5670, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
}
-
- /* "netCDF4/_netCDF4.pyx":5528
- * 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, 5528, __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, 5528, __pyx_L1_error)
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5670, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_value};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5670, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_value};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5670, __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, 5670, __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_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5670, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __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":5520
+ /* "netCDF4/_netCDF4.pyx":5669
+ * """
*
- * def __getattribute__(self, name):
- * if name in ['variables','dimensions','file_format','groups',\ # <<<<<<<<<<<<<<
- * 'data_model','disk_format','path']:
- * if name == 'dimensions': return self._dims
- */
- goto __pyx_L3;
- }
-
- /* "netCDF4/_netCDF4.pyx":5530
- * if name == 'groups': return self._grps
- * else:
- * return Dataset.__getattribute__(self, name) # <<<<<<<<<<<<<<
+ * for var in self.variables.values(): # <<<<<<<<<<<<<<
+ * var.set_auto_mask(value)
*
- * def ncattrs(self):
*/
- /*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, 5530, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = NULL;
- __pyx_t_6 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
- if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
- __Pyx_INCREF(__pyx_t_5);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_4, function);
- __pyx_t_6 = 1;
- }
- }
- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5530, __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_INCREF(__pyx_v_self);
- __Pyx_GIVEREF(__pyx_v_self);
- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self);
- __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, 5530, __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_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
}
- __pyx_L3:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5519
- * self.__dict__[name] = value
+ /* "netCDF4/_netCDF4.pyx":5659
+ * var.set_auto_maskandscale(value)
*
- * def __getattribute__(self, name): # <<<<<<<<<<<<<<
- * if name in ['variables','dimensions','file_format','groups',\
- * 'data_model','disk_format','path']:
+ * def set_auto_mask(self, value): # <<<<<<<<<<<<<<
+ * """
+ * **`set_auto_mask(self, True_or_False)`**
*/
/* function exit code */
@@ -64665,69 +70778,114 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(CYTHON
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
- __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__getattribute__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.set_auto_mask", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_var);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5532
- * return Dataset.__getattribute__(self, name)
+/* "netCDF4/_netCDF4.pyx":5672
+ * var.set_auto_mask(value)
*
- * def ncattrs(self): # <<<<<<<<<<<<<<
+ * def set_auto_scale(self, value): # <<<<<<<<<<<<<<
* """
- * **`ncattrs(self)`**
+ * **`set_auto_scale(self, True_or_False)`**
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_7ncattrs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_6ncattrs[] = "\n **`ncattrs(self)`**\n\n return the netcdf attribute names from the master file.\n ";
-static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_7ncattrs = {"ncattrs", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_7ncattrs, METH_O, __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_6ncattrs};
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_7ncattrs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_13set_auto_scale(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_12set_auto_scale[] = "\n **`set_auto_scale(self, True_or_False)`**\n \n Call `Variable.set_auto_scale` for all variables contained in this `MFDataset`.\n \n **`True_or_False`**: Boolean determining if automatic variable scaling\n shall be applied for all variables.\n ";
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_13set_auto_scale = {"set_auto_scale", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_13set_auto_scale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_12set_auto_scale};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_13set_auto_scale(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_value = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("ncattrs (wrapper)", 0);
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_6ncattrs(__pyx_self, ((PyObject *)__pyx_v_self));
+ __Pyx_RefNannySetupContext("set_auto_scale (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("set_auto_scale", 1, 2, 2, 1); __PYX_ERR(0, 5672, __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, 5672, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_value = values[1];
+ }
+ 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, 5672, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.set_auto_scale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_12set_auto_scale(__pyx_self, __pyx_v_self, __pyx_v_value);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_12set_auto_scale(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ PyObject *__pyx_v_var = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
- __Pyx_RefNannySetupContext("ncattrs", 0);
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("set_auto_scale", 0);
- /* "netCDF4/_netCDF4.pyx":5538
- * return the netcdf attribute names from the master file.
+ /* "netCDF4/_netCDF4.pyx":5682
* """
- * return self._cdf[0].__dict__.keys() # <<<<<<<<<<<<<<
*
- * def close(self):
+ * for var in self.variables.values(): # <<<<<<<<<<<<<<
+ * var.set_auto_scale(value)
+ *
*/
- __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, 5538, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5682, __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, 5538, __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, 5538, __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, 5538, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5682, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -64737,40 +70895,148 @@ 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, 5538, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5682, __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, 5538, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5682, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
+ 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, 5682, __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, 5682, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ 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, 5682, __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, 5682, __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, 5682, __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, 5682, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_5(__pyx_t_3);
+ if (unlikely(!__pyx_t_1)) {
+ 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, 5682, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1);
+ __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5532
- * return Dataset.__getattribute__(self, name)
+ /* "netCDF4/_netCDF4.pyx":5683
*
- * def ncattrs(self): # <<<<<<<<<<<<<<
+ * for var in self.variables.values():
+ * var.set_auto_scale(value) # <<<<<<<<<<<<<<
+ *
+ * def close(self):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5683, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5683, __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_6, __pyx_v_value};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5683, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_value};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5683, __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, 5683, __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_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5683, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __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":5682
* """
- * **`ncattrs(self)`**
+ *
+ * for var in self.variables.values(): # <<<<<<<<<<<<<<
+ * var.set_auto_scale(value)
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5672
+ * var.set_auto_mask(value)
+ *
+ * def set_auto_scale(self, value): # <<<<<<<<<<<<<<
+ * """
+ * **`set_auto_scale(self, True_or_False)`**
*/
/* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.ncattrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.set_auto_scale", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_var);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5540
- * return self._cdf[0].__dict__.keys()
+/* "netCDF4/_netCDF4.pyx":5685
+ * var.set_auto_scale(value)
*
* def close(self): # <<<<<<<<<<<<<<
* """
@@ -64778,21 +71044,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED P
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_9close(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_8close[] = "\n **`close(self)`**\n\n close all the open files.\n ";
-static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_9close = {"close", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_9close, METH_O, __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_8close};
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_9close(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_15close(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_14close[] = "\n **`close(self)`**\n\n close all the open files.\n ";
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_15close = {"close", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_15close, METH_O, __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_14close};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_15close(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("close (wrapper)", 0);
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(__pyx_self, ((PyObject *)__pyx_v_self));
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_14close(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_14close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_v_dset = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -64804,40 +71070,40 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(CYTHON_UNUSED PyO
PyObject *__pyx_t_6 = NULL;
__Pyx_RefNannySetupContext("close", 0);
- /* "netCDF4/_netCDF4.pyx":5546
+ /* "netCDF4/_netCDF4.pyx":5691
* 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, 5546, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5691, __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, 5546, __pyx_L1_error)
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5691, __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, 5546, __pyx_L1_error)
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5691, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_4)) {
if (likely(PyList_CheckExact(__pyx_t_2))) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5546, __pyx_L1_error)
+ #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, 5691, __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, 5546, __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, 5691, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5546, __pyx_L1_error)
+ #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, 5691, __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, 5546, __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, 5691, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -64847,7 +71113,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, 5546, __pyx_L1_error)
+ else __PYX_ERR(0, 5691, __pyx_L1_error)
}
break;
}
@@ -64856,17 +71122,17 @@ 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":5547
+ /* "netCDF4/_netCDF4.pyx":5692
* """
* 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, 5547, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5692, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -64876,16 +71142,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, 5547, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5692, __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, 5547, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5692, __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":5546
+ /* "netCDF4/_netCDF4.pyx":5691
* close all the open files.
* """
* for dset in self._cdf: # <<<<<<<<<<<<<<
@@ -64895,8 +71161,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(CYTHON_UNUSED PyO
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5540
- * return self._cdf[0].__dict__.keys()
+ /* "netCDF4/_netCDF4.pyx":5685
+ * var.set_auto_scale(value)
*
* def close(self): # <<<<<<<<<<<<<<
* """
@@ -64920,7 +71186,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(CYTHON_UNUSED PyO
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5549
+/* "netCDF4/_netCDF4.pyx":5694
* dset.close()
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -64929,20 +71195,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(CYTHON_UNUSED PyO
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_11__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_11__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_11__repr__, METH_O, 0};
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_11__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_17__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_17__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_17__repr__, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_17__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(__pyx_self, ((PyObject *)__pyx_v_self));
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_16__repr__(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_16__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_v_ncdump = NULL;
PyObject *__pyx_v_dimnames = NULL;
PyObject *__pyx_v_varnames = NULL;
@@ -64963,16 +71229,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED
int __pyx_t_8;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "netCDF4/_netCDF4.pyx":5550
+ /* "netCDF4/_netCDF4.pyx":5695
*
* 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, 5550, __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, 5695, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5550, __pyx_L1_error)
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5695, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_1);
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
@@ -64980,22 +71246,22 @@ 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":5551
+ /* "netCDF4/_netCDF4.pyx":5696
* 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, 5551, __pyx_L1_error)
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5696, __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, 5551, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5696, __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, 5551, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5696, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -65005,10 +71271,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, 5551, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5696, __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, 5551, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5696, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -65016,27 +71282,27 @@ 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, 5551, __pyx_L1_error)
+ __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5696, __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, 5551, __pyx_L1_error)
+ __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5696, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_6)) {
if (likely(PyList_CheckExact(__pyx_t_4))) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5551, __pyx_L1_error)
+ #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, 5696, __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, 5551, __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, 5696, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5551, __pyx_L1_error)
+ #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, 5696, __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, 5551, __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, 5696, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -65046,7 +71312,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, 5551, __pyx_L1_error)
+ else __PYX_ERR(0, 5696, __pyx_L1_error)
}
break;
}
@@ -65054,40 +71320,40 @@ 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, 5551, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5696, __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, 5551, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5696, __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, 5551, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 5696, __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, 5551, __pyx_L1_error)
+ __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5696, __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":5552
+ /* "netCDF4/_netCDF4.pyx":5697
* 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, 5552, __pyx_L1_error)
+ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5697, __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, 5552, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5697, __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, 5552, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5697, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -65097,10 +71363,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, 5552, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5697, __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, 5552, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5697, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -65108,27 +71374,27 @@ 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, 5552, __pyx_L1_error)
+ __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5697, __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, 5552, __pyx_L1_error)
+ __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5697, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
for (;;) {
if (likely(!__pyx_t_6)) {
if (likely(PyList_CheckExact(__pyx_t_1))) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5552, __pyx_L1_error)
+ #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, 5697, __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, 5552, __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, 5697, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
} else {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5552, __pyx_L1_error)
+ #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, 5697, __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, 5552, __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, 5697, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
}
@@ -65138,7 +71404,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, 5552, __pyx_L1_error)
+ else __PYX_ERR(0, 5697, __pyx_L1_error)
}
break;
}
@@ -65146,25 +71412,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, 5552, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5697, __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, 5552, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5697, __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, 5552, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 5697, __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, 5552, __pyx_L1_error)
+ __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5697, __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":5553
+ /* "netCDF4/_netCDF4.pyx":5698
* dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
* varnames = tuple([str(varname) for varname in self.variables.keys()])
* grpnames = () # <<<<<<<<<<<<<<
@@ -65174,37 +71440,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":5554
+ /* "netCDF4/_netCDF4.pyx":5699
* 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, 5554, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5699, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__16, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5554, __pyx_L1_error)
+ __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__15, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 5699, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_7) {
- /* "netCDF4/_netCDF4.pyx":5556
+ /* "netCDF4/_netCDF4.pyx":5701
* 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, 5556, __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, 5701, __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, 5556, __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, 5701, __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, 5556, __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, 5701, __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, 5556, __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, 5701, __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, 5556, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5701, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
@@ -65213,20 +71479,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED
__pyx_t_4 = 0;
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5555
+ /* "netCDF4/_netCDF4.pyx":5700
* 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, 5555, __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, 5700, __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, 5555, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_3); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5700, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5554
+ /* "netCDF4/_netCDF4.pyx":5699
* varnames = tuple([str(varname) for varname in self.variables.keys()])
* grpnames = ()
* if self.path == '/': # <<<<<<<<<<<<<<
@@ -65236,7 +71502,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED
goto __pyx_L7;
}
- /* "netCDF4/_netCDF4.pyx":5558
+ /* "netCDF4/_netCDF4.pyx":5703
* (self.data_model[0], self.disk_format[0]))
* else:
* ncdump.append('group %s:\n' % self.path) # <<<<<<<<<<<<<<
@@ -65244,37 +71510,37 @@ 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, 5558, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5703, __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, 5558, __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, 5703, __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, 5558, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5703, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
__pyx_L7:;
- /* "netCDF4/_netCDF4.pyx":5559
+ /* "netCDF4/_netCDF4.pyx":5704
* 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, 5559, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5704, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- /* "netCDF4/_netCDF4.pyx":5560
+ /* "netCDF4/_netCDF4.pyx":5705
* 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, 5560, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5705, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -65284,10 +71550,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, 5560, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5705, __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, 5560, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5705, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -65295,27 +71561,27 @@ 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, 5560, __pyx_L1_error)
+ __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5705, __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, 5560, __pyx_L1_error)
+ __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5705, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
for (;;) {
if (likely(!__pyx_t_6)) {
if (likely(PyList_CheckExact(__pyx_t_4))) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5560, __pyx_L1_error)
+ #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, 5705, __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, 5560, __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, 5705, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
} else {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5560, __pyx_L1_error)
+ #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, 5705, __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, 5560, __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, 5705, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
}
@@ -65325,7 +71591,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, 5560, __pyx_L1_error)
+ else __PYX_ERR(0, 5705, __pyx_L1_error)
}
break;
}
@@ -65334,19 +71600,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":5559
+ /* "netCDF4/_netCDF4.pyx":5704
* 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, 5559, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5704, __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, 5559, __pyx_L1_error)
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5704, __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, 5559, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5704, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_name);
__Pyx_GIVEREF(__pyx_v_name);
@@ -65354,106 +71620,106 @@ 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, 5559, __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, 5704, __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, 5559, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 5704, __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":5561
+ /* "netCDF4/_netCDF4.pyx":5706
* 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, 5561, __pyx_L1_error)
+ __pyx_t_1 = PyNumber_Add(__pyx_v_ncdump, __pyx_v_attrs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5706, __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":5562
+ /* "netCDF4/_netCDF4.pyx":5707
* 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, 5562, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5707, __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, 5562, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5707, __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, 5562, __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, 5707, __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, 5562, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5707, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5563
+ /* "netCDF4/_netCDF4.pyx":5708
* 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, 5563, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5708, __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, 5563, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5708, __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, 5563, __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, 5708, __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, 5563, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5708, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5564
+ /* "netCDF4/_netCDF4.pyx":5709
* 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, 5564, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5709, __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, 5564, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5709, __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, 5564, __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, 5709, __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, 5564, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 5709, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5565
+ /* "netCDF4/_netCDF4.pyx":5710
* ncdump.append(' variables = %s\n' % str(varnames))
* ncdump.append(' groups = %s\n' % str(grpnames))
* return ''.join(ncdump) # <<<<<<<<<<<<<<
*
- * class _Dimension(object):
+ * 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, 5565, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_v_ncdump); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5710, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5549
+ /* "netCDF4/_netCDF4.pyx":5694
* dset.close()
*
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -65483,7 +71749,66 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5568
+/* "netCDF4/_netCDF4.pyx":5712
+ * return ''.join(ncdump)
+ *
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * # raise error is user tries to pickle a MFDataset object.
+ * raise NotImplementedError('MFDataset is not picklable')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_19__reduce__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_19__reduce__ = {"__reduce__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_19__reduce__, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_19__reduce__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_18__reduce__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_18__reduce__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce__", 0);
+
+ /* "netCDF4/_netCDF4.pyx":5714
+ * 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, 5714, __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, 5714, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":5712
+ * return ''.join(ncdump)
+ *
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * # raise error is user tries to pickle a MFDataset object.
+ * raise NotImplementedError('MFDataset is not picklable')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":5717
*
* class _Dimension(object):
* def __init__(self, dimname, dim, dimlens, dimtotlen): # <<<<<<<<<<<<<<
@@ -65526,26 +71851,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, 5568, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 5717, __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, 5568, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 5717, __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, 5568, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 5717, __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, 5568, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 5717, __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, 5568, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5717, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
goto __pyx_L5_argtuple_error;
@@ -65564,7 +71889,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, 5568, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5717, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4._Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -65582,34 +71907,34 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension___init__(CYTHON_UNUSED
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__", 0);
- /* "netCDF4/_netCDF4.pyx":5569
+ /* "netCDF4/_netCDF4.pyx":5718
* 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, 5569, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimlens, __pyx_v_dimlens) < 0) __PYX_ERR(0, 5718, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5570
+ /* "netCDF4/_netCDF4.pyx":5719
* 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, 5570, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimtotlen, __pyx_v_dimtotlen) < 0) __PYX_ERR(0, 5719, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5571
+ /* "netCDF4/_netCDF4.pyx":5720
* 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, 5571, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name_2, __pyx_v_dimname) < 0) __PYX_ERR(0, 5720, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5568
+ /* "netCDF4/_netCDF4.pyx":5717
*
* class _Dimension(object):
* def __init__(self, dimname, dim, dimlens, dimtotlen): # <<<<<<<<<<<<<<
@@ -65629,7 +71954,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension___init__(CYTHON_UNUSED
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5572
+/* "netCDF4/_netCDF4.pyx":5721
* self.dimtotlen = dimtotlen
* self._name = dimname
* def __len__(self): # <<<<<<<<<<<<<<
@@ -65657,7 +71982,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":5573
+ /* "netCDF4/_netCDF4.pyx":5722
* self._name = dimname
* def __len__(self):
* return self.dimtotlen # <<<<<<<<<<<<<<
@@ -65665,13 +71990,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, 5573, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimtotlen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5722, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5572
+ /* "netCDF4/_netCDF4.pyx":5721
* self.dimtotlen = dimtotlen
* self._name = dimname
* def __len__(self): # <<<<<<<<<<<<<<
@@ -65690,7 +72015,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_2__len__(CYTHON_UNUSED
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5574
+/* "netCDF4/_netCDF4.pyx":5723
* def __len__(self):
* return self.dimtotlen
* def isunlimited(self): # <<<<<<<<<<<<<<
@@ -65717,7 +72042,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_4isunlimited(CYTHON_UN
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("isunlimited", 0);
- /* "netCDF4/_netCDF4.pyx":5575
+ /* "netCDF4/_netCDF4.pyx":5724
* return self.dimtotlen
* def isunlimited(self):
* return True # <<<<<<<<<<<<<<
@@ -65729,7 +72054,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_4isunlimited(CYTHON_UN
__pyx_r = Py_True;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5574
+ /* "netCDF4/_netCDF4.pyx":5723
* def __len__(self):
* return self.dimtotlen
* def isunlimited(self): # <<<<<<<<<<<<<<
@@ -65744,7 +72069,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_4isunlimited(CYTHON_UN
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5576
+/* "netCDF4/_netCDF4.pyx":5725
* def isunlimited(self):
* return True
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -65777,17 +72102,17 @@ 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":5577
+ /* "netCDF4/_netCDF4.pyx":5726
* 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, 5577, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5726, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -65797,18 +72122,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, 5577, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5726, __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, 5577, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5726, __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, 5577, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 5726, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_4) {
- /* "netCDF4/_netCDF4.pyx":5578
+ /* "netCDF4/_netCDF4.pyx":5727
* def __repr__(self):
* if self.isunlimited():
* return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self)) # <<<<<<<<<<<<<<
@@ -65816,14 +72141,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, 5578, __pyx_L1_error)
+ __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5727, __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, 5578, __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, 5727, __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, 5578, __pyx_L1_error)
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5578, __pyx_L1_error)
+ __pyx_t_5 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 5727, __pyx_L1_error)
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5727, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5578, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5727, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
@@ -65831,10 +72156,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, 5578, __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, 5727, __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, 5578, __pyx_L1_error)
+ __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5727, __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;
@@ -65842,7 +72167,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSE
__pyx_t_6 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5577
+ /* "netCDF4/_netCDF4.pyx":5726
* return True
* def __repr__(self):
* if self.isunlimited(): # <<<<<<<<<<<<<<
@@ -65851,7 +72176,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSE
*/
}
- /* "netCDF4/_netCDF4.pyx":5580
+ /* "netCDF4/_netCDF4.pyx":5729
* 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)) # <<<<<<<<<<<<<<
@@ -65860,14 +72185,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, 5580, __pyx_L1_error)
+ __pyx_t_6 = PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5729, __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, 5580, __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, 5729, __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, 5580, __pyx_L1_error)
- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5580, __pyx_L1_error)
+ __pyx_t_5 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 5729, __pyx_L1_error)
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5729, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5580, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5729, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
@@ -65875,10 +72200,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, 5580, __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, 5729, __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, 5580, __pyx_L1_error)
+ __pyx_t_2 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5729, __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;
@@ -65887,7 +72212,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSE
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":5576
+ /* "netCDF4/_netCDF4.pyx":5725
* def isunlimited(self):
* return True
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -65909,7 +72234,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSE
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5583
+/* "netCDF4/_netCDF4.pyx":5732
*
* class _Variable(object):
* def __init__(self, dset, varname, var, recdimname): # <<<<<<<<<<<<<<
@@ -65952,26 +72277,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, 5583, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 5732, __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, 5583, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 5732, __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, 5583, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 5732, __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, 5583, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 5732, __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, 5583, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5732, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
goto __pyx_L5_argtuple_error;
@@ -65990,7 +72315,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, 5583, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5732, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4._Variable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -66018,119 +72343,119 @@ 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":5584
+ /* "netCDF4/_netCDF4.pyx":5733
* 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, 5584, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5733, __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, 5584, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimensions, __pyx_t_1) < 0) __PYX_ERR(0, 5733, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5585
+ /* "netCDF4/_netCDF4.pyx":5734
* 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, 5585, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dset_2, __pyx_v_dset) < 0) __PYX_ERR(0, 5734, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5586
+ /* "netCDF4/_netCDF4.pyx":5735
* 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, 5586, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_grp_2, __pyx_v_dset) < 0) __PYX_ERR(0, 5735, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5587
+ /* "netCDF4/_netCDF4.pyx":5736
* 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, 5587, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_mastervar, __pyx_v_var) < 0) __PYX_ERR(0, 5736, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5588
+ /* "netCDF4/_netCDF4.pyx":5737
* 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, 5588, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_cdfRecVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5737, __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, 5588, __pyx_L1_error)
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_varname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5737, __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, 5588, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_recVar, __pyx_t_2) < 0) __PYX_ERR(0, 5737, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5589
+ /* "netCDF4/_netCDF4.pyx":5738
* 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, 5589, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_recdimname_2, __pyx_v_recdimname) < 0) __PYX_ERR(0, 5738, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5590
+ /* "netCDF4/_netCDF4.pyx":5739
* 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, 5590, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_cdfVLen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5739, __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, 5590, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_recLen, __pyx_t_2) < 0) __PYX_ERR(0, 5739, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5591
+ /* "netCDF4/_netCDF4.pyx":5740
* 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, 5591, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5740, __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, 5591, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 5740, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5592
+ /* "netCDF4/_netCDF4.pyx":5741
* 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, 5592, __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, 5741, __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, 5592, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name_2, __pyx_t_2) < 0) __PYX_ERR(0, 5741, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5594
+ /* "netCDF4/_netCDF4.pyx":5743
* 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, 5594, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5743, __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, 5594, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5743, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -66140,10 +72465,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, 5594, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5743, __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, 5594, __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;
@@ -66151,27 +72476,27 @@ 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, 5594, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5743, __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, 5594, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5743, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
for (;;) {
if (likely(!__pyx_t_5)) {
if (likely(PyList_CheckExact(__pyx_t_3))) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5594, __pyx_L1_error)
+ #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, 5743, __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, 5594, __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, 5743, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5594, __pyx_L1_error)
+ #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, 5743, __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, 5594, __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, 5743, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
}
@@ -66181,7 +72506,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, 5594, __pyx_L1_error)
+ else __PYX_ERR(0, 5743, __pyx_L1_error)
}
break;
}
@@ -66189,7 +72514,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable___init__(CYTHON_UNUSED P
}
if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
PyObject* sequence = __pyx_t_2;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -66197,9 +72522,9 @@ 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, 5594, __pyx_L1_error)
+ __PYX_ERR(0, 5743, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
@@ -66210,15 +72535,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, 5594, __pyx_L1_error)
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5743, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5594, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5743, __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, 5594, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5743, __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;
@@ -66226,7 +72551,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, 5594, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 5743, __pyx_L1_error)
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L6_unpacking_done;
@@ -66234,7 +72559,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, 5594, __pyx_L1_error)
+ __PYX_ERR(0, 5743, __pyx_L1_error)
__pyx_L6_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
@@ -66242,19 +72567,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":5595
+ /* "netCDF4/_netCDF4.pyx":5744
* # 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, 5595, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5744, __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, 5595, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 5744, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5594
+ /* "netCDF4/_netCDF4.pyx":5743
* self._name = var._name
* # copy attributes from master.
* for name, value in var.__dict__.items(): # <<<<<<<<<<<<<<
@@ -66264,7 +72589,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":5583
+ /* "netCDF4/_netCDF4.pyx":5732
*
* class _Variable(object):
* def __init__(self, dset, varname, var, recdimname): # <<<<<<<<<<<<<<
@@ -66291,7 +72616,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable___init__(CYTHON_UNUSED P
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5596
+/* "netCDF4/_netCDF4.pyx":5745
* for name, value in var.__dict__.items():
* self.__dict__[name] = value
* def typecode(self): # <<<<<<<<<<<<<<
@@ -66319,7 +72644,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":5597
+ /* "netCDF4/_netCDF4.pyx":5746
* self.__dict__[name] = value
* def typecode(self):
* return self.dtype # <<<<<<<<<<<<<<
@@ -66327,13 +72652,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, 5597, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5746, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5596
+ /* "netCDF4/_netCDF4.pyx":5745
* for name, value in var.__dict__.items():
* self.__dict__[name] = value
* def typecode(self): # <<<<<<<<<<<<<<
@@ -66352,7 +72677,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_2typecode(CYTHON_UNUSED
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5598
+/* "netCDF4/_netCDF4.pyx":5747
* def typecode(self):
* return self.dtype
* def ncattrs(self): # <<<<<<<<<<<<<<
@@ -66382,7 +72707,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":5599
+ /* "netCDF4/_netCDF4.pyx":5748
* return self.dtype
* def ncattrs(self):
* return self._mastervar.__dict__.keys() # <<<<<<<<<<<<<<
@@ -66390,16 +72715,16 @@ 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, 5599, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mastervar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5748, __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, 5599, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5748, __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, 5599, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5748, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -66409,10 +72734,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, 5599, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5748, __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, 5599, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5748, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -66420,7 +72745,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_4ncattrs(CYTHON_UNUSED P
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5598
+ /* "netCDF4/_netCDF4.pyx":5747
* def typecode(self):
* return self.dtype
* def ncattrs(self): # <<<<<<<<<<<<<<
@@ -66441,7 +72766,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_4ncattrs(CYTHON_UNUSED P
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5600
+/* "netCDF4/_netCDF4.pyx":5749
* def ncattrs(self):
* return self._mastervar.__dict__.keys()
* def __getattr__(self,name): # <<<<<<<<<<<<<<
@@ -66478,11 +72803,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, 5600, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, 1); __PYX_ERR(0, 5749, __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, 5600, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getattr__") < 0)) __PYX_ERR(0, 5749, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -66495,7 +72820,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, 5600, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5749, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4._Variable.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -66523,20 +72848,20 @@ 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":5601
+ /* "netCDF4/_netCDF4.pyx":5750
* 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, 5601, __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, 5750, __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, 5601, __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, 5750, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -66546,10 +72871,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, 5601, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5750, __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, 5601, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5750, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -66558,20 +72883,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUS
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":5602
+ /* "netCDF4/_netCDF4.pyx":5751
* 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, 5602, __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, 5751, __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, 5602, __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, 5751, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -66581,23 +72906,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, 5602, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5751, __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, 5602, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5751, __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, 5602, __pyx_L1_error)
+ __pyx_t_5 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 5751, __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, 5602, __pyx_L1_error)
+ __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5751, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":5603
+ /* "netCDF4/_netCDF4.pyx":5752
* if name == 'shape': return self._shape()
* if name == 'ndim': return len(self._shape())
* try: # <<<<<<<<<<<<<<
@@ -66613,7 +72938,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUS
__Pyx_XGOTREF(__pyx_t_8);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":5604
+ /* "netCDF4/_netCDF4.pyx":5753
* if name == 'ndim': return len(self._shape())
* try:
* return self.__dict__[name] # <<<<<<<<<<<<<<
@@ -66621,16 +72946,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, 5604, __pyx_L5_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5753, __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, 5604, __pyx_L5_error)
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5753, __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":5603
+ /* "netCDF4/_netCDF4.pyx":5752
* if name == 'shape': return self._shape()
* if name == 'ndim': return len(self._shape())
* try: # <<<<<<<<<<<<<<
@@ -66644,7 +72969,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":5605
+ /* "netCDF4/_netCDF4.pyx":5754
* try:
* return self.__dict__[name]
* except: # <<<<<<<<<<<<<<
@@ -66653,33 +72978,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, 5605, __pyx_L7_except_error)
+ if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 5754, __pyx_L7_except_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_t_4);
- /* "netCDF4/_netCDF4.pyx":5606
+ /* "netCDF4/_netCDF4.pyx":5755
* 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, 5606, __pyx_L7_except_error)
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5755, __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, 5606, __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, 5755, __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, 5606, __pyx_L7_except_error)
+ __PYX_ERR(0, 5755, __pyx_L7_except_error)
}
__pyx_L7_except_error:;
- /* "netCDF4/_netCDF4.pyx":5603
+ /* "netCDF4/_netCDF4.pyx":5752
* if name == 'shape': return self._shape()
* if name == 'ndim': return len(self._shape())
* try: # <<<<<<<<<<<<<<
@@ -66701,7 +73026,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUS
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":5600
+ /* "netCDF4/_netCDF4.pyx":5749
* def ncattrs(self):
* return self._mastervar.__dict__.keys()
* def __getattr__(self,name): # <<<<<<<<<<<<<<
@@ -66724,7 +73049,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUS
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5607
+/* "netCDF4/_netCDF4.pyx":5756
* except:
* raise AttributeError(name)
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -66764,21 +73089,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED
PyObject *__pyx_t_6 = NULL;
int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
- Py_ssize_t __pyx_t_9;
+ int __pyx_t_9;
PyObject *__pyx_t_10 = NULL;
int __pyx_t_11;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "netCDF4/_netCDF4.pyx":5608
+ /* "netCDF4/_netCDF4.pyx":5757
* 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, 5608, __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, 5757, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5608, __pyx_L1_error)
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5757, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_1);
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
@@ -66786,42 +73111,42 @@ 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":5609
+ /* "netCDF4/_netCDF4.pyx":5758
* 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, 5609, __pyx_L1_error)
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5758, __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, 5609, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5758, __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, 5609, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5758, __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, 5609, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5758, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_5)) {
if (likely(PyList_CheckExact(__pyx_t_3))) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5609, __pyx_L1_error)
+ #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, 5758, __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, 5609, __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, 5758, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5609, __pyx_L1_error)
+ #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, 5758, __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, 5609, __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, 5758, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -66831,7 +73156,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, 5609, __pyx_L1_error)
+ else __PYX_ERR(0, 5758, __pyx_L1_error)
}
break;
}
@@ -66839,45 +73164,45 @@ 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, 5609, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5758, __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, 5609, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5758, __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, 5609, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 5758, __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, 5609, __pyx_L1_error)
+ __pyx_t_3 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5758, __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":5610
+ /* "netCDF4/_netCDF4.pyx":5759
* 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, 5610, __pyx_L1_error)
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5759, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- /* "netCDF4/_netCDF4.pyx":5611
+ /* "netCDF4/_netCDF4.pyx":5760
* 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, 5611, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5760, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -66887,10 +73212,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, 5611, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5760, __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, 5611, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5760, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
@@ -66898,27 +73223,27 @@ 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, 5611, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5760, __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, 5611, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5760, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
for (;;) {
if (likely(!__pyx_t_5)) {
if (likely(PyList_CheckExact(__pyx_t_6))) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5611, __pyx_L1_error)
+ #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, 5760, __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, 5611, __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, 5760, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5611, __pyx_L1_error)
+ #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, 5760, __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, 5611, __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, 5760, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
}
@@ -66928,7 +73253,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, 5611, __pyx_L1_error)
+ else __PYX_ERR(0, 5760, __pyx_L1_error)
}
break;
}
@@ -66937,19 +73262,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":5610
+ /* "netCDF4/_netCDF4.pyx":5759
* 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, 5610, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5759, __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, 5610, __pyx_L1_error)
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5759, __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, 5610, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5759, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_name);
__Pyx_GIVEREF(__pyx_v_name);
@@ -66957,28 +73282,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, 5610, __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, 5759, __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, 5610, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 5759, __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":5613
+ /* "netCDF4/_netCDF4.pyx":5762
* 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, 5613, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5762, __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, 5613, __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, 5762, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5613, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5762, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
@@ -66990,77 +73315,77 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED
__pyx_t_3 = 0;
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":5612
+ /* "netCDF4/_netCDF4.pyx":5761
* 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, 5612, __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, 5761, __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, 5612, __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, 5761, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":5614
+ /* "netCDF4/_netCDF4.pyx":5763
* 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, 5614, __pyx_L1_error)
+ __pyx_t_6 = PyNumber_Add(__pyx_v_ncdump_var, __pyx_v_attrs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5763, __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":5615
+ /* "netCDF4/_netCDF4.pyx":5764
* (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, 5615, __pyx_L1_error)
+ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5764, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_v_unlimdims = ((PyObject*)__pyx_t_6);
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":5616
+ /* "netCDF4/_netCDF4.pyx":5765
* 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, 5616, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5765, __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, 5616, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5765, __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, 5616, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5765, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
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_COMPILING_IN_CPYTHON
- __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, 5616, __pyx_L1_error)
+ #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, 5765, __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, 5616, __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, 5765, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5616, __pyx_L1_error)
+ #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, 5765, __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, 5616, __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, 5765, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
#endif
}
@@ -67070,7 +73395,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, 5616, __pyx_L1_error)
+ else __PYX_ERR(0, 5765, __pyx_L1_error)
}
break;
}
@@ -67079,20 +73404,20 @@ 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":5617
+ /* "netCDF4/_netCDF4.pyx":5766
* 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, 5617, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5766, __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, 5617, __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, 5766, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_8 = NULL;
__pyx_t_9 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_8)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -67102,35 +73427,55 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED
__pyx_t_9 = 1;
}
}
- __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5617, __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;
+ #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, 5766, __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
+ #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, 5766, __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, 5766, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_dimname);
+ __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, 5766, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_2);
- __Pyx_INCREF(__pyx_v_dimname);
- __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, 5617, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_6);
__pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":5618
+ /* "netCDF4/_netCDF4.pyx":5767
* 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, 5618, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5767, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_10 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_10)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -67140,36 +73485,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, 5618, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5767, __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, 5618, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5767, __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, 5618, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5767, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_11) {
- /* "netCDF4/_netCDF4.pyx":5619
+ /* "netCDF4/_netCDF4.pyx":5768
* 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, 5619, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5768, __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, 5619, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5768, __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, 5619, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_unlimdims, __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 5768, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5618
+ /* "netCDF4/_netCDF4.pyx":5767
* for dimname in self.dimensions:
* dim = _find_dim(self._grp, dimname)
* if dim.isunlimited(): # <<<<<<<<<<<<<<
@@ -67178,7 +73523,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED
*/
}
- /* "netCDF4/_netCDF4.pyx":5616
+ /* "netCDF4/_netCDF4.pyx":5765
* ncdump_var = ncdump_var + attrs
* unlimdims = []
* for dimname in self.dimensions: # <<<<<<<<<<<<<<
@@ -67188,43 +73533,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":5620
+ /* "netCDF4/_netCDF4.pyx":5769
* 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, 5620, __pyx_L1_error)
+ __pyx_t_1 = PyList_AsTuple(__pyx_v_unlimdims); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5769, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5620, __pyx_L1_error)
+ __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5769, __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, 5620, __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, 5769, __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, 5620, __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, 5769, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5621
+ /* "netCDF4/_netCDF4.pyx":5770
* 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, 5621, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5770, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5621, __pyx_L1_error)
+ __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5770, __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, 5621, __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, 5770, __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, 5621, __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, 5770, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5622
+ /* "netCDF4/_netCDF4.pyx":5771
* ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims)))
* ncdump_var.append('current size = %s\n' % repr(self.shape))
* return ''.join(ncdump_var) # <<<<<<<<<<<<<<
@@ -67232,13 +73577,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, 5622, __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, 5771, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5607
+ /* "netCDF4/_netCDF4.pyx":5756
* except:
* raise AttributeError(name)
* def __repr__(self): # <<<<<<<<<<<<<<
@@ -67269,7 +73614,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5623
+/* "netCDF4/_netCDF4.pyx":5772
* ncdump_var.append('current size = %s\n' % repr(self.shape))
* return ''.join(ncdump_var)
* def __len__(self): # <<<<<<<<<<<<<<
@@ -67301,34 +73646,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":5624
+ /* "netCDF4/_netCDF4.pyx":5773
* 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, 5624, __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, 5773, __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, 5624, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 5773, __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":5625
+ /* "netCDF4/_netCDF4.pyx":5774
* 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__112, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5625, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__120, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5774, __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, 5625, __pyx_L1_error)
+ __PYX_ERR(0, 5774, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5624
+ /* "netCDF4/_netCDF4.pyx":5773
* return ''.join(ncdump_var)
* def __len__(self):
* if not self._shape: # <<<<<<<<<<<<<<
@@ -67337,7 +73682,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_10__len__(CYTHON_UNUSED
*/
}
- /* "netCDF4/_netCDF4.pyx":5627
+ /* "netCDF4/_netCDF4.pyx":5776
* raise TypeError('len() of unsized object')
* else:
* return self._shape()[0] # <<<<<<<<<<<<<<
@@ -67346,10 +73691,10 @@ 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, 5627, __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, 5776, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -67359,14 +73704,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, 5627, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5776, __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, 5627, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5776, __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, 5627, __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, 5776, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_4;
@@ -67374,7 +73719,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_10__len__(CYTHON_UNUSED
goto __pyx_L0;
}
- /* "netCDF4/_netCDF4.pyx":5623
+ /* "netCDF4/_netCDF4.pyx":5772
* ncdump_var.append('current size = %s\n' % repr(self.shape))
* return ''.join(ncdump_var)
* def __len__(self): # <<<<<<<<<<<<<<
@@ -67395,7 +73740,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_10__len__(CYTHON_UNUSED
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5628
+/* "netCDF4/_netCDF4.pyx":5777
* else:
* return self._shape()[0]
* def _shape(self): # <<<<<<<<<<<<<<
@@ -67427,29 +73772,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":5629
+ /* "netCDF4/_netCDF4.pyx":5778
* 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, 5629, __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, 5778, __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, 5629, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5778, __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, 5629, __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, 5778, __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, 5629, __pyx_L1_error)
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5778, __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, 5629, __pyx_L1_error)
+ __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 5778, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_recdimlen = __pyx_t_4;
- /* "netCDF4/_netCDF4.pyx":5630
+ /* "netCDF4/_netCDF4.pyx":5779
* def _shape(self):
* recdimlen = len(self._dset.dimensions[self._recdimname])
* return (recdimlen,) + self._mastervar.shape[1:] # <<<<<<<<<<<<<<
@@ -67457,22 +73802,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, 5630, __pyx_L1_error)
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_recdimlen); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5779, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5630, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5779, __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, 5630, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mastervar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5779, __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, 5630, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5779, __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__113, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5630, __pyx_L1_error)
+ __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, 5779, __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, 5630, __pyx_L1_error)
+ __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5779, __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;
@@ -67480,7 +73825,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":5628
+ /* "netCDF4/_netCDF4.pyx":5777
* else:
* return self._shape()[0]
* def _shape(self): # <<<<<<<<<<<<<<
@@ -67501,7 +73846,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_12_shape(CYTHON_UNUSED P
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5631
+/* "netCDF4/_netCDF4.pyx":5780
* recdimlen = len(self._dset.dimensions[self._recdimname])
* return (recdimlen,) + self._mastervar.shape[1:]
* def set_auto_maskandscale(self,val): # <<<<<<<<<<<<<<
@@ -67538,11 +73883,233 @@ 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, 5631, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_auto_maskandscale", 1, 2, 2, 1); __PYX_ERR(0, 5780, __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, 5780, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_val = values[1];
+ }
+ 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, 5780, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("netCDF4._netCDF4._Variable.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale(__pyx_self, __pyx_v_self, __pyx_v_val);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("set_auto_maskandscale", 0);
+
+ /* "netCDF4/_netCDF4.pyx":5781
+ * 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, 5781, __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, 5781, __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, 5781, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_4)) {
+ 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, 5781, __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, 5781, __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, 5781, __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, 5781, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_4(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ 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, 5781, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5782
+ * 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, 5782, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5782, __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, 5782, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 5782, __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, 5782, __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, 5782, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5781
+ * 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5780
+ * 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)
+ */
+
+ /* 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_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("netCDF4._netCDF4._Variable.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":5783
+ * 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)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_17set_auto_mask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9_Variable_17set_auto_mask = {"set_auto_mask", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9_Variable_17set_auto_mask, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_17set_auto_mask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_val = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("set_auto_mask (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_val,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ 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, 5783, __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, 5631, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_auto_mask") < 0)) __PYX_ERR(0, 5783, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -67555,20 +74122,20 @@ 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, 5631, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_auto_mask", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5783, __pyx_L3_error)
__pyx_L3_error:;
- __Pyx_AddTraceback("netCDF4._netCDF4._Variable.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("netCDF4._netCDF4._Variable.set_auto_mask", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale(__pyx_self, __pyx_v_self, __pyx_v_val);
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9_Variable_16set_auto_mask(__pyx_self, __pyx_v_self, __pyx_v_val);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16set_auto_mask(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
PyObject *__pyx_v_v = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -67579,42 +74146,264 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale(
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
- __Pyx_RefNannySetupContext("set_auto_maskandscale", 0);
+ __Pyx_RefNannySetupContext("set_auto_mask", 0);
- /* "netCDF4/_netCDF4.pyx":5632
- * return (recdimlen,) + self._mastervar.shape[1:]
- * def set_auto_maskandscale(self,val):
+ /* "netCDF4/_netCDF4.pyx":5784
+ * 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, 5784, __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, 5784, __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, 5784, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_4)) {
+ 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, 5784, __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, 5784, __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, 5784, __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, 5784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_4(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ 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, 5784, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5785
+ * 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, 5785, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5785, __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, 5785, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 5785, __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, 5785, __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, 5785, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5784
+ * 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5783
+ * 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)
+ */
+
+ /* 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_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("netCDF4._netCDF4._Variable.set_auto_mask", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":5786
+ * 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)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_19set_auto_scale(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9_Variable_19set_auto_scale = {"set_auto_scale", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9_Variable_19set_auto_scale, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_19set_auto_scale(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_val = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("set_auto_scale (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_val,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ 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, 5786, __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, 5786, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_val = values[1];
+ }
+ 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, 5786, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("netCDF4._netCDF4._Variable.set_auto_scale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9_Variable_18set_auto_scale(__pyx_self, __pyx_v_self, __pyx_v_val);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_18set_auto_scale(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
+ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("set_auto_scale", 0);
+
+ /* "netCDF4/_netCDF4.pyx":5787
+ * 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, 5632, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5787, __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, 5632, __pyx_L1_error)
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5787, __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, 5632, __pyx_L1_error)
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5787, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_4)) {
if (likely(PyList_CheckExact(__pyx_t_2))) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5632, __pyx_L1_error)
+ #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, 5787, __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, 5632, __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, 5787, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5632, __pyx_L1_error)
+ #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, 5787, __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, 5632, __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, 5787, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -67624,7 +74413,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, 5632, __pyx_L1_error)
+ else __PYX_ERR(0, 5787, __pyx_L1_error)
}
break;
}
@@ -67633,17 +74422,17 @@ 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":5633
- * def set_auto_maskandscale(self,val):
+ /* "netCDF4/_netCDF4.pyx":5788
+ * def set_auto_scale(self,val):
* for v in self._recVar:
- * v.set_auto_maskandscale(val) # <<<<<<<<<<<<<<
+ * 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_maskandscale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5633, __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, 5788, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
if (likely(__pyx_t_6)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
@@ -67653,38 +74442,56 @@ 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, 5633, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5788, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5633, __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, 5633, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ #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, 5788, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 5788, __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, 5788, __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, 5788, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5632
- * return (recdimlen,) + self._mastervar.shape[1:]
- * def set_auto_maskandscale(self,val):
+ /* "netCDF4/_netCDF4.pyx":5787
+ * v.set_auto_mask(val)
+ * def set_auto_scale(self,val):
* for v in self._recVar: # <<<<<<<<<<<<<<
- * v.set_auto_maskandscale(val)
+ * v.set_auto_scale(val)
* def __getitem__(self, elem):
*/
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5631
- * recdimlen = len(self._dset.dimensions[self._recdimname])
- * return (recdimlen,) + self._mastervar.shape[1:]
- * def set_auto_maskandscale(self,val): # <<<<<<<<<<<<<<
+ /* "netCDF4/_netCDF4.pyx":5786
* for v in self._recVar:
- * v.set_auto_maskandscale(val)
+ * v.set_auto_mask(val)
+ * def set_auto_scale(self,val): # <<<<<<<<<<<<<<
+ * for v in self._recVar:
+ * v.set_auto_scale(val)
*/
/* function exit code */
@@ -67696,7 +74503,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale(
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
- __Pyx_AddTraceback("netCDF4._netCDF4._Variable.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("netCDF4._netCDF4._Variable.set_auto_scale", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_v);
@@ -67705,19 +74512,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale(
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5634
+/* "netCDF4/_netCDF4.pyx":5789
* for v in self._recVar:
- * v.set_auto_maskandscale(val)
+ * v.set_auto_scale(val)
* def __getitem__(self, elem): # <<<<<<<<<<<<<<
* """Get records from a concatenated set of variables."""
*
*/
/* Python wrapper */
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_17__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_9_Variable_16__getitem__[] = "Get records from a concatenated set of variables.";
-static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9_Variable_17__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9_Variable_17__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_9_Variable_16__getitem__};
-static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_17__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_21__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_9_Variable_20__getitem__[] = "Get records from a concatenated set of variables.";
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9_Variable_21__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9_Variable_21__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_9_Variable_20__getitem__};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_21__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_elem = 0;
PyObject *__pyx_r = 0;
@@ -67743,11 +74550,11 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_17__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, 5634, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 5789, __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, 5634, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 5789, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -67760,20 +74567,20 @@ static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_17__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, 5634, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5789, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4._Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(__pyx_self, __pyx_v_self, __pyx_v_elem);
+ __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(__pyx_self, __pyx_v_self, __pyx_v_elem);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_elem) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_20__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_elem) {
PyObject *__pyx_v_start = NULL;
PyObject *__pyx_v_count = NULL;
PyObject *__pyx_v_stride = NULL;
@@ -67808,41 +74615,41 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
- Py_ssize_t __pyx_t_5;
+ int __pyx_t_5;
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *(*__pyx_t_8)(PyObject *);
- PyObject *(*__pyx_t_9)(PyObject *);
- int __pyx_t_10;
+ Py_ssize_t __pyx_t_9;
+ PyObject *(*__pyx_t_10)(PyObject *);
int __pyx_t_11;
- PyObject *__pyx_t_12 = NULL;
- Py_ssize_t __pyx_t_13;
- PyObject *(*__pyx_t_14)(PyObject *);
- int __pyx_t_15;
- Py_ssize_t __pyx_t_16;
- PyObject *(*__pyx_t_17)(PyObject *);
- PyObject *__pyx_t_18 = NULL;
+ int __pyx_t_12;
+ PyObject *__pyx_t_13 = NULL;
+ Py_ssize_t __pyx_t_14;
+ PyObject *(*__pyx_t_15)(PyObject *);
+ int __pyx_t_16;
+ Py_ssize_t __pyx_t_17;
+ PyObject *(*__pyx_t_18)(PyObject *);
PyObject *__pyx_t_19 = NULL;
PyObject *__pyx_t_20 = NULL;
PyObject *__pyx_t_21 = NULL;
- int __pyx_t_22;
+ PyObject *__pyx_t_22 = NULL;
int __pyx_t_23;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "netCDF4/_netCDF4.pyx":5643
+ /* "netCDF4/_netCDF4.pyx":5798
* # 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, 5643, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5798, __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, 5643, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5798, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
__pyx_t_5 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -67852,24 +74659,44 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
__pyx_t_5 = 1;
}
}
- __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5643, __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;
+ #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, 5798, __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
+ #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, 5798, __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, 5798, __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;
+ }
+ __Pyx_INCREF(__pyx_v_elem);
+ __Pyx_GIVEREF(__pyx_v_elem);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_elem);
+ __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, 5798, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
- __Pyx_INCREF(__pyx_v_elem);
- __Pyx_GIVEREF(__pyx_v_elem);
- PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_elem);
- __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, 5643, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -67877,9 +74704,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
if (unlikely(size != 4)) {
if (size > 4) __Pyx_RaiseTooManyValuesError(4);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 5642, __pyx_L1_error)
+ __PYX_ERR(0, 5797, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
@@ -67900,7 +74727,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5642, __pyx_L1_error)
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 5797, __pyx_L1_error)
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
@@ -67910,7 +74737,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5642, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5797, __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;
@@ -67919,7 +74746,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
__Pyx_GOTREF(item);
*(temps[index]) = item;
}
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 4) < 0) __PYX_ERR(0, 5642, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 4) < 0) __PYX_ERR(0, 5797, __pyx_L1_error)
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L4_unpacking_done;
@@ -67927,11 +74754,11 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5642, __pyx_L1_error)
+ __PYX_ERR(0, 5797, __pyx_L1_error)
__pyx_L4_unpacking_done:;
}
- /* "netCDF4/_netCDF4.pyx":5642
+ /* "netCDF4/_netCDF4.pyx":5797
* # arguments to the nc_get_var() function, and is much more easy
* # to use.
* start, count, stride, put_ind =\ # <<<<<<<<<<<<<<
@@ -67947,17 +74774,17 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
__pyx_v_put_ind = __pyx_t_4;
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5644
+ /* "netCDF4/_netCDF4.pyx":5799
* 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, 5644, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5799, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -67967,47 +74794,65 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5644, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5799, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5644, __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, 5644, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ #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, 5799, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 5799, __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, 5799, __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, 5799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_datashape = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5645
+ /* "netCDF4/_netCDF4.pyx":5800
* _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, 5645, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5800, __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, 5645, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5800, __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, 5645, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5800, __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, 5645, __pyx_L1_error)
+ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5800, __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, 5645, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5800, __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, 5645, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 5800, __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, 5645, __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, 5800, __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;
@@ -68015,28 +74860,28 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
__pyx_v_data = __pyx_t_3;
__pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5651
+ /* "netCDF4/_netCDF4.pyx":5806
* # 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, 5651, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5806, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5651, __pyx_L1_error)
+ __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5806, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __Pyx_INCREF(__pyx_slice__114);
- __Pyx_GIVEREF(__pyx_slice__114);
- PyList_SET_ITEM(__pyx_t_6, 0, __pyx_slice__114);
- __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5651, __pyx_L1_error)
+ __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, 5806, __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":5652
+ /* "netCDF4/_netCDF4.pyx":5807
* # 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]): # <<<<<<<<<<<<<<
@@ -68045,46 +74890,46 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5652, __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, 5807, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_6, 0, -1L, NULL, NULL, &__pyx_slice__115, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5652, __pyx_L1_error)
+ __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, 5807, __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_5 = 0;
- __pyx_t_9 = NULL;
+ __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
+ __pyx_t_10 = NULL;
} else {
- __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5652, __pyx_L1_error)
+ __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5807, __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, 5652, __pyx_L1_error)
+ __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5807, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
for (;;) {
- if (likely(!__pyx_t_9)) {
+ if (likely(!__pyx_t_10)) {
if (likely(PyList_CheckExact(__pyx_t_6))) {
- if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5652, __pyx_L1_error)
+ 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, 5807, __pyx_L1_error)
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5652, __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, 5807, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
} else {
- if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5652, __pyx_L1_error)
+ 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, 5807, __pyx_L1_error)
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5652, __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, 5807, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
}
} else {
- __pyx_t_3 = __pyx_t_9(__pyx_t_6);
+ __pyx_t_3 = __pyx_t_10(__pyx_t_6);
if (unlikely(!__pyx_t_3)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 5652, __pyx_L1_error)
+ else __PYX_ERR(0, 5807, __pyx_L1_error)
}
break;
}
@@ -68094,29 +74939,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5652, __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, 5807, __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":5653
+ /* "netCDF4/_netCDF4.pyx":5808
* 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, 5653, __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, 5808, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5653, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5808, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_11) {
+ if (__pyx_t_12) {
} else {
- __pyx_t_10 = __pyx_t_11;
+ __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, 5653, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5808, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(Py_Ellipsis);
__Pyx_GIVEREF(Py_Ellipsis);
@@ -68124,14 +74969,14 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5653, __pyx_L1_error)
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_put_ind, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5808, __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, 5653, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ravel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5808, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
@@ -68141,35 +74986,35 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5653, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5808, __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, 5653, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5808, __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, 5653, __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, 5808, __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, 5653, __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, 5808, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5653, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5808, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_10 = __pyx_t_11;
+ __pyx_t_11 = __pyx_t_12;
__pyx_L8_bool_binop_done:;
- if (__pyx_t_10) {
+ if (__pyx_t_11) {
- /* "netCDF4/_netCDF4.pyx":5654
+ /* "netCDF4/_netCDF4.pyx":5809
* 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, 5654, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_squeeze, __pyx_v_i, __pyx_int_0) < 0)) __PYX_ERR(0, 5809, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5653
+ /* "netCDF4/_netCDF4.pyx":5808
* squeeze = data.ndim * [slice(None),]
* for i,n in enumerate(put_ind.shape[:-1]):
* if n == 1 and put_ind[...,i].ravel()[0] == -1: # <<<<<<<<<<<<<<
@@ -68178,7 +75023,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
*/
}
- /* "netCDF4/_netCDF4.pyx":5652
+ /* "netCDF4/_netCDF4.pyx":5807
* # 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]): # <<<<<<<<<<<<<<
@@ -68189,19 +75034,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5657
+ /* "netCDF4/_netCDF4.pyx":5812
*
* # 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, 5657, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5812, __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, 5657, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5812, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 5657, __pyx_L1_error)
- if (!__pyx_t_10) {
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5812, __pyx_L1_error)
+ if (!__pyx_t_11) {
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
__Pyx_INCREF(__pyx_t_4);
@@ -68209,12 +75054,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5657, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5812, __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, 5657, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5812, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
@@ -68223,7 +75068,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
__pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -68233,37 +75078,57 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5657, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5812, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5657, __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, 5657, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ #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, 5812, __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
+ #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, 5812, __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, 5812, __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, 5812, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_v_strt = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5658
+ /* "netCDF4/_netCDF4.pyx":5813
* # 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, 5658, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5813, __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, 5658, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5813, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 5658, __pyx_L1_error)
- if (!__pyx_t_10) {
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5813, __pyx_L1_error)
+ if (!__pyx_t_11) {
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
__Pyx_INCREF(__pyx_t_4);
@@ -68271,12 +75136,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5658, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5813, __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, 5658, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5813, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
@@ -68285,7 +75150,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
__pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -68295,37 +75160,57 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5658, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5813, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5658, __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, 5658, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ #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, 5813, __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
+ #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, 5813, __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, 5813, __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, 5813, __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_cnt = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5659
+ /* "netCDF4/_netCDF4.pyx":5814
* 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, 5659, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5814, __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, 5659, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5814, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 5659, __pyx_L1_error)
- if (!__pyx_t_10) {
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5814, __pyx_L1_error)
+ if (!__pyx_t_11) {
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
__Pyx_INCREF(__pyx_t_4);
@@ -68333,12 +75218,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5659, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5814, __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, 5659, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5814, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
@@ -68347,7 +75232,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
__pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -68357,37 +75242,57 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5659, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5814, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5659, __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, 5659, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ #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, 5814, __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
+ #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, 5814, __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, 5814, __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, 5814, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_v_strd = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5660
+ /* "netCDF4/_netCDF4.pyx":5815
* 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, 5660, __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, 5815, __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, 5660, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5815, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 5660, __pyx_L1_error)
- if (!__pyx_t_10) {
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5815, __pyx_L1_error)
+ if (!__pyx_t_11) {
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
__Pyx_INCREF(__pyx_t_4);
@@ -68395,12 +75300,12 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5660, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5815, __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, 5660, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5815, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_int_neg_1);
__Pyx_GIVEREF(__pyx_int_neg_1);
@@ -68409,7 +75314,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
__pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -68419,49 +75324,69 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5660, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5815, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
- __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5660, __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, 5660, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ #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, 5815, __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
+ #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, 5815, __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, 5815, __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, 5815, __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_DECREF_SET(__pyx_v_put_ind, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5664
+ /* "netCDF4/_netCDF4.pyx":5819
* # 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, 5664, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5819, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 5664, __pyx_L1_error)
+ __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5819, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_nv = __pyx_t_5;
+ __pyx_v_nv = __pyx_t_9;
- /* "netCDF4/_netCDF4.pyx":5665
+ /* "netCDF4/_netCDF4.pyx":5820
* # 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, 5665, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5820, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_3 = NULL;
__pyx_t_5 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
@@ -68471,62 +75396,80 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
__pyx_t_5 = 1;
}
}
- __pyx_t_4 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5665, __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;
- }
- __Pyx_INCREF(__pyx_v_strt);
- __Pyx_GIVEREF(__pyx_v_strt);
- PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_strt);
- __Pyx_INCREF(__pyx_v_cnt);
- __Pyx_GIVEREF(__pyx_v_cnt);
- PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_cnt);
- __Pyx_INCREF(__pyx_v_strd);
- __Pyx_GIVEREF(__pyx_v_strd);
- PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, __pyx_v_strd);
- __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, 5665, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ #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, 5820, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 5820, __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, 5820, __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;
+ }
+ __Pyx_INCREF(__pyx_v_strt);
+ __Pyx_GIVEREF(__pyx_v_strt);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_strt);
+ __Pyx_INCREF(__pyx_v_cnt);
+ __Pyx_GIVEREF(__pyx_v_cnt);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_cnt);
+ __Pyx_INCREF(__pyx_v_strd);
+ __Pyx_GIVEREF(__pyx_v_strd);
+ PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, __pyx_v_strd);
+ __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, 5820, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
__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_5 = 0;
- __pyx_t_9 = NULL;
+ __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
+ __pyx_t_10 = NULL;
} else {
- __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5665, __pyx_L1_error)
+ __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5820, __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, 5665, __pyx_L1_error)
+ __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5820, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
- if (likely(!__pyx_t_9)) {
+ if (likely(!__pyx_t_10)) {
if (likely(PyList_CheckExact(__pyx_t_6))) {
- if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5665, __pyx_L1_error)
+ 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, 5820, __pyx_L1_error)
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __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_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5820, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
- if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 5665, __pyx_L1_error)
+ 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, 5820, __pyx_L1_error)
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __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_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5820, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
} else {
- __pyx_t_1 = __pyx_t_9(__pyx_t_6);
+ __pyx_t_1 = __pyx_t_10(__pyx_t_6);
if (unlikely(!__pyx_t_1)) {
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, 5820, __pyx_L1_error)
}
break;
}
@@ -68534,7 +75477,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
}
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -68542,9 +75485,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
if (unlikely(size != 4)) {
if (size > 4) __Pyx_RaiseTooManyValuesError(4);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 5665, __pyx_L1_error)
+ __PYX_ERR(0, 5820, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #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);
@@ -68565,7 +75508,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5665, __pyx_L1_error)
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 5820, __pyx_L1_error)
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
@@ -68575,24 +75518,24 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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_12 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5665, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5820, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_8 = Py_TYPE(__pyx_t_12)->tp_iternext;
+ __pyx_t_8 = Py_TYPE(__pyx_t_13)->tp_iternext;
for (index=0; index < 4; index++) {
- PyObject* item = __pyx_t_8(__pyx_t_12); if (unlikely(!item)) goto __pyx_L20_unpacking_failed;
+ PyObject* item = __pyx_t_8(__pyx_t_13); if (unlikely(!item)) goto __pyx_L20_unpacking_failed;
__Pyx_GOTREF(item);
*(temps[index]) = item;
}
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_12), 4) < 0) __PYX_ERR(0, 5665, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_13), 4) < 0) __PYX_ERR(0, 5820, __pyx_L1_error)
__pyx_t_8 = NULL;
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
goto __pyx_L21_unpacking_done;
__pyx_L20_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
__pyx_t_8 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 5665, __pyx_L1_error)
+ __PYX_ERR(0, 5820, __pyx_L1_error)
__pyx_L21_unpacking_done:;
}
__Pyx_DECREF_SET(__pyx_v_start, __pyx_t_4);
@@ -68604,49 +75547,49 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
__Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5667
+ /* "netCDF4/_netCDF4.pyx":5822
* 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, 5667, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5822, __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_13 = 0;
- __pyx_t_14 = NULL;
+ __pyx_t_7 = __pyx_v_count; __Pyx_INCREF(__pyx_t_7); __pyx_t_14 = 0;
+ __pyx_t_15 = NULL;
} else {
- __pyx_t_13 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5667, __pyx_L1_error)
+ __pyx_t_14 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5822, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_14 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5667, __pyx_L1_error)
+ __pyx_t_15 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5822, __pyx_L1_error)
}
for (;;) {
- if (likely(!__pyx_t_14)) {
+ if (likely(!__pyx_t_15)) {
if (likely(PyList_CheckExact(__pyx_t_7))) {
- if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_2); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 5667, __pyx_L1_error)
+ 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, 5822, __pyx_L1_error)
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5667, __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, 5822, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
} else {
- if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_2); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 5667, __pyx_L1_error)
+ 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, 5822, __pyx_L1_error)
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5667, __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, 5822, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
}
} else {
- __pyx_t_2 = __pyx_t_14(__pyx_t_7);
+ __pyx_t_2 = __pyx_t_15(__pyx_t_7);
if (unlikely(!__pyx_t_2)) {
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, 5667, __pyx_L1_error)
+ else __PYX_ERR(0, 5822, __pyx_L1_error)
}
break;
}
@@ -68654,29 +75597,29 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5667, __pyx_L1_error)
+ __pyx_t_2 = PyNumber_Absolute(__pyx_v_cnt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5822, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 5667, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 5822, __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":5668
+ /* "netCDF4/_netCDF4.pyx":5823
* # 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, 5668, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5823, __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, 5668, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5823, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -68686,27 +75629,45 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5668, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_stride); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5823, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
} else {
- __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5668, __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, 5668, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ #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, 5823, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #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, 5823, __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, 5823, __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, 5823, __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, 5668, __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, 5823, __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, 5668, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_any); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5823, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
if (likely(__pyx_t_3)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
@@ -68716,31 +75677,31 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5668, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5823, __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, 5668, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5823, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 5668, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5823, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__pyx_t_10) {
+ if (__pyx_t_11) {
- /* "netCDF4/_netCDF4.pyx":5669
+ /* "netCDF4/_netCDF4.pyx":5824
* 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__116, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5669, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5824, __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, 5669, __pyx_L1_error)
+ __PYX_ERR(0, 5824, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5668
+ /* "netCDF4/_netCDF4.pyx":5823
* # make sure count=-1 becomes count=1
* count = [abs(cnt) for cnt in count]
* if (numpy.array(stride) < 0).any(): # <<<<<<<<<<<<<<
@@ -68749,124 +75710,124 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
*/
}
- /* "netCDF4/_netCDF4.pyx":5672
+ /* "netCDF4/_netCDF4.pyx":5827
* # 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, 5672, __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, 5827, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XDECREF_SET(__pyx_v_sta, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5673
+ /* "netCDF4/_netCDF4.pyx":5828
* # 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, 5673, __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, 5828, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XDECREF_SET(__pyx_v_step, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5674
+ /* "netCDF4/_netCDF4.pyx":5829
* 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, 5674, __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, 5829, __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, 5674, __pyx_L1_error)
+ __pyx_t_7 = PyNumber_Multiply(__pyx_t_1, __pyx_v_step); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5829, __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, 5674, __pyx_L1_error)
+ __pyx_t_1 = PyNumber_Add(__pyx_v_sta, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5829, __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":5681
+ /* "netCDF4/_netCDF4.pyx":5836
* # 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, 5681, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5836, __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":5682
+ /* "netCDF4/_netCDF4.pyx":5837
* # 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, 5682, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5837, __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":5683
+ /* "netCDF4/_netCDF4.pyx":5838
* 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, 5683, __pyx_L1_error)
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_nv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5838, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5683, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5838, __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, 5683, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5838, __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_13 = 0;
- __pyx_t_14 = NULL;
+ __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_14 = 0;
+ __pyx_t_15 = NULL;
} else {
- __pyx_t_13 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5683, __pyx_L1_error)
+ __pyx_t_14 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5838, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_14 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5683, __pyx_L1_error)
+ __pyx_t_15 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5838, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
- if (likely(!__pyx_t_14)) {
+ if (likely(!__pyx_t_15)) {
if (likely(PyList_CheckExact(__pyx_t_7))) {
- if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 5683, __pyx_L1_error)
+ 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, 5838, __pyx_L1_error)
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5683, __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, 5838, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
- if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 5683, __pyx_L1_error)
+ 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, 5838, __pyx_L1_error)
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5683, __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, 5838, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
} else {
- __pyx_t_1 = __pyx_t_14(__pyx_t_7);
+ __pyx_t_1 = __pyx_t_15(__pyx_t_7);
if (unlikely(!__pyx_t_1)) {
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, 5683, __pyx_L1_error)
+ else __PYX_ERR(0, 5838, __pyx_L1_error)
}
break;
}
@@ -68875,60 +75836,60 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
__Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5684
+ /* "netCDF4/_netCDF4.pyx":5839
* 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, 5684, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5839, __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, 5684, __pyx_L1_error)
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5839, __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":5685
+ /* "netCDF4/_netCDF4.pyx":5840
* 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, 5685, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5840, __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, 5685, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5840, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_idx, __pyx_t_1); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 5685, __pyx_L1_error)
+ __pyx_t_16 = __Pyx_PyList_Extend(__pyx_v_idx, __pyx_t_1); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5840, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5686
+ /* "netCDF4/_netCDF4.pyx":5841
* 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, 5686, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5841, __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, 5686, __pyx_L1_error)
+ { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_v_k); if (unlikely(!__pyx_temp)) __PYX_ERR(0, 5841, __pyx_L1_error)
__Pyx_GOTREF(__pyx_temp);
__Pyx_DECREF(__pyx_t_1);
__pyx_t_1 = __pyx_temp;
}
- __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_vid, __pyx_t_1); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 5686, __pyx_L1_error)
+ __pyx_t_16 = __Pyx_PyList_Extend(__pyx_v_vid, __pyx_t_1); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5841, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5683
+ /* "netCDF4/_netCDF4.pyx":5838
* idx = [] # list of record indices
* vid = [] # list of Variable indices
* for n in range(nv): # <<<<<<<<<<<<<<
@@ -68938,52 +75899,70 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5690
+ /* "netCDF4/_netCDF4.pyx":5845
* # 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, 5690, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5845, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
- __pyx_t_13 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_4)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
__Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_3, function);
- __pyx_t_13 = 1;
+ __pyx_t_5 = 1;
}
}
- __pyx_t_2 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5690, __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;
+ #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, 5845, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #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, 5845, __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, 5845, __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;
+ }
+ __Pyx_INCREF(__pyx_v_idx);
+ __Pyx_GIVEREF(__pyx_v_idx);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_5, __pyx_v_idx);
+ __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, 5845, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
- __Pyx_INCREF(__pyx_v_idx);
- __Pyx_GIVEREF(__pyx_v_idx);
- PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_13, __pyx_v_idx);
- __Pyx_INCREF(__pyx_v_vid);
- __Pyx_GIVEREF(__pyx_v_vid);
- PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_13, __pyx_v_vid);
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5690, __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, 5690, __pyx_L1_error)
+ __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5845, __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, 5690, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getitem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5845, __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, 5690, __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, 5845, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -68993,50 +75972,70 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5690, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5845, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_7);
} else {
- __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5690, __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, 5690, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ #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, 5845, __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
+ #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, 5845, __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, 5845, __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, 5845, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_XDECREF_SET(__pyx_v_lst, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5693
+ /* "netCDF4/_netCDF4.pyx":5848
*
* # 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, 5693, __pyx_L1_error)
+ __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5848, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __Pyx_INCREF(__pyx_slice__117);
- __Pyx_GIVEREF(__pyx_slice__117);
- PyList_SET_ITEM(__pyx_t_7, 0, __pyx_slice__117);
+ __Pyx_INCREF(__pyx_slice__125);
+ __Pyx_GIVEREF(__pyx_slice__125);
+ PyList_SET_ITEM(__pyx_t_7, 0, __pyx_slice__125);
__Pyx_XDECREF_SET(__pyx_v_newSlice, ((PyObject*)__pyx_t_7));
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5694
+ /* "netCDF4/_netCDF4.pyx":5849
* # 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_13 = PyObject_Length(__pyx_v_start); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 5694, __pyx_L1_error)
- __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5694, __pyx_L1_error)
+ __pyx_t_14 = PyObject_Length(__pyx_v_start); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 5849, __pyx_L1_error)
+ __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5849, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5694, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5849, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_int_1);
__Pyx_GIVEREF(__pyx_int_1);
@@ -69044,44 +76043,44 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5694, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5849, __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_13 = 0;
- __pyx_t_14 = NULL;
+ __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_14 = 0;
+ __pyx_t_15 = NULL;
} else {
- __pyx_t_13 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5694, __pyx_L1_error)
+ __pyx_t_14 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5849, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_14 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5694, __pyx_L1_error)
+ __pyx_t_15 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5849, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
for (;;) {
- if (likely(!__pyx_t_14)) {
+ if (likely(!__pyx_t_15)) {
if (likely(PyList_CheckExact(__pyx_t_1))) {
- if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 5694, __pyx_L1_error)
+ 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, 5849, __pyx_L1_error)
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5694, __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, 5849, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
} else {
- if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 5694, __pyx_L1_error)
+ 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, 5849, __pyx_L1_error)
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5694, __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, 5849, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
}
} else {
- __pyx_t_7 = __pyx_t_14(__pyx_t_1);
+ __pyx_t_7 = __pyx_t_15(__pyx_t_1);
if (unlikely(!__pyx_t_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, 5694, __pyx_L1_error)
+ else __PYX_ERR(0, 5849, __pyx_L1_error)
}
break;
}
@@ -69090,49 +76089,49 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
__Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_7);
__pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5695
+ /* "netCDF4/_netCDF4.pyx":5850
* 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, 5695, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5850, __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, 5695, __pyx_L1_error)
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5850, __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, 5695, __pyx_L1_error)
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5850, __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, 5695, __pyx_L1_error)
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5850, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_12 = PyNumber_Multiply(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5695, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_13 = PyNumber_Multiply(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5850, __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_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5695, __pyx_L1_error)
+ __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5850, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_12 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5695, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- __pyx_t_4 = PySlice_New(__pyx_t_7, __pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5695, __pyx_L1_error)
+ __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, 5850, __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, 5850, __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;
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
__Pyx_XDECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_4));
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5696
+ /* "netCDF4/_netCDF4.pyx":5851
* 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_15 = __Pyx_PyList_Append(__pyx_v_newSlice, __pyx_v_s); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 5696, __pyx_L1_error)
+ __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_newSlice, __pyx_v_s); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5851, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5694
+ /* "netCDF4/_netCDF4.pyx":5849
* # Rebuild the slicing expression for dimensions 1 and ssq.
* newSlice = [slice(None, None, None)]
* for n in range(1, len(start)): # skip dimension 0 # <<<<<<<<<<<<<<
@@ -69142,19 +76141,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5700
+ /* "netCDF4/_netCDF4.pyx":5855
* # 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, 5700, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5855, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XDECREF_SET(__pyx_v_lstArr, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5701
+ /* "netCDF4/_netCDF4.pyx":5856
* # in a list of arrays.
* lstArr = []
* ismasked = False # <<<<<<<<<<<<<<
@@ -69163,58 +76162,58 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
*/
__pyx_v_ismasked = 0;
- /* "netCDF4/_netCDF4.pyx":5702
+ /* "netCDF4/_netCDF4.pyx":5857
* 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, 5702, __pyx_L1_error)
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_nv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5857, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5702, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5857, __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, 5702, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5857, __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_13 = 0;
- __pyx_t_14 = NULL;
+ __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_14 = 0;
+ __pyx_t_15 = NULL;
} else {
- __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5702, __pyx_L1_error)
+ __pyx_t_14 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5857, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_14 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5702, __pyx_L1_error)
+ __pyx_t_15 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 5857, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
- if (likely(!__pyx_t_14)) {
+ if (likely(!__pyx_t_15)) {
if (likely(PyList_CheckExact(__pyx_t_4))) {
- if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 5702, __pyx_L1_error)
+ 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, 5857, __pyx_L1_error)
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5702, __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, 5857, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
- if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 5702, __pyx_L1_error)
+ 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, 5857, __pyx_L1_error)
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5702, __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, 5857, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
} else {
- __pyx_t_1 = __pyx_t_14(__pyx_t_4);
+ __pyx_t_1 = __pyx_t_15(__pyx_t_4);
if (unlikely(!__pyx_t_1)) {
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, 5702, __pyx_L1_error)
+ else __PYX_ERR(0, 5857, __pyx_L1_error)
}
break;
}
@@ -69223,49 +76222,49 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
__Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1);
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5704
+ /* "netCDF4/_netCDF4.pyx":5859
* 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, 5704, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5859, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
- __pyx_t_12 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_12); __pyx_t_16 = 0;
- __pyx_t_17 = NULL;
+ __pyx_t_13 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_13); __pyx_t_17 = 0;
+ __pyx_t_18 = NULL;
} else {
- __pyx_t_16 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5704, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- __pyx_t_17 = Py_TYPE(__pyx_t_12)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 5704, __pyx_L1_error)
+ __pyx_t_17 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5859, __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, 5859, __pyx_L1_error)
}
for (;;) {
- if (likely(!__pyx_t_17)) {
- if (likely(PyList_CheckExact(__pyx_t_12))) {
- if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_12)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 5704, __pyx_L1_error)
+ 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, 5859, __pyx_L1_error)
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_12, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5704, __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, 5859, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
} else {
- if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 5704, __pyx_L1_error)
+ 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, 5859, __pyx_L1_error)
#else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_12, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5704, __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, 5859, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
#endif
}
} else {
- __pyx_t_2 = __pyx_t_17(__pyx_t_12);
+ __pyx_t_2 = __pyx_t_18(__pyx_t_13);
if (unlikely(!__pyx_t_2)) {
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, 5704, __pyx_L1_error)
+ else __PYX_ERR(0, 5859, __pyx_L1_error)
}
break;
}
@@ -69273,7 +76272,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
}
if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
PyObject* sequence = __pyx_t_2;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -69281,9 +76280,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 5704, __pyx_L1_error)
+ __PYX_ERR(0, 5859, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
@@ -69294,175 +76293,215 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5704, __pyx_L1_error)
+ __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5859, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5704, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5859, __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_18 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 5704, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_18);
+ __pyx_t_19 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5859, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_19);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_8 = Py_TYPE(__pyx_t_18)->tp_iternext;
- index = 0; __pyx_t_7 = __pyx_t_8(__pyx_t_18); if (unlikely(!__pyx_t_7)) goto __pyx_L33_unpacking_failed;
+ __pyx_t_8 = Py_TYPE(__pyx_t_19)->tp_iternext;
+ index = 0; __pyx_t_7 = __pyx_t_8(__pyx_t_19); if (unlikely(!__pyx_t_7)) goto __pyx_L33_unpacking_failed;
__Pyx_GOTREF(__pyx_t_7);
- index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_18); if (unlikely(!__pyx_t_3)) goto __pyx_L33_unpacking_failed;
+ 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_18), 2) < 0) __PYX_ERR(0, 5704, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_19), 2) < 0) __PYX_ERR(0, 5859, __pyx_L1_error)
__pyx_t_8 = NULL;
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
goto __pyx_L34_unpacking_done;
__pyx_L33_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
__pyx_t_8 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 5704, __pyx_L1_error)
+ __PYX_ERR(0, 5859, __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, 5704, __pyx_L1_error)
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 5704, __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, 5859, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5859, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__pyx_t_10) {
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_i))) __PYX_ERR(0, 5704, __pyx_L1_error)
+ if (__pyx_t_11) {
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_i))) __PYX_ERR(0, 5859, __pyx_L1_error)
}
}
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __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":5705
+ /* "netCDF4/_netCDF4.pyx":5860
* # 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.
* newSlice[0] = slice(idx[0], idx[-1] + 1, step)
*/
- __pyx_t_10 = (__pyx_v_idx != Py_None) && (PyList_GET_SIZE(__pyx_v_idx) != 0);
- if (__pyx_t_10) {
+ __pyx_t_11 = (__pyx_v_idx != Py_None) && (PyList_GET_SIZE(__pyx_v_idx) != 0);
+ if (__pyx_t_11) {
- /* "netCDF4/_netCDF4.pyx":5707
+ /* "netCDF4/_netCDF4.pyx":5862
* 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, 5707, __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, 5862, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_idx, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5707, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_12, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5707, __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, 5862, __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, 5862, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_12 = PySlice_New(__pyx_t_1, __pyx_t_2, __pyx_v_step); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5707, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
+ __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, 5862, __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_12, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 5707, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 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, 5862, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- /* "netCDF4/_netCDF4.pyx":5710
+ /* "netCDF4/_netCDF4.pyx":5865
* # 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, 5710, __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, 5865, __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, 5710, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5865, __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, 5710, __pyx_L1_error)
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5865, __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, 5710, __pyx_L1_error)
+ __pyx_t_1 = PyList_AsTuple(__pyx_v_newSlice); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5865, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_7 = NULL;
- __pyx_t_16 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_7)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
__Pyx_INCREF(__pyx_t_7);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_2, function);
- __pyx_t_16 = 1;
+ __pyx_t_5 = 1;
}
}
- __pyx_t_18 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 5710, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_18);
- if (__pyx_t_7) {
- __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ #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, 5865, __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;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #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, 5865, __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;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_19 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5865, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1);
+ 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, 5865, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
}
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_16, __pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_16, __pyx_t_1);
- __pyx_t_3 = 0;
- __pyx_t_1 = 0;
- __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_18, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5710, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_XDECREF_SET(__pyx_v_dat, __pyx_t_12);
- __pyx_t_12 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_dat, __pyx_t_13);
+ __pyx_t_13 = 0;
- /* "netCDF4/_netCDF4.pyx":5711
+ /* "netCDF4/_netCDF4.pyx":5866
* # 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, 5711, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5866, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isMA); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 5711, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_18);
+ __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isMA); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_19);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_18))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_18);
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_19);
if (likely(__pyx_t_2)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
__Pyx_INCREF(__pyx_t_2);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_18, function);
+ __Pyx_DECREF_SET(__pyx_t_19, function);
}
}
if (!__pyx_t_2) {
- __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_v_dat); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5711, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_v_dat); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
} else {
- __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5711, __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_12 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_1, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5711, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ #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, 5866, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ } else
+ #endif
+ #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, 5866, __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, 5866, __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, 5866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5711, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- if (__pyx_t_11) {
+ __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, 5866, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ if (__pyx_t_12) {
} else {
- __pyx_t_10 = __pyx_t_11;
+ __pyx_t_11 = __pyx_t_12;
goto __pyx_L38_bool_binop_done;
}
- __pyx_t_11 = ((!(__pyx_v_ismasked != 0)) != 0);
- __pyx_t_10 = __pyx_t_11;
+ __pyx_t_12 = ((!(__pyx_v_ismasked != 0)) != 0);
+ __pyx_t_11 = __pyx_t_12;
__pyx_L38_bool_binop_done:;
- if (__pyx_t_10) {
+ if (__pyx_t_11) {
- /* "netCDF4/_netCDF4.pyx":5712
+ /* "netCDF4/_netCDF4.pyx":5867
* dat = Variable.__getitem__(self._recVar[n],tuple(newSlice))
* if ma.isMA(dat) and not ismasked:
* ismasked=True # <<<<<<<<<<<<<<
@@ -69471,19 +76510,19 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
*/
__pyx_v_ismasked = 1;
- /* "netCDF4/_netCDF4.pyx":5713
+ /* "netCDF4/_netCDF4.pyx":5868
* if ma.isMA(dat) and not ismasked:
* ismasked=True
* fill_value = dat.fill_value # <<<<<<<<<<<<<<
* lstArr.append(dat)
* if ismasked:
*/
- __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_dat, __pyx_n_s_fill_value); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5713, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- __Pyx_XDECREF_SET(__pyx_v_fill_value, __pyx_t_12);
- __pyx_t_12 = 0;
+ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_dat, __pyx_n_s_fill_value); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5868, __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":5711
+ /* "netCDF4/_netCDF4.pyx":5866
* # of arrays.
* dat = Variable.__getitem__(self._recVar[n],tuple(newSlice))
* if ma.isMA(dat) and not ismasked: # <<<<<<<<<<<<<<
@@ -69492,16 +76531,16 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
*/
}
- /* "netCDF4/_netCDF4.pyx":5714
+ /* "netCDF4/_netCDF4.pyx":5869
* ismasked=True
* fill_value = dat.fill_value
* lstArr.append(dat) # <<<<<<<<<<<<<<
* if ismasked:
* lstArr = ma.concatenate(lstArr)
*/
- __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_lstArr, __pyx_v_dat); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 5714, __pyx_L1_error)
+ __pyx_t_16 = __Pyx_PyObject_Append(__pyx_v_lstArr, __pyx_v_dat); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 5869, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5705
+ /* "netCDF4/_netCDF4.pyx":5860
* # Get the list of indices for variable 'n'.
* idx = [i for i,numv in lst if numv == n]
* if idx: # <<<<<<<<<<<<<<
@@ -69510,7 +76549,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
*/
}
- /* "netCDF4/_netCDF4.pyx":5702
+ /* "netCDF4/_netCDF4.pyx":5857
* lstArr = []
* ismasked = False
* for n in range(nv): # <<<<<<<<<<<<<<
@@ -69520,57 +76559,75 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5715
+ /* "netCDF4/_netCDF4.pyx":5870
* fill_value = dat.fill_value
* lstArr.append(dat)
* if ismasked: # <<<<<<<<<<<<<<
* lstArr = ma.concatenate(lstArr)
* else:
*/
- __pyx_t_10 = (__pyx_v_ismasked != 0);
- if (__pyx_t_10) {
+ __pyx_t_11 = (__pyx_v_ismasked != 0);
+ if (__pyx_t_11) {
- /* "netCDF4/_netCDF4.pyx":5716
+ /* "netCDF4/_netCDF4.pyx":5871
* lstArr.append(dat)
* if ismasked:
* lstArr = ma.concatenate(lstArr) # <<<<<<<<<<<<<<
* else:
* lstArr = numpy.concatenate(lstArr)
*/
- __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5716, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_concatenate); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 5716, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_18);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_12 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_18))) {
- __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_18);
- if (likely(__pyx_t_12)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
- __Pyx_INCREF(__pyx_t_12);
+ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5871, __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, 5871, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_19);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __pyx_t_13 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_19);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
+ __Pyx_INCREF(__pyx_t_13);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_18, function);
+ __Pyx_DECREF_SET(__pyx_t_19, function);
}
}
- if (!__pyx_t_12) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_v_lstArr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5716, __pyx_L1_error)
+ if (!__pyx_t_13) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_v_lstArr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5871, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
} else {
- __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5716, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_12); __pyx_t_12 = 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_18, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5716, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ #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, 5871, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #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, 5871, __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, 5871, __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, 5871, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
}
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
__Pyx_DECREF_SET(__pyx_v_lstArr, __pyx_t_4);
__pyx_t_4 = 0;
- /* "netCDF4/_netCDF4.pyx":5715
+ /* "netCDF4/_netCDF4.pyx":5870
* fill_value = dat.fill_value
* lstArr.append(dat)
* if ismasked: # <<<<<<<<<<<<<<
@@ -69580,7 +76637,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
goto __pyx_L40;
}
- /* "netCDF4/_netCDF4.pyx":5718
+ /* "netCDF4/_netCDF4.pyx":5873
* lstArr = ma.concatenate(lstArr)
* else:
* lstArr = numpy.concatenate(lstArr) # <<<<<<<<<<<<<<
@@ -69588,34 +76645,52 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
* # sometimes there are legitimate singleton dimensions, in which
*/
/*else*/ {
- __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 5718, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_18);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_concatenate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5718, __pyx_L1_error)
+ __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 5873, __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, 5873, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_18 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
- __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_1);
- if (likely(__pyx_t_18)) {
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __pyx_t_19 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_19)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
- __Pyx_INCREF(__pyx_t_18);
+ __Pyx_INCREF(__pyx_t_19);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_1, function);
}
}
- if (!__pyx_t_18) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_lstArr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5718, __pyx_L1_error)
+ if (!__pyx_t_19) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_lstArr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5873, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
} else {
- __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5718, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_18); __pyx_t_18 = NULL;
- __Pyx_INCREF(__pyx_v_lstArr);
- __Pyx_GIVEREF(__pyx_v_lstArr);
- PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_lstArr);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5718, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ #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, 5873, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #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, 5873, __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, 5873, __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, 5873, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF_SET(__pyx_v_lstArr, __pyx_t_4);
@@ -69623,58 +76698,78 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
}
__pyx_L40:;
- /* "netCDF4/_netCDF4.pyx":5719
+ /* "netCDF4/_netCDF4.pyx":5874
* 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, 5719, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5874, __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, 5719, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5874, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_12 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5719, __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, 5874, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 5719, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- if (__pyx_t_10) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5719, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5874, __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, 5874, __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, 5719, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5874, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_18 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
- __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_1);
- if (likely(__pyx_t_18)) {
+ __pyx_t_19 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_19)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
- __Pyx_INCREF(__pyx_t_18);
+ __Pyx_INCREF(__pyx_t_19);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_1, function);
}
}
- if (!__pyx_t_18) {
- __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5719, __pyx_L1_error)
+ if (!__pyx_t_19) {
+ __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5874, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GOTREF(__pyx_t_13);
} else {
- __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5719, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_18); __pyx_t_18 = NULL;
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_4);
- __pyx_t_4 = 0;
- __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5719, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ #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, 5874, __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
+ #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, 5874, __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, 5874, __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, 5874, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_12);
- __pyx_t_12 = 0;
+ __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_13);
+ __pyx_t_13 = 0;
}
- /* "netCDF4/_netCDF4.pyx":5723
+ /* "netCDF4/_netCDF4.pyx":5878
* # case the array shapes won't conform. If so, a ValueError will
* # result, and no squeeze will be done.
* try: # <<<<<<<<<<<<<<
@@ -69684,23 +76779,23 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
- __Pyx_ExceptionSave(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
- __Pyx_XGOTREF(__pyx_t_19);
+ __Pyx_ExceptionSave(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
__Pyx_XGOTREF(__pyx_t_20);
__Pyx_XGOTREF(__pyx_t_21);
+ __Pyx_XGOTREF(__pyx_t_22);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":5724
+ /* "netCDF4/_netCDF4.pyx":5879
* # 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, 5724, __pyx_L42_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5879, __pyx_L42_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -69710,20 +76805,20 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
}
}
if (__pyx_t_2) {
- __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5724, __pyx_L42_error)
+ __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5879, __pyx_L42_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
} else {
- __pyx_t_12 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5724, __pyx_L42_error)
+ __pyx_t_13 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5879, __pyx_L42_error)
}
- __Pyx_GOTREF(__pyx_t_12);
+ __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, 5724, __pyx_L42_error)
+ __pyx_t_1 = PySequence_Tuple(__pyx_v_ind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5879, __pyx_L42_error)
__Pyx_GOTREF(__pyx_t_1);
- if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_1, __pyx_t_12) < 0)) __PYX_ERR(0, 5724, __pyx_L42_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_1, __pyx_t_13) < 0)) __PYX_ERR(0, 5879, __pyx_L42_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- /* "netCDF4/_netCDF4.pyx":5723
+ /* "netCDF4/_netCDF4.pyx":5878
* # case the array shapes won't conform. If so, a ValueError will
* # result, and no squeeze will be done.
* try: # <<<<<<<<<<<<<<
@@ -69731,47 +76826,47 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
* except ValueError:
*/
}
- __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
__Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
__Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
+ __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
goto __pyx_L49_try_end;
__pyx_L42_error:;
__Pyx_PyThreadState_assign
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
- /* "netCDF4/_netCDF4.pyx":5725
+ /* "netCDF4/_netCDF4.pyx":5880
* try:
* data[tuple(ind)] = lstArr.squeeze()
* except ValueError: # <<<<<<<<<<<<<<
* data[tuple(ind)] = lstArr
*
*/
- __pyx_t_22 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
- if (__pyx_t_22) {
+ __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_12, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 5725, __pyx_L44_except_error)
- __Pyx_GOTREF(__pyx_t_12);
+ if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 5880, __pyx_L44_except_error)
+ __Pyx_GOTREF(__pyx_t_13);
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_2);
- /* "netCDF4/_netCDF4.pyx":5726
+ /* "netCDF4/_netCDF4.pyx":5881
* 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, 5726, __pyx_L44_except_error)
+ __pyx_t_4 = PySequence_Tuple(__pyx_v_ind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5881, __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, 5726, __pyx_L44_except_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_4, __pyx_v_lstArr) < 0)) __PYX_ERR(0, 5881, __pyx_L44_except_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L43_exception_handled;
@@ -69779,7 +76874,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
goto __pyx_L44_except_error;
__pyx_L44_except_error:;
- /* "netCDF4/_netCDF4.pyx":5723
+ /* "netCDF4/_netCDF4.pyx":5878
* # case the array shapes won't conform. If so, a ValueError will
* # result, and no squeeze will be done.
* try: # <<<<<<<<<<<<<<
@@ -69787,21 +76882,21 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
* except ValueError:
*/
__Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_19);
__Pyx_XGIVEREF(__pyx_t_20);
__Pyx_XGIVEREF(__pyx_t_21);
- __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
+ __Pyx_XGIVEREF(__pyx_t_22);
+ __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
goto __pyx_L1_error;
__pyx_L43_exception_handled:;
__Pyx_PyThreadState_assign
- __Pyx_XGIVEREF(__pyx_t_19);
__Pyx_XGIVEREF(__pyx_t_20);
__Pyx_XGIVEREF(__pyx_t_21);
- __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
+ __Pyx_XGIVEREF(__pyx_t_22);
+ __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
__pyx_L49_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":5665
+ /* "netCDF4/_netCDF4.pyx":5820
* # Number of variables making up the MFVariable.Variable.
* nv = len(self._recLen)
* for (start,count,stride,ind) in zip(strt, cnt, strd, put_ind): # <<<<<<<<<<<<<<
@@ -69811,35 +76906,35 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":5729
+ /* "netCDF4/_netCDF4.pyx":5884
*
* # 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, 5729, __pyx_L1_error)
+ __pyx_t_6 = PySequence_Tuple(__pyx_v_squeeze); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5884, __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, 5729, __pyx_L1_error)
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5884, __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":5732
+ /* "netCDF4/_netCDF4.pyx":5887
*
* # 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, 5732, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5887, __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, 5732, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_isMA); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5887, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+ 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_1);
@@ -69849,88 +76944,106 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__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, 5732, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5887, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
} else {
- __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5732, __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_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5732, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ #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, 5887, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #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, 5887, __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, 5887, __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, 5887, __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_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5732, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 5887, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__pyx_t_11) {
+ if (__pyx_t_12) {
} else {
- __pyx_t_10 = __pyx_t_11;
+ __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, 5732, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5887, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_any); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5732, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_any); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5887, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_12))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_13);
if (likely(__pyx_t_1)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_12, function);
+ __Pyx_DECREF_SET(__pyx_t_13, function);
}
}
if (__pyx_t_1) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5732, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5887, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5732, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5887, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 5732, __pyx_L1_error)
+ __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, 5887, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_23 = ((!__pyx_t_11) != 0);
- __pyx_t_10 = __pyx_t_23;
+ __pyx_t_23 = ((!__pyx_t_12) != 0);
+ __pyx_t_11 = __pyx_t_23;
__pyx_L53_bool_binop_done:;
- if (__pyx_t_10) {
+ if (__pyx_t_11) {
- /* "netCDF4/_netCDF4.pyx":5733
+ /* "netCDF4/_netCDF4.pyx":5888
* # if no masked elements, return numpy array.
* if ma.isMA(data) and not data.mask.any():
* data = data.filled() # <<<<<<<<<<<<<<
*
* return data
*/
- __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_filled); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5733, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_filled); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5888, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_12))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_13);
if (likely(__pyx_t_1)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
__Pyx_INCREF(__pyx_t_1);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_12, function);
+ __Pyx_DECREF_SET(__pyx_t_13, function);
}
}
if (__pyx_t_1) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5733, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5888, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5733, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5888, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __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":5732
+ /* "netCDF4/_netCDF4.pyx":5887
*
* # if no masked elements, return numpy array.
* if ma.isMA(data) and not data.mask.any(): # <<<<<<<<<<<<<<
@@ -69939,7 +77052,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
*/
}
- /* "netCDF4/_netCDF4.pyx":5735
+ /* "netCDF4/_netCDF4.pyx":5890
* data = data.filled()
*
* return data # <<<<<<<<<<<<<<
@@ -69951,9 +77064,9 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
__pyx_r = __pyx_v_data;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5634
+ /* "netCDF4/_netCDF4.pyx":5789
* for v in self._recVar:
- * v.set_auto_maskandscale(val)
+ * v.set_auto_scale(val)
* def __getitem__(self, elem): # <<<<<<<<<<<<<<
* """Get records from a concatenated set of variables."""
*
@@ -69967,8 +77080,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
- __Pyx_XDECREF(__pyx_t_12);
- __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_19);
__Pyx_AddTraceback("netCDF4._netCDF4._Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -70003,7 +77116,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNU
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5773
+/* "netCDF4/_netCDF4.pyx":5928
* """
*
* def __init__(self, time, units=None): # <<<<<<<<<<<<<<
@@ -70044,7 +77157,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, 5773, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 5928, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
@@ -70053,7 +77166,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, 5773, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 5928, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -70070,7 +77183,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, 5773, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5928, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4.MFTime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -70108,47 +77221,47 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb
PyObject *(*__pyx_t_8)(PyObject *);
int __pyx_t_9;
int __pyx_t_10;
- PyObject *__pyx_t_11 = NULL;
+ int __pyx_t_11;
PyObject *__pyx_t_12 = NULL;
- Py_ssize_t __pyx_t_13;
+ PyObject *__pyx_t_13 = NULL;
PyObject *__pyx_t_14 = NULL;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "netCDF4/_netCDF4.pyx":5785
+ /* "netCDF4/_netCDF4.pyx":5940
* 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, 5785, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_datetime, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5940, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_datetime = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5786
+ /* "netCDF4/_netCDF4.pyx":5941
* """
* 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, 5786, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__time, __pyx_v_time) < 0) __PYX_ERR(0, 5941, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5789
+ /* "netCDF4/_netCDF4.pyx":5944
*
* # 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, 5789, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5944, __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, 5789, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5944, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
@@ -70158,10 +77271,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, 5789, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5944, __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, 5789, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5944, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
@@ -70169,27 +77282,27 @@ 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, 5789, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5944, __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, 5789, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5944, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_5)) {
if (likely(PyList_CheckExact(__pyx_t_3))) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5789, __pyx_L1_error)
+ #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, 5944, __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, 5789, __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, 5944, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5789, __pyx_L1_error)
+ #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, 5944, __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, 5789, __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, 5944, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -70199,7 +77312,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, 5789, __pyx_L1_error)
+ else __PYX_ERR(0, 5944, __pyx_L1_error)
}
break;
}
@@ -70207,7 +77320,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb
}
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -70215,9 +77328,9 @@ 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, 5789, __pyx_L1_error)
+ __PYX_ERR(0, 5944, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
@@ -70228,15 +77341,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, 5789, __pyx_L1_error)
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5944, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5789, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5944, __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, 5789, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5944, __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;
@@ -70244,7 +77357,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, 5789, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 5944, __pyx_L1_error)
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L6_unpacking_done;
@@ -70252,7 +77365,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, 5789, __pyx_L1_error)
+ __PYX_ERR(0, 5944, __pyx_L1_error)
__pyx_L6_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2);
@@ -70260,19 +77373,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":5790
+ /* "netCDF4/_netCDF4.pyx":5945
* # 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, 5790, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5945, __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, 5790, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 5945, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5789
+ /* "netCDF4/_netCDF4.pyx":5944
*
* # copy attributes from master time variable.
* for name, value in time.__dict__.items(): # <<<<<<<<<<<<<<
@@ -70282,40 +77395,40 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "netCDF4/_netCDF4.pyx":5793
+ /* "netCDF4/_netCDF4.pyx":5948
*
* # 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, 5793, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5948, __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, 5793, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5948, __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, 5793, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5948, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
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_COMPILING_IN_CPYTHON
- __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, 5793, __pyx_L1_error)
+ #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, 5948, __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, 5793, __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, 5948, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5793, __pyx_L1_error)
+ #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, 5948, __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, 5793, __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, 5948, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
}
@@ -70325,7 +77438,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, 5793, __pyx_L1_error)
+ else __PYX_ERR(0, 5948, __pyx_L1_error)
}
break;
}
@@ -70334,31 +77447,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":5794
+ /* "netCDF4/_netCDF4.pyx":5949
* # 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, 5794, __pyx_L1_error)
+ __pyx_t_9 = PyObject_HasAttr(__pyx_v_t, __pyx_n_s_calendar); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 5949, __pyx_L1_error)
__pyx_t_10 = ((!(__pyx_t_9 != 0)) != 0);
if (__pyx_t_10) {
- /* "netCDF4/_netCDF4.pyx":5795
+ /* "netCDF4/_netCDF4.pyx":5950
* 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__118, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5795, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__126, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5950, __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, 5795, __pyx_L1_error)
+ __PYX_ERR(0, 5950, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5794
+ /* "netCDF4/_netCDF4.pyx":5949
* # make sure calendar attribute present in all files.
* for t in self._recVar:
* if not hasattr(t,'calendar'): # <<<<<<<<<<<<<<
@@ -70367,7 +77480,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb
*/
}
- /* "netCDF4/_netCDF4.pyx":5793
+ /* "netCDF4/_netCDF4.pyx":5948
*
* # make sure calendar attribute present in all files.
* for t in self._recVar: # <<<<<<<<<<<<<<
@@ -70377,42 +77490,42 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5798
+ /* "netCDF4/_netCDF4.pyx":5953
*
* # 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, 5798, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5953, __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, 5798, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5953, __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, 5798, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5953, __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, 5798, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5953, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
for (;;) {
if (likely(!__pyx_t_5)) {
if (likely(PyList_CheckExact(__pyx_t_6))) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5798, __pyx_L1_error)
+ #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, 5953, __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, 5798, __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, 5953, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 5798, __pyx_L1_error)
+ #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, 5953, __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, 5798, __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, 5953, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
}
@@ -70422,7 +77535,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, 5798, __pyx_L1_error)
+ else __PYX_ERR(0, 5953, __pyx_L1_error)
}
break;
}
@@ -70430,34 +77543,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, 5798, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5953, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 5798, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 5953, __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, 5798, __pyx_L1_error)
+ __pyx_t_6 = PySet_New(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5953, __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, 5798, __pyx_L1_error)
+ __pyx_t_4 = PySet_GET_SIZE(__pyx_t_6); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 5953, __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":5799
+ /* "netCDF4/_netCDF4.pyx":5954
* # 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__119, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5799, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5954, __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, 5799, __pyx_L1_error)
+ __PYX_ERR(0, 5954, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5798
+ /* "netCDF4/_netCDF4.pyx":5953
*
* # Check that calendar is the same in all files.
* if len(set([t.calendar for t in self._recVar])) > 1: # <<<<<<<<<<<<<<
@@ -70466,138 +77579,182 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb
*/
}
- /* "netCDF4/_netCDF4.pyx":5802
+ /* "netCDF4/_netCDF4.pyx":5957
*
* # 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, 5802, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_units); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 5957, __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, 5802, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5957, __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, 5802, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_units, __pyx_t_6) < 0) __PYX_ERR(0, 5957, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "netCDF4/_netCDF4.pyx":5805
+ /* "netCDF4/_netCDF4.pyx":5960
*
* # 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, 5805, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_n_s_datetime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5960, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__120, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5805, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__128, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5960, __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":5806
+ /* "netCDF4/_netCDF4.pyx":5961
* # 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, 5806, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5961, __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, 5806, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5961, __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, 5806, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5961, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_7 = NULL;
- __pyx_t_4 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_11 = 0;
+ 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);
- __pyx_t_4 = 1;
+ __pyx_t_11 = 1;
}
}
- __pyx_t_11 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5806, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- if (__pyx_t_7) {
- __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ #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, 5961, __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;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #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, 5961, __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;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5961, __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;
+ }
+ __Pyx_INCREF(__pyx_v_ref_date);
+ __Pyx_GIVEREF(__pyx_v_ref_date);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_ref_date);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ 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, 5961, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
}
- __Pyx_INCREF(__pyx_v_ref_date);
- __Pyx_GIVEREF(__pyx_v_ref_date);
- PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_4, __pyx_v_ref_date);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_4, __pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_4, __pyx_t_2);
- __pyx_t_3 = 0;
- __pyx_t_2 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5806, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_v_ref_num = __pyx_t_1;
__pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5810
+ /* "netCDF4/_netCDF4.pyx":5965
* # 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, 5810, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5965, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5810, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5965, __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, 5810, __pyx_L1_error)
- __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5810, __pyx_L1_error)
+ __pyx_t_4 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 5965, __pyx_L1_error)
+ __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5965, __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, 5810, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5965, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
- __pyx_t_4 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11);
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
if (likely(__pyx_t_3)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
__Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_11, function);
- __pyx_t_4 = 1;
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ __pyx_t_11 = 1;
}
}
- __pyx_t_7 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5810, __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;
+ #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, 5965, __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;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #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, 5965, __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;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5965, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_11, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_2);
+ 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, 5965, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_4, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_4, __pyx_t_2);
- __pyx_t_6 = 0;
- __pyx_t_2 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5810, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__delta, __pyx_t_1) < 0) __PYX_ERR(0, 5810, __pyx_L1_error)
+ __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, 5965, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":5812
+ /* "netCDF4/_netCDF4.pyx":5967
* self.__delta = numpy.empty(len(self), time.dtype)
*
* i0 = 0; i1 = 0 # <<<<<<<<<<<<<<
@@ -70609,7 +77766,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":5813
+ /* "netCDF4/_netCDF4.pyx":5968
*
* i0 = 0; i1 = 0
* for i,v in enumerate(self._recVar): # <<<<<<<<<<<<<<
@@ -70618,159 +77775,181 @@ 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_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5813, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
- __pyx_t_7 = __pyx_t_11; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5968, __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_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5813, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5968, __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, 5813, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5968, __pyx_L1_error)
}
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
for (;;) {
if (likely(!__pyx_t_5)) {
if (likely(PyList_CheckExact(__pyx_t_7))) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_11 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_11); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5813, __pyx_L1_error)
+ #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, 5968, __pyx_L1_error)
#else
- __pyx_t_11 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5813, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5968, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_11); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 5813, __pyx_L1_error)
+ #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, 5968, __pyx_L1_error)
#else
- __pyx_t_11 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5813, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5968, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
#endif
}
} else {
- __pyx_t_11 = __pyx_t_5(__pyx_t_7);
- if (unlikely(!__pyx_t_11)) {
+ __pyx_t_12 = __pyx_t_5(__pyx_t_7);
+ if (unlikely(!__pyx_t_12)) {
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, 5813, __pyx_L1_error)
+ else __PYX_ERR(0, 5968, __pyx_L1_error)
}
break;
}
- __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GOTREF(__pyx_t_12);
}
- __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_11);
- __pyx_t_11 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_12);
+ __pyx_t_12 = 0;
__Pyx_INCREF(__pyx_t_1);
__Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
- __pyx_t_11 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5813, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5968, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_1);
- __pyx_t_1 = __pyx_t_11;
- __pyx_t_11 = 0;
+ __pyx_t_1 = __pyx_t_12;
+ __pyx_t_12 = 0;
- /* "netCDF4/_netCDF4.pyx":5814
+ /* "netCDF4/_netCDF4.pyx":5969
* 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_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5814, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __pyx_t_2 = PyObject_GetItem(__pyx_t_11, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5814, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5969, __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, 5969, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __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":5815
+ /* "netCDF4/_netCDF4.pyx":5970
* 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_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5815, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_units); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5815, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5970, __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, 5970, __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, 5815, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5970, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_12 = NULL;
- __pyx_t_13 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) {
- __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
- if (likely(__pyx_t_12)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
- __Pyx_INCREF(__pyx_t_12);
+ __pyx_t_13 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_13);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_11, function);
- __pyx_t_13 = 1;
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ __pyx_t_11 = 1;
}
}
- __pyx_t_14 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5815, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
- if (__pyx_t_12) {
- __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ #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, 5970, __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;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #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, 5970, __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;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5970, __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;
+ }
+ __Pyx_INCREF(__pyx_v_ref_date);
+ __Pyx_GIVEREF(__pyx_v_ref_date);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_11, __pyx_v_ref_date);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_11, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_3);
+ 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, 5970, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
}
- __Pyx_INCREF(__pyx_v_ref_date);
- __Pyx_GIVEREF(__pyx_v_ref_date);
- PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_v_ref_date);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_13, __pyx_t_3);
- __pyx_t_6 = 0;
- __pyx_t_3 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5815, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_XDECREF_SET(__pyx_v_num, __pyx_t_2);
__pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5816
+ /* "netCDF4/_netCDF4.pyx":5971
* 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, 5816, __pyx_L1_error)
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i1, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5971, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF_SET(__pyx_v_i1, __pyx_t_2);
__pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5817
+ /* "netCDF4/_netCDF4.pyx":5972
* 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, 5817, __pyx_L1_error)
+ __pyx_t_2 = PyNumber_Subtract(__pyx_v_ref_num, __pyx_v_num); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5972, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__delta); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5817, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
- if (__Pyx_PyObject_SetSlice(__pyx_t_11, __pyx_t_2, 0, 0, &__pyx_v_i0, &__pyx_v_i1, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 5817, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__delta); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5972, __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, 5972, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5818
+ /* "netCDF4/_netCDF4.pyx":5973
* 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, 5818, __pyx_L1_error)
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i0, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5973, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF_SET(__pyx_v_i0, __pyx_t_2);
__pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5813
+ /* "netCDF4/_netCDF4.pyx":5968
*
* i0 = 0; i1 = 0
* for i,v in enumerate(self._recVar): # <<<<<<<<<<<<<<
@@ -70781,7 +77960,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":5773
+ /* "netCDF4/_netCDF4.pyx":5928
* """
*
* def __init__(self, time, units=None): # <<<<<<<<<<<<<<
@@ -70798,8 +77977,8 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
- __Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
__Pyx_XDECREF(__pyx_t_14);
__Pyx_AddTraceback("netCDF4._netCDF4.MFTime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
@@ -70821,7 +78000,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(CYTHON_UNUSED PyOb
return __pyx_r;
}
-/* "netCDF4/_netCDF4.pyx":5821
+/* "netCDF4/_netCDF4.pyx":5976
*
*
* def __getitem__(self, elem): # <<<<<<<<<<<<<<
@@ -70857,11 +78036,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, 5821, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 5976, __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, 5821, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 5976, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -70874,7 +78053,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, 5821, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 5976, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("netCDF4._netCDF4.MFTime.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -70895,23 +78074,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":5822
+ /* "netCDF4/_netCDF4.pyx":5977
*
* 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, 5822, __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, 5977, __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, 5822, __pyx_L1_error)
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_elem); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5977, __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, 5822, __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, 5977, __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, 5822, __pyx_L1_error)
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_elem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5977, __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, 5822, __pyx_L1_error)
+ __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5977, __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;
@@ -70919,7 +78098,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6MFTime_2__getitem__(CYTHON_UNUSED
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "netCDF4/_netCDF4.pyx":5821
+ /* "netCDF4/_netCDF4.pyx":5976
*
*
* def __getitem__(self, elem): # <<<<<<<<<<<<<<
@@ -71099,17 +78278,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_63__getattr__(o, n);
+ v = __pyx_pw_7netCDF4_8_netCDF4_7Dataset_65__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_61__setattr__(o, n, v);
+ return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_63__setattr__(o, n, v);
}
else {
- return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_57__delattr__(o, n);
+ return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_59__delattr__(o, n);
}
}
@@ -71317,32 +78496,33 @@ static PyMethodDef __pyx_methods_7netCDF4_8_netCDF4_Dataset[] = {
{"__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},
- {"sync", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_21sync, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_20sync},
- {"_redef", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_23_redef, METH_NOARGS, 0},
- {"_enddef", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_25_enddef, METH_NOARGS, 0},
- {"set_fill_on", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_27set_fill_on, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_26set_fill_on},
- {"set_fill_off", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_29set_fill_off, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_28set_fill_off},
- {"createDimension", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_31createDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_30createDimension},
- {"renameDimension", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33renameDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_32renameDimension},
- {"createCompoundType", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35createCompoundType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_34createCompoundType},
- {"createVLType", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37createVLType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_36createVLType},
- {"createEnumType", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39createEnumType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_38createEnumType},
- {"createVariable", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createVariable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_40createVariable},
- {"renameVariable", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43renameVariable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_42renameVariable},
- {"createGroup", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45createGroup, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_44createGroup},
- {"ncattrs", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_47ncattrs, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_46ncattrs},
- {"setncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_49setncattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_48setncattr},
- {"setncattr_string", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_51setncattr_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_50setncattr_string},
- {"setncatts", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_53setncatts, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_52setncatts},
- {"getncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_55getncattr, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_54getncattr},
- {"delncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_59delncattr, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_58delncattr},
- {"__getattr__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_63__getattr__, METH_O|METH_COEXIST, 0},
- {"renameAttribute", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_65renameAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_64renameAttribute},
- {"renameGroup", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67renameGroup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_66renameGroup},
- {"set_auto_maskandscale", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_69set_auto_maskandscale, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_68set_auto_maskandscale},
- {"set_auto_mask", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_71set_auto_mask, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_70set_auto_mask},
- {"set_auto_scale", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_73set_auto_scale, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_72set_auto_scale},
- {"get_variables_by_attributes", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_75get_variables_by_attributes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_74get_variables_by_attributes},
+ {"__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},
{0, 0, 0, 0}
};
@@ -72293,6 +79473,7 @@ static PyMethodDef __pyx_methods_7netCDF4_8_netCDF4_Variable[] = {
{"set_auto_mask", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_63set_auto_mask, METH_O, __pyx_doc_7netCDF4_8_netCDF4_8Variable_62set_auto_mask},
{"_put", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_65_put, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_8Variable_64_put},
{"_get", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_67_get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_8Variable_66_get},
+ {"__reduce__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_69__reduce__, METH_NOARGS, 0},
{0, 0, 0, 0}
};
@@ -72494,6 +79675,7 @@ static int __pyx_setprop_7netCDF4_8_netCDF4_12CompoundType_name(PyObject *o, PyO
static PyMethodDef __pyx_methods_7netCDF4_8_netCDF4_CompoundType[] = {
{"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_12CompoundType_5__unicode__, METH_NOARGS, 0},
+ {"__reduce__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_12CompoundType_7__reduce__, METH_NOARGS, 0},
{0, 0, 0, 0}
};
@@ -72656,6 +79838,7 @@ static int __pyx_setprop_7netCDF4_8_netCDF4_6VLType_name(PyObject *o, PyObject *
static PyMethodDef __pyx_methods_7netCDF4_8_netCDF4_VLType[] = {
{"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_6VLType_5__unicode__, METH_NOARGS, 0},
+ {"__reduce__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_6VLType_7__reduce__, METH_NOARGS, 0},
{0, 0, 0, 0}
};
@@ -72839,6 +80022,7 @@ static int __pyx_setprop_7netCDF4_8_netCDF4_8EnumType_enum_dict(PyObject *o, PyO
static PyMethodDef __pyx_methods_7netCDF4_8_netCDF4_EnumType[] = {
{"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8EnumType_5__unicode__, METH_NOARGS, 0},
+ {"__reduce__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8EnumType_7__reduce__, METH_NOARGS, 0},
{0, 0, 0, 0}
};
@@ -73031,7 +80215,7 @@ static struct PyModuleDef __pyx_moduledef = {
PyModuleDef_HEAD_INIT,
#endif
"_netCDF4",
- __pyx_k_Version_1_2_4_Introduction_netc, /* m_doc */
+ __pyx_k_Version_1_2_5_Introduction_netc, /* m_doc */
-1, /* m_size */
__pyx_methods /* m_methods */,
NULL, /* m_reload */
@@ -73046,7 +80230,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_4, __pyx_k_1_2_4, sizeof(__pyx_k_1_2_4), 0, 0, 1, 0},
+ {&__pyx_kp_s_1_2_5, __pyx_k_1_2_5, sizeof(__pyx_k_1_2_5), 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},
@@ -73065,6 +80249,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_Class_for_reading_multi_file_ne, __pyx_k_Class_for_reading_multi_file_ne, sizeof(__pyx_k_Class_for_reading_multi_file_ne), 0, 0, 1, 0},
{&__pyx_kp_s_Class_providing_an_interface_to, __pyx_k_Class_providing_an_interface_to, sizeof(__pyx_k_Class_providing_an_interface_to), 0, 0, 1, 0},
{&__pyx_kp_s_CompoundType_dtype, __pyx_k_CompoundType_dtype, sizeof(__pyx_k_CompoundType_dtype), 0, 0, 1, 0},
+ {&__pyx_kp_s_CompoundType_is_not_picklable, __pyx_k_CompoundType_is_not_picklable, sizeof(__pyx_k_CompoundType_is_not_picklable), 0, 0, 1, 0},
{&__pyx_kp_s_CompoundType_name, __pyx_k_CompoundType_name, sizeof(__pyx_k_CompoundType_name), 0, 0, 1, 0},
{&__pyx_kp_s_Dataset_cmptypes, __pyx_k_Dataset_cmptypes, sizeof(__pyx_k_Dataset_cmptypes), 0, 0, 1, 0},
{&__pyx_kp_s_Dataset_data_model, __pyx_k_Dataset_data_model, sizeof(__pyx_k_Dataset_data_model), 0, 0, 1, 0},
@@ -73074,6 +80259,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_Dataset_file_format, __pyx_k_Dataset_file_format, sizeof(__pyx_k_Dataset_file_format), 0, 0, 1, 0},
{&__pyx_kp_u_Dataset_get_variables_by_attribu, __pyx_k_Dataset_get_variables_by_attribu, sizeof(__pyx_k_Dataset_get_variables_by_attribu), 0, 1, 0, 0},
{&__pyx_kp_s_Dataset_groups, __pyx_k_Dataset_groups, sizeof(__pyx_k_Dataset_groups), 0, 0, 1, 0},
+ {&__pyx_kp_s_Dataset_is_not_picklable, __pyx_k_Dataset_is_not_picklable, sizeof(__pyx_k_Dataset_is_not_picklable), 0, 0, 1, 0},
{&__pyx_kp_s_Dataset_keepweakref, __pyx_k_Dataset_keepweakref, sizeof(__pyx_k_Dataset_keepweakref), 0, 0, 1, 0},
{&__pyx_kp_s_Dataset_parent, __pyx_k_Dataset_parent, sizeof(__pyx_k_Dataset_parent), 0, 0, 1, 0},
{&__pyx_kp_s_Dataset_path, __pyx_k_Dataset_path, sizeof(__pyx_k_Dataset_path), 0, 0, 1, 0},
@@ -73090,6 +80276,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
{&__pyx_kp_s_EnumType_dtype, __pyx_k_EnumType_dtype, sizeof(__pyx_k_EnumType_dtype), 0, 0, 1, 0},
{&__pyx_kp_s_EnumType_enum_dict, __pyx_k_EnumType_enum_dict, sizeof(__pyx_k_EnumType_enum_dict), 0, 0, 1, 0},
+ {&__pyx_kp_s_EnumType_is_not_picklable, __pyx_k_EnumType_is_not_picklable, sizeof(__pyx_k_EnumType_is_not_picklable), 0, 0, 1, 0},
{&__pyx_kp_s_EnumType_name, __pyx_k_EnumType_name, sizeof(__pyx_k_EnumType_name), 0, 0, 1, 0},
{&__pyx_n_s_FillValue, __pyx_k_FillValue, sizeof(__pyx_k_FillValue), 0, 0, 1, 1},
{&__pyx_kp_s_FillValue_attribute_must_be_set, __pyx_k_FillValue_attribute_must_be_set, sizeof(__pyx_k_FillValue_attribute_must_be_set), 0, 0, 1, 0},
@@ -73104,10 +80291,15 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_MFDataset, __pyx_k_MFDataset, sizeof(__pyx_k_MFDataset), 0, 0, 1, 1},
{&__pyx_n_s_MFDataset___getattribute, __pyx_k_MFDataset___getattribute, sizeof(__pyx_k_MFDataset___getattribute), 0, 0, 1, 1},
{&__pyx_n_s_MFDataset___init, __pyx_k_MFDataset___init, sizeof(__pyx_k_MFDataset___init), 0, 0, 1, 1},
+ {&__pyx_n_s_MFDataset___reduce, __pyx_k_MFDataset___reduce, sizeof(__pyx_k_MFDataset___reduce), 0, 0, 1, 1},
{&__pyx_n_s_MFDataset___repr, __pyx_k_MFDataset___repr, sizeof(__pyx_k_MFDataset___repr), 0, 0, 1, 1},
{&__pyx_n_s_MFDataset___setattr, __pyx_k_MFDataset___setattr, sizeof(__pyx_k_MFDataset___setattr), 0, 0, 1, 1},
{&__pyx_n_s_MFDataset_close, __pyx_k_MFDataset_close, sizeof(__pyx_k_MFDataset_close), 0, 0, 1, 1},
+ {&__pyx_kp_s_MFDataset_is_not_picklable, __pyx_k_MFDataset_is_not_picklable, sizeof(__pyx_k_MFDataset_is_not_picklable), 0, 0, 1, 0},
{&__pyx_n_s_MFDataset_ncattrs, __pyx_k_MFDataset_ncattrs, sizeof(__pyx_k_MFDataset_ncattrs), 0, 0, 1, 1},
+ {&__pyx_n_s_MFDataset_set_auto_mask, __pyx_k_MFDataset_set_auto_mask, sizeof(__pyx_k_MFDataset_set_auto_mask), 0, 0, 1, 1},
+ {&__pyx_n_s_MFDataset_set_auto_maskandscale, __pyx_k_MFDataset_set_auto_maskandscale, sizeof(__pyx_k_MFDataset_set_auto_maskandscale), 0, 0, 1, 1},
+ {&__pyx_n_s_MFDataset_set_auto_scale, __pyx_k_MFDataset_set_auto_scale, sizeof(__pyx_k_MFDataset_set_auto_scale), 0, 0, 1, 1},
{&__pyx_kp_s_MFNetCDF4_only_works_with_NETCDF, __pyx_k_MFNetCDF4_only_works_with_NETCDF, sizeof(__pyx_k_MFNetCDF4_only_works_with_NETCDF), 0, 0, 1, 0},
{&__pyx_n_s_MFTime, __pyx_k_MFTime, sizeof(__pyx_k_MFTime), 0, 0, 1, 1},
{&__pyx_n_s_MFTime___getitem, __pyx_k_MFTime___getitem, sizeof(__pyx_k_MFTime___getitem), 0, 0, 1, 1},
@@ -73117,6 +80309,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_MFTime_requires_that_the_same_ti, __pyx_k_MFTime_requires_that_the_same_ti, sizeof(__pyx_k_MFTime_requires_that_the_same_ti), 0, 0, 1, 0},
{&__pyx_kp_s_MFTime_requires_that_the_time_va, __pyx_k_MFTime_requires_that_the_time_va, sizeof(__pyx_k_MFTime_requires_that_the_time_va), 0, 0, 1, 0},
{&__pyx_n_s_MINYEAR, __pyx_k_MINYEAR, sizeof(__pyx_k_MINYEAR), 0, 0, 1, 1},
+ {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
{&__pyx_n_s_NC_DISKLESS, __pyx_k_NC_DISKLESS, sizeof(__pyx_k_NC_DISKLESS), 0, 0, 1, 1},
{&__pyx_n_s_NETCDF3, __pyx_k_NETCDF3, sizeof(__pyx_k_NETCDF3), 0, 0, 1, 1},
{&__pyx_n_s_NETCDF3_64BIT, __pyx_k_NETCDF3_64BIT, sizeof(__pyx_k_NETCDF3_64BIT), 0, 0, 1, 1},
@@ -73125,6 +80318,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_NETCDF4, __pyx_k_NETCDF4, sizeof(__pyx_k_NETCDF4), 0, 0, 1, 1},
{&__pyx_n_s_NETCDF4_CLASSIC, __pyx_k_NETCDF4_CLASSIC, sizeof(__pyx_k_NETCDF4_CLASSIC), 0, 0, 1, 1},
{&__pyx_n_s_NUMCHARS, __pyx_k_NUMCHARS, sizeof(__pyx_k_NUMCHARS), 0, 0, 1, 1},
+ {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
{&__pyx_n_s_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 1, 1},
{&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1},
{&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
@@ -73148,6 +80342,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__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_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},
{&__pyx_kp_s_VLType_name, __pyx_k_VLType_name, sizeof(__pyx_k_VLType_name), 0, 0, 1, 0},
{&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
{&__pyx_n_s_Variable, __pyx_k_Variable, sizeof(__pyx_k_Variable), 0, 0, 1, 1},
@@ -73161,6 +80356,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_Variable_datatype, __pyx_k_Variable_datatype, sizeof(__pyx_k_Variable_datatype), 0, 0, 1, 0},
{&__pyx_kp_s_Variable_dimensions, __pyx_k_Variable_dimensions, sizeof(__pyx_k_Variable_dimensions), 0, 0, 1, 0},
{&__pyx_kp_s_Variable_dtype, __pyx_k_Variable_dtype, sizeof(__pyx_k_Variable_dtype), 0, 0, 1, 0},
+ {&__pyx_kp_s_Variable_is_not_picklable, __pyx_k_Variable_is_not_picklable, sizeof(__pyx_k_Variable_is_not_picklable), 0, 0, 1, 0},
{&__pyx_kp_s_Variable_least_significant_digit, __pyx_k_Variable_least_significant_digit, sizeof(__pyx_k_Variable_least_significant_digit), 0, 0, 1, 0},
{&__pyx_kp_s_Variable_length_strings_are_only, __pyx_k_Variable_length_strings_are_only, sizeof(__pyx_k_Variable_length_strings_are_only), 0, 0, 1, 0},
{&__pyx_kp_s_Variable_mask, __pyx_k_Variable_mask, sizeof(__pyx_k_Variable_mask), 0, 0, 1, 0},
@@ -73169,10 +80365,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_Variable_ndim, __pyx_k_Variable_ndim, sizeof(__pyx_k_Variable_ndim), 0, 0, 1, 0},
{&__pyx_kp_s_Variable_object_no_longer_valid, __pyx_k_Variable_object_no_longer_valid, sizeof(__pyx_k_Variable_object_no_longer_valid), 0, 0, 1, 0},
{&__pyx_kp_s_Variable_scale, __pyx_k_Variable_scale, sizeof(__pyx_k_Variable_scale), 0, 0, 1, 0},
+ {&__pyx_n_s_Variable_set_auto_mask, __pyx_k_Variable_set_auto_mask, sizeof(__pyx_k_Variable_set_auto_mask), 0, 0, 1, 1},
{&__pyx_n_s_Variable_set_auto_maskandscale, __pyx_k_Variable_set_auto_maskandscale, sizeof(__pyx_k_Variable_set_auto_maskandscale), 0, 0, 1, 1},
+ {&__pyx_n_s_Variable_set_auto_scale, __pyx_k_Variable_set_auto_scale, sizeof(__pyx_k_Variable_set_auto_scale), 0, 0, 1, 1},
{&__pyx_kp_s_Variable_shape, __pyx_k_Variable_shape, sizeof(__pyx_k_Variable_shape), 0, 0, 1, 0},
{&__pyx_kp_s_Variable_size, __pyx_k_Variable_size, sizeof(__pyx_k_Variable_size), 0, 0, 1, 0},
{&__pyx_n_s_Variable_typecode, __pyx_k_Variable_typecode, sizeof(__pyx_k_Variable_typecode), 0, 0, 1, 1},
+ {&__pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_k_Volumes_Drobo_python_netcdf4_py, sizeof(__pyx_k_Volumes_Drobo_python_netcdf4_py), 0, 0, 1, 0},
{&__pyx_kp_s_WARNING_Backwards_incompatible, __pyx_k_WARNING_Backwards_incompatible, sizeof(__pyx_k_WARNING_Backwards_incompatible), 0, 0, 1, 0},
{&__pyx_kp_s_WARNING_unsupported_Compound_typ, __pyx_k_WARNING_unsupported_Compound_typ, sizeof(__pyx_k_WARNING_unsupported_Compound_typ), 0, 0, 1, 0},
{&__pyx_kp_s_WARNING_unsupported_Enum_type_sk, __pyx_k_WARNING_unsupported_Enum_type_sk, sizeof(__pyx_k_WARNING_unsupported_Enum_type_sk), 0, 0, 1, 0},
@@ -73181,15 +80380,15 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_WARNING_variable_s_has_unsupport_2, __pyx_k_WARNING_variable_s_has_unsupport_2, sizeof(__pyx_k_WARNING_variable_s_has_unsupport_2), 0, 0, 1, 0},
{&__pyx_kp_s_WARNING_variable_s_has_unsupport_3, __pyx_k_WARNING_variable_s_has_unsupport_3, sizeof(__pyx_k_WARNING_variable_s_has_unsupport_3), 0, 0, 1, 0},
{&__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__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 1, 0},
- {&__pyx_kp_s__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 1, 0},
+ {&__pyx_kp_s__18, __pyx_k__18, sizeof(__pyx_k__18), 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_kp_s__25, __pyx_k__25, sizeof(__pyx_k__25), 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},
@@ -73542,7 +80741,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_preemption, __pyx_k_preemption, sizeof(__pyx_k_preemption), 0, 0, 1, 1},
{&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
{&__pyx_n_s_private_atts, __pyx_k_private_atts, sizeof(__pyx_k_private_atts), 0, 0, 1, 1},
- {&__pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_k_private_tmp_netcdf4_python_netC, sizeof(__pyx_k_private_tmp_netcdf4_python_netC), 0, 0, 1, 0},
{&__pyx_n_s_prod, __pyx_k_prod, sizeof(__pyx_k_prod), 0, 0, 1, 1},
{&__pyx_n_s_proleptic_gregorian, __pyx_k_proleptic_gregorian, sizeof(__pyx_k_proleptic_gregorian), 0, 0, 1, 1},
{&__pyx_n_s_proxy, __pyx_k_proxy, sizeof(__pyx_k_proxy), 0, 0, 1, 1},
@@ -73564,6 +80762,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_recdimname, __pyx_k_recdimname, sizeof(__pyx_k_recdimname), 0, 0, 1, 1},
{&__pyx_n_s_recdimname_2, __pyx_k_recdimname_2, sizeof(__pyx_k_recdimname_2), 0, 0, 1, 1},
{&__pyx_n_s_redef, __pyx_k_redef, sizeof(__pyx_k_redef), 0, 0, 1, 1},
+ {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
{&__pyx_n_s_ref_date, __pyx_k_ref_date, sizeof(__pyx_k_ref_date), 0, 0, 1, 1},
{&__pyx_n_s_ref_num, __pyx_k_ref_num, sizeof(__pyx_k_ref_num), 0, 0, 1, 1},
{&__pyx_n_s_releasevers, __pyx_k_releasevers, sizeof(__pyx_k_releasevers), 0, 0, 1, 1},
@@ -73684,6 +80883,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_vInst, __pyx_k_vInst, sizeof(__pyx_k_vInst), 0, 0, 1, 1},
{&__pyx_n_s_vName, __pyx_k_vName, sizeof(__pyx_k_vName), 0, 0, 1, 1},
{&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
+ {&__pyx_n_s_valid_max, __pyx_k_valid_max, sizeof(__pyx_k_valid_max), 0, 0, 1, 1},
+ {&__pyx_n_s_valid_min, __pyx_k_valid_min, sizeof(__pyx_k_valid_min), 0, 0, 1, 1},
+ {&__pyx_n_s_valid_range, __pyx_k_valid_range, sizeof(__pyx_k_valid_range), 0, 0, 1, 1},
{&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
{&__pyx_n_s_value_2, __pyx_k_value_2, sizeof(__pyx_k_value_2), 0, 0, 1, 1},
{&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
@@ -73706,7 +80908,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_view, __pyx_k_view, sizeof(__pyx_k_view), 0, 0, 1, 1},
{&__pyx_n_s_vlen, __pyx_k_vlen, sizeof(__pyx_k_vlen), 0, 0, 1, 1},
{&__pyx_kp_s_vlen_data_type_s, __pyx_k_vlen_data_type_s, sizeof(__pyx_k_vlen_data_type_s), 0, 0, 1, 0},
- {&__pyx_kp_s_vlen_string_array_attributes_not, __pyx_k_vlen_string_array_attributes_not, sizeof(__pyx_k_vlen_string_array_attributes_not), 0, 0, 1, 0},
{&__pyx_n_s_vltype, __pyx_k_vltype, sizeof(__pyx_k_vltype), 0, 0, 1, 1},
{&__pyx_n_s_vltypes, __pyx_k_vltypes, sizeof(__pyx_k_vltypes), 0, 0, 1, 1},
{&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
@@ -73725,21 +80926,23 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 927, __pyx_L1_error)
- __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 5567, __pyx_L1_error)
- __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 1088, __pyx_L1_error)
- __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 1136, __pyx_L1_error)
- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 1172, __pyx_L1_error)
- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 1181, __pyx_L1_error)
- __pyx_builtin_UnicodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeError); if (!__pyx_builtin_UnicodeError) __PYX_ERR(0, 1260, __pyx_L1_error)
- __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 1274, __pyx_L1_error)
- __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 1811, __pyx_L1_error)
- __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 1862, __pyx_L1_error)
- __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 3683, __pyx_L1_error)
- __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(0, 3925, __pyx_L1_error)
- __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 4251, __pyx_L1_error)
- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 4266, __pyx_L1_error)
- __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 4957, __pyx_L1_error)
+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 929, __pyx_L1_error)
+ __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 5716, __pyx_L1_error)
+ __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 1090, __pyx_L1_error)
+ __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 1132, __pyx_L1_error)
+ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 1140, __pyx_L1_error)
+ __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 1157, __pyx_L1_error)
+ __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 1185, __pyx_L1_error)
+ __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 1194, __pyx_L1_error)
+ __pyx_builtin_UnicodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeError); if (!__pyx_builtin_UnicodeError) __PYX_ERR(0, 1294, __pyx_L1_error)
+ __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 1309, __pyx_L1_error)
+ __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 1847, __pyx_L1_error)
+ __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 1898, __pyx_L1_error)
+ __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 1991, __pyx_L1_error)
+ __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 3728, __pyx_L1_error)
+ __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(0, 4007, __pyx_L1_error)
+ __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 4337, __pyx_L1_error)
+ __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 5062, __pyx_L1_error)
return 0;
__pyx_L1_error:;
return -1;
@@ -73749,1618 +80952,1778 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
- /* "netCDF4/_netCDF4.pyx":1126
+ /* "netCDF4/_netCDF4.pyx":1127
* 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, 1126, __pyx_L1_error)
+ __pyx_tuple__3 = PyTuple_Pack(2, __pyx_kp_s_, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 1127, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__3);
__Pyx_GIVEREF(__pyx_tuple__3);
- /* "netCDF4/_netCDF4.pyx":1132
- * with nogil:
- * ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
- * pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','') # <<<<<<<<<<<<<<
- * ierr = nc_free_string(1, &stratt) # free memory in netcdf C lib
- * return pstring
+ /* "netCDF4/_netCDF4.pyx":1139
+ * raise AttributeError((<char *>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, 1132, __pyx_L1_error)
+ __pyx_tuple__4 = PyTuple_Pack(2, __pyx_kp_s_, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 1139, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__4);
__Pyx_GIVEREF(__pyx_tuple__4);
- /* "netCDF4/_netCDF4.pyx":1136
- * return pstring
- * else:
- * raise KeyError('vlen string array attributes not supported') # <<<<<<<<<<<<<<
- * else:
- * # a regular numeric or compound type.
- */
- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_vlen_string_array_attributes_not); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 1136, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__5);
- __Pyx_GIVEREF(__pyx_tuple__5);
-
- /* "netCDF4/_netCDF4.pyx":1172
+ /* "netCDF4/_netCDF4.pyx":1185
* # 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__6 = PyTuple_Pack(1, __pyx_kp_s_unrecognized_format_requested); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 1172, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__6);
- __Pyx_GIVEREF(__pyx_tuple__6);
+ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_unrecognized_format_requested); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 1185, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__5);
+ __Pyx_GIVEREF(__pyx_tuple__5);
- /* "netCDF4/_netCDF4.pyx":1183
+ /* "netCDF4/_netCDF4.pyx":1196
* raise RuntimeError((<char *>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__7 = PyTuple_Pack(1, __pyx_kp_s_format_not_supported_by_python_i); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1183, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__7);
- __Pyx_GIVEREF(__pyx_tuple__7);
+ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_format_not_supported_by_python_i); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 1196, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__6);
+ __Pyx_GIVEREF(__pyx_tuple__6);
- /* "netCDF4/_netCDF4.pyx":1227
+ /* "netCDF4/_netCDF4.pyx":1256
* # 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__8 = PyTuple_Pack(1, __pyx_n_s_NETCDF3); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 1227, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__8);
- __Pyx_GIVEREF(__pyx_tuple__8);
+ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_s_NETCDF3); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1256, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__7);
+ __Pyx_GIVEREF(__pyx_tuple__7);
- /* "netCDF4/_netCDF4.pyx":1228
+ /* "netCDF4/_netCDF4.pyx":1257
* 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__9 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__9)) __PYX_ERR(0, 1228, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__9);
- __Pyx_GIVEREF(__pyx_slice__9);
+ __pyx_slice__8 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 1257, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__8);
+ __Pyx_GIVEREF(__pyx_slice__8);
- /* "netCDF4/_netCDF4.pyx":1230
+ /* "netCDF4/_netCDF4.pyx":1259
* 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__10 = PyTuple_Pack(1, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 1230, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__10);
- __Pyx_GIVEREF(__pyx_tuple__10);
+ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1259, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__9);
+ __Pyx_GIVEREF(__pyx_tuple__9);
- /* "netCDF4/_netCDF4.pyx":1273
+ /* "netCDF4/_netCDF4.pyx":1308
* 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__11 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__11)) __PYX_ERR(0, 1273, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__11);
- __Pyx_GIVEREF(__pyx_slice__11);
+ __pyx_slice__10 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__10)) __PYX_ERR(0, 1308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__10);
+ __Pyx_GIVEREF(__pyx_slice__10);
- /* "netCDF4/_netCDF4.pyx":1274
+ /* "netCDF4/_netCDF4.pyx":1309
* 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__12 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__12)) __PYX_ERR(0, 1274, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__12);
- __Pyx_GIVEREF(__pyx_slice__12);
+ __pyx_slice__11 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__11)) __PYX_ERR(0, 1309, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__11);
+ __Pyx_GIVEREF(__pyx_slice__11);
- /* "netCDF4/_netCDF4.pyx":1276
+ /* "netCDF4/_netCDF4.pyx":1311
* 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__13 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__13)) __PYX_ERR(0, 1276, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__13);
- __Pyx_GIVEREF(__pyx_slice__13);
+ __pyx_slice__12 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__12)) __PYX_ERR(0, 1311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__12);
+ __Pyx_GIVEREF(__pyx_slice__12);
- /* "netCDF4/_netCDF4.pyx":1851
+ /* "netCDF4/_netCDF4.pyx":1887
* # 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__17 = PyTuple_Pack(1, __pyx_kp_s__16); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1851, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__17);
- __Pyx_GIVEREF(__pyx_tuple__17);
+ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s__15); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1887, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__16);
+ __Pyx_GIVEREF(__pyx_tuple__16);
- /* "netCDF4/_netCDF4.pyx":1909
+ /* "netCDF4/_netCDF4.pyx":1945
* [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
* (((_tostr(self.variables[varname].dimensions)
* .replace("u'",""))\ # <<<<<<<<<<<<<<
* .replace("'",""))\
* .replace(", ",","))\
*/
- __pyx_tuple__18 = PyTuple_Pack(2, __pyx_kp_s_u, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1909, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__18);
- __Pyx_GIVEREF(__pyx_tuple__18);
+ __pyx_tuple__17 = PyTuple_Pack(2, __pyx_kp_s_u, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1945, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__17);
+ __Pyx_GIVEREF(__pyx_tuple__17);
- /* "netCDF4/_netCDF4.pyx":1910
+ /* "netCDF4/_netCDF4.pyx":1946
* (((_tostr(self.variables[varname].dimensions)
* .replace("u'",""))\
* .replace("'",""))\ # <<<<<<<<<<<<<<
* .replace(", ",","))\
* .replace(",)",")") for varname in self.variables.keys()])
*/
- __pyx_tuple__20 = PyTuple_Pack(2, __pyx_kp_s__19, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1910, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__20);
- __Pyx_GIVEREF(__pyx_tuple__20);
+ __pyx_tuple__19 = PyTuple_Pack(2, __pyx_kp_s__18, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 1946, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__19);
+ __Pyx_GIVEREF(__pyx_tuple__19);
- /* "netCDF4/_netCDF4.pyx":1911
+ /* "netCDF4/_netCDF4.pyx":1947
* .replace("u'",""))\
* .replace("'",""))\
* .replace(", ",","))\ # <<<<<<<<<<<<<<
* .replace(",)",")") for varname in self.variables.keys()])
* grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
*/
- __pyx_tuple__23 = PyTuple_Pack(2, __pyx_kp_s__21, __pyx_kp_s__22); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 1911, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__23);
- __Pyx_GIVEREF(__pyx_tuple__23);
+ __pyx_tuple__22 = PyTuple_Pack(2, __pyx_kp_s__20, __pyx_kp_s__21); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1947, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__22);
+ __Pyx_GIVEREF(__pyx_tuple__22);
- /* "netCDF4/_netCDF4.pyx":1912
+ /* "netCDF4/_netCDF4.pyx":1948
* .replace("'",""))\
* .replace(", ",","))\
* .replace(",)",")") for varname in self.variables.keys()]) # <<<<<<<<<<<<<<
* grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
* if self.path == '/':
*/
- __pyx_tuple__26 = PyTuple_Pack(2, __pyx_kp_s__24, __pyx_kp_s__25); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1912, __pyx_L1_error)
+ __pyx_tuple__25 = PyTuple_Pack(2, __pyx_kp_s__23, __pyx_kp_s__24); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 1948, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__25);
+ __Pyx_GIVEREF(__pyx_tuple__25);
+
+ /* "netCDF4/_netCDF4.pyx":1991
+ * 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, 1991, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__26);
__Pyx_GIVEREF(__pyx_tuple__26);
- /* "netCDF4/_netCDF4.pyx":2268
+ /* "netCDF4/_netCDF4.pyx":2308
* # 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__16); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 2268, __pyx_L1_error)
+ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s__15); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 2308, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__27);
__Pyx_GIVEREF(__pyx_tuple__27);
- /* "netCDF4/_netCDF4.pyx":2365
+ /* "netCDF4/_netCDF4.pyx":2406
* 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, 2365, __pyx_L1_error)
+ __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s__28); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 2406, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__29);
__Pyx_GIVEREF(__pyx_tuple__29);
- /* "netCDF4/_netCDF4.pyx":2375
+ /* "netCDF4/_netCDF4.pyx":2416
* # 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, 2375, __pyx_L1_error)
+ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s__28); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 2416, __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, 2375, __pyx_L1_error)
+ __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s__28); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 2416, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__31);
__Pyx_GIVEREF(__pyx_tuple__31);
- /* "netCDF4/_netCDF4.pyx":2625
+ /* "netCDF4/_netCDF4.pyx":2666
* 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, 2625, __pyx_L1_error)
+ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_cannot_close_a_netCDF4_Group_onl); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 2666, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__32);
__Pyx_GIVEREF(__pyx_tuple__32);
- /* "netCDF4/_netCDF4.pyx":2642
+ /* "netCDF4/_netCDF4.pyx":2683
* 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, 2642, __pyx_L1_error)
+ __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 2683, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__33);
__Pyx_GIVEREF(__pyx_tuple__33);
- /* "netCDF4/_netCDF4.pyx":2729
+ /* "netCDF4/_netCDF4.pyx":2770
* 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, 2729, __pyx_L1_error)
+ __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 2770, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__34);
__Pyx_GIVEREF(__pyx_tuple__34);
- /* "netCDF4/_netCDF4.pyx":2736
+ /* "netCDF4/_netCDF4.pyx":2777
* 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, 2736, __pyx_L1_error)
+ __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_size_cannot_be_altered); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 2777, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__35);
__Pyx_GIVEREF(__pyx_tuple__35);
- /* "netCDF4/_netCDF4.pyx":3064
+ /* "netCDF4/_netCDF4.pyx":3105
* 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, 3064, __pyx_L1_error)
+ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_Variable_length_strings_are_only); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 3105, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__38);
__Pyx_GIVEREF(__pyx_tuple__38);
- /* "netCDF4/_netCDF4.pyx":3074
+ /* "netCDF4/_netCDF4.pyx":3115
* # 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, 3074, __pyx_L1_error)
+ __pyx_slice__39 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__39)) __PYX_ERR(0, 3115, __pyx_L1_error)
__Pyx_GOTREF(__pyx_slice__39);
__Pyx_GIVEREF(__pyx_slice__39);
- /* "netCDF4/_netCDF4.pyx":3078
+ /* "netCDF4/_netCDF4.pyx":3119
* # 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, 3078, __pyx_L1_error)
+ __pyx_slice__40 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__40)) __PYX_ERR(0, 3119, __pyx_L1_error)
__Pyx_GOTREF(__pyx_slice__40);
__Pyx_GIVEREF(__pyx_slice__40);
- /* "netCDF4/_netCDF4.pyx":3118
+ /* "netCDF4/_netCDF4.pyx":3159
* # 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, 3118, __pyx_L1_error)
+ __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_NETCDF4); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 3159, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__41);
__Pyx_GIVEREF(__pyx_tuple__41);
- /* "netCDF4/_netCDF4.pyx":3160
+ /* "netCDF4/_netCDF4.pyx":3201
* 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, 3160, __pyx_L1_error)
+ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_cannot_specify_chunksizes_for_a); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 3201, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__42);
__Pyx_GIVEREF(__pyx_tuple__42);
- /* "netCDF4/_netCDF4.pyx":3168
+ /* "netCDF4/_netCDF4.pyx":3209
* 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 = <size_t *>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, 3168, __pyx_L1_error)
+ __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_chunksizes_must_be_a_sequence_wi); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 3209, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__43);
__Pyx_GIVEREF(__pyx_tuple__43);
- /* "netCDF4/_netCDF4.pyx":3220
+ /* "netCDF4/_netCDF4.pyx":3260
+ * if (is_native_little and self.endian() == 'big') or\
+ * (is_native_big and self.endian() == 'little'):
+ * fillval = 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, 3260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__44);
+ __Pyx_GIVEREF(__pyx_tuple__44);
+
+ /* "netCDF4/_netCDF4.pyx":3264
* 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__44 = PyTuple_Pack(1, __pyx_kp_s_cannot_set__FillValue_attribute); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 3220, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__44);
- __Pyx_GIVEREF(__pyx_tuple__44);
+ __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_cannot_set__FillValue_attribute); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 3264, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__45);
+ __Pyx_GIVEREF(__pyx_tuple__45);
- /* "netCDF4/_netCDF4.pyx":3302
+ /* "netCDF4/_netCDF4.pyx":3346
* 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__45 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__45)) __PYX_ERR(0, 3302, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__45);
- __Pyx_GIVEREF(__pyx_slice__45);
+ __pyx_slice__46 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__46)) __PYX_ERR(0, 3346, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__46);
+ __Pyx_GIVEREF(__pyx_slice__46);
- /* "netCDF4/_netCDF4.pyx":3303
+ /* "netCDF4/_netCDF4.pyx":3347
* 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__46 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__46)) __PYX_ERR(0, 3303, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__46);
- __Pyx_GIVEREF(__pyx_slice__46);
+ __pyx_slice__47 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__47)) __PYX_ERR(0, 3347, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__47);
+ __Pyx_GIVEREF(__pyx_slice__47);
- /* "netCDF4/_netCDF4.pyx":3358
+ /* "netCDF4/_netCDF4.pyx":3402
* return self._getname()
* def __set__(self,value):
* raise AttributeError("name cannot be altered") # <<<<<<<<<<<<<<
*
* property datatype:
*/
- __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 3358, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__47);
- __Pyx_GIVEREF(__pyx_tuple__47);
+ __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 3402, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__48);
+ __Pyx_GIVEREF(__pyx_tuple__48);
- /* "netCDF4/_netCDF4.pyx":3384
+ /* "netCDF4/_netCDF4.pyx":3428
* return shape
* def __set__(self,value):
* raise AttributeError("shape cannot be altered") # <<<<<<<<<<<<<<
*
* property size:
*/
- __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_shape_cannot_be_altered); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 3384, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__48);
- __Pyx_GIVEREF(__pyx_tuple__48);
+ __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_shape_cannot_be_altered); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 3428, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__49);
+ __Pyx_GIVEREF(__pyx_tuple__49);
- /* "netCDF4/_netCDF4.pyx":3396
+ /* "netCDF4/_netCDF4.pyx":3440
* return self._getdims()
* def __set__(self,value):
* raise AttributeError("dimensions cannot be altered") # <<<<<<<<<<<<<<
*
*
*/
- __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_dimensions_cannot_be_altered); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 3396, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__49);
- __Pyx_GIVEREF(__pyx_tuple__49);
+ __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_dimensions_cannot_be_altered); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 3440, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__50);
+ __Pyx_GIVEREF(__pyx_tuple__50);
- /* "netCDF4/_netCDF4.pyx":3620
+ /* "netCDF4/_netCDF4.pyx":3665
* if (is_native_little and self.endian() == 'big') or\
* (is_native_big and self.endian() == 'little'):
* value = numpy.array(value, self.dtype).byteswap(True) # <<<<<<<<<<<<<<
* else:
* value = numpy.array(value, self.dtype)
*/
- __pyx_tuple__50 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 3620, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__50);
- __Pyx_GIVEREF(__pyx_tuple__50);
+ __pyx_tuple__51 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 3665, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__51);
+ __Pyx_GIVEREF(__pyx_tuple__51);
- /* "netCDF4/_netCDF4.pyx":3624
+ /* "netCDF4/_netCDF4.pyx":3669
* value = numpy.array(value, self.dtype)
* self.setncattr(name, value)
* elif not name.endswith('__'): # <<<<<<<<<<<<<<
* if hasattr(self,name):
* raise AttributeError(
*/
- __pyx_tuple__51 = PyTuple_Pack(1, __pyx_n_s__28); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 3624, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__51);
- __Pyx_GIVEREF(__pyx_tuple__51);
+ __pyx_tuple__52 = PyTuple_Pack(1, __pyx_n_s__28); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 3669, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__52);
+ __Pyx_GIVEREF(__pyx_tuple__52);
- /* "netCDF4/_netCDF4.pyx":3634
+ /* "netCDF4/_netCDF4.pyx":3679
* # 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__52 = PyTuple_Pack(1, __pyx_n_s__28); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 3634, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__52);
- __Pyx_GIVEREF(__pyx_tuple__52);
- __pyx_tuple__53 = PyTuple_Pack(1, __pyx_n_s__28); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 3634, __pyx_L1_error)
+ __pyx_tuple__53 = PyTuple_Pack(1, __pyx_n_s__28); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 3679, __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, 3679, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__54);
+ __Pyx_GIVEREF(__pyx_tuple__54);
- /* "netCDF4/_netCDF4.pyx":3682
+ /* "netCDF4/_netCDF4.pyx":3727
* # 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__54 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__54)) __PYX_ERR(0, 3682, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__54);
- __Pyx_GIVEREF(__pyx_slice__54);
+ __pyx_slice__55 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__55)) __PYX_ERR(0, 3727, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__55);
+ __Pyx_GIVEREF(__pyx_slice__55);
- /* "netCDF4/_netCDF4.pyx":3683
+ /* "netCDF4/_netCDF4.pyx":3728
* # 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__55 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__55)) __PYX_ERR(0, 3683, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__55);
- __Pyx_GIVEREF(__pyx_slice__55);
+ __pyx_slice__56 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__56)) __PYX_ERR(0, 3728, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__56);
+ __Pyx_GIVEREF(__pyx_slice__56);
+
+ /* "netCDF4/_netCDF4.pyx":3826
+ * # 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, 3826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__57);
+ __Pyx_GIVEREF(__pyx_slice__57);
+
+ /* "netCDF4/_netCDF4.pyx":3830
+ * 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, 3830, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__58);
+ __Pyx_GIVEREF(__pyx_slice__58);
- /* "netCDF4/_netCDF4.pyx":3813
+ /* "netCDF4/_netCDF4.pyx":3895
* # 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__56 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__56)) __PYX_ERR(0, 3813, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__56);
- __Pyx_GIVEREF(__pyx_slice__56);
+ __pyx_slice__59 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__59)) __PYX_ERR(0, 3895, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__59);
+ __Pyx_GIVEREF(__pyx_slice__59);
- /* "netCDF4/_netCDF4.pyx":3814
+ /* "netCDF4/_netCDF4.pyx":3896
* # 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__57 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__57)) __PYX_ERR(0, 3814, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__57);
- __Pyx_GIVEREF(__pyx_slice__57);
+ __pyx_slice__60 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__60)) __PYX_ERR(0, 3896, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__60);
+ __Pyx_GIVEREF(__pyx_slice__60);
- /* "netCDF4/_netCDF4.pyx":3845
+ /* "netCDF4/_netCDF4.pyx":3927
* 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__58 = PyTuple_Pack(1, __pyx_kp_s_assign_vlen_method_only_for_use); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 3845, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__58);
- __Pyx_GIVEREF(__pyx_tuple__58);
+ __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_assign_vlen_method_only_for_use); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 3927, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__61);
+ __Pyx_GIVEREF(__pyx_tuple__61);
- /* "netCDF4/_netCDF4.pyx":3857
+ /* "netCDF4/_netCDF4.pyx":3939
* elem = self.shape[0]+elem
* else:
* raise IndexError("Illegal index") # <<<<<<<<<<<<<<
* elif isinstance(elem, tuple):
* if len(elem) != ndims:
*/
- __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 3857, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__59);
- __Pyx_GIVEREF(__pyx_tuple__59);
+ __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 3939, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__62);
+ __Pyx_GIVEREF(__pyx_tuple__62);
- /* "netCDF4/_netCDF4.pyx":3860
+ /* "netCDF4/_netCDF4.pyx":3942
* elif isinstance(elem, tuple):
* if len(elem) != ndims:
* raise IndexError("Illegal index") # <<<<<<<<<<<<<<
* elemnew = []
* for n,e in enumerate(elem):
*/
- __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 3860, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__60);
- __Pyx_GIVEREF(__pyx_tuple__60);
+ __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 3942, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__63);
+ __Pyx_GIVEREF(__pyx_tuple__63);
- /* "netCDF4/_netCDF4.pyx":3868
+ /* "netCDF4/_netCDF4.pyx":3950
* enew = self.shape[n]+e
* if enew < 0:
* raise IndexError("Illegal index") # <<<<<<<<<<<<<<
* else:
* elemnew.append(self.shape[n]+e)
*/
- __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 3868, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__61);
- __Pyx_GIVEREF(__pyx_tuple__61);
+ __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 3950, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__64);
+ __Pyx_GIVEREF(__pyx_tuple__64);
- /* "netCDF4/_netCDF4.pyx":4040
+ /* "netCDF4/_netCDF4.pyx":4122
* fillval = self._FillValue
* else:
* fillval = default_fillvals[self.dtype.str[1:]] # <<<<<<<<<<<<<<
* data = data.filled(fill_value=fillval)
*
*/
- __pyx_slice__62 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__62)) __PYX_ERR(0, 4040, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__62);
- __Pyx_GIVEREF(__pyx_slice__62);
+ __pyx_slice__65 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__65)) __PYX_ERR(0, 4122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__65);
+ __Pyx_GIVEREF(__pyx_slice__65);
- /* "netCDF4/_netCDF4.pyx":4058
+ /* "netCDF4/_netCDF4.pyx":4140
* def __len__(self):
* if not self.shape:
* raise TypeError('len() of unsized object') # <<<<<<<<<<<<<<
* else:
* return self.shape[0]
*/
- __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_len_of_unsized_object); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 4058, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__63);
- __Pyx_GIVEREF(__pyx_tuple__63);
+ __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_len_of_unsized_object); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 4140, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__66);
+ __Pyx_GIVEREF(__pyx_tuple__66);
- /* "netCDF4/_netCDF4.pyx":4070
+ /* "netCDF4/_netCDF4.pyx":4152
* 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__64 = PyTuple_Pack(1, __pyx_kp_s_to_assign_values_to_a_non_scalar); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 4070, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__64);
- __Pyx_GIVEREF(__pyx_tuple__64);
+ __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_to_assign_values_to_a_non_scalar); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 4152, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__67);
+ __Pyx_GIVEREF(__pyx_tuple__67);
- /* "netCDF4/_netCDF4.pyx":4071
+ /* "netCDF4/_netCDF4.pyx":4153
* if len(self.dimensions):
* raise IndexError('to assign values to a non-scalar variable, use a slice')
* self[:]=val # <<<<<<<<<<<<<<
*
* def getValue(self):
*/
- __pyx_slice__65 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__65)) __PYX_ERR(0, 4071, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__65);
- __Pyx_GIVEREF(__pyx_slice__65);
+ __pyx_slice__68 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__68)) __PYX_ERR(0, 4153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__68);
+ __Pyx_GIVEREF(__pyx_slice__68);
- /* "netCDF4/_netCDF4.pyx":4080
+ /* "netCDF4/_netCDF4.pyx":4162
* 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__66 = PyTuple_Pack(1, __pyx_kp_s_to_retrieve_values_from_a_non_sc); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 4080, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__66);
- __Pyx_GIVEREF(__pyx_tuple__66);
+ __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_to_retrieve_values_from_a_non_sc); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 4162, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__69);
+ __Pyx_GIVEREF(__pyx_tuple__69);
- /* "netCDF4/_netCDF4.pyx":4081
+ /* "netCDF4/_netCDF4.pyx":4163
* 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__67 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__67)) __PYX_ERR(0, 4081, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__67);
- __Pyx_GIVEREF(__pyx_slice__67);
+ __pyx_slice__70 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__70)) __PYX_ERR(0, 4163, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__70);
+ __Pyx_GIVEREF(__pyx_slice__70);
- /* "netCDF4/_netCDF4.pyx":4224
+ /* "netCDF4/_netCDF4.pyx":4310
* 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__68 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__68)) __PYX_ERR(0, 4224, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__68);
- __Pyx_GIVEREF(__pyx_slice__68);
+ __pyx_slice__71 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__71)) __PYX_ERR(0, 4310, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__71);
+ __Pyx_GIVEREF(__pyx_slice__71);
- /* "netCDF4/_netCDF4.pyx":4228
+ /* "netCDF4/_netCDF4.pyx":4314
* 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__69 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__69)) __PYX_ERR(0, 4228, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__69);
- __Pyx_GIVEREF(__pyx_slice__69);
+ __pyx_slice__72 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__72)) __PYX_ERR(0, 4314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__72);
+ __Pyx_GIVEREF(__pyx_slice__72);
- /* "netCDF4/_netCDF4.pyx":4234
+ /* "netCDF4/_netCDF4.pyx":4320
* 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__70 = PyTuple_Pack(1, __pyx_kp_s_size_of_data_array_does_not_conf); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 4234, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__70);
- __Pyx_GIVEREF(__pyx_tuple__70);
+ __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_size_of_data_array_does_not_conf); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 4320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__73);
+ __Pyx_GIVEREF(__pyx_tuple__73);
- /* "netCDF4/_netCDF4.pyx":4261
+ /* "netCDF4/_netCDF4.pyx":4347
* 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__71 = PyTuple_Pack(1, __pyx_kp_s_data_to_put_in_string_variable_m); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 4261, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__71);
- __Pyx_GIVEREF(__pyx_tuple__71);
+ __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_data_to_put_in_string_variable_m); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 4347, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__74);
+ __Pyx_GIVEREF(__pyx_tuple__74);
- /* "netCDF4/_netCDF4.pyx":4280
+ /* "netCDF4/_netCDF4.pyx":4366
* 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__72 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 4280, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__72);
- __Pyx_GIVEREF(__pyx_tuple__72);
+ __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 4366, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__75);
+ __Pyx_GIVEREF(__pyx_tuple__75);
- /* "netCDF4/_netCDF4.pyx":4296
+ /* "netCDF4/_netCDF4.pyx":4382
* elptr = (<void**>databuff)[0]
* dataarr = <ndarray>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__73 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__73)) __PYX_ERR(0, 4296, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__73);
- __Pyx_GIVEREF(__pyx_slice__73);
+ __pyx_slice__76 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__76)) __PYX_ERR(0, 4382, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__76);
+ __Pyx_GIVEREF(__pyx_slice__76);
- /* "netCDF4/_netCDF4.pyx":4308
+ /* "netCDF4/_netCDF4.pyx":4394
* 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__74 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 4308, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__74);
- __Pyx_GIVEREF(__pyx_tuple__74);
+ __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, 4394, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__77);
+ __Pyx_GIVEREF(__pyx_tuple__77);
- /* "netCDF4/_netCDF4.pyx":4336
+ /* "netCDF4/_netCDF4.pyx":4422
* for lendim in count:
* if lendim == -1:
* shapeout = shapeout + (1,) # <<<<<<<<<<<<<<
* squeeze_out = True
* else:
*/
- __pyx_tuple__75 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 4336, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__75);
- __Pyx_GIVEREF(__pyx_tuple__75);
+ __pyx_tuple__78 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 4422, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__78);
+ __Pyx_GIVEREF(__pyx_tuple__78);
- /* "netCDF4/_netCDF4.pyx":4357
+ /* "netCDF4/_netCDF4.pyx":4443
* 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__76 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__76)) __PYX_ERR(0, 4357, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__76);
- __Pyx_GIVEREF(__pyx_slice__76);
+ __pyx_slice__79 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__79)) __PYX_ERR(0, 4443, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__79);
+ __Pyx_GIVEREF(__pyx_slice__79);
- /* "netCDF4/_netCDF4.pyx":4361
+ /* "netCDF4/_netCDF4.pyx":4447
* 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__77 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__77)) __PYX_ERR(0, 4361, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__77);
- __Pyx_GIVEREF(__pyx_slice__77);
+ __pyx_slice__80 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__80)) __PYX_ERR(0, 4447, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__80);
+ __Pyx_GIVEREF(__pyx_slice__80);
- /* "netCDF4/_netCDF4.pyx":4394
+ /* "netCDF4/_netCDF4.pyx":4480
* 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__78 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 4394, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__78);
- __Pyx_GIVEREF(__pyx_tuple__78);
+ __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 4480, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__81);
+ __Pyx_GIVEREF(__pyx_tuple__81);
- /* "netCDF4/_netCDF4.pyx":4421
+ /* "netCDF4/_netCDF4.pyx":4510
* 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__79 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 4421, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__79);
- __Pyx_GIVEREF(__pyx_tuple__79);
+ __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, 4510, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__82);
+ __Pyx_GIVEREF(__pyx_tuple__82);
- /* "netCDF4/_netCDF4.pyx":4455
+ /* "netCDF4/_netCDF4.pyx":4544
* if (self.endian() == 'big' and is_native_little) or\
* (self.endian() == 'little' and is_native_big):
* data.byteswap(True) # in-place byteswap # <<<<<<<<<<<<<<
* if not self.dimensions:
* return data[0] # a scalar
*/
- __pyx_tuple__80 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 4455, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__80);
- __Pyx_GIVEREF(__pyx_tuple__80);
+ __pyx_tuple__83 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 4544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__83);
+ __Pyx_GIVEREF(__pyx_tuple__83);
/* "netCDF4/_netCDF4.pyx":4554
+ * 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, 4554, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__84);
+ __Pyx_GIVEREF(__pyx_tuple__84);
+
+ /* "netCDF4/_netCDF4.pyx":4621
+ * 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, 4621, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__85);
+ __Pyx_GIVEREF(__pyx_tuple__85);
+
+ /* "netCDF4/_netCDF4.pyx":4651
* if format.kind != 'V': # scalar primitive type
* try:
* xtype_tmp = _nptonctype[format.str[1:]] # <<<<<<<<<<<<<<
* except KeyError:
* raise ValueError('Unsupported compound type element')
*/
- __pyx_slice__81 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__81)) __PYX_ERR(0, 4554, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__81);
- __Pyx_GIVEREF(__pyx_slice__81);
+ __pyx_slice__86 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__86)) __PYX_ERR(0, 4651, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__86);
+ __Pyx_GIVEREF(__pyx_slice__86);
- /* "netCDF4/_netCDF4.pyx":4556
+ /* "netCDF4/_netCDF4.pyx":4653
* 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__82 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 4556, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__82);
- __Pyx_GIVEREF(__pyx_tuple__82);
+ __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 4653, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__87);
+ __Pyx_GIVEREF(__pyx_tuple__87);
- /* "netCDF4/_netCDF4.pyx":4579
+ /* "netCDF4/_netCDF4.pyx":4676
* 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__83 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__83)) __PYX_ERR(0, 4579, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__83);
- __Pyx_GIVEREF(__pyx_slice__83);
+ __pyx_slice__88 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__88)) __PYX_ERR(0, 4676, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__88);
+ __Pyx_GIVEREF(__pyx_slice__88);
- /* "netCDF4/_netCDF4.pyx":4581
+ /* "netCDF4/_netCDF4.pyx":4678
* 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__84 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 4581, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__84);
- __Pyx_GIVEREF(__pyx_tuple__84);
+ __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 4678, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__89);
+ __Pyx_GIVEREF(__pyx_tuple__89);
- /* "netCDF4/_netCDF4.pyx":4619
+ /* "netCDF4/_netCDF4.pyx":4716
* 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__85 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 4619, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__85);
- __Pyx_GIVEREF(__pyx_tuple__85);
+ __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 4716, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__90);
+ __Pyx_GIVEREF(__pyx_tuple__90);
- /* "netCDF4/_netCDF4.pyx":4621
+ /* "netCDF4/_netCDF4.pyx":4718
* 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__86 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 4621, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__86);
- __Pyx_GIVEREF(__pyx_tuple__86);
+ __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 4718, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__91);
+ __Pyx_GIVEREF(__pyx_tuple__91);
- /* "netCDF4/_netCDF4.pyx":4695
+ /* "netCDF4/_netCDF4.pyx":4792
* 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__87 = PyTuple_Pack(1, __pyx_kp_s_compound_field_of_an_unsupported); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 4695, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__87);
- __Pyx_GIVEREF(__pyx_tuple__87);
+ __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_s_compound_field_of_an_unsupported); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 4792, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__92);
+ __Pyx_GIVEREF(__pyx_tuple__92);
+
+ /* "netCDF4/_netCDF4.pyx":4868
+ * 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, 4868, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__93);
+ __Pyx_GIVEREF(__pyx_tuple__93);
- /* "netCDF4/_netCDF4.pyx":4784
+ /* "netCDF4/_netCDF4.pyx":4885
* 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__88 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__88)) __PYX_ERR(0, 4784, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__88);
- __Pyx_GIVEREF(__pyx_slice__88);
+ __pyx_slice__94 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__94)) __PYX_ERR(0, 4885, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__94);
+ __Pyx_GIVEREF(__pyx_slice__94);
- /* "netCDF4/_netCDF4.pyx":4787
+ /* "netCDF4/_netCDF4.pyx":4888
* # 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__89 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__89)) __PYX_ERR(0, 4787, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__89);
- __Pyx_GIVEREF(__pyx_slice__89);
+ __pyx_slice__95 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__95)) __PYX_ERR(0, 4888, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__95);
+ __Pyx_GIVEREF(__pyx_slice__95);
- /* "netCDF4/_netCDF4.pyx":4792
+ /* "netCDF4/_netCDF4.pyx":4893
* raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
* else:
* raise KeyError("unsupported datatype specified for VLEN") # <<<<<<<<<<<<<<
* return xtype, dt
*
*/
- __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_s_unsupported_datatype_specified_f); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 4792, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__90);
- __Pyx_GIVEREF(__pyx_tuple__90);
+ __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_s_unsupported_datatype_specified_f); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 4893, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__96);
+ __Pyx_GIVEREF(__pyx_tuple__96);
- /* "netCDF4/_netCDF4.pyx":4819
+ /* "netCDF4/_netCDF4.pyx":4920
* 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__91 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 4819, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__91);
- __Pyx_GIVEREF(__pyx_tuple__91);
+ __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 4920, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__97);
+ __Pyx_GIVEREF(__pyx_tuple__97);
- /* "netCDF4/_netCDF4.pyx":4893
+ /* "netCDF4/_netCDF4.pyx":4987
+ * 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, 4987, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__98);
+ __Pyx_GIVEREF(__pyx_tuple__98);
+
+ /* "netCDF4/_netCDF4.pyx":4998
* 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__92 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__92)) __PYX_ERR(0, 4893, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__92);
- __Pyx_GIVEREF(__pyx_slice__92);
+ __pyx_slice__99 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__99)) __PYX_ERR(0, 4998, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__99);
+ __Pyx_GIVEREF(__pyx_slice__99);
- /* "netCDF4/_netCDF4.pyx":4896
+ /* "netCDF4/_netCDF4.pyx":5001
* # 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__93 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__93)) __PYX_ERR(0, 4896, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__93);
- __Pyx_GIVEREF(__pyx_slice__93);
+ __pyx_slice__100 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__100)) __PYX_ERR(0, 5001, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__100);
+ __Pyx_GIVEREF(__pyx_slice__100);
- /* "netCDF4/_netCDF4.pyx":4937
+ /* "netCDF4/_netCDF4.pyx":5042
* 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__94 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 4937, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__94);
- __Pyx_GIVEREF(__pyx_tuple__94);
+ __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 5042, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__101);
+ __Pyx_GIVEREF(__pyx_tuple__101);
- /* "netCDF4/_netCDF4.pyx":4965
+ /* "netCDF4/_netCDF4.pyx":5070
* return str(bytestr,encoding='ascii')
* else:
* return bytestr.encode('ascii') # <<<<<<<<<<<<<<
*
* #----------------------------------------
*/
- __pyx_tuple__95 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 4965, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__95);
- __Pyx_GIVEREF(__pyx_tuple__95);
+ __pyx_tuple__102 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 5070, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__102);
+ __Pyx_GIVEREF(__pyx_tuple__102);
- /* "netCDF4/_netCDF4.pyx":4985
+ /* "netCDF4/_netCDF4.pyx":5090
* 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__96 = PyTuple_Pack(1, __pyx_kp_s_no_since_in_unit_string); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 4985, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__96);
- __Pyx_GIVEREF(__pyx_tuple__96);
+ __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_s_no_since_in_unit_string); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 5090, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__103);
+ __Pyx_GIVEREF(__pyx_tuple__103);
- /* "netCDF4/_netCDF4.pyx":4987
+ /* "netCDF4/_netCDF4.pyx":5092
* 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__97 = PyTuple_Pack(1, __pyx_n_s_since); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 4987, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__97);
- __Pyx_GIVEREF(__pyx_tuple__97);
+ __pyx_tuple__104 = PyTuple_Pack(1, __pyx_n_s_since); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 5092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__104);
+ __Pyx_GIVEREF(__pyx_tuple__104);
- /* "netCDF4/_netCDF4.pyx":4999
+ /* "netCDF4/_netCDF4.pyx":5104
* basedate = netcdftime.datetime(year, month, day, hour, minute, second)
* else:
* raise ValueError('cannot use utc_offset for reference years <= 0') # <<<<<<<<<<<<<<
* return basedate
*
*/
- __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_s_cannot_use_utc_offset_for_refere); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 4999, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__98);
- __Pyx_GIVEREF(__pyx_tuple__98);
+ __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_s_cannot_use_utc_offset_for_refere); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 5104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__105);
+ __Pyx_GIVEREF(__pyx_tuple__105);
- /* "netCDF4/_netCDF4.pyx":5020
+ /* "netCDF4/_netCDF4.pyx":5125
* (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__99 = PyTuple_Pack(1, __pyx_kp_s_dtype_must_string_or_unicode_S_o); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 5020, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__99);
- __Pyx_GIVEREF(__pyx_tuple__99);
+ __pyx_tuple__106 = PyTuple_Pack(1, __pyx_kp_s_dtype_must_string_or_unicode_S_o); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 5125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__106);
+ __Pyx_GIVEREF(__pyx_tuple__106);
- /* "netCDF4/_netCDF4.pyx":5039
+ /* "netCDF4/_netCDF4.pyx":5144
* 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__100 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 5039, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__100);
- __Pyx_GIVEREF(__pyx_tuple__100);
+ __pyx_tuple__107 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 5144, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__107);
+ __Pyx_GIVEREF(__pyx_tuple__107);
- /* "netCDF4/_netCDF4.pyx":5058
+ /* "netCDF4/_netCDF4.pyx":5163
* 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__101 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 5058, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__101);
- __Pyx_GIVEREF(__pyx_tuple__101);
+ __pyx_tuple__108 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 5163, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__108);
+ __Pyx_GIVEREF(__pyx_tuple__108);
- /* "netCDF4/_netCDF4.pyx":5062
+ /* "netCDF4/_netCDF4.pyx":5167
* 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__102 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__102)) __PYX_ERR(0, 5062, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__102);
- __Pyx_GIVEREF(__pyx_slice__102);
+ __pyx_slice__109 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__109)) __PYX_ERR(0, 5167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__109);
+ __Pyx_GIVEREF(__pyx_slice__109);
- /* "netCDF4/_netCDF4.pyx":5144
+ /* "netCDF4/_netCDF4.pyx":5249
* times.append(totaltime/1.e6/3600./24.)
* else:
* raise ValueError('unsupported time units') # <<<<<<<<<<<<<<
* if isscalar:
* return times[0]
*/
- __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_s_unsupported_time_units); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 5144, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__103);
- __Pyx_GIVEREF(__pyx_tuple__103);
+ __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_s_unsupported_time_units); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 5249, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__110);
+ __Pyx_GIVEREF(__pyx_tuple__110);
- /* "netCDF4/_netCDF4.pyx":5238
+ /* "netCDF4/_netCDF4.pyx":5343
* tsecs = time*86400.
* else:
* raise ValueError('unsupported time units') # <<<<<<<<<<<<<<
* # compute time delta.
* days = tsecs // 86400.
*/
- __pyx_tuple__104 = PyTuple_Pack(1, __pyx_kp_s_unsupported_time_units); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 5238, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__104);
- __Pyx_GIVEREF(__pyx_tuple__104);
+ __pyx_tuple__111 = PyTuple_Pack(1, __pyx_kp_s_unsupported_time_units); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 5343, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__111);
+ __Pyx_GIVEREF(__pyx_tuple__111);
- /* "netCDF4/_netCDF4.pyx":5290
+ /* "netCDF4/_netCDF4.pyx":5395
* nctime.units
* except AttributeError:
* raise AttributeError("netcdf time variable is missing a 'units' attribute") # <<<<<<<<<<<<<<
* if calendar == None:
* calendar = getattr(nctime, 'calendar', 'standard')
*/
- __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_s_netcdf_time_variable_is_missing); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 5290, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__105);
- __Pyx_GIVEREF(__pyx_tuple__105);
+ __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_s_netcdf_time_variable_is_missing); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 5395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__112);
+ __Pyx_GIVEREF(__pyx_tuple__112);
- /* "netCDF4/_netCDF4.pyx":5376
+ /* "netCDF4/_netCDF4.pyx":5481
* # 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__106 = PyTuple_Pack(1, __pyx_n_s_http); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 5376, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__106);
- __Pyx_GIVEREF(__pyx_tuple__106);
+ __pyx_tuple__113 = PyTuple_Pack(1, __pyx_n_s_http); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 5481, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__113);
+ __Pyx_GIVEREF(__pyx_tuple__113);
- /* "netCDF4/_netCDF4.pyx":5438
+ /* "netCDF4/_netCDF4.pyx":5543
* # 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__107 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__107)) __PYX_ERR(0, 5438, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__107);
- __Pyx_GIVEREF(__pyx_slice__107);
+ __pyx_slice__114 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__114)) __PYX_ERR(0, 5543, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__114);
+ __Pyx_GIVEREF(__pyx_slice__114);
- /* "netCDF4/_netCDF4.pyx":5449
+ /* "netCDF4/_netCDF4.pyx":5554
* #if not vInst.dimensions[0] != aggDimName:
*
* masterDims, masterShape, masterType = masterRecVar[v][:3] # <<<<<<<<<<<<<<
* extDims = varInfo[v].dimensions
* extShape = varInfo[v].shape
*/
- __pyx_slice__108 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__108)) __PYX_ERR(0, 5449, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__108);
- __Pyx_GIVEREF(__pyx_slice__108);
+ __pyx_slice__115 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__115)) __PYX_ERR(0, 5554, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__115);
+ __Pyx_GIVEREF(__pyx_slice__115);
- /* "netCDF4/_netCDF4.pyx":5466
+ /* "netCDF4/_netCDF4.pyx":5571
* "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__109 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__109)) __PYX_ERR(0, 5466, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__109);
- __Pyx_GIVEREF(__pyx_slice__109);
- __pyx_slice__110 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__110)) __PYX_ERR(0, 5466, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__110);
- __Pyx_GIVEREF(__pyx_slice__110);
+ __pyx_slice__116 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__116)) __PYX_ERR(0, 5571, __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, 5571, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__117);
+ __Pyx_GIVEREF(__pyx_slice__117);
- /* "netCDF4/_netCDF4.pyx":5509
+ /* "netCDF4/_netCDF4.pyx":5614
* 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__111 = PyTuple_Pack(1, __pyx_kp_s_MFNetCDF4_only_works_with_NETCDF); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 5509, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__111);
- __Pyx_GIVEREF(__pyx_tuple__111);
+ __pyx_tuple__118 = PyTuple_Pack(1, __pyx_kp_s_MFNetCDF4_only_works_with_NETCDF); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 5614, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__118);
+ __Pyx_GIVEREF(__pyx_tuple__118);
- /* "netCDF4/_netCDF4.pyx":5625
+ /* "netCDF4/_netCDF4.pyx":5714
+ * 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, 5714, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__119);
+ __Pyx_GIVEREF(__pyx_tuple__119);
+
+ /* "netCDF4/_netCDF4.pyx":5774
* def __len__(self):
* if not self._shape:
* raise TypeError('len() of unsized object') # <<<<<<<<<<<<<<
* else:
* return self._shape()[0]
*/
- __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_s_len_of_unsized_object); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 5625, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__112);
- __Pyx_GIVEREF(__pyx_tuple__112);
+ __pyx_tuple__120 = PyTuple_Pack(1, __pyx_kp_s_len_of_unsized_object); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 5774, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__120);
+ __Pyx_GIVEREF(__pyx_tuple__120);
- /* "netCDF4/_netCDF4.pyx":5630
+ /* "netCDF4/_netCDF4.pyx":5779
* 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__113 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__113)) __PYX_ERR(0, 5630, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__113);
- __Pyx_GIVEREF(__pyx_slice__113);
+ __pyx_slice__121 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__121)) __PYX_ERR(0, 5779, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__121);
+ __Pyx_GIVEREF(__pyx_slice__121);
- /* "netCDF4/_netCDF4.pyx":5651
+ /* "netCDF4/_netCDF4.pyx":5806
* # 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__114 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__114)) __PYX_ERR(0, 5651, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__114);
- __Pyx_GIVEREF(__pyx_slice__114);
+ __pyx_slice__122 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__122)) __PYX_ERR(0, 5806, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__122);
+ __Pyx_GIVEREF(__pyx_slice__122);
- /* "netCDF4/_netCDF4.pyx":5652
+ /* "netCDF4/_netCDF4.pyx":5807
* # 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__115 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__115)) __PYX_ERR(0, 5652, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__115);
- __Pyx_GIVEREF(__pyx_slice__115);
+ __pyx_slice__123 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__123)) __PYX_ERR(0, 5807, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__123);
+ __Pyx_GIVEREF(__pyx_slice__123);
- /* "netCDF4/_netCDF4.pyx":5669
+ /* "netCDF4/_netCDF4.pyx":5824
* 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__116 = PyTuple_Pack(1, __pyx_kp_s_negative_strides_not_allowed_whe); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 5669, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__116);
- __Pyx_GIVEREF(__pyx_tuple__116);
+ __pyx_tuple__124 = PyTuple_Pack(1, __pyx_kp_s_negative_strides_not_allowed_whe); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 5824, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__124);
+ __Pyx_GIVEREF(__pyx_tuple__124);
- /* "netCDF4/_netCDF4.pyx":5693
+ /* "netCDF4/_netCDF4.pyx":5848
*
* # 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__117 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__117)) __PYX_ERR(0, 5693, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__117);
- __Pyx_GIVEREF(__pyx_slice__117);
+ __pyx_slice__125 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__125)) __PYX_ERR(0, 5848, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__125);
+ __Pyx_GIVEREF(__pyx_slice__125);
- /* "netCDF4/_netCDF4.pyx":5795
+ /* "netCDF4/_netCDF4.pyx":5950
* 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__118 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_time_va); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 5795, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__118);
- __Pyx_GIVEREF(__pyx_tuple__118);
+ __pyx_tuple__126 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_time_va); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 5950, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__126);
+ __Pyx_GIVEREF(__pyx_tuple__126);
- /* "netCDF4/_netCDF4.pyx":5799
+ /* "netCDF4/_netCDF4.pyx":5954
* # 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__119 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_same_ti); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 5799, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__119);
- __Pyx_GIVEREF(__pyx_tuple__119);
+ __pyx_tuple__127 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_same_ti); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 5954, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__127);
+ __Pyx_GIVEREF(__pyx_tuple__127);
- /* "netCDF4/_netCDF4.pyx":5805
+ /* "netCDF4/_netCDF4.pyx":5960
*
* # 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__120 = PyTuple_Pack(3, __pyx_int_1900, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 5805, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__120);
- __Pyx_GIVEREF(__pyx_tuple__120);
+ __pyx_tuple__128 = PyTuple_Pack(3, __pyx_int_1900, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 5960, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__128);
+ __Pyx_GIVEREF(__pyx_tuple__128);
- /* "netCDF4/_netCDF4.pyx":931
+ /* "netCDF4/_netCDF4.pyx":933
* from ordereddict import OrderedDict
* except ImportError:
* raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)') # <<<<<<<<<<<<<<
* try:
* from itertools import izip as zip
*/
- __pyx_tuple__121 = PyTuple_Pack(1, __pyx_kp_s_please_install_ordereddict_https); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 931, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__121);
- __Pyx_GIVEREF(__pyx_tuple__121);
+ __pyx_tuple__129 = PyTuple_Pack(1, __pyx_kp_s_please_install_ordereddict_https); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 933, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__129);
+ __Pyx_GIVEREF(__pyx_tuple__129);
- /* "netCDF4/_netCDF4.pyx":957
+ /* "netCDF4/_netCDF4.pyx":959
* # check for required version of netcdf-4 and hdf5.
*
* def _gethdf5libversion(): # <<<<<<<<<<<<<<
* majorvers = H5_VERS_MAJOR
* minorvers = H5_VERS_MINOR
*/
- __pyx_tuple__122 = PyTuple_Pack(4, __pyx_n_s_majorvers, __pyx_n_s_minorvers, __pyx_n_s_releasevers, __pyx_n_s_patchstring); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 957, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__122);
- __Pyx_GIVEREF(__pyx_tuple__122);
- __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_gethdf5libversion, 957, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 957, __pyx_L1_error)
+ __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, 959, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_gethdf5libversion, 959, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 959, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":967
+ /* "netCDF4/_netCDF4.pyx":969
* return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
*
* def getlibversion(): # <<<<<<<<<<<<<<
* """
* **`getlibversion()`**
*/
- __pyx_codeobj__124 = (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_private_tmp_netcdf4_python_netC, __pyx_n_s_getlibversion, 967, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 967, __pyx_L1_error)
+ __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_getlibversion, 969, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 969, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":983
+ /* "netCDF4/_netCDF4.pyx":985
* __has_cdf5__ = HAS_CDF5_FORMAT
* _needsworkaround_issue485 = __netcdf4libversion__ < "4.4.0" or \
* (__netcdf4libversion__.startswith("4.4.0") and \ # <<<<<<<<<<<<<<
* "-development" in __netcdf4libversion__)
*
*/
- __pyx_tuple__125 = PyTuple_Pack(1, __pyx_kp_s_4_4_0); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 983, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__125);
- __Pyx_GIVEREF(__pyx_tuple__125);
+ __pyx_tuple__133 = PyTuple_Pack(1, __pyx_kp_s_4_4_0); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 985, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__133);
+ __Pyx_GIVEREF(__pyx_tuple__133);
- /* "netCDF4/_netCDF4.pyx":987
+ /* "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__126 = PySlice_New(__pyx_int_0, __pyx_int_5, Py_None); if (unlikely(!__pyx_slice__126)) __PYX_ERR(0, 987, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_slice__126);
- __Pyx_GIVEREF(__pyx_slice__126);
+ __pyx_slice__134 = PySlice_New(__pyx_int_0, __pyx_int_5, Py_None); if (unlikely(!__pyx_slice__134)) __PYX_ERR(0, 989, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__134);
+ __Pyx_GIVEREF(__pyx_slice__134);
- /* "netCDF4/_netCDF4.pyx":988
+ /* "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__127 = PyTuple_Pack(1, __pyx_kp_s_1_10); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 988, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__127);
- __Pyx_GIVEREF(__pyx_tuple__127);
+ __pyx_tuple__135 = PyTuple_Pack(1, __pyx_kp_s_1_10); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 990, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__135);
+ __Pyx_GIVEREF(__pyx_tuple__135);
- /* "netCDF4/_netCDF4.pyx":1053
+ /* "netCDF4/_netCDF4.pyx":1055
*
* # logical for native endian type.
* is_native_little = numpy.dtype('<f4').byteorder == '=' # <<<<<<<<<<<<<<
* is_native_big = numpy.dtype('>f4').byteorder == '='
*
*/
- __pyx_tuple__128 = PyTuple_Pack(1, __pyx_kp_s_f4_2); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 1053, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__128);
- __Pyx_GIVEREF(__pyx_tuple__128);
+ __pyx_tuple__136 = PyTuple_Pack(1, __pyx_kp_s_f4_2); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 1055, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__136);
+ __Pyx_GIVEREF(__pyx_tuple__136);
- /* "netCDF4/_netCDF4.pyx":1054
+ /* "netCDF4/_netCDF4.pyx":1056
* # logical for native endian type.
* is_native_little = numpy.dtype('<f4').byteorder == '='
* is_native_big = numpy.dtype('>f4').byteorder == '=' # <<<<<<<<<<<<<<
*
* # hard code this here, instead of importing from netcdf.h
*/
- __pyx_tuple__129 = PyTuple_Pack(1, __pyx_kp_s_f4_3); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 1054, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__129);
- __Pyx_GIVEREF(__pyx_tuple__129);
+ __pyx_tuple__137 = PyTuple_Pack(1, __pyx_kp_s_f4_3); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 1056, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__137);
+ __Pyx_GIVEREF(__pyx_tuple__137);
- /* "netCDF4/_netCDF4.pyx":1169
+ /* "netCDF4/_netCDF4.pyx":1182
* 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__130 = PyTuple_Pack(1, __pyx_n_s_format); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 1169, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__130);
- __Pyx_GIVEREF(__pyx_tuple__130);
- __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_set_default_format, 1169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 1169, __pyx_L1_error)
+ __pyx_tuple__138 = PyTuple_Pack(1, __pyx_n_s_format); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 1182, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_set_default_format, 1182, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 1182, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4960
+ /* "netCDF4/_netCDF4.pyx":5065
* return pystr # already bytes or unicode?
*
* def _to_ascii(bytestr): # <<<<<<<<<<<<<<
* # encode a byte string to an ascii encoded string.
* if python3:
*/
- __pyx_tuple__132 = PyTuple_Pack(1, __pyx_n_s_bytestr); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 4960, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__132);
- __Pyx_GIVEREF(__pyx_tuple__132);
- __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_to_ascii, 4960, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 4960, __pyx_L1_error)
+ __pyx_tuple__140 = PyTuple_Pack(1, __pyx_n_s_bytestr); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 5065, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_to_ascii, 5065, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 5065, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":4975
+ /* "netCDF4/_netCDF4.pyx":5080
*
* # start of the gregorian calendar
* gregorian = datetime(1582,10,15) # <<<<<<<<<<<<<<
*
* def _dateparse(timestr):
*/
- __pyx_tuple__134 = PyTuple_Pack(3, __pyx_int_1582, __pyx_int_10, __pyx_int_15); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 4975, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__134);
- __Pyx_GIVEREF(__pyx_tuple__134);
+ __pyx_tuple__142 = PyTuple_Pack(3, __pyx_int_1582, __pyx_int_10, __pyx_int_15); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 5080, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__142);
+ __Pyx_GIVEREF(__pyx_tuple__142);
- /* "netCDF4/_netCDF4.pyx":4977
+ /* "netCDF4/_netCDF4.pyx":5082
* 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__135 = 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__135)) __PYX_ERR(0, 4977, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__135);
- __Pyx_GIVEREF(__pyx_tuple__135);
- __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(1, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_dateparse, 4977, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 4977, __pyx_L1_error)
+ __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, 5082, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_dateparse, 5082, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 5082, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5002
+ /* "netCDF4/_netCDF4.pyx":5107
* return basedate
*
* def stringtoarr(string,NUMCHARS,dtype='S'): # <<<<<<<<<<<<<<
* """
* **`stringtoarr(a, NUMCHARS,dtype='S')`**
*/
- __pyx_tuple__137 = PyTuple_Pack(4, __pyx_n_s_string, __pyx_n_s_NUMCHARS, __pyx_n_s_dtype, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 5002, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__137);
- __Pyx_GIVEREF(__pyx_tuple__137);
- __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_stringtoarr, 5002, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 5002, __pyx_L1_error)
+ __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, 5107, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_stringtoarr, 5107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 5107, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5025
+ /* "netCDF4/_netCDF4.pyx":5130
* return arr
*
* def stringtochar(a): # <<<<<<<<<<<<<<
* """
* **`stringtochar(a)`**
*/
- __pyx_tuple__139 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_n_s_dtype, __pyx_n_s_b); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 5025, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__139);
- __Pyx_GIVEREF(__pyx_tuple__139);
- __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_stringtochar, 5025, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 5025, __pyx_L1_error)
+ __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, 5130, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_stringtochar, 5130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 5130, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5044
+ /* "netCDF4/_netCDF4.pyx":5149
* return b
*
* def chartostring(b): # <<<<<<<<<<<<<<
* """
* **`chartostring(b)`**
*/
- __pyx_tuple__141 = 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__141)) __PYX_ERR(0, 5044, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__141);
- __Pyx_GIVEREF(__pyx_tuple__141);
- __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_chartostring, 5044, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 5044, __pyx_L1_error)
+ __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, 5149, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_chartostring, 5149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 5149, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5065
+ /* "netCDF4/_netCDF4.pyx":5170
* return a
*
* def date2num(dates,units,calendar='standard'): # <<<<<<<<<<<<<<
* """
* **`date2num(dates,units,calendar='standard')`**
*/
- __pyx_tuple__143 = 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__143)) __PYX_ERR(0, 5065, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__143);
- __Pyx_GIVEREF(__pyx_tuple__143);
- __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_date2num, 5065, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 5065, __pyx_L1_error)
+ __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, 5170, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_date2num, 5170, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 5170, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5153
+ /* "netCDF4/_netCDF4.pyx":5258
* return cdftime.date2num(dates)
*
* def num2date(times,units,calendar='standard'): # <<<<<<<<<<<<<<
* """
* **`num2date(times,units,calendar='standard')`**
*/
- __pyx_tuple__145 = 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__145)) __PYX_ERR(0, 5153, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__145);
- __Pyx_GIVEREF(__pyx_tuple__145);
- __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(3, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_num2date, 5153, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 5153, __pyx_L1_error)
+ __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, 5258, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_num2date, 5258, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 5258, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5256
+ /* "netCDF4/_netCDF4.pyx":5361
* return cdftime.num2date(times)
*
* def date2index(dates, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<<
* """
* **`date2index(dates, nctime, calendar=None, select='exact')`**
*/
- __pyx_tuple__147 = 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__147)) __PYX_ERR(0, 5256, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__147);
- __Pyx_GIVEREF(__pyx_tuple__147);
- __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_date2index, 5256, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 5256, __pyx_L1_error)
+ __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, 5361, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_date2index, 5361, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 5361, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5342
+ /* "netCDF4/_netCDF4.pyx":5447
* """
*
* def __init__(self, files, check=False, aggdim=None, exclude=[]): # <<<<<<<<<<<<<<
* """
* **`__init__(self, files, check=False, aggdim=None, exclude=[])`**
*/
- __pyx_tuple__149 = 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_var [...]
- __Pyx_GOTREF(__pyx_tuple__149);
- __Pyx_GIVEREF(__pyx_tuple__149);
- __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(5, 0, 36, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_init, 5342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 5342, __pyx_L1_error)
+ __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_var [...]
+ __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_init, 5447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 5447, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5515
+ /* "netCDF4/_netCDF4.pyx":5620
* self._path = '/'
*
* def __setattr__(self, name, value): # <<<<<<<<<<<<<<
* """override base class attribute creation"""
* self.__dict__[name] = value
*/
- __pyx_tuple__151 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 5515, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__151);
- __Pyx_GIVEREF(__pyx_tuple__151);
- __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(3, 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_private_tmp_netcdf4_python_netC, __pyx_n_s_setattr, 5515, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 5515, __pyx_L1_error)
+ __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, 5620, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_setattr, 5620, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 5620, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5519
+ /* "netCDF4/_netCDF4.pyx":5624
* self.__dict__[name] = value
*
* def __getattribute__(self, name): # <<<<<<<<<<<<<<
* if name in ['variables','dimensions','file_format','groups',\
* 'data_model','disk_format','path']:
*/
- __pyx_tuple__153 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 5519, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__153);
- __Pyx_GIVEREF(__pyx_tuple__153);
- __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_getattribute, 5519, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 5519, __pyx_L1_error)
+ __pyx_tuple__161 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 5624, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_getattribute, 5624, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 5624, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5532
+ /* "netCDF4/_netCDF4.pyx":5637
* return Dataset.__getattribute__(self, name)
*
* def ncattrs(self): # <<<<<<<<<<<<<<
* """
* **`ncattrs(self)`**
*/
- __pyx_tuple__155 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 5532, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__155);
- __Pyx_GIVEREF(__pyx_tuple__155);
- __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_ncattrs, 5532, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 5532, __pyx_L1_error)
+ __pyx_tuple__163 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 5637, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_ncattrs, 5637, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 5637, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5540
+ /* "netCDF4/_netCDF4.pyx":5645
* return self._cdf[0].__dict__.keys()
*
+ * def set_auto_maskandscale(self, value): # <<<<<<<<<<<<<<
+ * """
+ * **`set_auto_maskandscale(self, True_or_False)`**
+ */
+ __pyx_tuple__165 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_var); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 5645, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__165);
+ __Pyx_GIVEREF(__pyx_tuple__165);
+ __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_set_auto_maskandscale, 5645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 5645, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":5659
+ * var.set_auto_maskandscale(value)
+ *
+ * def set_auto_mask(self, value): # <<<<<<<<<<<<<<
+ * """
+ * **`set_auto_mask(self, True_or_False)`**
+ */
+ __pyx_tuple__167 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_var); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 5659, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__167);
+ __Pyx_GIVEREF(__pyx_tuple__167);
+ __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_set_auto_mask, 5659, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 5659, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":5672
+ * var.set_auto_mask(value)
+ *
+ * def set_auto_scale(self, value): # <<<<<<<<<<<<<<
+ * """
+ * **`set_auto_scale(self, True_or_False)`**
+ */
+ __pyx_tuple__169 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_var); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 5672, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__169);
+ __Pyx_GIVEREF(__pyx_tuple__169);
+ __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_set_auto_scale, 5672, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 5672, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":5685
+ * var.set_auto_scale(value)
+ *
* def close(self): # <<<<<<<<<<<<<<
* """
* **`close(self)`**
*/
- __pyx_tuple__157 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dset); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 5540, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__157);
- __Pyx_GIVEREF(__pyx_tuple__157);
- __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_close, 5540, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 5540, __pyx_L1_error)
+ __pyx_tuple__171 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dset); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 5685, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__171);
+ __Pyx_GIVEREF(__pyx_tuple__171);
+ __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_close, 5685, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 5685, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5549
+ /* "netCDF4/_netCDF4.pyx":5694
* dset.close()
*
* def __repr__(self): # <<<<<<<<<<<<<<
* ncdump = ['%r\n' % type(self)]
* dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
*/
- __pyx_tuple__159 = 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__159)) __PYX_ERR(0, 5549, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__159);
- __Pyx_GIVEREF(__pyx_tuple__159);
- __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_repr, 5549, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 5549, __pyx_L1_error)
+ __pyx_tuple__173 = 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__173)) __PYX_ERR(0, 5694, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__173);
+ __Pyx_GIVEREF(__pyx_tuple__173);
+ __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_repr, 5694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 5694, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5568
+ /* "netCDF4/_netCDF4.pyx":5712
+ * return ''.join(ncdump)
+ *
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * # raise error is user tries to pickle a MFDataset object.
+ * raise NotImplementedError('MFDataset is not picklable')
+ */
+ __pyx_tuple__175 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 5712, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_reduce, 5712, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 5712, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":5717
*
* class _Dimension(object):
* def __init__(self, dimname, dim, dimlens, dimtotlen): # <<<<<<<<<<<<<<
* self.dimlens = dimlens
* self.dimtotlen = dimtotlen
*/
- __pyx_tuple__161 = 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__161)) __PYX_ERR(0, 5568, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__161);
- __Pyx_GIVEREF(__pyx_tuple__161);
- __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_init, 5568, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 5568, __pyx_L1_error)
+ __pyx_tuple__177 = 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__177)) __PYX_ERR(0, 5717, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__177);
+ __Pyx_GIVEREF(__pyx_tuple__177);
+ __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_init, 5717, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 5717, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5572
+ /* "netCDF4/_netCDF4.pyx":5721
* self.dimtotlen = dimtotlen
* self._name = dimname
* def __len__(self): # <<<<<<<<<<<<<<
* return self.dimtotlen
* def isunlimited(self):
*/
- __pyx_tuple__163 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 5572, __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_private_tmp_netcdf4_python_netC, __pyx_n_s_len, 5572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 5572, __pyx_L1_error)
+ __pyx_tuple__179 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 5721, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_len, 5721, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 5721, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5574
+ /* "netCDF4/_netCDF4.pyx":5723
* def __len__(self):
* return self.dimtotlen
* def isunlimited(self): # <<<<<<<<<<<<<<
* return True
* def __repr__(self):
*/
- __pyx_tuple__165 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 5574, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__165);
- __Pyx_GIVEREF(__pyx_tuple__165);
- __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_isunlimited, 5574, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 5574, __pyx_L1_error)
+ __pyx_tuple__181 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 5723, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_isunlimited, 5723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 5723, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5576
+ /* "netCDF4/_netCDF4.pyx":5725
* 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__167 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 5576, __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_private_tmp_netcdf4_python_netC, __pyx_n_s_repr, 5576, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 5576, __pyx_L1_error)
+ __pyx_tuple__183 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 5725, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_repr, 5725, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 5725, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5583
+ /* "netCDF4/_netCDF4.pyx":5732
*
* class _Variable(object):
* def __init__(self, dset, varname, var, recdimname): # <<<<<<<<<<<<<<
* self.dimensions = var.dimensions
* self._dset = dset
*/
- __pyx_tuple__169 = 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__169)) __PYX_ERR(0, 5583, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__169);
- __Pyx_GIVEREF(__pyx_tuple__169);
- __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_init, 5583, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 5583, __pyx_L1_error)
+ __pyx_tuple__185 = 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__185)) __PYX_ERR(0, 5732, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__185);
+ __Pyx_GIVEREF(__pyx_tuple__185);
+ __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_init, 5732, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 5732, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5596
+ /* "netCDF4/_netCDF4.pyx":5745
* for name, value in var.__dict__.items():
* self.__dict__[name] = value
* def typecode(self): # <<<<<<<<<<<<<<
* return self.dtype
* def ncattrs(self):
*/
- __pyx_tuple__171 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 5596, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__171);
- __Pyx_GIVEREF(__pyx_tuple__171);
- __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_typecode, 5596, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 5596, __pyx_L1_error)
+ __pyx_tuple__187 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 5745, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_typecode, 5745, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 5745, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5598
+ /* "netCDF4/_netCDF4.pyx":5747
* def typecode(self):
* return self.dtype
* def ncattrs(self): # <<<<<<<<<<<<<<
* return self._mastervar.__dict__.keys()
* def __getattr__(self,name):
*/
- __pyx_tuple__173 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 5598, __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_private_tmp_netcdf4_python_netC, __pyx_n_s_ncattrs, 5598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 5598, __pyx_L1_error)
+ __pyx_tuple__189 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 5747, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_ncattrs, 5747, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 5747, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5600
+ /* "netCDF4/_netCDF4.pyx":5749
* 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__175 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 5600, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__175);
- __Pyx_GIVEREF(__pyx_tuple__175);
- __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_getattr, 5600, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 5600, __pyx_L1_error)
+ __pyx_tuple__191 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 5749, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__191);
+ __Pyx_GIVEREF(__pyx_tuple__191);
+ __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(2, 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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_getattr, 5749, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 5749, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5607
+ /* "netCDF4/_netCDF4.pyx":5756
* except:
* raise AttributeError(name)
* def __repr__(self): # <<<<<<<<<<<<<<
* ncdump_var = ['%r\n' % type(self)]
* dimnames = tuple([str(dimname) for dimname in self.dimensions])
*/
- __pyx_tuple__177 = 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__177)) __PYX_ERR(0, 5607, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__177);
- __Pyx_GIVEREF(__pyx_tuple__177);
- __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_repr, 5607, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 5607, __pyx_L1_error)
+ __pyx_tuple__193 = 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__193)) __PYX_ERR(0, 5756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__193);
+ __Pyx_GIVEREF(__pyx_tuple__193);
+ __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_repr, 5756, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 5756, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5623
+ /* "netCDF4/_netCDF4.pyx":5772
* 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__179 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 5623, __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_private_tmp_netcdf4_python_netC, __pyx_n_s_len, 5623, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 5623, __pyx_L1_error)
+ __pyx_tuple__195 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 5772, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__195);
+ __Pyx_GIVEREF(__pyx_tuple__195);
+ __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_len, 5772, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 5772, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5628
+ /* "netCDF4/_netCDF4.pyx":5777
* else:
* return self._shape()[0]
* def _shape(self): # <<<<<<<<<<<<<<
* recdimlen = len(self._dset.dimensions[self._recdimname])
* return (recdimlen,) + self._mastervar.shape[1:]
*/
- __pyx_tuple__181 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_recdimlen); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 5628, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__181);
- __Pyx_GIVEREF(__pyx_tuple__181);
- __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_shape_2, 5628, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 5628, __pyx_L1_error)
+ __pyx_tuple__197 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_recdimlen); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 5777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__197);
+ __Pyx_GIVEREF(__pyx_tuple__197);
+ __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_shape_2, 5777, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 5777, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5631
+ /* "netCDF4/_netCDF4.pyx":5780
* 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__183 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_val, __pyx_n_s_v); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 5631, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__183);
- __Pyx_GIVEREF(__pyx_tuple__183);
- __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_set_auto_maskandscale, 5631, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 5631, __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, 5780, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_set_auto_maskandscale, 5780, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 5780, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5634
+ /* "netCDF4/_netCDF4.pyx":5783
* 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__201 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_val, __pyx_n_s_v); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 5783, __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_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_set_auto_mask, 5783, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 5783, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":5786
+ * 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__203 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_val, __pyx_n_s_v); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 5786, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__203);
+ __Pyx_GIVEREF(__pyx_tuple__203);
+ __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_set_auto_scale, 5786, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(0, 5786, __pyx_L1_error)
+
+ /* "netCDF4/_netCDF4.pyx":5789
+ * for v in self._recVar:
+ * v.set_auto_scale(val)
* def __getitem__(self, elem): # <<<<<<<<<<<<<<
* """Get records from a concatenated set of variables."""
*
*/
- __pyx_tuple__185 = 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_GOTREF(__pyx_tuple__185);
- __Pyx_GIVEREF(__pyx_tuple__185);
- __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(2, 0, 30, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_getitem, 5634, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 5634, __pyx_L1_error)
+ __pyx_tuple__205 = 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_GOTREF(__pyx_tuple__205);
+ __Pyx_GIVEREF(__pyx_tuple__205);
+ __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(2, 0, 30, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_getitem, 5789, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 5789, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":5773
+ /* "netCDF4/_netCDF4.pyx":5928
* """
*
* def __init__(self, time, units=None): # <<<<<<<<<<<<<<
* """
* **`__init__(self, time, units=None)`**
*/
- __pyx_tuple__187 = 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__187)) __PYX_ERR(0, 5773, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__187);
- __Pyx_GIVEREF(__pyx_tuple__187);
- __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_init, 5773, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 5773, __pyx_L1_error)
- __pyx_tuple__189 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 5773, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__189);
- __Pyx_GIVEREF(__pyx_tuple__189);
+ __pyx_tuple__207 = 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__207)) __PYX_ERR(0, 5928, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__207);
+ __Pyx_GIVEREF(__pyx_tuple__207);
+ __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_init, 5928, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(0, 5928, __pyx_L1_error)
+ __pyx_tuple__209 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 5928, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__209);
+ __Pyx_GIVEREF(__pyx_tuple__209);
- /* "netCDF4/_netCDF4.pyx":5821
+ /* "netCDF4/_netCDF4.pyx":5976
*
*
* def __getitem__(self, elem): # <<<<<<<<<<<<<<
* return self.__time[elem] + self.__delta[elem]
*/
- __pyx_tuple__190 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 5821, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__190);
- __Pyx_GIVEREF(__pyx_tuple__190);
- __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_private_tmp_netcdf4_python_netC, __pyx_n_s_getitem, 5821, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 5821, __pyx_L1_error)
+ __pyx_tuple__210 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 5976, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__210);
+ __Pyx_GIVEREF(__pyx_tuple__210);
+ __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_getitem, 5976, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 5976, __pyx_L1_error)
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
@@ -75468,7 +82831,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_4_Introduction_netc, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+ __pyx_m = Py_InitModule4("_netCDF4", __pyx_methods, __pyx_k_Version_1_2_5_Introduction_netc, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
#else
__pyx_m = PyModule_Create(&__pyx_moduledef);
#endif
@@ -75505,11 +82868,11 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
/*--- 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, 1555, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Dataset) < 0) __PYX_ERR(0, 1590, __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, 1555, __pyx_L1_error)
+ PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dataset, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1590, __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__;
@@ -75517,15 +82880,15 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
}
}
#endif
- if (PyObject_SetAttrString(__pyx_m, "Dataset", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dataset) < 0) __PYX_ERR(0, 1555, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "Dataset", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dataset) < 0) __PYX_ERR(0, 1590, __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, 2550, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Group) < 0) __PYX_ERR(0, 2591, __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, 2550, __pyx_L1_error)
+ PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Group, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2591, __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__;
@@ -75533,14 +82896,14 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
}
}
#endif
- if (PyObject_SetAttrString(__pyx_m, "Group", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Group) < 0) __PYX_ERR(0, 2550, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "Group", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Group) < 0) __PYX_ERR(0, 2591, __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, 2645, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Dimension) < 0) __PYX_ERR(0, 2686, __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, 2645, __pyx_L1_error)
+ PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dimension, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2686, __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__;
@@ -75548,13 +82911,13 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
}
}
#endif
- if (PyObject_SetAttrString(__pyx_m, "Dimension", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dimension) < 0) __PYX_ERR(0, 2645, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "Dimension", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dimension) < 0) __PYX_ERR(0, 2686, __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, 2806, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Variable) < 0) __PYX_ERR(0, 2847, __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, 2806, __pyx_L1_error)
+ PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Variable, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2847, __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__;
@@ -75562,13 +82925,13 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
}
}
#endif
- if (PyObject_SetAttrString(__pyx_m, "Variable", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Variable) < 0) __PYX_ERR(0, 2806, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "Variable", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Variable) < 0) __PYX_ERR(0, 2847, __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, 4465, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_CompoundType) < 0) __PYX_ERR(0, 4558, __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, 4465, __pyx_L1_error)
+ PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_CompoundType, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4558, __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__;
@@ -75576,13 +82939,13 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
}
}
#endif
- if (PyObject_SetAttrString(__pyx_m, "CompoundType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_CompoundType) < 0) __PYX_ERR(0, 4465, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "CompoundType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_CompoundType) < 0) __PYX_ERR(0, 4558, __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, 4710, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_VLType) < 0) __PYX_ERR(0, 4807, __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, 4710, __pyx_L1_error)
+ PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_VLType, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4807, __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__;
@@ -75590,13 +82953,13 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
}
}
#endif
- if (PyObject_SetAttrString(__pyx_m, "VLType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_VLType) < 0) __PYX_ERR(0, 4710, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "VLType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_VLType) < 0) __PYX_ERR(0, 4807, __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, 4824, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_EnumType) < 0) __PYX_ERR(0, 4925, __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, 4824, __pyx_L1_error)
+ PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_7netCDF4_8_netCDF4_EnumType, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 4925, __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__;
@@ -75604,9 +82967,9 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
}
}
#endif
- if (PyObject_SetAttrString(__pyx_m, "EnumType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_EnumType) < 0) __PYX_ERR(0, 4824, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "EnumType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_EnumType) < 0) __PYX_ERR(0, 4925, __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, 1031, __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 ---*/
@@ -75617,14 +82980,14 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
#endif
- /* "netCDF4/_netCDF4.pyx":922
+ /* "netCDF4/_netCDF4.pyx":924
*
* # pure python utilities
* from .utils import (_StartCountStride, _quantize, _find_dim, _walk_grps, # <<<<<<<<<<<<<<
* _out_array_shape, _sortbylist, _tostr)
* # try to use built-in ordered dict in python >= 2.7
*/
- __pyx_t_1 = PyList_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_n_s_StartCountStride);
__Pyx_GIVEREF(__pyx_n_s_StartCountStride);
@@ -75647,40 +83010,40 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
__Pyx_INCREF(__pyx_n_s_tostr);
__Pyx_GIVEREF(__pyx_n_s_tostr);
PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_tostr);
- __pyx_t_2 = __Pyx_Import(__pyx_n_s_utils, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 922, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_utils, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_StartCountStride, __pyx_t_1) < 0) __PYX_ERR(0, 922, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_StartCountStride, __pyx_t_1) < 0) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_quantize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_quantize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_quantize, __pyx_t_1) < 0) __PYX_ERR(0, 922, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_quantize, __pyx_t_1) < 0) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_find_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_find_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_find_dim, __pyx_t_1) < 0) __PYX_ERR(0, 922, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_find_dim, __pyx_t_1) < 0) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_walk_grps, __pyx_t_1) < 0) __PYX_ERR(0, 922, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_walk_grps, __pyx_t_1) < 0) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_out_array_shape, __pyx_t_1) < 0) __PYX_ERR(0, 923, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_out_array_shape, __pyx_t_1) < 0) __PYX_ERR(0, 925, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_sortbylist, __pyx_t_1) < 0) __PYX_ERR(0, 923, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sortbylist, __pyx_t_1) < 0) __PYX_ERR(0, 925, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_tostr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_tostr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_tostr, __pyx_t_1) < 0) __PYX_ERR(0, 923, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_tostr, __pyx_t_1) < 0) __PYX_ERR(0, 925, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":925
+ /* "netCDF4/_netCDF4.pyx":927
* _out_array_shape, _sortbylist, _tostr)
* # try to use built-in ordered dict in python >= 2.7
* try: # <<<<<<<<<<<<<<
@@ -75696,28 +83059,28 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
__Pyx_XGOTREF(__pyx_t_5);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":926
+ /* "netCDF4/_netCDF4.pyx":928
* # try to use built-in ordered dict in python >= 2.7
* try:
* from collections import OrderedDict # <<<<<<<<<<<<<<
* except ImportError: # or else use drop-in substitute
* try:
*/
- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L2_error)
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 928, __pyx_L2_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_n_s_OrderedDict);
__Pyx_GIVEREF(__pyx_n_s_OrderedDict);
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_OrderedDict);
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 926, __pyx_L2_error)
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L2_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L2_error)
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 928, __pyx_L2_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __pyx_t_2) < 0) __PYX_ERR(0, 926, __pyx_L2_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __pyx_t_2) < 0) __PYX_ERR(0, 928, __pyx_L2_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":925
+ /* "netCDF4/_netCDF4.pyx":927
* _out_array_shape, _sortbylist, _tostr)
* # try to use built-in ordered dict in python >= 2.7
* try: # <<<<<<<<<<<<<<
@@ -75734,7 +83097,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":927
+ /* "netCDF4/_netCDF4.pyx":929
* try:
* from collections import OrderedDict
* except ImportError: # or else use drop-in substitute # <<<<<<<<<<<<<<
@@ -75744,12 +83107,12 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
__pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
if (__pyx_t_6) {
__Pyx_AddTraceback("netCDF4._netCDF4", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(0, 927, __pyx_L4_except_error)
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(0, 929, __pyx_L4_except_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_t_7);
- /* "netCDF4/_netCDF4.pyx":928
+ /* "netCDF4/_netCDF4.pyx":930
* from collections import OrderedDict
* except ImportError: # or else use drop-in substitute
* try: # <<<<<<<<<<<<<<
@@ -75765,28 +83128,28 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
__Pyx_XGOTREF(__pyx_t_10);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":929
+ /* "netCDF4/_netCDF4.pyx":931
* except ImportError: # or else use drop-in substitute
* try:
* from ordereddict import OrderedDict # <<<<<<<<<<<<<<
* except ImportError:
* raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')
*/
- __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 929, __pyx_L12_error)
+ __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 931, __pyx_L12_error)
__Pyx_GOTREF(__pyx_t_11);
__Pyx_INCREF(__pyx_n_s_OrderedDict);
__Pyx_GIVEREF(__pyx_n_s_OrderedDict);
PyList_SET_ITEM(__pyx_t_11, 0, __pyx_n_s_OrderedDict);
- __pyx_t_12 = __Pyx_Import(__pyx_n_s_ordereddict, __pyx_t_11, -1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 929, __pyx_L12_error)
+ __pyx_t_12 = __Pyx_Import(__pyx_n_s_ordereddict, __pyx_t_11, -1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 931, __pyx_L12_error)
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_12, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 929, __pyx_L12_error)
+ __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_12, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 931, __pyx_L12_error)
__Pyx_GOTREF(__pyx_t_11);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __pyx_t_11) < 0) __PYX_ERR(0, 929, __pyx_L12_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __pyx_t_11) < 0) __PYX_ERR(0, 931, __pyx_L12_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- /* "netCDF4/_netCDF4.pyx":928
+ /* "netCDF4/_netCDF4.pyx":930
* from collections import OrderedDict
* except ImportError: # or else use drop-in substitute
* try: # <<<<<<<<<<<<<<
@@ -75803,7 +83166,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
- /* "netCDF4/_netCDF4.pyx":930
+ /* "netCDF4/_netCDF4.pyx":932
* try:
* from ordereddict import OrderedDict
* except ImportError: # <<<<<<<<<<<<<<
@@ -75813,28 +83176,28 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
__pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
if (__pyx_t_6) {
__Pyx_AddTraceback("netCDF4._netCDF4", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_11, &__pyx_t_13) < 0) __PYX_ERR(0, 930, __pyx_L14_except_error)
+ if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_11, &__pyx_t_13) < 0) __PYX_ERR(0, 932, __pyx_L14_except_error)
__Pyx_GOTREF(__pyx_t_12);
__Pyx_GOTREF(__pyx_t_11);
__Pyx_GOTREF(__pyx_t_13);
- /* "netCDF4/_netCDF4.pyx":931
+ /* "netCDF4/_netCDF4.pyx":933
* from ordereddict import OrderedDict
* except ImportError:
* raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)') # <<<<<<<<<<<<<<
* try:
* from itertools import izip as zip
*/
- __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 931, __pyx_L14_except_error)
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__129, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 933, __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;
- __PYX_ERR(0, 931, __pyx_L14_except_error)
+ __PYX_ERR(0, 933, __pyx_L14_except_error)
}
goto __pyx_L14_except_error;
__pyx_L14_except_error:;
- /* "netCDF4/_netCDF4.pyx":928
+ /* "netCDF4/_netCDF4.pyx":930
* from collections import OrderedDict
* except ImportError: # or else use drop-in substitute
* try: # <<<<<<<<<<<<<<
@@ -75857,7 +83220,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
goto __pyx_L4_except_error;
__pyx_L4_except_error:;
- /* "netCDF4/_netCDF4.pyx":925
+ /* "netCDF4/_netCDF4.pyx":927
* _out_array_shape, _sortbylist, _tostr)
* # try to use built-in ordered dict in python >= 2.7
* try: # <<<<<<<<<<<<<<
@@ -75879,7 +83242,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
__pyx_L9_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":932
+ /* "netCDF4/_netCDF4.pyx":934
* except ImportError:
* raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')
* try: # <<<<<<<<<<<<<<
@@ -75895,28 +83258,28 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "netCDF4/_netCDF4.pyx":933
+ /* "netCDF4/_netCDF4.pyx":935
* raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')
* try:
* from itertools import izip as zip # <<<<<<<<<<<<<<
* except ImportError:
* # python3: zip is already python2's itertools.izip
*/
- __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 933, __pyx_L22_error)
+ __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 935, __pyx_L22_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_n_s_izip);
__Pyx_GIVEREF(__pyx_n_s_izip);
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_izip);
- __pyx_t_2 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_7, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 933, __pyx_L22_error)
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_7, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L22_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_izip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 933, __pyx_L22_error)
+ __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_izip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 935, __pyx_L22_error)
__Pyx_GOTREF(__pyx_t_7);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_zip, __pyx_t_7) < 0) __PYX_ERR(0, 933, __pyx_L22_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_zip, __pyx_t_7) < 0) __PYX_ERR(0, 935, __pyx_L22_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":932
+ /* "netCDF4/_netCDF4.pyx":934
* except ImportError:
* raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')
* try: # <<<<<<<<<<<<<<
@@ -75938,7 +83301,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":934
+ /* "netCDF4/_netCDF4.pyx":936
* try:
* from itertools import izip as zip
* except ImportError: # <<<<<<<<<<<<<<
@@ -75953,7 +83316,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
goto __pyx_L24_except_error;
__pyx_L24_except_error:;
- /* "netCDF4/_netCDF4.pyx":932
+ /* "netCDF4/_netCDF4.pyx":934
* except ImportError:
* raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')
* try: # <<<<<<<<<<<<<<
@@ -75975,130 +83338,130 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
__pyx_L29_try_end:;
}
- /* "netCDF4/_netCDF4.pyx":938
+ /* "netCDF4/_netCDF4.pyx":940
* pass
*
- * __version__ = "1.2.4" # <<<<<<<<<<<<<<
+ * __version__ = "1.2.5" # <<<<<<<<<<<<<<
*
* # Initialize numpy
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_1_2_4) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_1_2_5) < 0) __PYX_ERR(0, 940, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":941
+ /* "netCDF4/_netCDF4.pyx":943
*
* # Initialize numpy
* import posixpath # <<<<<<<<<<<<<<
* import netcdftime
* import numpy
*/
- __pyx_t_2 = __Pyx_Import(__pyx_n_s_posixpath, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_posixpath, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_posixpath, __pyx_t_2) < 0) __PYX_ERR(0, 941, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_posixpath, __pyx_t_2) < 0) __PYX_ERR(0, 943, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":942
+ /* "netCDF4/_netCDF4.pyx":944
* # Initialize numpy
* import posixpath
* import netcdftime # <<<<<<<<<<<<<<
* import numpy
* import weakref
*/
- __pyx_t_2 = __Pyx_Import(__pyx_n_s_netcdftime, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_netcdftime, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 944, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_netcdftime, __pyx_t_2) < 0) __PYX_ERR(0, 942, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_netcdftime, __pyx_t_2) < 0) __PYX_ERR(0, 944, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":943
+ /* "netCDF4/_netCDF4.pyx":945
* import posixpath
* import netcdftime
* import numpy # <<<<<<<<<<<<<<
* import weakref
* import sys
*/
- __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_2) < 0) __PYX_ERR(0, 943, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_2) < 0) __PYX_ERR(0, 945, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":944
+ /* "netCDF4/_netCDF4.pyx":946
* import netcdftime
* import numpy
* import weakref # <<<<<<<<<<<<<<
* import sys
* import warnings
*/
- __pyx_t_2 = __Pyx_Import(__pyx_n_s_weakref, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 944, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_weakref, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_weakref, __pyx_t_2) < 0) __PYX_ERR(0, 944, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_weakref, __pyx_t_2) < 0) __PYX_ERR(0, 946, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":945
+ /* "netCDF4/_netCDF4.pyx":947
* import numpy
* import weakref
* import sys # <<<<<<<<<<<<<<
* import warnings
* from glob import glob
*/
- __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 945, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 947, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":946
+ /* "netCDF4/_netCDF4.pyx":948
* import weakref
* import sys
* import warnings # <<<<<<<<<<<<<<
* from glob import glob
* from numpy import ma
*/
- __pyx_t_2 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 948, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_2) < 0) __PYX_ERR(0, 946, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_2) < 0) __PYX_ERR(0, 948, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":947
+ /* "netCDF4/_netCDF4.pyx":949
* import sys
* import warnings
* from glob import glob # <<<<<<<<<<<<<<
* from numpy import ma
* from libc.string cimport memcpy
*/
- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error)
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_n_s_glob);
__Pyx_GIVEREF(__pyx_n_s_glob);
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_glob);
- __pyx_t_7 = __Pyx_Import(__pyx_n_s_glob, __pyx_t_2, -1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 947, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_Import(__pyx_n_s_glob, __pyx_t_2, -1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 949, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_glob); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_glob); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 949, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_glob, __pyx_t_2) < 0) __PYX_ERR(0, 947, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_glob, __pyx_t_2) < 0) __PYX_ERR(0, 949, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":948
+ /* "netCDF4/_netCDF4.pyx":950
* import warnings
* from glob import glob
* from numpy import ma # <<<<<<<<<<<<<<
* from libc.string cimport memcpy
* from libc.stdlib cimport malloc, free
*/
- __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 948, __pyx_L1_error)
+ __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 950, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_n_s_ma);
__Pyx_GIVEREF(__pyx_n_s_ma);
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_ma);
- __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, __pyx_t_7, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 948, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, __pyx_t_7, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ma); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 948, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ma); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 950, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ma, __pyx_t_7) < 0) __PYX_ERR(0, 948, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ma, __pyx_t_7) < 0) __PYX_ERR(0, 950, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":951
+ /* "netCDF4/_netCDF4.pyx":953
* from libc.string cimport memcpy
* from libc.stdlib cimport malloc, free
* import_array() # <<<<<<<<<<<<<<
@@ -76107,41 +83470,41 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
*/
import_array();
- /* "netCDF4/_netCDF4.pyx":957
+ /* "netCDF4/_netCDF4.pyx":959
* # check for required version of netcdf-4 and hdf5.
*
* def _gethdf5libversion(): # <<<<<<<<<<<<<<
* majorvers = H5_VERS_MAJOR
* minorvers = H5_VERS_MINOR
*/
- __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_1_gethdf5libversion, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 957, __pyx_L1_error)
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_1_gethdf5libversion, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_gethdf5libversion, __pyx_t_2) < 0) __PYX_ERR(0, 957, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_gethdf5libversion, __pyx_t_2) < 0) __PYX_ERR(0, 959, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":967
+ /* "netCDF4/_netCDF4.pyx":969
* return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
*
* def getlibversion(): # <<<<<<<<<<<<<<
* """
* **`getlibversion()`**
*/
- __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_3getlibversion, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 967, __pyx_L1_error)
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_3getlibversion, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 969, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_getlibversion, __pyx_t_2) < 0) __PYX_ERR(0, 967, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_getlibversion, __pyx_t_2) < 0) __PYX_ERR(0, 969, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":976
+ /* "netCDF4/_netCDF4.pyx":978
* return (<char *>nc_inq_libvers()).decode('ascii')
*
* __netcdf4libversion__ = getlibversion().split()[0] # <<<<<<<<<<<<<<
* __hdf5libversion__ = _gethdf5libversion()
* __has_rename_grp__ = HAS_RENAME_GRP
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_getlibversion); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_getlibversion); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_13 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_13 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_13)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -76151,18 +83514,18 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
}
}
if (__pyx_t_13) {
- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 976, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 978, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
} else {
- __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 976, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 978, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_7)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
@@ -76172,30 +83535,30 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
}
}
if (__pyx_t_7) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 978, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 978, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_netcdf4libversion, __pyx_t_1) < 0) __PYX_ERR(0, 976, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_netcdf4libversion, __pyx_t_1) < 0) __PYX_ERR(0, 978, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":977
+ /* "netCDF4/_netCDF4.pyx":979
*
* __netcdf4libversion__ = getlibversion().split()[0]
* __hdf5libversion__ = _gethdf5libversion() # <<<<<<<<<<<<<<
* __has_rename_grp__ = HAS_RENAME_GRP
* __has_nc_inq_path__ = HAS_NC_INQ_PATH
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gethdf5libversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gethdf5libversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_7 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_7)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -76205,64 +83568,64 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
}
}
if (__pyx_t_7) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
} else {
- __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_hdf5libversion, __pyx_t_1) < 0) __PYX_ERR(0, 977, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_hdf5libversion, __pyx_t_1) < 0) __PYX_ERR(0, 979, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":978
+ /* "netCDF4/_netCDF4.pyx":980
* __netcdf4libversion__ = getlibversion().split()[0]
* __hdf5libversion__ = _gethdf5libversion()
* __has_rename_grp__ = HAS_RENAME_GRP # <<<<<<<<<<<<<<
* __has_nc_inq_path__ = HAS_NC_INQ_PATH
* __has_nc_inq_format_extended__ = HAS_NC_INQ_FORMAT_EXTENDED
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_rename_grp, __pyx_int_0) < 0) __PYX_ERR(0, 978, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_rename_grp, __pyx_int_0) < 0) __PYX_ERR(0, 980, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":979
+ /* "netCDF4/_netCDF4.pyx":981
* __hdf5libversion__ = _gethdf5libversion()
* __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
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_nc_inq_path, __pyx_int_0) < 0) __PYX_ERR(0, 979, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_nc_inq_path, __pyx_int_0) < 0) __PYX_ERR(0, 981, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":980
+ /* "netCDF4/_netCDF4.pyx":982
* __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
* _needsworkaround_issue485 = __netcdf4libversion__ < "4.4.0" or \
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_nc_inq_format_extended, __pyx_int_0) < 0) __PYX_ERR(0, 980, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_nc_inq_format_extended, __pyx_int_0) < 0) __PYX_ERR(0, 982, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":981
+ /* "netCDF4/_netCDF4.pyx":983
* __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 \
* (__netcdf4libversion__.startswith("4.4.0") and \
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_cdf5, __pyx_int_0) < 0) __PYX_ERR(0, 981, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_cdf5, __pyx_int_0) < 0) __PYX_ERR(0, 983, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":982
+ /* "netCDF4/_netCDF4.pyx":984
* __has_nc_inq_format_extended__ = HAS_NC_INQ_FORMAT_EXTENDED
* __has_cdf5__ = HAS_CDF5_FORMAT
* _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, 982, __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, 982, __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, 982, __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 {
@@ -76272,22 +83635,22 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
goto __pyx_L30_bool_binop_done;
}
- /* "netCDF4/_netCDF4.pyx":983
+ /* "netCDF4/_netCDF4.pyx":985
* __has_cdf5__ = HAS_CDF5_FORMAT
* _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, 983, __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, 983, __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__125, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 983, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__133, 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, 983, __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 {
@@ -76297,40 +83660,40 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
goto __pyx_L30_bool_binop_done;
}
- /* "netCDF4/_netCDF4.pyx":984
+ /* "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, 984, __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, 984, __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, 984, __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, 982, __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":987
+ /* "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, 987, __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__126, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 987, __pyx_L1_error)
+ __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, 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, 987, __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, 987, __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 {
@@ -76338,27 +83701,27 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
goto __pyx_L34_bool_binop_done;
}
- /* "netCDF4/_netCDF4.pyx":988
+ /* "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, 988, __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, 988, __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__127, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__135, 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, 988, __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":987
+ /* "netCDF4/_netCDF4.pyx":989
*
* # issue warning for hdf5 1.10 (issue #549)
* if __netcdf4libversion__[0:5] < "4.4.1" and\ # <<<<<<<<<<<<<<
@@ -76367,31 +83730,31 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
*/
if (__pyx_t_15) {
- /* "netCDF4/_netCDF4.pyx":989
+ /* "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, 989, __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":994
+ /* "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, 994, __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, 994, __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, 994, __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_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_13)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -76401,24 +83764,44 @@ 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, 994, __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 {
- __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 994, __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, 994, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ #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, 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
+ #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, 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, 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, 996, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":987
+ /* "netCDF4/_netCDF4.pyx":989
*
* # issue warning for hdf5 1.10 (issue #549)
* if __netcdf4libversion__[0:5] < "4.4.1" and\ # <<<<<<<<<<<<<<
@@ -76427,579 +83810,579 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
*/
}
- /* "netCDF4/_netCDF4.pyx":997
+ /* "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, 997, __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, 997, __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, 997, __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":998
+ /* "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, 998, __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, 997, __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":999
+ /* "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, 999, __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, 997, __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":1000
+ /* "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, 1000, __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, 997, __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":1001
+ /* "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, 1001, __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, 997, __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":1002
+ /* "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, 1002, __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, 997, __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":1003
+ /* "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, 1003, __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, 997, __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":1004
+ /* "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, 1004, __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, 997, __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":1005
+ /* "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, 1005, __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, 997, __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":1006
+ /* "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, 1006, __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, 997, __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":1007
+ /* "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, 1007, __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, 997, __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, 997, __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":1010
+ /* "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, 1010, __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, 1010, __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, 1010, __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":1011
+ /* "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, 1011, __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, 1010, __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":1012
+ /* "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, 1012, __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, 1010, __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":1013
+ /* "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, 1013, __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, 1010, __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":1014
+ /* "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, 1014, __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, 1010, __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":1015
+ /* "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, 1015, __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, 1010, __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":1016
+ /* "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, 1016, __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, 1010, __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":1017
+ /* "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, 1017, __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, 1010, __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, 1010, __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":1020
+ /* "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, 1020, __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, 1020, __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, 1020, __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":1021
+ /* "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, 1021, __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, 1020, __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":1022
+ /* "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, 1022, __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, 1020, __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, 1020, __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":1029
+ /* "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, 1029, __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, 1029, __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, 1029, __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":1031
+ /* "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, 1031, __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, 1031, __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, 1031, __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":1036
+ /* "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, 1036, __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, 1036, __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, 1036, __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":1040
+ /* "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, 1040, __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, 1040, __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":1041
+ /* "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, 1041, __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, 1040, __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":1042
+ /* "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, 1042, __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, 1040, __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":1043
+ /* "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, 1043, __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, 1040, __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":1044
+ /* "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, 1044, __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, 1040, __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":1045
+ /* "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, 1045, __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, 1040, __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":1046
+ /* "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, 1046, __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, 1040, __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":1047
+ /* "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, 1047, __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, 1040, __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":1048
+ /* "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, 1048, __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, 1040, __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":1049
+ /* "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, 1049, __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, 1040, __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":1050
+ /* "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, 1050, __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, 1040, __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, 1039, __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":1053
+ /* "netCDF4/_netCDF4.pyx":1055
*
* # logical for native endian type.
* is_native_little = numpy.dtype('<f4').byteorder == '=' # <<<<<<<<<<<<<<
* is_native_big = numpy.dtype('>f4').byteorder == '='
*
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __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, 1053, __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__128, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__136, 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, 1053, __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, 1053, __pyx_L1_error)
+ __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_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, 1053, __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":1054
+ /* "netCDF4/_netCDF4.pyx":1056
* # logical for native endian type.
* is_native_little = numpy.dtype('<f4').byteorder == '='
* is_native_big = numpy.dtype('>f4').byteorder == '=' # <<<<<<<<<<<<<<
*
* # hard code this here, instead of importing from netcdf.h
*/
- __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, 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, 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, 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__129, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1054, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__137, 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, 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, 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, 1054, __pyx_L1_error)
+ __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, 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, 1054, __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":1058
+ /* "netCDF4/_netCDF4.pyx":1060
* # hard code this 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, 1058, __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":1062
+ /* "netCDF4/_netCDF4.pyx":1064
* # 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, 1062, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(0, 1064, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1065
+ /* "netCDF4/_netCDF4.pyx":1067
* # 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 (PyDict_SetItem(__pyx_d, __pyx_n_s_unicode_error, __pyx_n_s_replace) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_unicode_error, __pyx_n_s_replace) < 0) __PYX_ERR(0, 1067, __pyx_L1_error)
- /* "netCDF4/_netCDF4.pyx":1066
+ /* "netCDF4/_netCDF4.pyx":1068
* # can be set to 'strict' or 'ignore'.
* unicode_error = 'replace'
* python3 = sys.version_info[0] > 2 # <<<<<<<<<<<<<<
*
* _nctonptype = {}
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1066, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __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, 1066, __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, 1068, __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, 1066, __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, 1068, __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, 1066, __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, 1068, __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, 1066, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_python3, __pyx_t_1) < 0) __PYX_ERR(0, 1068, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1068
+ /* "netCDF4/_netCDF4.pyx":1070
* python3 = sys.version_info[0] > 2
*
* _nctonptype = {} # <<<<<<<<<<<<<<
* for _key,_value in _nptonctype.items():
* _nctonptype[_value] = _key
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error)
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_nctonptype, __pyx_t_1) < 0) __PYX_ERR(0, 1068, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_nctonptype, __pyx_t_1) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "netCDF4/_netCDF4.pyx":1069
+ /* "netCDF4/_netCDF4.pyx":1071
*
* _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, 1069, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __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, 1069, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1071, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
if (likely(__pyx_t_2)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
@@ -77009,10 +84392,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, 1069, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __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, 1069, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
@@ -77020,27 +84403,27 @@ 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, 1069, __pyx_L1_error)
+ __pyx_t_17 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1071, __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, 1069, __pyx_L1_error)
+ __pyx_t_18 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1071, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(!__pyx_t_18)) {
if (likely(PyList_CheckExact(__pyx_t_11))) {
if (__pyx_t_17 >= PyList_GET_SIZE(__pyx_t_11)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 1069, __pyx_L1_error)
+ #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, 1071, __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, 1069, __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, 1071, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
} else {
if (__pyx_t_17 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __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, 1069, __pyx_L1_error)
+ #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, 1071, __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, 1069, __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, 1071, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
#endif
}
@@ -77050,7 +84433,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, 1069, __pyx_L1_error)
+ else __PYX_ERR(0, 1071, __pyx_L1_error)
}
break;
}
@@ -77058,7 +84441,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
}
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -77066,9 +84449,9 @@ 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, 1069, __pyx_L1_error)
+ __PYX_ERR(0, 1071, __pyx_L1_error)
}
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
@@ -77079,15 +84462,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, 1069, __pyx_L1_error)
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1069, __pyx_L1_error)
+ __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1071, __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, 1069, __pyx_L1_error)
+ __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1071, __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;
@@ -77095,7 +84478,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_L38_unpacking_failed;
__Pyx_GOTREF(__pyx_t_7);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_13), 2) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_13), 2) < 0) __PYX_ERR(0, 1071, __pyx_L1_error)
__pyx_t_19 = NULL;
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
goto __pyx_L39_unpacking_done;
@@ -77103,33 +84486,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, 1069, __pyx_L1_error)
+ __PYX_ERR(0, 1071, __pyx_L1_error)
__pyx_L39_unpacking_done:;
}
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_key, __pyx_t_2) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_key, __pyx_t_2) < 0) __PYX_ERR(0, 1071, __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, 1069, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_value_2, __pyx_t_7) < 0) __PYX_ERR(0, 1071, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":1070
+ /* "netCDF4/_netCDF4.pyx":1072
* _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, 1070, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __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, 1070, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1072, __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, 1070, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_value_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1072, __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, 1070, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(0, 1072, __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":1069
+ /* "netCDF4/_netCDF4.pyx":1071
*
* _nctonptype = {}
* for _key,_value in _nptonctype.items(): # <<<<<<<<<<<<<<
@@ -77139,20 +84522,20 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1071
+ /* "netCDF4/_netCDF4.pyx":1073
* 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, 1071, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1073, __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, 1071, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
if (likely(__pyx_t_1)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
@@ -77162,48 +84545,48 @@ 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, 1071, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1073, __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, 1071, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1073, __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, 1071, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_supportedtypes, __pyx_t_11) < 0) __PYX_ERR(0, 1073, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1073
+ /* "netCDF4/_netCDF4.pyx":1075
* _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, 1073, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1075, __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, 1073, __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, 1075, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1169
+ /* "netCDF4/_netCDF4.pyx":1182
* 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, 1169, __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, 1182, __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, 1169, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_default_format, __pyx_t_11) < 0) __PYX_ERR(0, 1182, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1549
+ /* "netCDF4/_netCDF4.pyx":1584
*
* _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, 1549, __pyx_L1_error)
+ __pyx_t_11 = PyList_New(30); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1584, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
__Pyx_INCREF(__pyx_n_s_grpid);
__Pyx_GIVEREF(__pyx_n_s_grpid);
@@ -77295,425 +84678,425 @@ 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, 1548, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_private_atts, __pyx_t_11) < 0) __PYX_ERR(0, 1583, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1553
+ /* "netCDF4/_netCDF4.pyx":1588
* 'file_format','_isvlen','_isenum','_iscompound','_cmptype','_vltype','_enumtype','name',
* '__orthogoral_indexing__','keepweakref','_has_lsd']
* __pdoc__ = {} # <<<<<<<<<<<<<<
*
* cdef class Dataset:
*/
- __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1553, __pyx_L1_error)
+ __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1588, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdoc, __pyx_t_11) < 0) __PYX_ERR(0, 1553, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdoc, __pyx_t_11) < 0) __PYX_ERR(0, 1588, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1629
+ /* "netCDF4/_netCDF4.pyx":1664
* 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, 1629, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1664, __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, 1629, __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, 1664, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1633
+ /* "netCDF4/_netCDF4.pyx":1668
* 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, 1633, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1668, __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, 1633, __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, 1668, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1637
+ /* "netCDF4/_netCDF4.pyx":1672
* 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, 1637, __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_groups, __pyx_kp_s_The_groups_dictionary_maps_the_n) < 0)) __PYX_ERR(0, 1637, __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, 1672, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1642
+ /* "netCDF4/_netCDF4.pyx":1677
* `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, 1642, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1677, __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, 1642, __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, 1677, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1646
+ /* "netCDF4/_netCDF4.pyx":1681
* 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, 1646, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1681, __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, 1646, __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, 1681, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1650
+ /* "netCDF4/_netCDF4.pyx":1685
* 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, 1650, __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_enumtypes, __pyx_kp_s_The_enumtypes_dictionary_maps_th) < 0)) __PYX_ERR(0, 1650, __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, 1685, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1654
+ /* "netCDF4/_netCDF4.pyx":1689
* 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, 1654, __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_data_model, __pyx_kp_s_data_model_describes_the_netCDF) < 0)) __PYX_ERR(0, 1654, __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, 1689, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1658
+ /* "netCDF4/_netCDF4.pyx":1693
* 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, 1658, __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_file_format, __pyx_kp_s_same_as_data_model_retained_for) < 0)) __PYX_ERR(0, 1658, __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, 1693, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1660
+ /* "netCDF4/_netCDF4.pyx":1695
* __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, 1660, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1695, __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, 1660, __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, 1695, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1666
+ /* "netCDF4/_netCDF4.pyx":1701
* 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, 1666, __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_parent, __pyx_kp_s_parent_is_a_reference_to_the_pa) < 0)) __PYX_ERR(0, 1666, __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, 1701, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1669
+ /* "netCDF4/_netCDF4.pyx":1704
* """`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, 1669, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1704, __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, 1669, __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, 1704, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":1674
+ /* "netCDF4/_netCDF4.pyx":1709
* 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, 1674, __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_keepweakref, __pyx_kp_s_If_True_child_Dimension_and_Vari) < 0)) __PYX_ERR(0, 1674, __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, 1709, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":2567
+ /* "netCDF4/_netCDF4.pyx":2608
* """
* # 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, 2567, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2608, __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, 2567, __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, 2608, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":2666
+ /* "netCDF4/_netCDF4.pyx":2707
* 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, 2666, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2707, __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, 2666, __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, 2707, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":2862
+ /* "netCDF4/_netCDF4.pyx":2903
* __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, 2862, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2903, __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, 2862, __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, 2903, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":2865
+ /* "netCDF4/_netCDF4.pyx":2906
* """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, 2865, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2906, __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, 2865, __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, 2906, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":2868
+ /* "netCDF4/_netCDF4.pyx":2909
* """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, 2868, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2909, __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, 2868, __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, 2909, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":2870
+ /* "netCDF4/_netCDF4.pyx":2911
* __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, 2870, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2911, __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, 2870, __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, 2911, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":2874
+ /* "netCDF4/_netCDF4.pyx":2915
* 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, 2874, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2915, __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, 2874, __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, 2915, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":2879
+ /* "netCDF4/_netCDF4.pyx":2920
* 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, 2879, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2920, __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, 2879, __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, 2920, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":2884
+ /* "netCDF4/_netCDF4.pyx":2925
* 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, 2884, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2925, __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, 2884, __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, 2925, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":2889
+ /* "netCDF4/_netCDF4.pyx":2930
* 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, 2889, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2930, __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, 2889, __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, 2930, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":2893
+ /* "netCDF4/_netCDF4.pyx":2934
* 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, 2893, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2934, __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, 2893, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_Variable_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 2934, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":2895
+ /* "netCDF4/_netCDF4.pyx":2936
* __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, 2895, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2936, __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, 2895, __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, 2936, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":2897
+ /* "netCDF4/_netCDF4.pyx":2938
* __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, 2897, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2938, __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, 2897, __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, 2938, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":4478
+ /* "netCDF4/_netCDF4.pyx":4571
* 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, 4478, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4571, __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, 4478, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_CompoundType_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 4571, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":4480
+ /* "netCDF4/_netCDF4.pyx":4573
* __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, 4480, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4573, __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, 4480, __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, 4573, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":4722
+ /* "netCDF4/_netCDF4.pyx":4819
* 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, 4722, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4819, __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, 4722, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_VLType_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 4819, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":4724
+ /* "netCDF4/_netCDF4.pyx":4821
* __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, 4724, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4821, __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, 4724, __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, 4821, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":4836
+ /* "netCDF4/_netCDF4.pyx":4937
* 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, 4836, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4937, __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, 4836, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_kp_s_EnumType_name, __pyx_kp_s_String_name) < 0)) __PYX_ERR(0, 4937, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":4838
+ /* "netCDF4/_netCDF4.pyx":4939
* __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, 4838, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4939, __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, 4838, __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, 4939, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":4840
+ /* "netCDF4/_netCDF4.pyx":4941
* __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, 4840, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_pdoc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4941, __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, 4840, __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, 4941, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":4960
+ /* "netCDF4/_netCDF4.pyx":5065
* 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, 4960, __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, 5065, __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, 4960, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_to_ascii, __pyx_t_11) < 0) __PYX_ERR(0, 5065, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":4970
+ /* "netCDF4/_netCDF4.pyx":5075
* # 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, 4970, __pyx_L1_error)
+ __pyx_t_11 = PyList_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5075, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
__Pyx_INCREF(__pyx_n_s_timedelta);
__Pyx_GIVEREF(__pyx_n_s_timedelta);
@@ -77724,31 +85107,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, 4970, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_11, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5075, __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, 4970, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5075, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_timedelta, __pyx_t_11) < 0) __PYX_ERR(0, 4970, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_timedelta, __pyx_t_11) < 0) __PYX_ERR(0, 5075, __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, 4970, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5075, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_11) < 0) __PYX_ERR(0, 4970, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_11) < 0) __PYX_ERR(0, 5075, __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, 4970, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5075, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MINYEAR, __pyx_t_11) < 0) __PYX_ERR(0, 4970, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MINYEAR, __pyx_t_11) < 0) __PYX_ERR(0, 5075, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":4971
+ /* "netCDF4/_netCDF4.pyx":5076
* #----------------------------------------
* 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, 4971, __pyx_L1_error)
+ __pyx_t_2 = PyList_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5076, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_n_s_parse_date);
__Pyx_GIVEREF(__pyx_n_s_parse_date);
@@ -77771,522 +85154,594 @@ 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, 4971, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_Import(__pyx_n_s_netcdftime, __pyx_t_2, -1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5076, __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, 4971, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_parse_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5076, __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, 4971, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_date, __pyx_t_2) < 0) __PYX_ERR(0, 5076, __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, 4971, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_microsec_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5076, __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, 4971, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_microsec_units, __pyx_t_2) < 0) __PYX_ERR(0, 5076, __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, 4971, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_millisec_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5076, __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, 4971, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_millisec_units, __pyx_t_2) < 0) __PYX_ERR(0, 5076, __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, 4971, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_sec_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5076, __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, 4972, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sec_units, __pyx_t_2) < 0) __PYX_ERR(0, 5077, __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, 4971, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_min_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5076, __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, 4972, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_min_units, __pyx_t_2) < 0) __PYX_ERR(0, 5077, __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, 4971, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_hr_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5076, __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, 4972, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_hr_units, __pyx_t_2) < 0) __PYX_ERR(0, 5077, __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, 4971, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_day_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5076, __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, 4972, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_day_units, __pyx_t_2) < 0) __PYX_ERR(0, 5077, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- /* "netCDF4/_netCDF4.pyx":4975
+ /* "netCDF4/_netCDF4.pyx":5080
*
* # 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, 4975, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5080, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__134, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4975, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__142, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5080, __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, 4975, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_gregorian, __pyx_t_2) < 0) __PYX_ERR(0, 5080, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":4977
+ /* "netCDF4/_netCDF4.pyx":5082
* 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, 4977, __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, 5082, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_dateparse, __pyx_t_2) < 0) __PYX_ERR(0, 4977, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_dateparse, __pyx_t_2) < 0) __PYX_ERR(0, 5082, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5002
+ /* "netCDF4/_netCDF4.pyx":5107
* 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, 5002, __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, 5107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtoarr, __pyx_t_2) < 0) __PYX_ERR(0, 5002, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtoarr, __pyx_t_2) < 0) __PYX_ERR(0, 5107, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5025
+ /* "netCDF4/_netCDF4.pyx":5130
* 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, 5025, __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, 5130, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtochar, __pyx_t_2) < 0) __PYX_ERR(0, 5025, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtochar, __pyx_t_2) < 0) __PYX_ERR(0, 5130, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5044
+ /* "netCDF4/_netCDF4.pyx":5149
* 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, 5044, __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, 5149, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_chartostring, __pyx_t_2) < 0) __PYX_ERR(0, 5044, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_chartostring, __pyx_t_2) < 0) __PYX_ERR(0, 5149, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5065
+ /* "netCDF4/_netCDF4.pyx":5170
* 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, 5065, __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, 5170, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2num, __pyx_t_2) < 0) __PYX_ERR(0, 5065, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2num, __pyx_t_2) < 0) __PYX_ERR(0, 5170, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5153
+ /* "netCDF4/_netCDF4.pyx":5258
* 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, 5153, __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, 5258, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_num2date, __pyx_t_2) < 0) __PYX_ERR(0, 5153, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_num2date, __pyx_t_2) < 0) __PYX_ERR(0, 5258, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5256
+ /* "netCDF4/_netCDF4.pyx":5361
* 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, 5256, __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, 5361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2index, __pyx_t_2) < 0) __PYX_ERR(0, 5256, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2index, __pyx_t_2) < 0) __PYX_ERR(0, 5361, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "netCDF4/_netCDF4.pyx":5312
+ /* "netCDF4/_netCDF4.pyx":5417
* 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, 5312, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5417, __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, 5312, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5417, __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, 5312, __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, 5417, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- /* "netCDF4/_netCDF4.pyx":5342
+ /* "netCDF4/_netCDF4.pyx":5447
* """
*
* 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__150)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5342, __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__158)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5447, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 5342, __pyx_L1_error)
- __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5342, __pyx_L1_error)
+ if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 5447, __pyx_L1_error)
+ __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 5447, __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_9MFDataset_12__defaults__);
- if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 5342, __pyx_L1_error)
+ __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, 5447, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5515
+ /* "netCDF4/_netCDF4.pyx":5620
* 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__152)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5515, __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__160)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5620, __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, 5515, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_setattr, __pyx_t_7) < 0) __PYX_ERR(0, 5620, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5519
+ /* "netCDF4/_netCDF4.pyx":5624
* 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__154)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5519, __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__162)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5624, __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, 5519, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getattribute, __pyx_t_7) < 0) __PYX_ERR(0, 5624, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5532
+ /* "netCDF4/_netCDF4.pyx":5637
* 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__156)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5532, __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__164)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5637, __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, 5532, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ncattrs, __pyx_t_7) < 0) __PYX_ERR(0, 5637, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5540
+ /* "netCDF4/_netCDF4.pyx":5645
* return self._cdf[0].__dict__.keys()
*
+ * def set_auto_maskandscale(self, value): # <<<<<<<<<<<<<<
+ * """
+ * **`set_auto_maskandscale(self, True_or_False)`**
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_9set_auto_maskandscale, 0, __pyx_n_s_MFDataset_set_auto_maskandscale, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5645, __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, 5645, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5659
+ * var.set_auto_maskandscale(value)
+ *
+ * def set_auto_mask(self, value): # <<<<<<<<<<<<<<
+ * """
+ * **`set_auto_mask(self, True_or_False)`**
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_11set_auto_mask, 0, __pyx_n_s_MFDataset_set_auto_mask, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5659, __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, 5659, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5672
+ * var.set_auto_mask(value)
+ *
+ * def set_auto_scale(self, value): # <<<<<<<<<<<<<<
+ * """
+ * **`set_auto_scale(self, True_or_False)`**
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_13set_auto_scale, 0, __pyx_n_s_MFDataset_set_auto_scale, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5672, __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, 5672, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5685
+ * var.set_auto_scale(value)
+ *
* 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__158)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5540, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_15close, 0, __pyx_n_s_MFDataset_close, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5685, __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, 5540, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_close, __pyx_t_7) < 0) __PYX_ERR(0, 5685, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5549
+ /* "netCDF4/_netCDF4.pyx":5694
* 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__160)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5549, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_17__repr__, 0, __pyx_n_s_MFDataset___repr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5694, __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)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5712
+ * 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_19__reduce__, 0, __pyx_n_s_MFDataset___reduce, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5712, __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, 5549, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_reduce, __pyx_t_7) < 0) __PYX_ERR(0, 5712, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5312
+ /* "netCDF4/_netCDF4.pyx":5417
* 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, 5312, __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, 5417, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFDataset, __pyx_t_7) < 0) __PYX_ERR(0, 5312, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFDataset, __pyx_t_7) < 0) __PYX_ERR(0, 5417, __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":5567
- * return ''.join(ncdump)
+ /* "netCDF4/_netCDF4.pyx":5716
+ * 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, 5567, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5716, __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, 5567, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5716, __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, 5567, __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, 5716, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- /* "netCDF4/_netCDF4.pyx":5568
+ /* "netCDF4/_netCDF4.pyx":5717
*
* 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__162)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5568, __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__178)); 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_init, __pyx_t_7) < 0) __PYX_ERR(0, 5568, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 5717, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5572
+ /* "netCDF4/_netCDF4.pyx":5721
* 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__164)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5572, __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__180)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5721, __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, 5572, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_len, __pyx_t_7) < 0) __PYX_ERR(0, 5721, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5574
+ /* "netCDF4/_netCDF4.pyx":5723
* 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__166)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5574, __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__182)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5723, __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, 5574, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_isunlimited, __pyx_t_7) < 0) __PYX_ERR(0, 5723, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5576
+ /* "netCDF4/_netCDF4.pyx":5725
* 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__168)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5576, __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__184)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5725, __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, 5576, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 5725, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5567
- * return ''.join(ncdump)
+ /* "netCDF4/_netCDF4.pyx":5716
+ * 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, 5567, __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, 5716, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Dimension, __pyx_t_7) < 0) __PYX_ERR(0, 5567, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Dimension, __pyx_t_7) < 0) __PYX_ERR(0, 5716, __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":5582
+ /* "netCDF4/_netCDF4.pyx":5731
* 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, 5582, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5731, __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, 5582, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5731, __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, 5582, __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, 5731, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- /* "netCDF4/_netCDF4.pyx":5583
+ /* "netCDF4/_netCDF4.pyx":5732
*
* 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__170)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5583, __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__186)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5732, __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, 5583, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 5732, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5596
+ /* "netCDF4/_netCDF4.pyx":5745
* 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__172)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5596, __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__188)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5745, __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, 5596, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_typecode, __pyx_t_7) < 0) __PYX_ERR(0, 5745, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5598
+ /* "netCDF4/_netCDF4.pyx":5747
* 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__174)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5598, __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__190)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5747, __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, 5598, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ncattrs, __pyx_t_7) < 0) __PYX_ERR(0, 5747, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5600
+ /* "netCDF4/_netCDF4.pyx":5749
* 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__176)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5600, __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__192)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5749, __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, 5600, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getattr, __pyx_t_7) < 0) __PYX_ERR(0, 5749, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5607
+ /* "netCDF4/_netCDF4.pyx":5756
* 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__178)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5607, __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__194)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5756, __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, 5607, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 5756, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5623
+ /* "netCDF4/_netCDF4.pyx":5772
* 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__180)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5623, __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__196)); 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_len, __pyx_t_7) < 0) __PYX_ERR(0, 5623, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_len, __pyx_t_7) < 0) __PYX_ERR(0, 5772, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5628
+ /* "netCDF4/_netCDF4.pyx":5777
* 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__182)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5628, __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__198)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5777, __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, 5628, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_shape_2, __pyx_t_7) < 0) __PYX_ERR(0, 5777, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5631
+ /* "netCDF4/_netCDF4.pyx":5780
* 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__184)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5631, __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__200)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5780, __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, 5631, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_set_auto_maskandscale, __pyx_t_7) < 0) __PYX_ERR(0, 5780, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5634
+ /* "netCDF4/_netCDF4.pyx":5783
* 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__202)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5783, __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, 5783, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5786
+ * 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__204)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5786, __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, 5786, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netCDF4/_netCDF4.pyx":5789
+ * 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_17__getitem__, 0, __pyx_n_s_Variable___getitem, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5634, __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__206)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5789, __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, 5634, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getitem, __pyx_t_7) < 0) __PYX_ERR(0, 5789, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5582
+ /* "netCDF4/_netCDF4.pyx":5731
* 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, 5582, __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, 5731, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Variable, __pyx_t_7) < 0) __PYX_ERR(0, 5582, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Variable, __pyx_t_7) < 0) __PYX_ERR(0, 5731, __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":5738
+ /* "netCDF4/_netCDF4.pyx":5893
*
*
* 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, 5738, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5893, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5738, __pyx_L1_error)
+ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5893, __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, 5738, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5893, __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, 5738, __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, 5893, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- /* "netCDF4/_netCDF4.pyx":5773
+ /* "netCDF4/_netCDF4.pyx":5928
* """
*
* 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__188)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5773, __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__208)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5928, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__189);
- if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 5773, __pyx_L1_error)
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__209);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 5928, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5821
+ /* "netCDF4/_netCDF4.pyx":5976
*
*
* 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__191)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5821, __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__211)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5976, __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, 5821, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getitem, __pyx_t_7) < 0) __PYX_ERR(0, 5976, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "netCDF4/_netCDF4.pyx":5738
+ /* "netCDF4/_netCDF4.pyx":5893
*
*
* 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, 5738, __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, 5893, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFTime, __pyx_t_7) < 0) __PYX_ERR(0, 5738, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFTime, __pyx_t_7) < 0) __PYX_ERR(0, 5893, __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;
@@ -78294,7 +85749,7 @@ PyMODINIT_FUNC PyInit__netCDF4(void)
/* "netCDF4/_netCDF4.pyx":1
* """ # <<<<<<<<<<<<<<
- * Version 1.2.4
+ * Version 1.2.5
* -------------
*/
__pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1, __pyx_L1_error)
@@ -78365,7 +85820,7 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_FAST_THREAD_STATE
PyThreadState *tstate = PyThreadState_GET();
PyObject* exc_type = tstate->curexc_type;
if (unlikely(exc_type)) {
@@ -78398,6 +85853,126 @@ static CYTHON_INLINE int __Pyx_IterFinish(void) {
#endif
}
+/* PyFunctionFastCall */
+#if CYTHON_FAST_PYCALL
+#include "frameobject.h"
+static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
+ PyObject *globals) {
+ PyFrameObject *f;
+ PyThreadState *tstate = PyThreadState_GET();
+ PyObject **fastlocals;
+ Py_ssize_t i;
+ PyObject *result;
+ assert(globals != NULL);
+ /* XXX Perhaps we should create a specialized
+ PyFrame_New() that doesn't take locals, but does
+ take builtins without sanity checking them.
+ */
+ assert(tstate != NULL);
+ f = PyFrame_New(tstate, co, globals, NULL);
+ if (f == NULL) {
+ return NULL;
+ }
+ fastlocals = f->f_localsplus;
+ for (i = 0; i < na; i++) {
+ Py_INCREF(*args);
+ fastlocals[i] = *args++;
+ }
+ result = PyEval_EvalFrameEx(f,0);
+ ++tstate->recursion_depth;
+ Py_DECREF(f);
+ --tstate->recursion_depth;
+ return result;
+}
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
+ PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
+ PyObject *globals = PyFunction_GET_GLOBALS(func);
+ PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
+ PyObject *closure;
+#if PY_MAJOR_VERSION >= 3
+ PyObject *kwdefs;
+#endif
+ PyObject *kwtuple, **k;
+ PyObject **d;
+ Py_ssize_t nd;
+ Py_ssize_t nk;
+ PyObject *result;
+ assert(kwargs == NULL || PyDict_Check(kwargs));
+ nk = kwargs ? PyDict_Size(kwargs) : 0;
+ if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
+ return NULL;
+ }
+ if (
+#if PY_MAJOR_VERSION >= 3
+ co->co_kwonlyargcount == 0 &&
+#endif
+ likely(kwargs == NULL || nk == 0) &&
+ co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
+ if (argdefs == NULL && co->co_argcount == nargs) {
+ result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
+ goto done;
+ }
+ else if (nargs == 0 && argdefs != NULL
+ && co->co_argcount == Py_SIZE(argdefs)) {
+ /* function called with no arguments, but all parameters have
+ a default value: use default values as arguments .*/
+ args = &PyTuple_GET_ITEM(argdefs, 0);
+ result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
+ goto done;
+ }
+ }
+ if (kwargs != NULL) {
+ Py_ssize_t pos, i;
+ kwtuple = PyTuple_New(2 * nk);
+ if (kwtuple == NULL) {
+ result = NULL;
+ goto done;
+ }
+ k = &PyTuple_GET_ITEM(kwtuple, 0);
+ pos = i = 0;
+ while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
+ Py_INCREF(k[i]);
+ Py_INCREF(k[i+1]);
+ i += 2;
+ }
+ nk = i / 2;
+ }
+ else {
+ kwtuple = NULL;
+ k = NULL;
+ }
+ closure = PyFunction_GET_CLOSURE(func);
+#if PY_MAJOR_VERSION >= 3
+ kwdefs = PyFunction_GET_KW_DEFAULTS(func);
+#endif
+ if (argdefs != NULL) {
+ d = &PyTuple_GET_ITEM(argdefs, 0);
+ nd = Py_SIZE(argdefs);
+ }
+ else {
+ d = NULL;
+ nd = 0;
+ }
+#if PY_MAJOR_VERSION >= 3
+ result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
+ args, nargs,
+ k, (int)nk,
+ d, (int)nd, kwdefs, closure);
+#else
+ result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
+ args, nargs,
+ k, (int)nk,
+ d, (int)nd, closure);
+#endif
+ Py_XDECREF(kwtuple);
+done:
+ Py_LeaveRecursiveCall();
+ return result;
+}
+#endif // CPython < 3.6
+#endif // CYTHON_FAST_PYCALL
+
/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
@@ -78441,6 +86016,11 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject
/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
+#if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(func)) {
+ return __Pyx_PyFunction_FastCall(func, NULL, 0);
+ }
+#endif
#ifdef __Pyx_CyFunction_USED
if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
@@ -78454,6 +86034,26 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
}
#endif
+/* PyCFunctionFastCall */
+ #if CYTHON_FAST_PYCCALL
+static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
+ 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(nargs >= 0);
+ assert(nargs == 0 || args != NULL);
+ /* _PyCFunction_FastCallDict() must not be called with an exception set,
+ because it may clear it (directly or indirectly) and so the
+ caller loses its exception */
+ assert(!PyErr_Occurred());
+ return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
+}
+#endif // CYTHON_FAST_PYCCALL
+
/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
@@ -78467,6 +86067,11 @@ static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+#if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(func)) {
+ return __Pyx_PyFunction_FastCall(func, &arg, 1);
+ }
+#endif
#ifdef __Pyx_CyFunction_USED
if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
@@ -78474,6 +86079,10 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec
#endif
if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
return __Pyx_PyObject_CallMethO(func, arg);
+#if CYTHON_FAST_PYCCALL
+ } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
+ return __Pyx_PyCFunction_FastCall(func, &arg, 1);
+#endif
}
}
return __Pyx__PyObject_CallOneArg(func, arg);
@@ -78494,7 +86103,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec
PyObject *method, *result = NULL;
method = __Pyx_PyObject_GetAttrStr(obj, method_name);
if (unlikely(!method)) goto bad;
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_UNPACK_METHODS
if (likely(PyMethod_Check(method))) {
PyObject *self = PyMethod_GET_SELF(method);
if (likely(self)) {
@@ -78698,7 +86307,7 @@ static CYTHON_INLINE int __Pyx_dict_iter_next(
/* GetModuleGlobalName */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
PyObject *result;
-#if CYTHON_COMPILING_IN_CPYTHON
+#if !CYTHON_AVOID_BORROWED_REFS
result = PyDict_GetItem(__pyx_d, name);
if (likely(result)) {
Py_INCREF(result);
@@ -78747,7 +86356,7 @@ static CYTHON_INLINE int __Pyx_dict_iter_next(
}
/* PyErrFetchRestore */
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
PyObject *tmp_type, *tmp_value, *tmp_tb;
tmp_type = tstate->curexc_type;
@@ -79068,8 +86677,118 @@ return_ne:
#endif
}
+/* GetException */
+ #if CYTHON_FAST_THREAD_STATE
+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+#else
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
+#endif
+ PyObject *local_type, *local_value, *local_tb;
+#if CYTHON_FAST_THREAD_STATE
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ local_type = tstate->curexc_type;
+ local_value = tstate->curexc_value;
+ local_tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+#else
+ PyErr_Fetch(&local_type, &local_value, &local_tb);
+#endif
+ PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+#if CYTHON_FAST_THREAD_STATE
+ if (unlikely(tstate->curexc_type))
+#else
+ if (unlikely(PyErr_Occurred()))
+#endif
+ goto bad;
+ #if PY_MAJOR_VERSION >= 3
+ if (local_tb) {
+ if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+ goto bad;
+ }
+ #endif
+ Py_XINCREF(local_tb);
+ Py_XINCREF(local_type);
+ Py_XINCREF(local_value);
+ *type = local_type;
+ *value = local_value;
+ *tb = local_tb;
+#if CYTHON_FAST_THREAD_STATE
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = local_type;
+ tstate->exc_value = local_value;
+ tstate->exc_traceback = local_tb;
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+#else
+ PyErr_SetExcInfo(local_type, local_value, local_tb);
+#endif
+ return 0;
+bad:
+ *type = 0;
+ *value = 0;
+ *tb = 0;
+ Py_XDECREF(local_type);
+ Py_XDECREF(local_value);
+ Py_XDECREF(local_tb);
+ return -1;
+}
+
+/* SwapException */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = *type;
+ tstate->exc_value = *value;
+ tstate->exc_traceback = *tb;
+ *type = tmp_type;
+ *value = tmp_value;
+ *tb = tmp_tb;
+}
+#else
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
+ PyErr_SetExcInfo(*type, *value, *tb);
+ *type = tmp_type;
+ *value = tmp_value;
+ *tb = tmp_tb;
+}
+#endif
+
+/* SaveResetException */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ *type = tstate->exc_type;
+ *value = tstate->exc_value;
+ *tb = tstate->exc_traceback;
+ Py_XINCREF(*type);
+ Py_XINCREF(*value);
+ Py_XINCREF(*tb);
+}
+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = type;
+ tstate->exc_value = value;
+ tstate->exc_traceback = tb;
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+}
+#endif
+
/* GetItemInt */
- static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
PyObject *r;
if (!j) return NULL;
r = PyObject_GetItem(o, j);
@@ -79079,7 +86798,7 @@ return_ne:
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
CYTHON_NCP_UNUSED int wraparound,
CYTHON_NCP_UNUSED int boundscheck) {
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
PyObject *r = PyList_GET_ITEM(o, i);
@@ -79094,7 +86813,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
CYTHON_NCP_UNUSED int wraparound,
CYTHON_NCP_UNUSED int boundscheck) {
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
PyObject *r = PyTuple_GET_ITEM(o, i);
@@ -79109,7 +86828,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
CYTHON_NCP_UNUSED int wraparound,
CYTHON_NCP_UNUSED int boundscheck) {
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
if (is_list || PyList_CheckExact(o)) {
Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
@@ -79149,32 +86868,8 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}
-/* SaveResetException */
- #if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
- *type = tstate->exc_type;
- *value = tstate->exc_value;
- *tb = tstate->exc_traceback;
- Py_XINCREF(*type);
- Py_XINCREF(*value);
- Py_XINCREF(*tb);
-}
-static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
- PyObject *tmp_type, *tmp_value, *tmp_tb;
- tmp_type = tstate->exc_type;
- tmp_value = tstate->exc_value;
- tmp_tb = tstate->exc_traceback;
- tstate->exc_type = type;
- tstate->exc_value = value;
- tstate->exc_traceback = tb;
- Py_XDECREF(tmp_type);
- Py_XDECREF(tmp_value);
- Py_XDECREF(tmp_tb);
-}
-#endif
-
/* PyErrExceptionMatches */
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
PyObject *exc_type = tstate->curexc_type;
if (exc_type == err) return 1;
@@ -79183,67 +86878,6 @@ static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tsta
}
#endif
-/* GetException */
- #if CYTHON_COMPILING_IN_CPYTHON
-static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
-#else
-static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
-#endif
- PyObject *local_type, *local_value, *local_tb;
-#if CYTHON_COMPILING_IN_CPYTHON
- PyObject *tmp_type, *tmp_value, *tmp_tb;
- local_type = tstate->curexc_type;
- local_value = tstate->curexc_value;
- local_tb = tstate->curexc_traceback;
- tstate->curexc_type = 0;
- tstate->curexc_value = 0;
- tstate->curexc_traceback = 0;
-#else
- PyErr_Fetch(&local_type, &local_value, &local_tb);
-#endif
- PyErr_NormalizeException(&local_type, &local_value, &local_tb);
-#if CYTHON_COMPILING_IN_CPYTHON
- if (unlikely(tstate->curexc_type))
-#else
- if (unlikely(PyErr_Occurred()))
-#endif
- goto bad;
- #if PY_MAJOR_VERSION >= 3
- if (local_tb) {
- if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
- goto bad;
- }
- #endif
- Py_XINCREF(local_tb);
- Py_XINCREF(local_type);
- Py_XINCREF(local_value);
- *type = local_type;
- *value = local_value;
- *tb = local_tb;
-#if CYTHON_COMPILING_IN_CPYTHON
- tmp_type = tstate->exc_type;
- tmp_value = tstate->exc_value;
- tmp_tb = tstate->exc_traceback;
- tstate->exc_type = local_type;
- tstate->exc_value = local_value;
- tstate->exc_traceback = local_tb;
- Py_XDECREF(tmp_type);
- Py_XDECREF(tmp_value);
- Py_XDECREF(tmp_tb);
-#else
- PyErr_SetExcInfo(local_type, local_value, local_tb);
-#endif
- return 0;
-bad:
- *type = 0;
- *value = 0;
- *tb = 0;
- Py_XDECREF(local_type);
- Py_XDECREF(local_value);
- Py_XDECREF(local_tb);
- return -1;
-}
-
/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name,
@@ -79391,7 +87025,7 @@ bad:
Py_ssize_t cstart, Py_ssize_t cstop,
PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_USE_TYPE_SLOTS
PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
@@ -79467,7 +87101,7 @@ bad:
Py_XDECREF(owned_stop);
if (unlikely(!py_slice)) goto bad;
}
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_USE_TYPE_SLOTS
result = mp->mp_subscript(obj, py_slice);
#else
result = PyObject_GetItem(obj, py_slice);
@@ -79544,7 +87178,7 @@ invalid_keyword:
{
PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
target->func = descr->d_method->ml_meth;
- target->flag = descr->d_method->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_O | METH_NOARGS);
+ target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
}
#endif
return 0;
@@ -79554,7 +87188,7 @@ invalid_keyword:
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
PyObject *args, *result = NULL;
if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_ASSUME_SAFE_MACROS
args = PyTuple_New(1);
if (unlikely(!args)) goto bad;
Py_INCREF(self);
@@ -79611,7 +87245,7 @@ bad:
}
/* PyIntBinop */
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_CheckExact(op1))) {
@@ -79624,12 +87258,14 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
return PyLong_Type.tp_as_number->nb_add(op1, op2);
}
#endif
- #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
if (likely(PyLong_CheckExact(op1))) {
const long b = intval;
long a, x;
+#ifdef HAVE_LONG_LONG
const PY_LONG_LONG llb = intval;
PY_LONG_LONG lla, llx;
+#endif
const digit* digits = ((PyLongObject*)op1)->ob_digit;
const Py_ssize_t size = Py_SIZE(op1);
if (likely(__Pyx_sst_abs(size) <= 1)) {
@@ -79641,58 +87277,74 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
+#ifdef HAVE_LONG_LONG
} else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
goto long_long;
+#endif
}
case 2:
if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
+#ifdef HAVE_LONG_LONG
} else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
goto long_long;
+#endif
}
case -3:
if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
+#ifdef HAVE_LONG_LONG
} else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
goto long_long;
+#endif
}
case 3:
if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
+#ifdef HAVE_LONG_LONG
} else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
goto long_long;
+#endif
}
case -4:
if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
+#ifdef HAVE_LONG_LONG
} else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
goto long_long;
+#endif
}
case 4:
if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
+#ifdef HAVE_LONG_LONG
} else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
goto long_long;
+#endif
}
default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
}
}
x = a + b;
return PyLong_FromLong(x);
+#ifdef HAVE_LONG_LONG
long_long:
llx = lla + llb;
return PyLong_FromLongLong(llx);
+#endif
+
+
}
#endif
if (PyFloat_CheckExact(op1)) {
@@ -79709,7 +87361,7 @@ static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
#endif
/* PyIntBinop */
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
if (op1 == op2) {
Py_RETURN_TRUE;
@@ -79725,7 +87377,7 @@ static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
}
}
#endif
- #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
if (likely(PyLong_CheckExact(op1))) {
const long b = intval;
long a;
@@ -79803,7 +87455,7 @@ static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
if (is_list || PyList_CheckExact(o)) {
Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
@@ -79844,7 +87496,7 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje
/* pyobject_as_double */
static double __Pyx__PyObject_AsDouble(PyObject* obj) {
PyObject* float_value;
-#if CYTHON_COMPILING_IN_PYPY
+#if !CYTHON_USE_TYPE_SLOTS
float_value = PyNumber_Float(obj); if (0) goto bad;
#else
PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
@@ -79886,7 +87538,7 @@ bad:
Py_ssize_t cstart, Py_ssize_t cstop,
PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_USE_TYPE_SLOTS
PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
@@ -79962,7 +87614,7 @@ bad:
Py_XDECREF(owned_stop);
if (unlikely(!py_slice)) goto bad;
}
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_USE_TYPE_SLOTS
result = mp->mp_ass_subscript(obj, py_slice, value);
#else
result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
@@ -80007,7 +87659,7 @@ static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, in
}
/* PyIntBinop */
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_CheckExact(op1))) {
@@ -80020,12 +87672,14 @@ static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_U
return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
}
#endif
- #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
if (likely(PyLong_CheckExact(op1))) {
const long b = intval;
long a, x;
+#ifdef HAVE_LONG_LONG
const PY_LONG_LONG llb = intval;
PY_LONG_LONG lla, llx;
+#endif
const digit* digits = ((PyLongObject*)op1)->ob_digit;
const Py_ssize_t size = Py_SIZE(op1);
if (likely(__Pyx_sst_abs(size) <= 1)) {
@@ -80037,58 +87691,74 @@ static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_U
if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
+#ifdef HAVE_LONG_LONG
} else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
goto long_long;
+#endif
}
case 2:
if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
+#ifdef HAVE_LONG_LONG
} else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
goto long_long;
+#endif
}
case -3:
if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
+#ifdef HAVE_LONG_LONG
} else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
goto long_long;
+#endif
}
case 3:
if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
+#ifdef HAVE_LONG_LONG
} else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
goto long_long;
+#endif
}
case -4:
if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
+#ifdef HAVE_LONG_LONG
} else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
goto long_long;
+#endif
}
case 4:
if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
break;
+#ifdef HAVE_LONG_LONG
} else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
goto long_long;
+#endif
}
default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
}
}
x = a - b;
return PyLong_FromLong(x);
+#ifdef HAVE_LONG_LONG
long_long:
llx = lla - llb;
return PyLong_FromLongLong(llx);
+#endif
+
+
}
#endif
if (PyFloat_CheckExact(op1)) {
@@ -80108,15 +87778,29 @@ static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_U
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
PyObject *method, *result = NULL;
method = __Pyx_PyObject_GetAttrStr(obj, method_name);
- if (unlikely(!method)) goto bad;
-#if CYTHON_COMPILING_IN_CPYTHON
+ if (unlikely(!method)) goto done;
+#if CYTHON_UNPACK_METHODS
if (likely(PyMethod_Check(method))) {
PyObject *self = PyMethod_GET_SELF(method);
if (likely(self)) {
PyObject *args;
PyObject *function = PyMethod_GET_FUNCTION(method);
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(function)) {
+ PyObject *args[2] = {self, arg};
+ result = __Pyx_PyFunction_FastCall(function, args, 2);
+ goto done;
+ }
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(function)) {
+ PyObject *args[2] = {self, arg};
+ result = __Pyx_PyCFunction_FastCall(function, args, 2);
+ goto done;
+ }
+ #endif
args = PyTuple_New(2);
- if (unlikely(!args)) goto bad;
+ if (unlikely(!args)) goto done;
Py_INCREF(self);
PyTuple_SET_ITEM(args, 0, self);
Py_INCREF(arg);
@@ -80131,7 +87815,7 @@ static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_U
}
#endif
result = __Pyx_PyObject_CallOneArg(method, arg);
-bad:
+done:
Py_XDECREF(method);
return result;
}
@@ -80150,7 +87834,7 @@ bad:
}
/* PyFloatBinop */
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, CYTHON_UNUSED int inplace) {
const double b = floatval;
double a, result;
@@ -80163,7 +87847,7 @@ static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double f
} else
#endif
if (likely(PyLong_CheckExact(op1))) {
- #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3
+ #if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)op1)->ob_digit;
const Py_ssize_t size = Py_SIZE(op1);
switch (size) {
@@ -80549,7 +88233,7 @@ __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
PyObject *res = op->defaults_getter((PyObject *) op);
if (unlikely(!res))
return -1;
- #if CYTHON_COMPILING_IN_CPYTHON
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
Py_INCREF(op->defaults_tuple);
op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
@@ -80808,11 +88492,9 @@ __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
PyString_AsString(op->func_qualname), (void *)op);
#endif
}
-#if CYTHON_COMPILING_IN_PYPY
-static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
PyCFunctionObject* f = (PyCFunctionObject*)func;
PyCFunction meth = f->m_ml->ml_meth;
- PyObject *self = f->m_self;
Py_ssize_t size;
switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
case METH_VARARGS:
@@ -80858,11 +88540,32 @@ static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject
f->m_ml->ml_name);
return NULL;
}
-#else
-static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
- return PyCFunction_Call(func, arg, kw);
+static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+ return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
+}
+static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
+ PyObject *result;
+ __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
+ if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
+ Py_ssize_t argc;
+ PyObject *new_args;
+ PyObject *self;
+ argc = PyTuple_GET_SIZE(args);
+ new_args = PyTuple_GetSlice(args, 1, argc);
+ if (unlikely(!new_args))
+ return NULL;
+ self = PyTuple_GetItem(args, 0);
+ if (unlikely(!self)) {
+ Py_DECREF(new_args);
+ return NULL;
+ }
+ result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
+ Py_DECREF(new_args);
+ } else {
+ result = __Pyx_CyFunction_Call(func, args, kw);
+ }
+ return result;
}
-#endif
static PyTypeObject __pyx_CyFunctionType_type = {
PyVarObject_HEAD_INIT(0, 0)
"cython_function_or_method",
@@ -80882,7 +88585,7 @@ static PyTypeObject __pyx_CyFunctionType_type = {
0,
0,
0,
- __Pyx_CyFunction_Call,
+ __Pyx_CyFunction_CallAsMethod,
0,
0,
0,
@@ -80924,9 +88627,6 @@ static PyTypeObject __pyx_CyFunctionType_type = {
#endif
};
static int __pyx_CyFunction_init(void) {
-#if !CYTHON_COMPILING_IN_PYPY
- __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
-#endif
__pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
if (__pyx_CyFunctionType == NULL) {
return -1;
@@ -81179,7 +88879,7 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line,
0 /*PyObject *locals*/
);
if (!py_frame) goto bad;
- py_frame->f_lineno = py_line;
+ __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
PyTraceBack_Here(py_frame);
bad:
Py_XDECREF(py_code);
@@ -81195,14 +88895,18 @@ bad:
return PyInt_FromLong((long) value);
} else if (sizeof(long) <= sizeof(unsigned long)) {
return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
}
} else {
if (sizeof(long) <= sizeof(long)) {
return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
}
}
{
@@ -81222,14 +88926,18 @@ bad:
return PyInt_FromLong((long) value);
} else if (sizeof(int) <= sizeof(unsigned long)) {
return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
}
} else {
if (sizeof(int) <= sizeof(long)) {
return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
}
}
{
@@ -81249,14 +88957,18 @@ bad:
return PyInt_FromLong((long) value);
} else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) {
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
}
} else {
if (sizeof(unsigned long) <= sizeof(long)) {
return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) {
return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
}
}
{
@@ -81276,14 +88988,18 @@ bad:
return PyInt_FromLong((long) value);
} else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
}
} else {
if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) {
return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
}
}
{
@@ -81303,14 +89019,18 @@ bad:
return PyInt_FromLong((long) value);
} else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long)) {
return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
}
} else {
if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long)) {
return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) {
return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
}
}
{
@@ -81352,14 +89072,18 @@ bad:
return PyInt_FromLong((long) value);
} else if (sizeof(nc_type) <= sizeof(unsigned long)) {
return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(nc_type) <= sizeof(unsigned PY_LONG_LONG)) {
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
}
} else {
if (sizeof(nc_type) <= sizeof(long)) {
return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(nc_type) <= sizeof(PY_LONG_LONG)) {
return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
}
}
{
@@ -81379,14 +89103,18 @@ bad:
return PyInt_FromLong((long) value);
} else if (sizeof(npy_intp) <= sizeof(unsigned long)) {
return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(npy_intp) <= sizeof(unsigned PY_LONG_LONG)) {
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
}
} else {
if (sizeof(npy_intp) <= sizeof(long)) {
return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(npy_intp) <= sizeof(PY_LONG_LONG)) {
return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
}
}
{
@@ -81406,14 +89134,18 @@ bad:
return PyInt_FromLong((long) value);
} else if (sizeof(char) <= sizeof(unsigned long)) {
return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
}
} else {
if (sizeof(char) <= sizeof(long)) {
return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
} else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
}
}
{
@@ -81492,8 +89224,10 @@ bad:
#endif
if (sizeof(int) <= sizeof(unsigned long)) {
__PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
} else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
@@ -81560,8 +89294,10 @@ bad:
#endif
if (sizeof(int) <= sizeof(long)) {
__PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
} else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
}
}
{
@@ -81610,19 +89346,19 @@ raise_neg_overflow:
}
/* CIntFromPy */
- static CYTHON_INLINE nc_type __Pyx_PyInt_As_nc_type(PyObject *x) {
- const nc_type neg_one = (nc_type) -1, const_zero = (nc_type) 0;
+ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
+ const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x))) {
- if (sizeof(nc_type) < sizeof(long)) {
- __PYX_VERIFY_RETURN_INT(nc_type, long, PyInt_AS_LONG(x))
+ if (sizeof(size_t) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
} else {
long val = PyInt_AS_LONG(x);
if (is_unsigned && unlikely(val < 0)) {
goto raise_neg_overflow;
}
- return (nc_type) val;
+ return (size_t) val;
}
} else
#endif
@@ -81631,32 +89367,32 @@ raise_neg_overflow:
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
- case 0: return (nc_type) 0;
- case 1: __PYX_VERIFY_RETURN_INT(nc_type, digit, digits[0])
+ case 0: return (size_t) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
case 2:
- if (8 * sizeof(nc_type) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(nc_type, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(nc_type) >= 2 * PyLong_SHIFT) {
- return (nc_type) (((((nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0]));
+ __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
+ return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
}
break;
case 3:
- if (8 * sizeof(nc_type) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(nc_type, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(nc_type) >= 3 * PyLong_SHIFT) {
- return (nc_type) (((((((nc_type)digits[2]) << PyLong_SHIFT) | (nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0]));
+ __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
+ return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
}
break;
case 4:
- if (8 * sizeof(nc_type) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(nc_type, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(nc_type) >= 4 * PyLong_SHIFT) {
- return (nc_type) (((((((((nc_type)digits[3]) << PyLong_SHIFT) | (nc_type)digits[2]) << PyLong_SHIFT) | (nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0]));
+ __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
+ return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
}
}
break;
@@ -81670,83 +89406,87 @@ raise_neg_overflow:
{
int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
if (unlikely(result < 0))
- return (nc_type) -1;
+ return (size_t) -1;
if (unlikely(result == 1))
goto raise_neg_overflow;
}
#endif
- if (sizeof(nc_type) <= sizeof(unsigned long)) {
- __PYX_VERIFY_RETURN_INT_EXC(nc_type, unsigned long, PyLong_AsUnsignedLong(x))
- } else if (sizeof(nc_type) <= sizeof(unsigned PY_LONG_LONG)) {
- __PYX_VERIFY_RETURN_INT_EXC(nc_type, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+ if (sizeof(size_t) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
- case 0: return (nc_type) 0;
- case -1: __PYX_VERIFY_RETURN_INT(nc_type, sdigit, (sdigit) (-(sdigit)digits[0]))
- case 1: __PYX_VERIFY_RETURN_INT(nc_type, digit, +digits[0])
+ case 0: return (size_t) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0])
case -2:
- if (8 * sizeof(nc_type) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(nc_type, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(nc_type) - 1 > 2 * PyLong_SHIFT) {
- return (nc_type) (((nc_type)-1)*(((((nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0])));
+ __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
+ return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case 2:
- if (8 * sizeof(nc_type) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(nc_type, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(nc_type) - 1 > 2 * PyLong_SHIFT) {
- return (nc_type) ((((((nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0])));
+ __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
+ return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case -3:
- if (8 * sizeof(nc_type) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(nc_type, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(nc_type) - 1 > 3 * PyLong_SHIFT) {
- return (nc_type) (((nc_type)-1)*(((((((nc_type)digits[2]) << PyLong_SHIFT) | (nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0])));
+ __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
+ return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case 3:
- if (8 * sizeof(nc_type) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(nc_type, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(nc_type) - 1 > 3 * PyLong_SHIFT) {
- return (nc_type) ((((((((nc_type)digits[2]) << PyLong_SHIFT) | (nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0])));
+ __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
+ return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case -4:
- if (8 * sizeof(nc_type) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(nc_type, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(nc_type) - 1 > 4 * PyLong_SHIFT) {
- return (nc_type) (((nc_type)-1)*(((((((((nc_type)digits[3]) << PyLong_SHIFT) | (nc_type)digits[2]) << PyLong_SHIFT) | (nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0])));
+ __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
+ return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
case 4:
- if (8 * sizeof(nc_type) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(nc_type, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(nc_type) - 1 > 4 * PyLong_SHIFT) {
- return (nc_type) ((((((((((nc_type)digits[3]) << PyLong_SHIFT) | (nc_type)digits[2]) << PyLong_SHIFT) | (nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0])));
+ __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
+ return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
}
}
break;
}
#endif
- if (sizeof(nc_type) <= sizeof(long)) {
- __PYX_VERIFY_RETURN_INT_EXC(nc_type, long, PyLong_AsLong(x))
- } else if (sizeof(nc_type) <= sizeof(PY_LONG_LONG)) {
- __PYX_VERIFY_RETURN_INT_EXC(nc_type, PY_LONG_LONG, PyLong_AsLongLong(x))
+ if (sizeof(size_t) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
}
}
{
@@ -81754,7 +89494,7 @@ raise_neg_overflow:
PyErr_SetString(PyExc_RuntimeError,
"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
- nc_type val;
+ size_t val;
PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
if (likely(v) && !PyLong_Check(v)) {
@@ -81774,40 +89514,40 @@ raise_neg_overflow:
return val;
}
#endif
- return (nc_type) -1;
+ return (size_t) -1;
}
} else {
- nc_type val;
+ size_t val;
PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
- if (!tmp) return (nc_type) -1;
- val = __Pyx_PyInt_As_nc_type(tmp);
+ if (!tmp) return (size_t) -1;
+ val = __Pyx_PyInt_As_size_t(tmp);
Py_DECREF(tmp);
return val;
}
raise_overflow:
PyErr_SetString(PyExc_OverflowError,
- "value too large to convert to nc_type");
- return (nc_type) -1;
+ "value too large to convert to size_t");
+ return (size_t) -1;
raise_neg_overflow:
PyErr_SetString(PyExc_OverflowError,
- "can't convert negative value to nc_type");
- return (nc_type) -1;
+ "can't convert negative value to size_t");
+ return (size_t) -1;
}
/* CIntFromPy */
- static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
- const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
+ static CYTHON_INLINE nc_type __Pyx_PyInt_As_nc_type(PyObject *x) {
+ const nc_type neg_one = (nc_type) -1, const_zero = (nc_type) 0;
const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
if (likely(PyInt_Check(x))) {
- if (sizeof(size_t) < sizeof(long)) {
- __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
+ if (sizeof(nc_type) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(nc_type, long, PyInt_AS_LONG(x))
} else {
long val = PyInt_AS_LONG(x);
if (is_unsigned && unlikely(val < 0)) {
goto raise_neg_overflow;
}
- return (size_t) val;
+ return (nc_type) val;
}
} else
#endif
@@ -81816,32 +89556,32 @@ raise_neg_overflow:
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
- case 0: return (size_t) 0;
- case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
+ case 0: return (nc_type) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(nc_type, digit, digits[0])
case 2:
- if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(nc_type) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
- return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ __PYX_VERIFY_RETURN_INT(nc_type, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(nc_type) >= 2 * PyLong_SHIFT) {
+ return (nc_type) (((((nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0]));
}
}
break;
case 3:
- if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(nc_type) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
- return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ __PYX_VERIFY_RETURN_INT(nc_type, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(nc_type) >= 3 * PyLong_SHIFT) {
+ return (nc_type) (((((((nc_type)digits[2]) << PyLong_SHIFT) | (nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0]));
}
}
break;
case 4:
- if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(nc_type) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
- return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ __PYX_VERIFY_RETURN_INT(nc_type, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(nc_type) >= 4 * PyLong_SHIFT) {
+ return (nc_type) (((((((((nc_type)digits[3]) << PyLong_SHIFT) | (nc_type)digits[2]) << PyLong_SHIFT) | (nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0]));
}
}
break;
@@ -81855,83 +89595,87 @@ raise_neg_overflow:
{
int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
if (unlikely(result < 0))
- return (size_t) -1;
+ return (nc_type) -1;
if (unlikely(result == 1))
goto raise_neg_overflow;
}
#endif
- if (sizeof(size_t) <= sizeof(unsigned long)) {
- __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
- } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
- __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+ if (sizeof(nc_type) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(nc_type, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(nc_type) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(nc_type, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
const digit* digits = ((PyLongObject*)x)->ob_digit;
switch (Py_SIZE(x)) {
- case 0: return (size_t) 0;
- case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
- case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0])
+ case 0: return (nc_type) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(nc_type, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(nc_type, digit, +digits[0])
case -2:
- if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(nc_type) - 1 > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
- return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
+ __PYX_VERIFY_RETURN_INT(nc_type, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(nc_type) - 1 > 2 * PyLong_SHIFT) {
+ return (nc_type) (((nc_type)-1)*(((((nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0])));
}
}
break;
case 2:
- if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(nc_type) > 1 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
- return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
+ __PYX_VERIFY_RETURN_INT(nc_type, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(nc_type) - 1 > 2 * PyLong_SHIFT) {
+ return (nc_type) ((((((nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0])));
}
}
break;
case -3:
- if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(nc_type) - 1 > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
- return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
+ __PYX_VERIFY_RETURN_INT(nc_type, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(nc_type) - 1 > 3 * PyLong_SHIFT) {
+ return (nc_type) (((nc_type)-1)*(((((((nc_type)digits[2]) << PyLong_SHIFT) | (nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0])));
}
}
break;
case 3:
- if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(nc_type) > 2 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
- return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
+ __PYX_VERIFY_RETURN_INT(nc_type, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(nc_type) - 1 > 3 * PyLong_SHIFT) {
+ return (nc_type) ((((((((nc_type)digits[2]) << PyLong_SHIFT) | (nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0])));
}
}
break;
case -4:
- if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(nc_type) - 1 > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
- return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
+ __PYX_VERIFY_RETURN_INT(nc_type, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(nc_type) - 1 > 4 * PyLong_SHIFT) {
+ return (nc_type) (((nc_type)-1)*(((((((((nc_type)digits[3]) << PyLong_SHIFT) | (nc_type)digits[2]) << PyLong_SHIFT) | (nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0])));
}
}
break;
case 4:
- if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(nc_type) > 3 * PyLong_SHIFT) {
if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
- } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
- return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
+ __PYX_VERIFY_RETURN_INT(nc_type, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(nc_type) - 1 > 4 * PyLong_SHIFT) {
+ return (nc_type) ((((((((((nc_type)digits[3]) << PyLong_SHIFT) | (nc_type)digits[2]) << PyLong_SHIFT) | (nc_type)digits[1]) << PyLong_SHIFT) | (nc_type)digits[0])));
}
}
break;
}
#endif
- if (sizeof(size_t) <= sizeof(long)) {
- __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
- } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
- __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
+ if (sizeof(nc_type) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(nc_type, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(nc_type) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(nc_type, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
}
}
{
@@ -81939,7 +89683,7 @@ raise_neg_overflow:
PyErr_SetString(PyExc_RuntimeError,
"_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
- size_t val;
+ nc_type val;
PyObject *v = __Pyx_PyNumber_IntOrLong(x);
#if PY_MAJOR_VERSION < 3
if (likely(v) && !PyLong_Check(v)) {
@@ -81959,24 +89703,24 @@ raise_neg_overflow:
return val;
}
#endif
- return (size_t) -1;
+ return (nc_type) -1;
}
} else {
- size_t val;
+ nc_type val;
PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
- if (!tmp) return (size_t) -1;
- val = __Pyx_PyInt_As_size_t(tmp);
+ if (!tmp) return (nc_type) -1;
+ val = __Pyx_PyInt_As_nc_type(tmp);
Py_DECREF(tmp);
return val;
}
raise_overflow:
PyErr_SetString(PyExc_OverflowError,
- "value too large to convert to size_t");
- return (size_t) -1;
+ "value too large to convert to nc_type");
+ return (nc_type) -1;
raise_neg_overflow:
PyErr_SetString(PyExc_OverflowError,
- "can't convert negative value to size_t");
- return (size_t) -1;
+ "can't convert negative value to nc_type");
+ return (nc_type) -1;
}
/* CIntFromPy */
@@ -82047,8 +89791,10 @@ raise_neg_overflow:
#endif
if (sizeof(ptrdiff_t) <= sizeof(unsigned long)) {
__PYX_VERIFY_RETURN_INT_EXC(ptrdiff_t, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
} else if (sizeof(ptrdiff_t) <= sizeof(unsigned PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(ptrdiff_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
@@ -82115,8 +89861,10 @@ raise_neg_overflow:
#endif
if (sizeof(ptrdiff_t) <= sizeof(long)) {
__PYX_VERIFY_RETURN_INT_EXC(ptrdiff_t, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
} else if (sizeof(ptrdiff_t) <= sizeof(PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(ptrdiff_t, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
}
}
{
@@ -82232,8 +89980,10 @@ raise_neg_overflow:
#endif
if (sizeof(long) <= sizeof(unsigned long)) {
__PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
}
} else {
#if CYTHON_USE_PYLONG_INTERNALS
@@ -82300,8 +90050,10 @@ raise_neg_overflow:
#endif
if (sizeof(long) <= sizeof(long)) {
__PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
} else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
__PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
}
}
{
@@ -82349,31 +90101,6 @@ raise_neg_overflow:
return (long) -1;
}
-/* SwapException */
- #if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
- PyObject *tmp_type, *tmp_value, *tmp_tb;
- tmp_type = tstate->exc_type;
- tmp_value = tstate->exc_value;
- tmp_tb = tstate->exc_traceback;
- tstate->exc_type = *type;
- tstate->exc_value = *value;
- tstate->exc_traceback = *tb;
- *type = tmp_type;
- *value = tmp_value;
- *tb = tmp_tb;
-}
-#else
-static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
- PyObject *tmp_type, *tmp_value, *tmp_tb;
- PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
- PyErr_SetExcInfo(*type, *value, *tb);
- *type = tmp_type;
- *value = tmp_value;
- *tb = tmp_tb;
-}
-#endif
-
/* CoroutineBase */
#include <structmember.h>
#include <frameobject.h>
@@ -82396,41 +90123,38 @@ static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
return 0;
}
if (likely(et == PyExc_StopIteration)) {
+ if (!ev) {
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
#if PY_VERSION_HEX >= 0x030300A0
- if (ev && Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
+ else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
value = ((PyStopIterationObject *)ev)->value;
Py_INCREF(value);
Py_DECREF(ev);
- Py_XDECREF(tb);
- Py_DECREF(et);
- *pvalue = value;
- return 0;
}
#endif
- if (!ev || !PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
- if (!ev) {
- Py_INCREF(Py_None);
- ev = Py_None;
- } else if (PyTuple_Check(ev)) {
- if (PyTuple_GET_SIZE(ev) >= 1) {
- PyObject *value;
-#if CYTHON_COMPILING_IN_CPYTHON
- value = PySequence_ITEM(ev, 0);
+ else if (unlikely(PyTuple_Check(ev))) {
+ if (PyTuple_GET_SIZE(ev) >= 1) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ value = PyTuple_GET_ITEM(ev, 0);
+ Py_INCREF(value);
#else
- value = PyTuple_GET_ITEM(ev, 0);
- Py_INCREF(value);
+ value = PySequence_ITEM(ev, 0);
#endif
- Py_DECREF(ev);
- ev = value;
- } else {
- Py_INCREF(Py_None);
- Py_DECREF(ev);
- ev = Py_None;
- }
+ } else {
+ Py_INCREF(Py_None);
+ value = Py_None;
}
+ Py_DECREF(ev);
+ }
+ else if (!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
+ value = ev;
+ }
+ if (likely(value)) {
Py_XDECREF(tb);
Py_DECREF(et);
- *pvalue = ev;
+ *pvalue = value;
return 0;
}
} else if (!PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
@@ -82507,7 +90231,7 @@ PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value) {
}
__Pyx_PyThreadState_assign
if (value) {
-#if CYTHON_COMPILING_IN_PYPY
+#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
if (self->exc_traceback) {
PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
@@ -82528,7 +90252,7 @@ PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value) {
if (retval) {
__Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
&self->exc_traceback);
-#if CYTHON_COMPILING_IN_PYPY
+#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
if (self->exc_traceback) {
PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
@@ -82638,7 +90362,12 @@ static PyObject *__Pyx_Generator_Next(PyObject *self) {
if (yf) {
PyObject *ret;
gen->is_running = 1;
- ret = Py_TYPE(yf)->tp_iternext(yf);
+ #ifdef __Pyx_Generator_USED
+ if (__Pyx_Generator_CheckExact(yf)) {
+ ret = __Pyx_Generator_Next(yf);
+ } else
+ #endif
+ ret = Py_TYPE(yf)->tp_iternext(yf);
gen->is_running = 0;
if (likely(ret)) {
return ret;
@@ -82827,8 +90556,10 @@ static void __Pyx_Coroutine_del(PyObject *self) {
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
{
- Py_INCREF(self->gi_name);
- return self->gi_name;
+ PyObject *name = self->gi_name;
+ if (unlikely(!name)) name = Py_None;
+ Py_INCREF(name);
+ return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
@@ -82852,8 +90583,10 @@ __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
{
- Py_INCREF(self->gi_qualname);
- return self->gi_qualname;
+ PyObject *name = self->gi_qualname;
+ if (unlikely(!name)) name = Py_None;
+ Py_INCREF(name);
+ return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
@@ -82874,8 +90607,9 @@ __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
Py_XDECREF(tmp);
return 0;
}
-static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject* type, __pyx_coroutine_body_t body,
- PyObject *closure, PyObject *name, PyObject *qualname) {
+static __pyx_CoroutineObject *__Pyx__Coroutine_New(
+ PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *closure,
+ PyObject *name, PyObject *qualname, PyObject *module_name) {
__pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
if (gen == NULL)
return NULL;
@@ -82894,6 +90628,8 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject* type, __pyx_cor
gen->gi_qualname = qualname;
Py_XINCREF(name);
gen->gi_name = name;
+ Py_XINCREF(module_name);
+ gen->gi_modulename = module_name;
PyObject_GC_Track(gen);
return gen;
}
@@ -83282,7 +91018,9 @@ static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
else return PyObject_IsTrue(x);
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
+#if CYTHON_USE_TYPE_SLOTS
PyNumberMethods *m;
+#endif
const char *name = NULL;
PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
@@ -83291,8 +91029,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
if (PyLong_Check(x))
#endif
return __Pyx_NewRef(x);
+#if CYTHON_USE_TYPE_SLOTS
m = Py_TYPE(x)->tp_as_number;
-#if PY_MAJOR_VERSION < 3
+ #if PY_MAJOR_VERSION < 3
if (m && m->nb_int) {
name = "int";
res = PyNumber_Int(x);
@@ -83301,11 +91040,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
name = "long";
res = PyNumber_Long(x);
}
-#else
+ #else
if (m && m->nb_int) {
name = "int";
res = PyNumber_Long(x);
}
+ #endif
+#else
+ res = PyNumber_Int(x);
#endif
if (res) {
#if PY_MAJOR_VERSION < 3
diff --git a/netCDF4/_netCDF4.pyx b/netCDF4/_netCDF4.pyx
index ad6edd6..5176f3b 100644
--- a/netCDF4/_netCDF4.pyx
+++ b/netCDF4/_netCDF4.pyx
@@ -1,5 +1,5 @@
"""
-Version 1.2.4
+Version 1.2.5
-------------
- - -
@@ -161,7 +161,7 @@ version 4.0.1).
netCDF version 4 added support for organizing data in hierarchical
groups, which are analogous to directories in a filesystem. Groups serve
as containers for variables, dimensions and attributes, as well as other
-groups. A `netCDF4.Dataset` defines creates a special group, called
+groups. A `netCDF4.Dataset` creates a special group, called
the 'root group', which is similar to the root directory in a unix
filesystem. To create `netCDF4.Group` instances, use the
`netCDF4.Dataset.createGroup` method of a `netCDF4.Dataset` or `netCDF4.Group`
@@ -320,7 +320,7 @@ You can specify the datatype as a numpy dtype object, or anything that
can be converted to a numpy dtype object. Valid datatype specifiers
include: `'f4'` (32-bit floating point), `'f8'` (64-bit floating
point), `'i4'` (32-bit signed integer), `'i2'` (16-bit signed
-integer), `'i8'` (64-bit singed integer), `'i1'` (8-bit signed
+integer), `'i8'` (64-bit signed integer), `'i1'` (8-bit signed
integer), `'u1'` (8-bit unsigned integer), `'u2'` (16-bit unsigned
integer), `'u4'` (32-bit unsigned integer), `'u8'` (64-bit unsigned
integer), or `'S1'` (single-character string). The old Numeric
@@ -664,8 +664,8 @@ and see how much smaller the resulting files are.
## <div id='section10'>10) Beyond homogeneous arrays of a fixed type - compound data types.
-Compound data types map directly to numpy structured (a.k.a 'record'
-arrays). Structured arrays are akin to C structs, or derived types
+Compound data types map directly to numpy structured (a.k.a 'record')
+arrays. Structured arrays are akin to C structs, or derived types
in Fortran. They allow for the construction of table-like structures
composed of combinations of other data types, including other
compound types. Compound types might be useful for representing multiple
@@ -756,7 +756,7 @@ in python as object arrays (arrays of dtype `object`). These are arrays whose
elements are Python object pointers, and can contain any type of python object.
For this application, they must contain 1-D numpy arrays all of the same type
but of varying length.
-In this case, they contain 1-D numpy `int32` arrays of random length betwee
+In this case, they contain 1-D numpy `int32` arrays of random length between
1 and 10.
:::python
@@ -918,6 +918,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
+
# pure python utilities
from .utils import (_StartCountStride, _quantize, _find_dim, _walk_grps,
_out_array_shape, _sortbylist, _tostr)
@@ -935,7 +937,7 @@ except ImportError:
# python3: zip is already python2's itertools.izip
pass
-__version__ = "1.2.4"
+__version__ = "1.2.5"
# Initialize numpy
import posixpath
@@ -1100,7 +1102,6 @@ cdef _get_att(grp, int varid, name):
cdef int ierr, n, _grpid
cdef size_t att_len
cdef char *attname
- cdef char *stratt
cdef nc_type att_type
cdef ndarray value_arr
bytestr = _strencode(name)
@@ -1126,14 +1127,26 @@ cdef _get_att(grp, int varid, name):
value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
return pstring
elif att_type == NC_STRING:
- if att_len == 1:
+ values = <char**>PyMem_Malloc(sizeof(char*) * att_len)
+ if not values:
+ raise MemoryError()
+ try:
with nogil:
- ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
- pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
- ierr = nc_free_string(1, &stratt) # free memory in netcdf C lib
- return pstring
+ ierr = nc_get_att_string(_grpid, varid, attname, values)
+ if ierr != NC_NOERR:
+ raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ try:
+ result = [values[j].decode(default_encoding,unicode_error).replace('\x00','')
+ for j in range(att_len)]
+ finally:
+ ierr = nc_free_string(att_len, values) # free memory in netcdf C lib
+ finally:
+ PyMem_Free(values)
+
+ if len(result) == 1:
+ return result[0]
else:
- raise KeyError('vlen string array attributes not supported')
+ return result
else:
# a regular numeric or compound type.
if att_type == NC_LONG:
@@ -1208,14 +1221,30 @@ cdef _get_full_format(int grpid):
ELSE:
return 'UNDEFINED'
+cdef issue485_workaround(int grpid, int varid, char* attname):
+ # check to see if attribute already exists
+ # and is NC_CHAR, if so delete it and re-create it
+ # (workaround for issue #485). Fixed in C library
+ # with commit 473259b7728120bb281c52359b1af50cca2fcb72,
+ # which was included in 4.4.0-RC5.
+ cdef nc_type att_type
+ cdef size_t att_len
+
+ if not _needsworkaround_issue485:
+ return
+ 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)
+ if ierr != NC_NOERR:
+ raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+
cdef _set_att(grp, int varid, name, value,\
nc_type xtype=-99, force_ncstring=False):
# Private function to set an attribute name/value pair
- cdef int i, ierr, lenarr, n
- cdef size_t att_len
- cdef nc_type att_type
+ cdef int ierr, lenarr
cdef char *attname
cdef char *datstring
+ cdef char **string_ptrs
cdef ndarray value_arr
bytestr = _strencode(name)
attname = bytestr
@@ -1230,40 +1259,46 @@ cdef _set_att(grp, int varid, name, value,\
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,
- # write as a string. string arrays are concatenated into a single string.
+ # write as a string.
if value_arr.dtype.char in ['S','U']:
- if not value_arr.shape:
- dats = _strencode(value_arr.item())
- else:
- value_arr1 = value_arr.ravel()
- dats = _strencode(''.join(value_arr1.tolist()))
- lenarr = len(dats)
- datstring = dats
- if lenarr == 0:
- # write null byte
- lenarr=1; datstring = '\x00'
- if (force_ncstring or value_arr.dtype.char == 'U') and not is_netcdf3:
- # check to see if attribute already exists
- # and is NC_CHAR, if so delete it and re-create it
- # (workaround for issue #485). Fixed in C library
- # with commit 473259b7728120bb281c52359b1af50cca2fcb72,
- # which was included in 4.4.0-RC5.
- if _needsworkaround_issue485:
- ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
- if ierr == NC_NOERR and att_type == NC_CHAR:
- ierr = nc_del_att(grp._grpid, varid, attname)
- if ierr != NC_NOERR:
- raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- # try to convert to ascii string, write as NC_CHAR
- # else it's a unicode string, write as NC_STRING (if NETCDF4)
+ if not is_netcdf3 and force_ncstring and value_arr.size > 1:
+ N = value_arr.size
+ string_ptrs = <char**>PyMem_Malloc(N * sizeof(char*))
+ if not string_ptrs:
+ raise MemoryError()
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:
- ierr = nc_put_att_string(grp._grpid, varid, attname, 1, &datstring)
+ 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]
+ issue485_workaround(grp._grpid, varid, attname)
+ ierr = nc_put_att_string(grp._grpid, varid, attname, N, string_ptrs)
+ finally:
+ PyMem_Free(string_ptrs)
else:
- ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
+ if not value_arr.shape:
+ dats = _strencode(value_arr.item())
+ else:
+ value_arr1 = value_arr.ravel()
+ dats = _strencode(''.join(value_arr1.tolist()))
+ lenarr = len(dats)
+ datstring = dats
+ if lenarr == 0:
+ # 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)
+ 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:
+ 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)
if ierr != NC_NOERR:
raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
# a 'regular' array type ('f4','i4','f8' etc)
@@ -1679,7 +1714,7 @@ references to the parent Dataset or Group.
diskless=False, persist=False, keepweakref=False, **kwargs):
"""
**`__init__(self, filename, mode="r", clobber=True, diskless=False,
- persist=False, weakref=False, format='NETCDF4')`**
+ persist=False, keepweakref=False, format='NETCDF4')`**
`netCDF4.Dataset` constructor.
@@ -1693,7 +1728,7 @@ references to the parent Dataset or Group.
Appending `s` to modes `w`, `r+` or `a` will enable unbuffered shared
access to `NETCDF3_CLASSIC`, `NETCDF3_64BIT_OFFSET` or
`NETCDF3_64BIT_DATA` formatted files.
- Unbuffered acesss may be useful even if you don't need shared
+ Unbuffered access may be useful even if you don't need shared
access, since it may be faster for programs that don't access data
sequentially. This option is ignored for `NETCDF4` and `NETCDF4_CLASSIC`
formatted files.
@@ -1709,7 +1744,7 @@ references to the parent Dataset or Group.
is automatically detected). Default `'NETCDF4'`, which means the data is
stored in an HDF5 file, using netCDF 4 API features. Setting
`format='NETCDF4_CLASSIC'` will create an HDF5 file, using only netCDF 3
- compatibile API features. netCDF 3 clients must be recompiled and linked
+ compatible API features. netCDF 3 clients must be recompiled and linked
against the netCDF 4 library to read files in `NETCDF4_CLASSIC` format.
`'NETCDF3_CLASSIC'` is the classic netCDF 3 file format that does not
handle 2+ Gb files. `'NETCDF3_64BIT_OFFSET'` is the 64-bit offset
@@ -1734,11 +1769,12 @@ references to the parent Dataset or Group.
reference to child Dimension and Variable instances, creates circular references.
Circular references complicate garbage collection, which may mean increased
memory usage for programs that create may Dataset instances with lots of
- Variables. Setting `keepweakref=True` allows Dataset instances to be
- garbage collected as soon as they go out of scope, potential reducing memory
- usage. However, in most 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.
+ Variables. It also will result in the Dataset object never being deleted, which
+ means it may keep open files alive as well. Setting `keepweakref=True` allows
+ Dataset instances to be garbage collected as soon as they go out of scope, potentially
+ 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.
"""
cdef int grpid, ierr, numgrps, numdims, numvars
cdef char *path
@@ -1875,7 +1911,7 @@ open/create the Dataset. Requires netcdf >= 4.1.2"""
ierr = nc_inq_path(self._grpid, &pathlen, NULL)
if ierr != NC_NOERR:
raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- c_path = <char *>malloc(sizeof(char) * pathlen)
+ c_path = <char *>malloc(sizeof(char) * (pathlen + 1))
if not c_path:
raise MemoryError()
try:
@@ -1950,6 +1986,10 @@ is the Dataset open or closed?
if self._isopen:
ierr = nc_close(self._grpid)
+ def __reduce__(self):
+ # raise error is user tries to pickle a Dataset object.
+ raise NotImplementedError('Dataset is not picklable')
+
def sync(self):
"""
**`sync(self)`**
@@ -1978,7 +2018,7 @@ This causes data to be pre-filled with fill values. The fill values can be
controlled by the variable's `_Fill_Value` attribute, but is usually
sufficient to the use the netCDF default `_Fill_Value` (defined
separately for each variable type). The default behavior of the netCDF
-library correspongs to `set_fill_on`. Data which are equal to the
+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
@@ -2104,7 +2144,7 @@ and `GroupA/GroupB`, plus the variable `GroupA/GroupB/VarC`, if the preceding
groups don't already exist.
The `datatype` can be a numpy datatype object, or a string that describes
-a numpy dtype object (like the `dtype.str` attribue of a numpy array).
+a numpy dtype object (like the `dtype.str` attribute of a numpy array).
Supported specifiers include: `'S1' or 'c' (NC_CHAR), 'i1' or 'b' or 'B'
(NC_BYTE), 'u1' (NC_UBYTE), 'i2' or 'h' or 's' (NC_SHORT), 'u2'
(NC_USHORT), 'i4' or 'i' or 'l' (NC_INT), 'u4' (NC_UINT), 'i8' (NC_INT64),
@@ -2302,13 +2342,14 @@ with the same name as one of the reserved python attributes."""
set a netCDF dataset or group string attribute using name,value pair.
Use if you need to ensure that a netCDF attribute is created with type
-`NC_STRING` if the file format is `NETCDF4`."""
+`NC_STRING` if the file format is `NETCDF4`.
+Use if you need to set an attribute to an array of variable-length strings."""
cdef nc_type xtype
xtype=-99
if self.data_model != 'NETCDF4':
msg='file format does not support NC_STRING attributes'
raise IOError(msg)
- _set_att(self, NC_GLOBAL, name, str(value), xtype=xtype, force_ncstring=True)
+ _set_att(self, NC_GLOBAL, name, value, xtype=xtype, force_ncstring=True)
def setncatts(self,attdict):
"""
@@ -2327,7 +2368,7 @@ each attribute"""
"""
**`getncattr(self,name)`**
-retrievel a netCDF dataset or group attribute.
+retrieve a netCDF dataset or group attribute.
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)
@@ -2918,7 +2959,7 @@ behavior is similar to Fortran or Matlab, but different than numpy.
Supported values, corresponding to `str` attribute of numpy dtype
objects, include `'f4'` (32-bit floating point), `'f8'` (64-bit floating
point), `'i4'` (32-bit signed integer), `'i2'` (16-bit signed integer),
- `'i8'` (64-bit singed integer), `'i4'` (8-bit singed integer), `'i1'`
+ `'i8'` (64-bit signed integer), `'i4'` (8-bit signed integer), `'i1'`
(8-bit signed integer), `'u1'` (8-bit unsigned integer), `'u2'` (16-bit
unsigned integer), `'u4'` (32-bit unsigned integer), `'u8'` (64-bit
unsigned integer), or `'S1'` (single-character string). From
@@ -3211,9 +3252,12 @@ behavior is similar to Fortran or Matlab, but different than numpy.
if grp.data_model != 'NETCDF4': grp._enddef()
raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
else:
- # cast fill_value to type of variable.
+ # cast fill_value to type/endian-ness of variable.
if self._isprimitive or self._isenum:
fillval = numpy.array(fill_value, self.dtype)
+ if (is_native_little and self.endian() == 'big') or\
+ (is_native_big and self.endian() == 'little'):
+ fillval = fillval.byteswap(True)
_set_att(self._grp, self._varid, '_FillValue',\
fillval, xtype=xtype)
else:
@@ -3427,13 +3471,14 @@ attributes."""
set a netCDF variable string attribute using name,value pair.
Use if you need to ensure that a netCDF attribute is created with type
-`NC_STRING` if the file format is `NETCDF4`."""
+`NC_STRING` if the file format is `NETCDF4`.
+Use if you need to set an attribute to an array of variable-length strings."""
cdef nc_type xtype
xtype=-99
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, str(value), xtype=xtype, force_ncstring=True)
+ _set_att(self._grp, self._varid, name, value, xtype=xtype, force_ncstring=True)
def setncatts(self,attdict):
"""
@@ -3452,7 +3497,7 @@ each attribute"""
"""
**`getncattr(self,name)`**
-retrievel a netCDF variable attribute. Use if you need to set a
+retrieve a netCDF variable attribute. Use if you need to set a
netCDF attribute with the same name as one of the reserved python
attributes."""
return _get_att(self._grp, self._varid, name)
@@ -3614,7 +3659,7 @@ details."""
# msg="cannot set _FillValue attribute for "+\
# "VLEN or compound variable"
# raise AttributeError(msg)
- elif name == 'missing_value' and self._isprimitive:
+ elif name in ['valid_min','valid_max','valid_range','missing_value'] and self._isprimitive:
if (is_native_little and self.endian() == 'big') or\
(is_native_big and self.endian() == 'little'):
value = numpy.array(value, self.dtype).byteswap(True)
@@ -3753,27 +3798,64 @@ rename a `netCDF4.Variable` attribute named `oldname` to `newname`."""
# note: missing_value has to have same endian-ness as variable
# or this won't work.
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)
+ validmin = None; validmax = None
+ # if valid_range exists use that, otherwise
+ # look for valid_min, valid_max. No special
+ # 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)
+ 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)
+ # http://www.unidata.ucar.edu/software/netcdf/docs/attribute_conventions.html).
+ # "If the data type is byte and _FillValue
+ # is not explicitly defined,
+ # then the valid range should include all possible values.
+ # Otherwise, the valid range should exclude the _FillValue
+ # (whether defined explicitly or by default) as follows.
+ # 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)
+ 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):
+ validmin = fval
+ elif validmax is None and (fval is not None and fval > 0):
+ validmax = fval
+ if validmin is not None:
+ mvalmask += data < validmin
+ if validmax is not None:
+ mvalmask += data > validmax
if mval.shape == (): # mval a scalar.
- hasmval = data==mval
+ mval = [mval] # make into iterable.
+ for m in mval:
# is scalar missing value a NaN?
try:
- mvalisnan = numpy.isnan(mval)
+ mvalisnan = numpy.isnan(m)
except TypeError: # isnan fails on some dtypes (issue 206)
mvalisnan = False
- else: # mval a vector.
- hasmval = numpy.zeros(data.shape, numpy.bool)
- for m in mval:
- m = numpy.array(m)
- hasmval += data == m
- if mval.shape == () and mvalisnan:
- mask = numpy.isnan(data)
- elif hasmval.any():
- mask = hasmval
- else:
- mask = None
- if mask is not None:
- fill_value = mval
- totalmask += mask
+ if mvalisnan:
+ mvalmask += numpy.isnan(data)
+ else:
+ mvalmask += data==mval
+ if mvalmask.any():
+ # set fill_value for masked array
+ # to missing_value (or 1st element
+ # if missing_value is a vector).
+ fill_value = mval[0]
+ totalmask += mvalmask
+ # set mask=True for missing data
if hasattr(self, '_FillValue'):
fval = numpy.array(self._FillValue, self.dtype)
# is _FillValue a NaN?
@@ -3996,7 +4078,7 @@ rename a `netCDF4.Variable` attribute named `oldname` to `newname`."""
# if auto_mask mode is set to True (through a call to
# set_auto_mask or set_auto_maskandscale), perform
# automatic conversion to masked array using
- # missing_value/_Fill_Value.
+ # 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.
@@ -4098,7 +4180,9 @@ for each data type). When data is written to a variable, the masked
array is converted back to a regular numpy array by replacing all the
masked values by the missing_value attribute of the variable (if it
exists). If the variable has no missing_value attribute, the _FillValue
-is used instead.
+is used instead. If the variable has valid_min/valid_max and
+missing_value attributes, data outside the specified range will be
+set to missing_value.
If `maskandscale` is set to `True`, and the variable has a
`scale_factor` or an `add_offset` attribute, then data read
@@ -4176,7 +4260,9 @@ for each data type). When data is written to a variable, the masked
array is converted back to a regular numpy array by replacing all the
masked values by the missing_value attribute of the variable (if it
exists). If the variable has no missing_value attribute, the _FillValue
-is used instead.
+is used instead. If the variable has valid_min/valid_max and
+missing_value attributes, data outside the specified range will be
+set to missing_value.
The default value of `mask` is `True`
(automatic conversions are performed).
@@ -4412,6 +4498,9 @@ The default value of `mask` is `True`
# regular vlen
# allocate struct array to hold vlen data.
vldata = <nc_vlen_t *>malloc(totelem*sizeof(nc_vlen_t))
+ for i in range(totelem):
+ vldata[i].len = 0
+ vldata[i].p = <void*>0
# strides all 1 or scalar variable, use get_vara (faster)
if sum(stride) == ndims or ndims == 0:
with nogil:
@@ -4460,6 +4549,10 @@ The default value of `mask` is `True`
else:
return data
+ def __reduce__(self):
+ # raise error is user tries to pickle a Variable object.
+ raise NotImplementedError('Variable is not picklable')
+
# Compound datatype support.
cdef class CompoundType:
@@ -4523,6 +4616,10 @@ the user.
return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
(self.name,self.dtype)
+ 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):
# private function used to construct a netcdf compound data type
# from a numpy dtype object by CompoundType.__init__.
@@ -4766,6 +4863,10 @@ the user.
return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
(self.name, self.dtype)
+ 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):
# private function used to construct a netcdf VLEN data type
# from a numpy dtype object or python str object by VLType.__init__.
@@ -4881,6 +4982,10 @@ the user.
": name = '%s', numpy dtype = %s, fields/values =%s\n" %\
(self.name, self.dtype, self.enum_dict)
+ 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):
# private function used to construct a netCDF Enum data type
# from a numpy dtype object or python str object by EnumType.__init__.
@@ -5079,8 +5184,7 @@ The datetime objects should not include a time-zone offset.
**`units`**: a string of the form `<time units> since <reference time>`
describing the time units. `<time units>` can be days, hours, minutes,
seconds, milliseconds or microseconds. `<reference time>` is the time
-origin. Accuracy is somewhere between a millisecond and a microsecond,
-depending on the time interval and the calendar used.
+origin.
**`calendar`**: describes the calendar used in the time calculations.
All the values currently defined in the
@@ -5089,7 +5193,8 @@ Valid calendars `'standard', 'gregorian', 'proleptic_gregorian'
'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'`.
Default is `'standard'`, which is a mixed Julian/Gregorian calendar.
-returns a numeric time value, or an array of numeric time values.
+returns a numeric time value, or an array of numeric time values
+with approximately millisecond accuracy.
"""
calendar = calendar.lower()
basedate = _dateparse(units)
@@ -5165,8 +5270,7 @@ UTC with no time-zone offset, even if the specified
**`units`**: a string of the form `<time units> since <reference time>`
describing the time units. `<time units>` can be days, hours, minutes,
seconds, milliseconds or microseconds. `<reference time>` is the time
-origin. Accuracy is somewhere between a millisecond and a microsecond,
-depending on the time interval and the calendar used.
+origin.
**`calendar`**: describes the calendar used in the time calculations.
All the values currently defined in the
@@ -5175,7 +5279,8 @@ Valid calendars `'standard', 'gregorian', 'proleptic_gregorian'
'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'`.
Default is `'standard'`, which is a mixed Julian/Gregorian calendar.
-returns a datetime instance, or an array of datetime instances.
+returns a datetime instance, or an array of datetime instances with
+approximately millisecond accuracy.
***Note***: The datetime instances returned are 'real' python datetime
objects if `calendar='proleptic_gregorian'`, or
@@ -5412,7 +5517,7 @@ Example usage (See `netCDF4.MFDataset.__init__` for more details):
dims = v.dimensions
shape = v.shape
dtype = v.dtype
- # Be carefull: we may deal with a scalar (dimensionless) variable.
+ # 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)
@@ -5474,7 +5579,7 @@ Example usage (See `netCDF4.MFDataset.__init__` for more details):
"master %s (%s) and extension %s (%s)" %
(v, master, masterType, f, extType))
- # Everythig ok.
+ # Everything ok.
vInst = part.variables[v]
cdfRecVar[v].append(vInst)
else:
@@ -5537,6 +5642,46 @@ Example usage (See `netCDF4.MFDataset.__init__` for more details):
"""
return self._cdf[0].__dict__.keys()
+ def set_auto_maskandscale(self, value):
+ """
+ **`set_auto_maskandscale(self, True_or_False)`**
+
+ Call `Variable.set_auto_maskandscale` for all variables contained in this
+ `MFDataset`.
+
+ **`True_or_False`**: Boolean determining if automatic conversion to masked arrays
+ and variable scaling shall be applied for all variables.
+ """
+
+ for var in self.variables.values():
+ var.set_auto_maskandscale(value)
+
+ def set_auto_mask(self, value):
+ """
+ **`set_auto_mask(self, True_or_False)`**
+
+ Call `Variable.set_auto_mask` for all variables contained in this `MFDataset`.
+
+ **`True_or_False`**: Boolean determining if automatic conversion to masked arrays
+ shall be applied for all variables.
+ """
+
+ for var in self.variables.values():
+ var.set_auto_mask(value)
+
+ def set_auto_scale(self, value):
+ """
+ **`set_auto_scale(self, True_or_False)`**
+
+ Call `Variable.set_auto_scale` for all variables contained in this `MFDataset`.
+
+ **`True_or_False`**: Boolean determining if automatic variable scaling
+ shall be applied for all variables.
+ """
+
+ for var in self.variables.values():
+ var.set_auto_scale(value)
+
def close(self):
"""
**`close(self)`**
@@ -5564,6 +5709,10 @@ Example usage (See `netCDF4.MFDataset.__init__` for more details):
ncdump.append(' groups = %s\n' % str(grpnames))
return ''.join(ncdump)
+ def __reduce__(self):
+ # raise error is user tries to pickle a MFDataset object.
+ raise NotImplementedError('MFDataset is not picklable')
+
class _Dimension(object):
def __init__(self, dimname, dim, dimlens, dimtotlen):
self.dimlens = dimlens
@@ -5631,6 +5780,12 @@ class _Variable(object):
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:
+ 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):
"""Get records from a concatenated set of variables."""
diff --git a/netcdftime/__init__.py b/netcdftime/__init__.py
index 0886ec1..8693bb6 100644
--- a/netcdftime/__init__.py
+++ b/netcdftime/__init__.py
@@ -1,5 +1,8 @@
-from .netcdftime import utime, JulianDayFromDate, DateFromJulianDay
-from .netcdftime import datetime, _parse_date, date2index, time2index
-from .netcdftime import microsec_units, millisec_units, \
- sec_units, hr_units, day_units, min_units
-from .netcdftime import __version__
+from ._netcdftime import utime, JulianDayFromDate, DateFromJulianDay
+from ._netcdftime import _parse_date, date2index, time2index
+from ._netcdftime import DatetimeProlepticGregorian as datetime
+from ._netcdftime import DatetimeNoLeap, DatetimeAllLeap, Datetime360Day, DatetimeJulian, \
+ DatetimeGregorian, DatetimeProlepticGregorian
+from ._netcdftime import microsec_units, millisec_units, \
+ sec_units, hr_units, day_units, min_units
+from ._netcdftime import __version__
diff --git a/netcdftime/_datetime.c b/netcdftime/_datetime.c
deleted file mode 100644
index f0da31f..0000000
--- a/netcdftime/_datetime.c
+++ /dev/null
@@ -1,6201 +0,0 @@
-/* Generated by Cython 0.23.2 */
-
-#define PY_SSIZE_T_CLEAN
-#include "Python.h"
-#ifndef Py_PYTHON_H
- #error Python headers needed to compile C extensions, please install development version of Python.
-#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_23_2"
-#include <stddef.h>
-#ifndef offsetof
-#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
-#endif
-#if !defined(WIN32) && !defined(MS_WINDOWS)
- #ifndef __stdcall
- #define __stdcall
- #endif
- #ifndef __cdecl
- #define __cdecl
- #endif
- #ifndef __fastcall
- #define __fastcall
- #endif
-#endif
-#ifndef DL_IMPORT
- #define DL_IMPORT(t) t
-#endif
-#ifndef DL_EXPORT
- #define DL_EXPORT(t) t
-#endif
-#ifndef PY_LONG_LONG
- #define PY_LONG_LONG LONG_LONG
-#endif
-#ifndef Py_HUGE_VAL
- #define Py_HUGE_VAL HUGE_VAL
-#endif
-#ifdef PYPY_VERSION
-#define CYTHON_COMPILING_IN_PYPY 1
-#define CYTHON_COMPILING_IN_CPYTHON 0
-#else
-#define CYTHON_COMPILING_IN_PYPY 0
-#define CYTHON_COMPILING_IN_CPYTHON 1
-#endif
-#if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
-#define CYTHON_USE_PYLONG_INTERNALS 1
-#endif
-#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
-#define Py_OptimizeFlag 0
-#endif
-#define __PYX_BUILD_PY_SSIZE_T "n"
-#define CYTHON_FORMAT_SSIZE_T "z"
-#if PY_MAJOR_VERSION < 3
- #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
- PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
- #define __Pyx_DefaultClassType PyClass_Type
-#else
- #define __Pyx_BUILTIN_MODULE_NAME "builtins"
- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
- PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
- #define __Pyx_DefaultClassType PyType_Type
-#endif
-#ifndef Py_TPFLAGS_CHECKTYPES
- #define Py_TPFLAGS_CHECKTYPES 0
-#endif
-#ifndef Py_TPFLAGS_HAVE_INDEX
- #define Py_TPFLAGS_HAVE_INDEX 0
-#endif
-#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
- #define Py_TPFLAGS_HAVE_NEWBUFFER 0
-#endif
-#ifndef Py_TPFLAGS_HAVE_FINALIZE
- #define Py_TPFLAGS_HAVE_FINALIZE 0
-#endif
-#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
- #define CYTHON_PEP393_ENABLED 1
- #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
- 0 : _PyUnicode_Ready((PyObject *)(op)))
- #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
- #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
- #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
- #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
- #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
-#else
- #define CYTHON_PEP393_ENABLED 0
- #define __Pyx_PyUnicode_READY(op) (0)
- #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
- #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
- #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
- #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
- #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
-#endif
-#if CYTHON_COMPILING_IN_PYPY
- #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
- #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
-#else
- #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
- #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
- PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
-#endif
-#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
- #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
-#endif
-#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
-#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
-#if PY_MAJOR_VERSION >= 3
- #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
-#else
- #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
-#endif
-#if PY_MAJOR_VERSION >= 3
- #define PyBaseString_Type PyUnicode_Type
- #define PyStringObject PyUnicodeObject
- #define PyString_Type PyUnicode_Type
- #define PyString_Check PyUnicode_Check
- #define PyString_CheckExact PyUnicode_CheckExact
-#endif
-#if PY_MAJOR_VERSION >= 3
- #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
- #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
-#else
- #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
- #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
-#endif
-#ifndef PySet_CheckExact
- #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
-#endif
-#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
-#if PY_MAJOR_VERSION >= 3
- #define PyIntObject PyLongObject
- #define PyInt_Type PyLong_Type
- #define PyInt_Check(op) PyLong_Check(op)
- #define PyInt_CheckExact(op) PyLong_CheckExact(op)
- #define PyInt_FromString PyLong_FromString
- #define PyInt_FromUnicode PyLong_FromUnicode
- #define PyInt_FromLong PyLong_FromLong
- #define PyInt_FromSize_t PyLong_FromSize_t
- #define PyInt_FromSsize_t PyLong_FromSsize_t
- #define PyInt_AsLong PyLong_AsLong
- #define PyInt_AS_LONG PyLong_AS_LONG
- #define PyInt_AsSsize_t PyLong_AsSsize_t
- #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
- #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
- #define PyNumber_Int PyNumber_Long
-#endif
-#if PY_MAJOR_VERSION >= 3
- #define PyBoolObject PyLongObject
-#endif
-#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
- #ifndef PyUnicode_InternFromString
- #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
- #endif
-#endif
-#if PY_VERSION_HEX < 0x030200A4
- typedef long Py_hash_t;
- #define __Pyx_PyInt_FromHash_t PyInt_FromLong
- #define __Pyx_PyInt_AsHash_t PyInt_AsLong
-#else
- #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
-#endif
-#if PY_MAJOR_VERSION >= 3
- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
-#else
- #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
-#endif
-#if PY_VERSION_HEX >= 0x030500B1
-#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
-#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
-#elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
-typedef struct {
- unaryfunc am_await;
- unaryfunc am_aiter;
- unaryfunc am_anext;
-} __Pyx_PyAsyncMethodsStruct;
-#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
-#else
-#define __Pyx_PyType_AsAsync(obj) NULL
-#endif
-#ifndef CYTHON_RESTRICT
- #if defined(__GNUC__)
- #define CYTHON_RESTRICT __restrict__
- #elif defined(_MSC_VER) && _MSC_VER >= 1400
- #define CYTHON_RESTRICT __restrict
- #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define CYTHON_RESTRICT restrict
- #else
- #define CYTHON_RESTRICT
- #endif
-#endif
-#define __Pyx_void_to_None(void_result) (void_result, Py_INCREF(Py_None), Py_None)
-
-#ifndef CYTHON_INLINE
- #if defined(__GNUC__)
- #define CYTHON_INLINE __inline__
- #elif defined(_MSC_VER)
- #define CYTHON_INLINE __inline
- #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define CYTHON_INLINE inline
- #else
- #define CYTHON_INLINE
- #endif
-#endif
-
-#if defined(WIN32) || defined(MS_WINDOWS)
- #define _USE_MATH_DEFINES
-#endif
-#include <math.h>
-#ifdef NAN
-#define __PYX_NAN() ((float) NAN)
-#else
-static CYTHON_INLINE float __PYX_NAN() {
- float value;
- memset(&value, 0xFF, sizeof(value));
- return value;
-}
-#endif
-
-
-#if PY_MAJOR_VERSION >= 3
- #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
- #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
-#else
- #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
- #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
-#endif
-
-#ifndef __PYX_EXTERN_C
- #ifdef __cplusplus
- #define __PYX_EXTERN_C extern "C"
- #else
- #define __PYX_EXTERN_C extern
- #endif
-#endif
-
-#define __PYX_HAVE__netcdftime___datetime
-#define __PYX_HAVE_API__netcdftime___datetime
-#include "string.h"
-#include "stdio.h"
-#ifdef _OPENMP
-#include <omp.h>
-#endif /* _OPENMP */
-
-#ifdef PYREX_WITHOUT_ASSERTIONS
-#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; char *s; const Py_ssize_t n; const char* encoding;
- const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
-
-#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
-#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
-#define __PYX_DEFAULT_STRING_ENCODING ""
-#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
-#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
-#define __Pyx_uchar_cast(c) ((unsigned char)c)
-#define __Pyx_long_cast(x) ((long)x)
-#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
- (sizeof(type) < sizeof(Py_ssize_t)) ||\
- (sizeof(type) > sizeof(Py_ssize_t) &&\
- likely(v < (type)PY_SSIZE_T_MAX ||\
- v == (type)PY_SSIZE_T_MAX) &&\
- (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
- v == (type)PY_SSIZE_T_MIN))) ||\
- (sizeof(type) == sizeof(Py_ssize_t) &&\
- (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
- v == (type)PY_SSIZE_T_MAX))) )
-#if defined (__cplusplus) && __cplusplus >= 201103L
- #include <cstdlib>
- #define __Pyx_sst_abs(value) std::abs(value)
-#elif SIZEOF_INT >= SIZEOF_SIZE_T
- #define __Pyx_sst_abs(value) abs(value)
-#elif SIZEOF_LONG >= SIZEOF_SIZE_T
- #define __Pyx_sst_abs(value) labs(value)
-#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define __Pyx_sst_abs(value) llabs(value)
-#elif defined (_MSC_VER) && defined (_M_X64)
- #define __Pyx_sst_abs(value) _abs64(value)
-#elif defined (__GNUC__)
- #define __Pyx_sst_abs(value) __builtin_llabs(value)
-#else
- #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
-#endif
-static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
-static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
-#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
-#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
-#define __Pyx_PyBytes_FromString PyBytes_FromString
-#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
-static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
-#if PY_MAJOR_VERSION < 3
- #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
- #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
-#else
- #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
- #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
-#endif
-#define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
-#define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
-#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
-#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
-#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
-#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
-#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
-#if PY_MAJOR_VERSION < 3
-static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
-{
- const Py_UNICODE *u_end = u;
- while (*u_end++) ;
- return (size_t)(u_end - u - 1);
-}
-#else
-#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
-#endif
-#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
-#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
-#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
-#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
-#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
-#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
-static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
-static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
-static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
-static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
-#if CYTHON_COMPILING_IN_CPYTHON
-#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
-#else
-#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
-#endif
-#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
-#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
-static int __Pyx_sys_getdefaultencoding_not_ascii;
-static int __Pyx_init_sys_getdefaultencoding_params(void) {
- PyObject* sys;
- PyObject* default_encoding = NULL;
- PyObject* ascii_chars_u = NULL;
- PyObject* ascii_chars_b = NULL;
- const char* default_encoding_c;
- sys = PyImport_ImportModule("sys");
- if (!sys) goto bad;
- default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
- Py_DECREF(sys);
- if (!default_encoding) goto bad;
- default_encoding_c = PyBytes_AsString(default_encoding);
- if (!default_encoding_c) goto bad;
- if (strcmp(default_encoding_c, "ascii") == 0) {
- __Pyx_sys_getdefaultencoding_not_ascii = 0;
- } else {
- char ascii_chars[128];
- int c;
- for (c = 0; c < 128; c++) {
- ascii_chars[c] = c;
- }
- __Pyx_sys_getdefaultencoding_not_ascii = 1;
- ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
- if (!ascii_chars_u) goto bad;
- ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
- if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
- PyErr_Format(
- PyExc_ValueError,
- "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
- default_encoding_c);
- goto bad;
- }
- Py_DECREF(ascii_chars_u);
- Py_DECREF(ascii_chars_b);
- }
- Py_DECREF(default_encoding);
- return 0;
-bad:
- Py_XDECREF(default_encoding);
- Py_XDECREF(ascii_chars_u);
- Py_XDECREF(ascii_chars_b);
- return -1;
-}
-#endif
-#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
-#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
-#else
-#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
-#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
-static char* __PYX_DEFAULT_STRING_ENCODING;
-static int __Pyx_init_sys_getdefaultencoding_params(void) {
- PyObject* sys;
- PyObject* default_encoding = NULL;
- char* default_encoding_c;
- sys = PyImport_ImportModule("sys");
- if (!sys) goto bad;
- default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
- Py_DECREF(sys);
- if (!default_encoding) goto bad;
- default_encoding_c = PyBytes_AsString(default_encoding);
- if (!default_encoding_c) goto bad;
- __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
- if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
- strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
- Py_DECREF(default_encoding);
- return 0;
-bad:
- Py_XDECREF(default_encoding);
- return -1;
-}
-#endif
-#endif
-
-
-/* Test for GCC > 2.95 */
-#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
-#else /* !__GNUC__ or GCC < 2.95 */
- #define likely(x) (x)
- #define unlikely(x) (x)
-#endif /* __GNUC__ */
-
-static PyObject *__pyx_m;
-static PyObject *__pyx_d;
-static PyObject *__pyx_b;
-static PyObject *__pyx_empty_tuple;
-static PyObject *__pyx_empty_bytes;
-static int __pyx_lineno;
-static int __pyx_clineno = 0;
-static const char * __pyx_cfilenm= __FILE__;
-static const char *__pyx_filename;
-
-
-static const char *__pyx_f[] = {
- "netcdftime/_datetime.pyx",
- "type.pxd",
-};
-
-/*--- Type declarations ---*/
-struct __pyx_obj_10netcdftime_9_datetime_datetime;
-
-/* "netcdftime/_datetime.pyx":9
- *
- *
- * cdef class datetime(object): # <<<<<<<<<<<<<<
- *
- * """
- */
-struct __pyx_obj_10netcdftime_9_datetime_datetime {
- PyObject_HEAD
- int year;
- int month;
- int day;
- int hour;
- int minute;
- int dayofwk;
- int dayofyr;
- int second;
- int microsecond;
-};
-
-
-/* --- Runtime support code (head) --- */
-#ifndef CYTHON_REFNANNY
- #define CYTHON_REFNANNY 0
-#endif
-#if CYTHON_REFNANNY
- typedef struct {
- void (*INCREF)(void*, PyObject*, int);
- void (*DECREF)(void*, PyObject*, int);
- void (*GOTREF)(void*, PyObject*, int);
- void (*GIVEREF)(void*, PyObject*, int);
- void* (*SetupContext)(const char*, int, const char*);
- void (*FinishContext)(void**);
- } __Pyx_RefNannyAPIStruct;
- static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
- static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
- #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
-#ifdef WITH_THREAD
- #define __Pyx_RefNannySetupContext(name, acquire_gil)\
- if (acquire_gil) {\
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
- __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
- PyGILState_Release(__pyx_gilstate_save);\
- } else {\
- __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
- }
-#else
- #define __Pyx_RefNannySetupContext(name, acquire_gil)\
- __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
-#endif
- #define __Pyx_RefNannyFinishContext()\
- __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
- #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
- #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
- #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
- #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
- #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
- #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
- #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
- #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
-#else
- #define __Pyx_RefNannyDeclarations
- #define __Pyx_RefNannySetupContext(name, acquire_gil)
- #define __Pyx_RefNannyFinishContext()
- #define __Pyx_INCREF(r) Py_INCREF(r)
- #define __Pyx_DECREF(r) Py_DECREF(r)
- #define __Pyx_GOTREF(r)
- #define __Pyx_GIVEREF(r)
- #define __Pyx_XINCREF(r) Py_XINCREF(r)
- #define __Pyx_XDECREF(r) Py_XDECREF(r)
- #define __Pyx_XGOTREF(r)
- #define __Pyx_XGIVEREF(r)
-#endif
-#define __Pyx_XDECREF_SET(r, v) do {\
- PyObject *tmp = (PyObject *) r;\
- r = v; __Pyx_XDECREF(tmp);\
- } while (0)
-#define __Pyx_DECREF_SET(r, v) do {\
- PyObject *tmp = (PyObject *) r;\
- r = v; __Pyx_DECREF(tmp);\
- } while (0)
-#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
-#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
- PyTypeObject* tp = Py_TYPE(obj);
- if (likely(tp->tp_getattro))
- return tp->tp_getattro(obj, attr_name);
-#if PY_MAJOR_VERSION < 3
- if (likely(tp->tp_getattr))
- return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
-#endif
- return PyObject_GetAttr(obj, attr_name);
-}
-#else
-#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
-#endif
-
-static PyObject *__Pyx_GetBuiltinName(PyObject *name);
-
-static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
- Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
-
-static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
-
-static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
- PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
- const char* function_name);
-
-static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
-#else
-#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
-#endif
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
-#endif
-
-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
-#else
-#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
-#endif
-
-static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
-static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
-
-static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
-#else
-#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
- PyObject_RichCompare(op1, op2, Py_EQ)
- #endif
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
- PyListObject* L = (PyListObject*) list;
- Py_ssize_t len = Py_SIZE(list);
- if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
- Py_INCREF(x);
- PyList_SET_ITEM(list, len, x);
- Py_SIZE(list) = len+1;
- return 0;
- }
- return PyList_Append(list, x);
-}
-#else
-#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
-#endif
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
-#else
-#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
- (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
-#endif
-
-static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
-static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);
-
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, long intval, int inplace);
-#else
-#define __Pyx_PyInt_SubtractCObj(op1, op2, intval, inplace)\
- (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
-#endif
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
-#else
-#define __Pyx_PyInt_FloorDivideObjC(op1, op2, intval, inplace)\
- (inplace ? PyNumber_InPlaceFloorDivide(op1, op2) : PyNumber_FloorDivide(op1, op2))
-#endif
-
-static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
- PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
- PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
- int has_cstart, int has_cstop, int wraparound);
-
-static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
- int result = PySequence_Contains(seq, item);
- return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
-}
-
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
-
-static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
-
-typedef struct {
- int code_line;
- PyCodeObject* code_object;
-} __Pyx_CodeObjectCacheEntry;
-struct __Pyx_CodeObjectCache {
- int count;
- int max_count;
- __Pyx_CodeObjectCacheEntry* entries;
-};
-static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
-static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
-static PyCodeObject *__pyx_find_code_object(int code_line);
-static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
-
-static void __Pyx_AddTraceback(const char *funcname, int c_line,
- int py_line, const char *filename);
-
-static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
-
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
-
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
-
-static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
-
-static int __Pyx_check_binary_version(void);
-
-#if !defined(__Pyx_PyIdentifier_FromString)
-#if PY_MAJOR_VERSION < 3
- #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
-#else
- #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
-#endif
-#endif
-
-static PyObject *__Pyx_ImportModule(const char *name);
-
-static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);
-
-static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
-
-
-/* Module declarations from 'libc.string' */
-
-/* Module declarations from 'libc.stdio' */
-
-/* Module declarations from '__builtin__' */
-
-/* Module declarations from 'cpython.type' */
-static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
-
-/* Module declarations from 'cpython' */
-
-/* Module declarations from 'cpython.object' */
-
-/* Module declarations from 'netcdftime._datetime' */
-static PyTypeObject *__pyx_ptype_10netcdftime_9_datetime_datetime = 0;
-#define __Pyx_MODULE_NAME "netcdftime._datetime"
-int __pyx_module_is_main_netcdftime___datetime = 0;
-
-/* Implementation of 'netcdftime._datetime' */
-static PyObject *__pyx_builtin_ValueError;
-static PyObject *__pyx_builtin_NotImplemented;
-static PyObject *__pyx_builtin_TypeError;
-static char __pyx_k_i[] = "i";
-static char __pyx_k_j[] = "j";
-static char __pyx_k_s[] = "((^|[^%])(%%)*%s)";
-static char __pyx_k_4d[] = "%4d";
-static char __pyx_k_dt[] = "dt";
-static char __pyx_k_re[] = "re";
-static char __pyx_k_s1[] = "s1";
-static char __pyx_k_s2[] = "s2";
-static char __pyx_k_day[] = "day";
-static char __pyx_k_fmt[] = "fmt";
-static char __pyx_k_off[] = "off";
-static char __pyx_k_s_2[] = "s";
-static char __pyx_k_find[] = "find";
-static char __pyx_k_hour[] = "hour";
-static char __pyx_k_main[] = "__main__";
-static char __pyx_k_site[] = "site";
-static char __pyx_k_test[] = "__test__";
-static char __pyx_k_text[] = "text";
-static char __pyx_k_time[] = "time";
-static char __pyx_k_year[] = "year";
-static char __pyx_k_class[] = "__class__";
-static char __pyx_k_delta[] = "delta";
-static char __pyx_k_month[] = "month";
-static char __pyx_k_sites[] = "sites";
-static char __pyx_k_syear[] = "syear";
-static char __pyx_k_format[] = "format";
-static char __pyx_k_import[] = "__import__";
-static char __pyx_k_minute[] = "minute";
-static char __pyx_k_search[] = "search";
-static char __pyx_k_second[] = "second";
-static char __pyx_k_sites1[] = "sites1";
-static char __pyx_k_sites2[] = "sites2";
-static char __pyx_k_substr[] = "substr";
-static char __pyx_k_compile[] = "compile";
-static char __pyx_k_dayofwk[] = "dayofwk";
-static char __pyx_k_dayofyr[] = "dayofyr";
-static char __pyx_k_findall[] = "_findall";
-static char __pyx_k_datetime[] = "datetime";
-static char __pyx_k_operator[] = "operator";
-static char __pyx_k_strftime[] = "_strftime";
-static char __pyx_k_TypeError[] = "TypeError";
-static char __pyx_k_illegal_s[] = "_illegal_s";
-static char __pyx_k_timetuple[] = "timetuple";
-static char __pyx_k_ValueError[] = "ValueError";
-static char __pyx_k_strftime_2[] = "strftime";
-static char __pyx_k_Y_m_d_H_M_S[] = "%Y-%m-%d %H:%M:%S";
-static char __pyx_k_microsecond[] = "microsecond";
-static char __pyx_k_real_datetime[] = "real_datetime";
-static char __pyx_k_NotImplemented[] = "NotImplemented";
-static char __pyx_k_to_real_datetime[] = "_to_real_datetime";
-static char __pyx_k_netcdftime__datetime[] = "netcdftime._datetime";
-static char __pyx_k_Users_jsw_python_netcdf4_python[] = "/Users/jsw/python/netcdf4-python.git/netcdftime/_datetime.pyx";
-static char __pyx_k_This_strftime_implementation_doe[] = "This strftime implementation does not handle %s";
-static PyObject *__pyx_kp_s_4d;
-static PyObject *__pyx_n_s_NotImplemented;
-static PyObject *__pyx_kp_s_This_strftime_implementation_doe;
-static PyObject *__pyx_n_s_TypeError;
-static PyObject *__pyx_kp_s_Users_jsw_python_netcdf4_python;
-static PyObject *__pyx_n_s_ValueError;
-static PyObject *__pyx_kp_s_Y_m_d_H_M_S;
-static PyObject *__pyx_n_s_class;
-static PyObject *__pyx_n_s_compile;
-static PyObject *__pyx_n_s_datetime;
-static PyObject *__pyx_n_s_day;
-static PyObject *__pyx_n_s_dayofwk;
-static PyObject *__pyx_n_s_dayofyr;
-static PyObject *__pyx_n_s_delta;
-static PyObject *__pyx_n_s_dt;
-static PyObject *__pyx_n_s_find;
-static PyObject *__pyx_n_s_findall;
-static PyObject *__pyx_n_s_fmt;
-static PyObject *__pyx_n_s_format;
-static PyObject *__pyx_n_s_hour;
-static PyObject *__pyx_n_s_i;
-static PyObject *__pyx_n_s_illegal_s;
-static PyObject *__pyx_n_s_import;
-static PyObject *__pyx_n_s_j;
-static PyObject *__pyx_n_s_main;
-static PyObject *__pyx_n_s_microsecond;
-static PyObject *__pyx_n_s_minute;
-static PyObject *__pyx_n_s_month;
-static PyObject *__pyx_n_s_netcdftime__datetime;
-static PyObject *__pyx_n_s_off;
-static PyObject *__pyx_n_s_operator;
-static PyObject *__pyx_n_s_re;
-static PyObject *__pyx_n_s_real_datetime;
-static PyObject *__pyx_kp_s_s;
-static PyObject *__pyx_n_s_s1;
-static PyObject *__pyx_n_s_s2;
-static PyObject *__pyx_n_s_s_2;
-static PyObject *__pyx_n_s_search;
-static PyObject *__pyx_n_s_second;
-static PyObject *__pyx_n_s_site;
-static PyObject *__pyx_n_s_sites;
-static PyObject *__pyx_n_s_sites1;
-static PyObject *__pyx_n_s_sites2;
-static PyObject *__pyx_n_s_strftime;
-static PyObject *__pyx_n_s_strftime_2;
-static PyObject *__pyx_n_s_substr;
-static PyObject *__pyx_n_s_syear;
-static PyObject *__pyx_n_s_test;
-static PyObject *__pyx_n_s_text;
-static PyObject *__pyx_n_s_time;
-static PyObject *__pyx_n_s_timetuple;
-static PyObject *__pyx_n_s_to_real_datetime;
-static PyObject *__pyx_n_s_year;
-static int __pyx_pf_10netcdftime_9_datetime_8datetime___init__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self, PyObject *__pyx_v_year, PyObject *__pyx_v_month, PyObject *__pyx_v_day, PyObject *__pyx_v_hour, PyObject *__pyx_v_minute, PyObject *__pyx_v_second, PyObject *__pyx_v_microsecond, PyObject *__pyx_v_dayofwk, PyObject *__pyx_v_dayofyr); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6format___get__(CYTHON_UNUSED struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_2strftime(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self, PyObject *__pyx_v_format); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_4timetuple(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6_to_real_datetime(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_8__repr__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static Py_hash_t __pyx_pf_10netcdftime_9_datetime_8datetime_10__hash__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_12__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_14__reduce__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_4year___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_5month___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_3day___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_4hour___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6minute___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_7dayofwk___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_7dayofyr___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6second___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_11microsecond___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime__findall(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_text, PyObject *__pyx_v_substr); /* proto */
-static PyObject *__pyx_pf_10netcdftime_9_datetime_2_strftime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt, PyObject *__pyx_v_fmt); /* proto */
-static PyObject *__pyx_tp_new_10netcdftime_9_datetime_datetime(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_int_0;
-static PyObject *__pyx_int_1;
-static PyObject *__pyx_int_4;
-static PyObject *__pyx_int_6;
-static PyObject *__pyx_int_28;
-static PyObject *__pyx_int_100;
-static PyObject *__pyx_int_400;
-static PyObject *__pyx_int_2000;
-static PyObject *__pyx_int_neg_1;
-static PyObject *__pyx_tuple_;
-static PyObject *__pyx_slice__4;
-static PyObject *__pyx_slice__5;
-static PyObject *__pyx_tuple__2;
-static PyObject *__pyx_tuple__3;
-static PyObject *__pyx_tuple__6;
-static PyObject *__pyx_tuple__7;
-static PyObject *__pyx_tuple__9;
-static PyObject *__pyx_codeobj__8;
-static PyObject *__pyx_codeobj__10;
-
-/* "netcdftime/_datetime.pyx":27
- * cdef readonly int second, microsecond
- *
- * def __init__(self, year, month, day, hour=0, minute=0, second=0, # <<<<<<<<<<<<<<
- * microsecond=0,dayofwk=-1, dayofyr=1):
- * """dayofyr set to 1 by default - otherwise time.strftime will complain"""
- */
-
-/* Python wrapper */
-static int __pyx_pw_10netcdftime_9_datetime_8datetime_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_10netcdftime_9_datetime_8datetime___init__[] = "dayofyr set to 1 by default - otherwise time.strftime will complain";
-#if CYTHON_COMPILING_IN_CPYTHON
-struct wrapperbase __pyx_wrapperbase_10netcdftime_9_datetime_8datetime___init__;
-#endif
-static int __pyx_pw_10netcdftime_9_datetime_8datetime_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- PyObject *__pyx_v_year = 0;
- PyObject *__pyx_v_month = 0;
- PyObject *__pyx_v_day = 0;
- PyObject *__pyx_v_hour = 0;
- PyObject *__pyx_v_minute = 0;
- PyObject *__pyx_v_second = 0;
- PyObject *__pyx_v_microsecond = 0;
- PyObject *__pyx_v_dayofwk = 0;
- PyObject *__pyx_v_dayofyr = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
- {
- static PyObject **__pyx_pyargnames[] = {&__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_microsecond,&__pyx_n_s_dayofwk,&__pyx_n_s_dayofyr,0};
- PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
- values[3] = ((PyObject *)__pyx_int_0);
- values[4] = ((PyObject *)__pyx_int_0);
- values[5] = ((PyObject *)__pyx_int_0);
- values[6] = ((PyObject *)__pyx_int_0);
- values[7] = ((PyObject *)__pyx_int_neg_1);
- values[8] = ((PyObject *)__pyx_int_1);
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
- switch (pos_args) {
- case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
- 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);
- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- kw_args = PyDict_Size(__pyx_kwds);
- switch (pos_args) {
- case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_year)) != 0)) kw_args--;
- else goto __pyx_L5_argtuple_error;
- case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_month)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 9, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- case 2:
- if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_day)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 9, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- case 3:
- if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hour);
- if (value) { values[3] = value; kw_args--; }
- }
- case 4:
- if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minute);
- if (value) { values[4] = value; kw_args--; }
- }
- case 5:
- if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_second);
- if (value) { values[5] = value; kw_args--; }
- }
- case 6:
- if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_microsecond);
- if (value) { values[6] = value; kw_args--; }
- }
- case 7:
- if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dayofwk);
- if (value) { values[7] = value; kw_args--; }
- }
- case 8:
- if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dayofyr);
- if (value) { values[8] = value; kw_args--; }
- }
- }
- if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
- case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
- 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);
- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- break;
- default: goto __pyx_L5_argtuple_error;
- }
- }
- __pyx_v_year = values[0];
- __pyx_v_month = values[1];
- __pyx_v_day = values[2];
- __pyx_v_hour = values[3];
- __pyx_v_minute = values[4];
- __pyx_v_second = values[5];
- __pyx_v_microsecond = values[6];
- __pyx_v_dayofwk = values[7];
- __pyx_v_dayofyr = values[8];
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_L3_error:;
- __Pyx_AddTraceback("netcdftime._datetime.datetime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return -1;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime___init__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self), __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_dayofwk, __pyx_v_dayofyr);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static int __pyx_pf_10netcdftime_9_datetime_8datetime___init__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self, PyObject *__pyx_v_year, PyObject *__pyx_v_month, PyObject *__pyx_v_day, PyObject *__pyx_v_hour, PyObject *__pyx_v_minute, PyObject *__pyx_v_second, PyObject *__pyx_v_microsecond, PyObject *__pyx_v_dayofwk, PyObject *__pyx_v_dayofyr) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__init__", 0);
-
- /* "netcdftime/_datetime.pyx":31
- * """dayofyr set to 1 by default - otherwise time.strftime will complain"""
- *
- * self.year = year # <<<<<<<<<<<<<<
- * self.month = month
- * self.day = day
- */
- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_year); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_self->year = __pyx_t_1;
-
- /* "netcdftime/_datetime.pyx":32
- *
- * self.year = year
- * self.month = month # <<<<<<<<<<<<<<
- * self.day = day
- * self.hour = hour
- */
- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_month); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_self->month = __pyx_t_1;
-
- /* "netcdftime/_datetime.pyx":33
- * self.year = year
- * self.month = month
- * self.day = day # <<<<<<<<<<<<<<
- * self.hour = hour
- * self.minute = minute
- */
- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_day); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_self->day = __pyx_t_1;
-
- /* "netcdftime/_datetime.pyx":34
- * self.month = month
- * self.day = day
- * self.hour = hour # <<<<<<<<<<<<<<
- * self.minute = minute
- * self.dayofwk = dayofwk
- */
- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_hour); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_self->hour = __pyx_t_1;
-
- /* "netcdftime/_datetime.pyx":35
- * self.day = day
- * self.hour = hour
- * self.minute = minute # <<<<<<<<<<<<<<
- * self.dayofwk = dayofwk
- * self.dayofyr = dayofyr
- */
- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_minute); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_self->minute = __pyx_t_1;
-
- /* "netcdftime/_datetime.pyx":36
- * self.hour = hour
- * self.minute = minute
- * self.dayofwk = dayofwk # <<<<<<<<<<<<<<
- * self.dayofyr = dayofyr
- * self.second = second
- */
- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_dayofwk); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_self->dayofwk = __pyx_t_1;
-
- /* "netcdftime/_datetime.pyx":37
- * self.minute = minute
- * self.dayofwk = dayofwk
- * self.dayofyr = dayofyr # <<<<<<<<<<<<<<
- * self.second = second
- * self.microsecond = microsecond
- */
- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_dayofyr); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_self->dayofyr = __pyx_t_1;
-
- /* "netcdftime/_datetime.pyx":38
- * self.dayofwk = dayofwk
- * self.dayofyr = dayofyr
- * self.second = second # <<<<<<<<<<<<<<
- * self.microsecond = microsecond
- *
- */
- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_second); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_self->second = __pyx_t_1;
-
- /* "netcdftime/_datetime.pyx":39
- * self.dayofyr = dayofyr
- * self.second = second
- * self.microsecond = microsecond # <<<<<<<<<<<<<<
- *
- * property format:
- */
- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_microsecond); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_self->microsecond = __pyx_t_1;
-
- /* "netcdftime/_datetime.pyx":27
- * cdef readonly int second, microsecond
- *
- * def __init__(self, year, month, day, hour=0, minute=0, second=0, # <<<<<<<<<<<<<<
- * microsecond=0,dayofwk=-1, dayofyr=1):
- * """dayofyr set to 1 by default - otherwise time.strftime will complain"""
- */
-
- /* function exit code */
- __pyx_r = 0;
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_AddTraceback("netcdftime._datetime.datetime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = -1;
- __pyx_L0:;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "netcdftime/_datetime.pyx":42
- *
- * property format:
- * def __get__(self): # <<<<<<<<<<<<<<
- * return '%Y-%m-%d %H:%M:%S'
- *
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_6format_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_6format_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_6format___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6format___get__(CYTHON_UNUSED struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__", 0);
-
- /* "netcdftime/_datetime.pyx":43
- * property format:
- * def __get__(self):
- * return '%Y-%m-%d %H:%M:%S' # <<<<<<<<<<<<<<
- *
- * def strftime(self, format=None):
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_kp_s_Y_m_d_H_M_S);
- __pyx_r = __pyx_kp_s_Y_m_d_H_M_S;
- goto __pyx_L0;
-
- /* "netcdftime/_datetime.pyx":42
- *
- * property format:
- * def __get__(self): # <<<<<<<<<<<<<<
- * return '%Y-%m-%d %H:%M:%S'
- *
- */
-
- /* function exit code */
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "netcdftime/_datetime.pyx":45
- * return '%Y-%m-%d %H:%M:%S'
- *
- * def strftime(self, format=None): # <<<<<<<<<<<<<<
- * if format is None:
- * format = self.format
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_3strftime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_3strftime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- PyObject *__pyx_v_format = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("strftime (wrapper)", 0);
- {
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_format,0};
- PyObject* values[1] = {0};
- values[0] = ((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 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- kw_args = PyDict_Size(__pyx_kwds);
- switch (pos_args) {
- case 0:
- if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format);
- if (value) { values[0] = value; kw_args--; }
- }
- }
- if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "strftime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- }
- __pyx_v_format = values[0];
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("strftime", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_L3_error:;
- __Pyx_AddTraceback("netcdftime._datetime.datetime.strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_2strftime(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self), __pyx_v_format);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_2strftime(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self, PyObject *__pyx_v_format) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- int __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- Py_ssize_t __pyx_t_6;
- PyObject *__pyx_t_7 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("strftime", 0);
- __Pyx_INCREF(__pyx_v_format);
-
- /* "netcdftime/_datetime.pyx":46
- *
- * def strftime(self, format=None):
- * if format is None: # <<<<<<<<<<<<<<
- * format = self.format
- * return _strftime(self, format)
- */
- __pyx_t_1 = (__pyx_v_format == Py_None);
- __pyx_t_2 = (__pyx_t_1 != 0);
- if (__pyx_t_2) {
-
- /* "netcdftime/_datetime.pyx":47
- * def strftime(self, format=None):
- * if format is None:
- * format = self.format # <<<<<<<<<<<<<<
- * return _strftime(self, format)
- *
- */
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
- __pyx_t_3 = 0;
-
- /* "netcdftime/_datetime.pyx":46
- *
- * def strftime(self, format=None):
- * if format is None: # <<<<<<<<<<<<<<
- * format = self.format
- * return _strftime(self, format)
- */
- }
-
- /* "netcdftime/_datetime.pyx":48
- * if format is None:
- * format = self.format
- * return _strftime(self, format) # <<<<<<<<<<<<<<
- *
- * def timetuple(self):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_strftime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = NULL;
- __pyx_t_6 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
- if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
- __Pyx_INCREF(__pyx_t_5);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_4, function);
- __pyx_t_6 = 1;
- }
- }
- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __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_INCREF(((PyObject *)__pyx_v_self));
- __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_self));
- __Pyx_INCREF(__pyx_v_format);
- __Pyx_GIVEREF(__pyx_v_format);
- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_format);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
- /* "netcdftime/_datetime.pyx":45
- * return '%Y-%m-%d %H:%M:%S'
- *
- * def strftime(self, format=None): # <<<<<<<<<<<<<<
- * if format is None:
- * format = self.format
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_7);
- __Pyx_AddTraceback("netcdftime._datetime.datetime.strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_format);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "netcdftime/_datetime.pyx":50
- * return _strftime(self, format)
- *
- * def timetuple(self): # <<<<<<<<<<<<<<
- * return (self.year, self.month, self.day, self.hour,
- * self.minute, self.second, self.dayofwk, self.dayofyr, -1)
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_5timetuple(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_5timetuple(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("timetuple (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_4timetuple(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_4timetuple(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- PyObject *__pyx_t_6 = NULL;
- PyObject *__pyx_t_7 = NULL;
- PyObject *__pyx_t_8 = NULL;
- PyObject *__pyx_t_9 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("timetuple", 0);
-
- /* "netcdftime/_datetime.pyx":51
- *
- * def timetuple(self):
- * return (self.year, self.month, self.day, self.hour, # <<<<<<<<<<<<<<
- * self.minute, self.second, self.dayofwk, self.dayofyr, -1)
- *
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->day); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->hour); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
-
- /* "netcdftime/_datetime.pyx":52
- * def timetuple(self):
- * return (self.year, self.month, self.day, self.hour,
- * self.minute, self.second, self.dayofwk, self.dayofyr, -1) # <<<<<<<<<<<<<<
- *
- * def _to_real_datetime(self):
- */
- __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->minute); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->second); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->dayofwk); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_self->dayofyr); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
-
- /* "netcdftime/_datetime.pyx":51
- *
- * def timetuple(self):
- * return (self.year, self.month, self.day, self.hour, # <<<<<<<<<<<<<<
- * self.minute, self.second, self.dayofwk, self.dayofyr, -1)
- *
- */
- __pyx_t_9 = PyTuple_New(9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_8);
- PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_t_8);
- __Pyx_INCREF(__pyx_int_neg_1);
- __Pyx_GIVEREF(__pyx_int_neg_1);
- PyTuple_SET_ITEM(__pyx_t_9, 8, __pyx_int_neg_1);
- __pyx_t_1 = 0;
- __pyx_t_2 = 0;
- __pyx_t_3 = 0;
- __pyx_t_4 = 0;
- __pyx_t_5 = 0;
- __pyx_t_6 = 0;
- __pyx_t_7 = 0;
- __pyx_t_8 = 0;
- __pyx_r = __pyx_t_9;
- __pyx_t_9 = 0;
- goto __pyx_L0;
-
- /* "netcdftime/_datetime.pyx":50
- * return _strftime(self, format)
- *
- * def timetuple(self): # <<<<<<<<<<<<<<
- * return (self.year, self.month, self.day, self.hour,
- * self.minute, self.second, self.dayofwk, self.dayofyr, -1)
- */
-
- /* 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_8);
- __Pyx_XDECREF(__pyx_t_9);
- __Pyx_AddTraceback("netcdftime._datetime.datetime.timetuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "netcdftime/_datetime.pyx":54
- * self.minute, self.second, self.dayofwk, self.dayofyr, -1)
- *
- * def _to_real_datetime(self): # <<<<<<<<<<<<<<
- * return real_datetime(self.year, self.month, self.day,
- * self.hour, self.minute, self.second,
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_7_to_real_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_7_to_real_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("_to_real_datetime (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_6_to_real_datetime(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6_to_real_datetime(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- PyObject *__pyx_t_6 = NULL;
- PyObject *__pyx_t_7 = NULL;
- PyObject *__pyx_t_8 = NULL;
- PyObject *__pyx_t_9 = NULL;
- PyObject *__pyx_t_10 = NULL;
- Py_ssize_t __pyx_t_11;
- PyObject *__pyx_t_12 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_to_real_datetime", 0);
-
- /* "netcdftime/_datetime.pyx":55
- *
- * def _to_real_datetime(self):
- * return real_datetime(self.year, self.month, self.day, # <<<<<<<<<<<<<<
- * self.hour, self.minute, self.second,
- * self.microsecond)
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_real_datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->year); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->day); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
-
- /* "netcdftime/_datetime.pyx":56
- * def _to_real_datetime(self):
- * return real_datetime(self.year, self.month, self.day,
- * self.hour, self.minute, self.second, # <<<<<<<<<<<<<<
- * self.microsecond)
- *
- */
- __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->hour); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->minute); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_self->second); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
-
- /* "netcdftime/_datetime.pyx":57
- * return real_datetime(self.year, self.month, self.day,
- * self.hour, self.minute, self.second,
- * self.microsecond) # <<<<<<<<<<<<<<
- *
- * def __repr__(self):
- */
- __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->microsecond); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = NULL;
- __pyx_t_11 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_10)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_10);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_2, function);
- __pyx_t_11 = 1;
- }
- }
- __pyx_t_12 = PyTuple_New(7+__pyx_t_11); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __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;
- }
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_12, 3+__pyx_t_11, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_12, 4+__pyx_t_11, __pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_8);
- PyTuple_SET_ITEM(__pyx_t_12, 5+__pyx_t_11, __pyx_t_8);
- __Pyx_GIVEREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_12, 6+__pyx_t_11, __pyx_t_9);
- __pyx_t_3 = 0;
- __pyx_t_4 = 0;
- __pyx_t_5 = 0;
- __pyx_t_6 = 0;
- __pyx_t_7 = 0;
- __pyx_t_8 = 0;
- __pyx_t_9 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "netcdftime/_datetime.pyx":54
- * self.minute, self.second, self.dayofwk, self.dayofyr, -1)
- *
- * def _to_real_datetime(self): # <<<<<<<<<<<<<<
- * return real_datetime(self.year, self.month, self.day,
- * self.hour, self.minute, self.second,
- */
-
- /* 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_8);
- __Pyx_XDECREF(__pyx_t_9);
- __Pyx_XDECREF(__pyx_t_10);
- __Pyx_XDECREF(__pyx_t_12);
- __Pyx_AddTraceback("netcdftime._datetime.datetime._to_real_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "netcdftime/_datetime.pyx":59
- * self.microsecond)
- *
- * def __repr__(self): # <<<<<<<<<<<<<<
- * return self.strftime(self.format)
- *
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_9__repr__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_9__repr__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_8__repr__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_8__repr__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__repr__", 0);
-
- /* "netcdftime/_datetime.pyx":60
- *
- * def __repr__(self):
- * return self.strftime(self.format) # <<<<<<<<<<<<<<
- *
- * def __hash__(self):
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strftime_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_4)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_4);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_2, function);
- }
- }
- if (!__pyx_t_4) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- } else {
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __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_3);
- PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
- __pyx_t_3 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __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;
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* "netcdftime/_datetime.pyx":59
- * self.microsecond)
- *
- * def __repr__(self): # <<<<<<<<<<<<<<
- * return self.strftime(self.format)
- *
- */
-
- /* 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_AddTraceback("netcdftime._datetime.datetime.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "netcdftime/_datetime.pyx":62
- * return self.strftime(self.format)
- *
- * def __hash__(self): # <<<<<<<<<<<<<<
- * try:
- * d = self._to_real_datetime()
- */
-
-/* Python wrapper */
-static Py_hash_t __pyx_pw_10netcdftime_9_datetime_8datetime_11__hash__(PyObject *__pyx_v_self); /*proto*/
-static Py_hash_t __pyx_pw_10netcdftime_9_datetime_8datetime_11__hash__(PyObject *__pyx_v_self) {
- Py_hash_t __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_10__hash__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static Py_hash_t __pyx_pf_10netcdftime_9_datetime_8datetime_10__hash__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_v_d = NULL;
- Py_hash_t __pyx_r;
- __Pyx_RefNannyDeclarations
- 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_7;
- PyObject *__pyx_t_8 = NULL;
- PyObject *__pyx_t_9 = NULL;
- PyObject *__pyx_t_10 = NULL;
- Py_hash_t __pyx_t_11;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__hash__", 0);
-
- /* "netcdftime/_datetime.pyx":63
- *
- * def __hash__(self):
- * try: # <<<<<<<<<<<<<<
- * d = self._to_real_datetime()
- * except ValueError:
- */
- {
- __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
- __Pyx_XGOTREF(__pyx_t_1);
- __Pyx_XGOTREF(__pyx_t_2);
- __Pyx_XGOTREF(__pyx_t_3);
- /*try:*/ {
-
- /* "netcdftime/_datetime.pyx":64
- * def __hash__(self):
- * try:
- * d = self._to_real_datetime() # <<<<<<<<<<<<<<
- * except ValueError:
- * return hash(self.timetuple())
- */
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_real_datetime); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
- if (likely(__pyx_t_6)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_6);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_5, function);
- }
- }
- if (__pyx_t_6) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- } else {
- __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_v_d = __pyx_t_4;
- __pyx_t_4 = 0;
-
- /* "netcdftime/_datetime.pyx":63
- *
- * def __hash__(self):
- * try: # <<<<<<<<<<<<<<
- * d = self._to_real_datetime()
- * except ValueError:
- */
- }
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- goto __pyx_L10_try_end;
- __pyx_L3_error:;
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-
- /* "netcdftime/_datetime.pyx":65
- * try:
- * d = self._to_real_datetime()
- * except ValueError: # <<<<<<<<<<<<<<
- * return hash(self.timetuple())
- * return hash(d)
- */
- __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
- if (__pyx_t_7) {
- __Pyx_AddTraceback("netcdftime._datetime.datetime.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GOTREF(__pyx_t_6);
-
- /* "netcdftime/_datetime.pyx":66
- * d = self._to_real_datetime()
- * except ValueError:
- * return hash(self.timetuple()) # <<<<<<<<<<<<<<
- * return hash(d)
- *
- */
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_timetuple); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
- __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
- if (likely(__pyx_t_10)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
- __Pyx_INCREF(__pyx_t_10);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_9, function);
- }
- }
- if (__pyx_t_10) {
- __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- } else {
- __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
- }
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_11 = PyObject_Hash(__pyx_t_8); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_r = __pyx_t_11;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- goto __pyx_L6_except_return;
- }
- goto __pyx_L5_except_error;
- __pyx_L5_except_error:;
-
- /* "netcdftime/_datetime.pyx":63
- *
- * def __hash__(self):
- * try: # <<<<<<<<<<<<<<
- * d = self._to_real_datetime()
- * except ValueError:
- */
- __Pyx_XGIVEREF(__pyx_t_1);
- __Pyx_XGIVEREF(__pyx_t_2);
- __Pyx_XGIVEREF(__pyx_t_3);
- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
- goto __pyx_L1_error;
- __pyx_L6_except_return:;
- __Pyx_XGIVEREF(__pyx_t_1);
- __Pyx_XGIVEREF(__pyx_t_2);
- __Pyx_XGIVEREF(__pyx_t_3);
- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
- goto __pyx_L0;
- __pyx_L10_try_end:;
- }
-
- /* "netcdftime/_datetime.pyx":67
- * except ValueError:
- * return hash(self.timetuple())
- * return hash(d) # <<<<<<<<<<<<<<
- *
- * def __richcmp__(self, other, int op):
- */
- __pyx_t_11 = PyObject_Hash(__pyx_v_d); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_r = __pyx_t_11;
- goto __pyx_L0;
-
- /* "netcdftime/_datetime.pyx":62
- * return self.strftime(self.format)
- *
- * def __hash__(self): # <<<<<<<<<<<<<<
- * try:
- * d = self._to_real_datetime()
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_6);
- __Pyx_XDECREF(__pyx_t_8);
- __Pyx_XDECREF(__pyx_t_9);
- __Pyx_XDECREF(__pyx_t_10);
- __Pyx_AddTraceback("netcdftime._datetime.datetime.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = -1;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_d);
- if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "netcdftime/_datetime.pyx":69
- * return hash(d)
- *
- * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<<
- * if hasattr(other, 'strftime'):
- * self_str = self.strftime('%Y-%m-%d %H:%M:%S')
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_13__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_13__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_12__richcmp__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_12__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
- PyObject *__pyx_v_self_str = NULL;
- PyObject *__pyx_v_other_str = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- int __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__richcmp__", 0);
-
- /* "netcdftime/_datetime.pyx":70
- *
- * def __richcmp__(self, other, int op):
- * if hasattr(other, 'strftime'): # <<<<<<<<<<<<<<
- * self_str = self.strftime('%Y-%m-%d %H:%M:%S')
- * other_str = other.strftime('%Y-%m-%d %H:%M:%S')
- */
- __pyx_t_1 = PyObject_HasAttr(__pyx_v_other, __pyx_n_s_strftime_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = (__pyx_t_1 != 0);
- if (__pyx_t_2) {
-
- /* "netcdftime/_datetime.pyx":71
- * def __richcmp__(self, other, int op):
- * if hasattr(other, 'strftime'):
- * self_str = self.strftime('%Y-%m-%d %H:%M:%S') # <<<<<<<<<<<<<<
- * other_str = other.strftime('%Y-%m-%d %H:%M:%S')
- * return PyObject_RichCompare(self_str, other_str, op)
- */
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strftime_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_v_self_str = __pyx_t_4;
- __pyx_t_4 = 0;
-
- /* "netcdftime/_datetime.pyx":72
- * if hasattr(other, 'strftime'):
- * self_str = self.strftime('%Y-%m-%d %H:%M:%S')
- * other_str = other.strftime('%Y-%m-%d %H:%M:%S') # <<<<<<<<<<<<<<
- * return PyObject_RichCompare(self_str, other_str, op)
- * return NotImplemented
- */
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_strftime_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_other_str = __pyx_t_3;
- __pyx_t_3 = 0;
-
- /* "netcdftime/_datetime.pyx":73
- * self_str = self.strftime('%Y-%m-%d %H:%M:%S')
- * other_str = other.strftime('%Y-%m-%d %H:%M:%S')
- * return PyObject_RichCompare(self_str, other_str, op) # <<<<<<<<<<<<<<
- * return NotImplemented
- *
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = PyObject_RichCompare(__pyx_v_self_str, __pyx_v_other_str, __pyx_v_op); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
- /* "netcdftime/_datetime.pyx":70
- *
- * def __richcmp__(self, other, int op):
- * if hasattr(other, 'strftime'): # <<<<<<<<<<<<<<
- * self_str = self.strftime('%Y-%m-%d %H:%M:%S')
- * other_str = other.strftime('%Y-%m-%d %H:%M:%S')
- */
- }
-
- /* "netcdftime/_datetime.pyx":74
- * other_str = other.strftime('%Y-%m-%d %H:%M:%S')
- * return PyObject_RichCompare(self_str, other_str, op)
- * return NotImplemented # <<<<<<<<<<<<<<
- *
- * def __reduce__(self):
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_builtin_NotImplemented);
- __pyx_r = __pyx_builtin_NotImplemented;
- goto __pyx_L0;
-
- /* "netcdftime/_datetime.pyx":69
- * return hash(d)
- *
- * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<<
- * if hasattr(other, 'strftime'):
- * self_str = self.strftime('%Y-%m-%d %H:%M:%S')
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("netcdftime._datetime.datetime.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_self_str);
- __Pyx_XDECREF(__pyx_v_other_str);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "netcdftime/_datetime.pyx":76
- * return NotImplemented
- *
- * def __reduce__(self): # <<<<<<<<<<<<<<
- * """special method that allows instance to be pickled"""
- * args = (self.year,self.month,self.day,self.hour,
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_15__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_10netcdftime_9_datetime_8datetime_14__reduce__[] = "special method that allows instance to be pickled";
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_15__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_14__reduce__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_14__reduce__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_v_args = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- PyObject *__pyx_t_6 = NULL;
- PyObject *__pyx_t_7 = NULL;
- PyObject *__pyx_t_8 = NULL;
- PyObject *__pyx_t_9 = NULL;
- PyObject *__pyx_t_10 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__reduce__", 0);
-
- /* "netcdftime/_datetime.pyx":78
- * def __reduce__(self):
- * """special method that allows instance to be pickled"""
- * args = (self.year,self.month,self.day,self.hour, # <<<<<<<<<<<<<<
- * self.minute,self.second,self.microsecond,
- * self.dayofwk,self.dayofyr)
- */
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->day); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->hour); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
-
- /* "netcdftime/_datetime.pyx":79
- * """special method that allows instance to be pickled"""
- * args = (self.year,self.month,self.day,self.hour,
- * self.minute,self.second,self.microsecond, # <<<<<<<<<<<<<<
- * self.dayofwk,self.dayofyr)
- * return (self.__class__,args)
- */
- __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->minute); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->second); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->microsecond); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
-
- /* "netcdftime/_datetime.pyx":80
- * args = (self.year,self.month,self.day,self.hour,
- * self.minute,self.second,self.microsecond,
- * self.dayofwk,self.dayofyr) # <<<<<<<<<<<<<<
- * return (self.__class__,args)
- *
- */
- __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_self->dayofwk); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->dayofyr); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
-
- /* "netcdftime/_datetime.pyx":78
- * def __reduce__(self):
- * """special method that allows instance to be pickled"""
- * args = (self.year,self.month,self.day,self.hour, # <<<<<<<<<<<<<<
- * self.minute,self.second,self.microsecond,
- * self.dayofwk,self.dayofyr)
- */
- __pyx_t_10 = PyTuple_New(9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_3);
- __Pyx_GIVEREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_8);
- PyTuple_SET_ITEM(__pyx_t_10, 7, __pyx_t_8);
- __Pyx_GIVEREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_10, 8, __pyx_t_9);
- __pyx_t_1 = 0;
- __pyx_t_2 = 0;
- __pyx_t_3 = 0;
- __pyx_t_4 = 0;
- __pyx_t_5 = 0;
- __pyx_t_6 = 0;
- __pyx_t_7 = 0;
- __pyx_t_8 = 0;
- __pyx_t_9 = 0;
- __pyx_v_args = __pyx_t_10;
- __pyx_t_10 = 0;
-
- /* "netcdftime/_datetime.pyx":81
- * self.minute,self.second,self.microsecond,
- * self.dayofwk,self.dayofyr)
- * return (self.__class__,args) # <<<<<<<<<<<<<<
- *
- *
- */
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_10);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10);
- __Pyx_INCREF(__pyx_v_args);
- __Pyx_GIVEREF(__pyx_v_args);
- PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_args);
- __pyx_t_10 = 0;
- __pyx_r = __pyx_t_9;
- __pyx_t_9 = 0;
- goto __pyx_L0;
-
- /* "netcdftime/_datetime.pyx":76
- * return NotImplemented
- *
- * def __reduce__(self): # <<<<<<<<<<<<<<
- * """special method that allows instance to be pickled"""
- * args = (self.year,self.month,self.day,self.hour,
- */
-
- /* 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_8);
- __Pyx_XDECREF(__pyx_t_9);
- __Pyx_XDECREF(__pyx_t_10);
- __Pyx_AddTraceback("netcdftime._datetime.datetime.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_args);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "netcdftime/_datetime.pyx":24
- * and format.
- * """
- * cdef readonly int year, month, day, hour, minute, dayofwk, dayofyr # <<<<<<<<<<<<<<
- * cdef readonly int second, microsecond
- *
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_4year_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_4year_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_4year___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_4year___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("netcdftime._datetime.datetime.year.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_5month_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_5month_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_5month___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_5month___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("netcdftime._datetime.datetime.month.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_3day_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_3day_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_3day___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_3day___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->day); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("netcdftime._datetime.datetime.day.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_4hour_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_4hour_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_4hour___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_4hour___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->hour); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("netcdftime._datetime.datetime.hour.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_6minute_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_6minute_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_6minute___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6minute___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->minute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("netcdftime._datetime.datetime.minute.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_7dayofwk_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_7dayofwk_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_7dayofwk___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_7dayofwk___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dayofwk); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("netcdftime._datetime.datetime.dayofwk.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_7dayofyr_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_7dayofyr_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_7dayofyr___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_7dayofyr___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dayofyr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("netcdftime._datetime.datetime.dayofyr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "netcdftime/_datetime.pyx":25
- * """
- * cdef readonly int year, month, day, hour, minute, dayofwk, dayofyr
- * cdef readonly int second, microsecond # <<<<<<<<<<<<<<
- *
- * def __init__(self, year, month, day, hour=0, minute=0, second=0,
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_6second_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_6second_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_6second___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_6second___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->second); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("netcdftime._datetime.datetime.second.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_11microsecond_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_10netcdftime_9_datetime_8datetime_11microsecond_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_8datetime_11microsecond___get__(((struct __pyx_obj_10netcdftime_9_datetime_datetime *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_8datetime_11microsecond___get__(struct __pyx_obj_10netcdftime_9_datetime_datetime *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->microsecond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("netcdftime._datetime.datetime.microsecond.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "netcdftime/_datetime.pyx":87
- *
- *
- * def _findall(text, substr): # <<<<<<<<<<<<<<
- * # Also finds overlaps
- * sites = []
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_1_findall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_10netcdftime_9_datetime_1_findall = {"_findall", (PyCFunction)__pyx_pw_10netcdftime_9_datetime_1_findall, METH_VARARGS|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_10netcdftime_9_datetime_1_findall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- PyObject *__pyx_v_text = 0;
- PyObject *__pyx_v_substr = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("_findall (wrapper)", 0);
- {
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_text,&__pyx_n_s_substr,0};
- PyObject* values[2] = {0,0};
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
- switch (pos_args) {
- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- kw_args = PyDict_Size(__pyx_kwds);
- switch (pos_args) {
- case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_text)) != 0)) kw_args--;
- else goto __pyx_L5_argtuple_error;
- case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_substr)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("_findall", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- }
- if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_findall") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- }
- __pyx_v_text = values[0];
- __pyx_v_substr = values[1];
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_findall", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_L3_error:;
- __Pyx_AddTraceback("netcdftime._datetime._findall", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_10netcdftime_9_datetime__findall(__pyx_self, __pyx_v_text, __pyx_v_substr);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime__findall(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_text, PyObject *__pyx_v_substr) {
- PyObject *__pyx_v_sites = NULL;
- PyObject *__pyx_v_i = NULL;
- PyObject *__pyx_v_j = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- Py_ssize_t __pyx_t_4;
- PyObject *__pyx_t_5 = NULL;
- int __pyx_t_6;
- int __pyx_t_7;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_findall", 0);
-
- /* "netcdftime/_datetime.pyx":89
- * def _findall(text, substr):
- * # Also finds overlaps
- * sites = [] # <<<<<<<<<<<<<<
- * i = 0
- * while 1:
- */
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_sites = ((PyObject*)__pyx_t_1);
- __pyx_t_1 = 0;
-
- /* "netcdftime/_datetime.pyx":90
- * # Also finds overlaps
- * sites = []
- * i = 0 # <<<<<<<<<<<<<<
- * while 1:
- * j = text.find(substr, i)
- */
- __Pyx_INCREF(__pyx_int_0);
- __pyx_v_i = __pyx_int_0;
-
- /* "netcdftime/_datetime.pyx":91
- * sites = []
- * i = 0
- * while 1: # <<<<<<<<<<<<<<
- * j = text.find(substr, i)
- * if j == -1:
- */
- while (1) {
-
- /* "netcdftime/_datetime.pyx":92
- * i = 0
- * while 1:
- * j = text.find(substr, i) # <<<<<<<<<<<<<<
- * if j == -1:
- * break
- */
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_text, __pyx_n_s_find); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- __pyx_t_4 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_3)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_2, function);
- __pyx_t_4 = 1;
- }
- }
- __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- if (__pyx_t_3) {
- __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
- }
- __Pyx_INCREF(__pyx_v_substr);
- __Pyx_GIVEREF(__pyx_v_substr);
- PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_substr);
- __Pyx_INCREF(__pyx_v_i);
- __Pyx_GIVEREF(__pyx_v_i);
- PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_i);
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __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;
- __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_1);
- __pyx_t_1 = 0;
-
- /* "netcdftime/_datetime.pyx":93
- * while 1:
- * j = text.find(substr, i)
- * if j == -1: # <<<<<<<<<<<<<<
- * break
- * sites.append(j)
- */
- __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_j, __pyx_int_neg_1, -1, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__pyx_t_6) {
-
- /* "netcdftime/_datetime.pyx":94
- * j = text.find(substr, i)
- * if j == -1:
- * break # <<<<<<<<<<<<<<
- * sites.append(j)
- * i = j + 1
- */
- goto __pyx_L4_break;
-
- /* "netcdftime/_datetime.pyx":93
- * while 1:
- * j = text.find(substr, i)
- * if j == -1: # <<<<<<<<<<<<<<
- * break
- * sites.append(j)
- */
- }
-
- /* "netcdftime/_datetime.pyx":95
- * if j == -1:
- * break
- * sites.append(j) # <<<<<<<<<<<<<<
- * i = j + 1
- * return sites
- */
- __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_sites, __pyx_v_j); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
- /* "netcdftime/_datetime.pyx":96
- * break
- * sites.append(j)
- * i = j + 1 # <<<<<<<<<<<<<<
- * return sites
- *
- */
- __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_j, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_1);
- __pyx_t_1 = 0;
- }
- __pyx_L4_break:;
-
- /* "netcdftime/_datetime.pyx":97
- * sites.append(j)
- * i = j + 1
- * return sites # <<<<<<<<<<<<<<
- *
- * # Every 28 years the calendar repeats, except through century leap
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_sites);
- __pyx_r = __pyx_v_sites;
- goto __pyx_L0;
-
- /* "netcdftime/_datetime.pyx":87
- *
- *
- * def _findall(text, substr): # <<<<<<<<<<<<<<
- * # Also finds overlaps
- * sites = []
- */
-
- /* 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_5);
- __Pyx_AddTraceback("netcdftime._datetime._findall", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_sites);
- __Pyx_XDECREF(__pyx_v_i);
- __Pyx_XDECREF(__pyx_v_j);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-/* "netcdftime/_datetime.pyx":104
- *
- *
- * def _strftime(dt, fmt): # <<<<<<<<<<<<<<
- * if _illegal_s.search(fmt):
- * raise TypeError("This strftime implementation does not handle %s")
- */
-
-/* Python wrapper */
-static PyObject *__pyx_pw_10netcdftime_9_datetime_3_strftime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_10netcdftime_9_datetime_3_strftime = {"_strftime", (PyCFunction)__pyx_pw_10netcdftime_9_datetime_3_strftime, METH_VARARGS|METH_KEYWORDS, 0};
-static PyObject *__pyx_pw_10netcdftime_9_datetime_3_strftime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- PyObject *__pyx_v_dt = 0;
- PyObject *__pyx_v_fmt = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("_strftime (wrapper)", 0);
- {
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dt,&__pyx_n_s_fmt,0};
- PyObject* values[2] = {0,0};
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
- switch (pos_args) {
- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- kw_args = PyDict_Size(__pyx_kwds);
- switch (pos_args) {
- case 0:
- if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--;
- else goto __pyx_L5_argtuple_error;
- case 1:
- if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fmt)) != 0)) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("_strftime", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- }
- if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_strftime") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- }
- __pyx_v_dt = values[0];
- __pyx_v_fmt = values[1];
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_strftime", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_L3_error:;
- __Pyx_AddTraceback("netcdftime._datetime._strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_10netcdftime_9_datetime_2_strftime(__pyx_self, __pyx_v_dt, __pyx_v_fmt);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_pf_10netcdftime_9_datetime_2_strftime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt, PyObject *__pyx_v_fmt) {
- PyObject *__pyx_v_year = NULL;
- PyObject *__pyx_v_delta = NULL;
- PyObject *__pyx_v_off = NULL;
- PyObject *__pyx_v_timetuple = NULL;
- PyObject *__pyx_v_s1 = NULL;
- PyObject *__pyx_v_sites1 = NULL;
- PyObject *__pyx_v_s2 = NULL;
- PyObject *__pyx_v_sites2 = NULL;
- PyObject *__pyx_v_sites = NULL;
- PyObject *__pyx_v_site = NULL;
- PyObject *__pyx_v_s = NULL;
- PyObject *__pyx_v_syear = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- int __pyx_t_5;
- PyObject *__pyx_t_6 = NULL;
- Py_ssize_t __pyx_t_7;
- PyObject *(*__pyx_t_8)(PyObject *);
- int __pyx_t_9;
- int __pyx_t_10;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_strftime", 0);
-
- /* "netcdftime/_datetime.pyx":105
- *
- * def _strftime(dt, fmt):
- * if _illegal_s.search(fmt): # <<<<<<<<<<<<<<
- * raise TypeError("This strftime implementation does not handle %s")
- * # don't use strftime method at all.
- */
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_illegal_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_search); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
- if (likely(__pyx_t_2)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
- __Pyx_INCREF(__pyx_t_2);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_3, function);
- }
- }
- if (!__pyx_t_2) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_fmt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- } else {
- __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __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_fmt);
- __Pyx_GIVEREF(__pyx_v_fmt);
- PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_fmt);
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- }
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__pyx_t_5) {
-
- /* "netcdftime/_datetime.pyx":106
- * def _strftime(dt, fmt):
- * if _illegal_s.search(fmt):
- * raise TypeError("This strftime implementation does not handle %s") # <<<<<<<<<<<<<<
- * # don't use strftime method at all.
- * # if dt.year > 1900:
- */
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
- /* "netcdftime/_datetime.pyx":105
- *
- * def _strftime(dt, fmt):
- * if _illegal_s.search(fmt): # <<<<<<<<<<<<<<
- * raise TypeError("This strftime implementation does not handle %s")
- * # don't use strftime method at all.
- */
- }
-
- /* "netcdftime/_datetime.pyx":111
- * # return dt.strftime(fmt)
- *
- * year = dt.year # <<<<<<<<<<<<<<
- * # For every non-leap year century, advance by
- * # 6 years to get into the 28-year repeat cycle
- */
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_year = __pyx_t_1;
- __pyx_t_1 = 0;
-
- /* "netcdftime/_datetime.pyx":114
- * # For every non-leap year century, advance by
- * # 6 years to get into the 28-year repeat cycle
- * delta = 2000 - year # <<<<<<<<<<<<<<
- * off = 6 * (delta // 100 + delta // 400)
- * year = year + off
- */
- __pyx_t_1 = __Pyx_PyInt_SubtractCObj(__pyx_int_2000, __pyx_v_year, 0x7D0, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_delta = __pyx_t_1;
- __pyx_t_1 = 0;
-
- /* "netcdftime/_datetime.pyx":115
- * # 6 years to get into the 28-year repeat cycle
- * delta = 2000 - year
- * off = 6 * (delta // 100 + delta // 400) # <<<<<<<<<<<<<<
- * year = year + off
- *
- */
- __pyx_t_1 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_delta, __pyx_int_100, 0x64, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_delta, __pyx_int_400, 0x190, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __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_3 = PyNumber_Multiply(__pyx_int_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_off = __pyx_t_3;
- __pyx_t_3 = 0;
-
- /* "netcdftime/_datetime.pyx":116
- * delta = 2000 - year
- * off = 6 * (delta // 100 + delta // 400)
- * year = year + off # <<<<<<<<<<<<<<
- *
- * # Move to around the year 2000
- */
- __pyx_t_3 = PyNumber_Add(__pyx_v_year, __pyx_v_off); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF_SET(__pyx_v_year, __pyx_t_3);
- __pyx_t_3 = 0;
-
- /* "netcdftime/_datetime.pyx":119
- *
- * # Move to around the year 2000
- * year = year + ((2000 - year) // 28) * 28 # <<<<<<<<<<<<<<
- * timetuple = dt.timetuple()
- * s1 = time.strftime(fmt, (year,) + timetuple[1:])
- */
- __pyx_t_3 = __Pyx_PyInt_SubtractCObj(__pyx_int_2000, __pyx_v_year, 0x7D0, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_3, __pyx_int_28, 28, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_int_28); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyNumber_Add(__pyx_v_year, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF_SET(__pyx_v_year, __pyx_t_4);
- __pyx_t_4 = 0;
-
- /* "netcdftime/_datetime.pyx":120
- * # Move to around the year 2000
- * year = year + ((2000 - year) // 28) * 28
- * timetuple = dt.timetuple() # <<<<<<<<<<<<<<
- * s1 = time.strftime(fmt, (year,) + timetuple[1:])
- * sites1 = _findall(s1, str(year))
- */
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_timetuple); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
- if (likely(__pyx_t_1)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_3, function);
- }
- }
- if (__pyx_t_1) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- } else {
- __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_v_timetuple = __pyx_t_4;
- __pyx_t_4 = 0;
-
- /* "netcdftime/_datetime.pyx":121
- * year = year + ((2000 - year) // 28) * 28
- * timetuple = dt.timetuple()
- * s1 = time.strftime(fmt, (year,) + timetuple[1:]) # <<<<<<<<<<<<<<
- * sites1 = _findall(s1, str(year))
- *
- */
- __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strftime_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_INCREF(__pyx_v_year);
- __Pyx_GIVEREF(__pyx_v_year);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_year);
- __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_timetuple, 1, 0, NULL, NULL, &__pyx_slice__4, 1, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = NULL;
- __pyx_t_7 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
- if (likely(__pyx_t_2)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
- __Pyx_INCREF(__pyx_t_2);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_1, function);
- __pyx_t_7 = 1;
- }
- }
- __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- if (__pyx_t_2) {
- __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
- }
- __Pyx_INCREF(__pyx_v_fmt);
- __Pyx_GIVEREF(__pyx_v_fmt);
- PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_v_fmt);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_t_6);
- __pyx_t_6 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __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_v_s1 = __pyx_t_4;
- __pyx_t_4 = 0;
-
- /* "netcdftime/_datetime.pyx":122
- * timetuple = dt.timetuple()
- * s1 = time.strftime(fmt, (year,) + timetuple[1:])
- * sites1 = _findall(s1, str(year)) # <<<<<<<<<<<<<<
- *
- * s2 = time.strftime(fmt, (year + 28,) + timetuple[1:])
- */
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_findall); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_INCREF(__pyx_v_year);
- __Pyx_GIVEREF(__pyx_v_year);
- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_year);
- __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = NULL;
- __pyx_t_7 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
- if (likely(__pyx_t_3)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_1, function);
- __pyx_t_7 = 1;
- }
- }
- __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __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;
- }
- __Pyx_INCREF(__pyx_v_s1);
- __Pyx_GIVEREF(__pyx_v_s1);
- PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_v_s1);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_t_6);
- __pyx_t_6 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __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;
- __pyx_v_sites1 = __pyx_t_4;
- __pyx_t_4 = 0;
-
- /* "netcdftime/_datetime.pyx":124
- * sites1 = _findall(s1, str(year))
- *
- * s2 = time.strftime(fmt, (year + 28,) + timetuple[1:]) # <<<<<<<<<<<<<<
- * sites2 = _findall(s2, str(year + 28))
- *
- */
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strftime_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_year, __pyx_int_28, 28, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
- __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_timetuple, 1, 0, NULL, NULL, &__pyx_slice__5, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = NULL;
- __pyx_t_7 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_1)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_2, function);
- __pyx_t_7 = 1;
- }
- }
- __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- if (__pyx_t_1) {
- __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
- }
- __Pyx_INCREF(__pyx_v_fmt);
- __Pyx_GIVEREF(__pyx_v_fmt);
- PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_fmt);
- __Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_3);
- __pyx_t_3 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_s2 = __pyx_t_4;
- __pyx_t_4 = 0;
-
- /* "netcdftime/_datetime.pyx":125
- *
- * s2 = time.strftime(fmt, (year + 28,) + timetuple[1:])
- * sites2 = _findall(s2, str(year + 28)) # <<<<<<<<<<<<<<
- *
- * sites = []
- */
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_findall); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_year, __pyx_int_28, 28, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __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 = 0;
- __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = NULL;
- __pyx_t_7 = 0;
- if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_3)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_2, function);
- __pyx_t_7 = 1;
- }
- }
- __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- if (__pyx_t_3) {
- __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL;
- }
- __Pyx_INCREF(__pyx_v_s2);
- __Pyx_GIVEREF(__pyx_v_s2);
- PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_v_s2);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_t_6);
- __pyx_t_6 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_sites2 = __pyx_t_4;
- __pyx_t_4 = 0;
-
- /* "netcdftime/_datetime.pyx":127
- * sites2 = _findall(s2, str(year + 28))
- *
- * sites = [] # <<<<<<<<<<<<<<
- * for site in sites1:
- * if site in sites2:
- */
- __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_v_sites = ((PyObject*)__pyx_t_4);
- __pyx_t_4 = 0;
-
- /* "netcdftime/_datetime.pyx":128
- *
- * sites = []
- * for site in sites1: # <<<<<<<<<<<<<<
- * if site in sites2:
- * sites.append(site)
- */
- if (likely(PyList_CheckExact(__pyx_v_sites1)) || PyTuple_CheckExact(__pyx_v_sites1)) {
- __pyx_t_4 = __pyx_v_sites1; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
- __pyx_t_8 = NULL;
- } else {
- __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_sites1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- for (;;) {
- if (likely(!__pyx_t_8)) {
- if (likely(PyList_CheckExact(__pyx_t_4))) {
- if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- #endif
- } else {
- if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- #endif
- }
- } else {
- __pyx_t_2 = __pyx_t_8(__pyx_t_4);
- if (unlikely(!__pyx_t_2)) {
- PyObject* exc_type = PyErr_Occurred();
- if (exc_type) {
- if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- break;
- }
- __Pyx_GOTREF(__pyx_t_2);
- }
- __Pyx_XDECREF_SET(__pyx_v_site, __pyx_t_2);
- __pyx_t_2 = 0;
-
- /* "netcdftime/_datetime.pyx":129
- * sites = []
- * for site in sites1:
- * if site in sites2: # <<<<<<<<<<<<<<
- * sites.append(site)
- *
- */
- __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_site, __pyx_v_sites2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_9 = (__pyx_t_5 != 0);
- if (__pyx_t_9) {
-
- /* "netcdftime/_datetime.pyx":130
- * for site in sites1:
- * if site in sites2:
- * sites.append(site) # <<<<<<<<<<<<<<
- *
- * s = s1
- */
- __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_sites, __pyx_v_site); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
- /* "netcdftime/_datetime.pyx":129
- * sites = []
- * for site in sites1:
- * if site in sites2: # <<<<<<<<<<<<<<
- * sites.append(site)
- *
- */
- }
-
- /* "netcdftime/_datetime.pyx":128
- *
- * sites = []
- * for site in sites1: # <<<<<<<<<<<<<<
- * if site in sites2:
- * sites.append(site)
- */
- }
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
- /* "netcdftime/_datetime.pyx":132
- * sites.append(site)
- *
- * s = s1 # <<<<<<<<<<<<<<
- * syear = "%4d" % (dt.year,)
- * for site in sites:
- */
- __Pyx_INCREF(__pyx_v_s1);
- __pyx_v_s = __pyx_v_s1;
-
- /* "netcdftime/_datetime.pyx":133
- *
- * s = s1
- * syear = "%4d" % (dt.year,) # <<<<<<<<<<<<<<
- * for site in sites:
- * s = s[:site] + syear + s[site + 4:]
- */
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_year); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __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 = 0;
- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_4d, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_syear = ((PyObject*)__pyx_t_4);
- __pyx_t_4 = 0;
-
- /* "netcdftime/_datetime.pyx":134
- * s = s1
- * syear = "%4d" % (dt.year,)
- * for site in sites: # <<<<<<<<<<<<<<
- * s = s[:site] + syear + s[site + 4:]
- * return s
- */
- __pyx_t_4 = __pyx_v_sites; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
- for (;;) {
- if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- #endif
- __Pyx_XDECREF_SET(__pyx_v_site, __pyx_t_2);
- __pyx_t_2 = 0;
-
- /* "netcdftime/_datetime.pyx":135
- * syear = "%4d" % (dt.year,)
- * for site in sites:
- * s = s[:site] + syear + s[site + 4:] # <<<<<<<<<<<<<<
- * return s
- */
- __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_s, 0, 0, NULL, &__pyx_v_site, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_v_syear); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_site, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_s, 0, 0, &__pyx_t_2, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_2);
- __pyx_t_2 = 0;
-
- /* "netcdftime/_datetime.pyx":134
- * s = s1
- * syear = "%4d" % (dt.year,)
- * for site in sites: # <<<<<<<<<<<<<<
- * s = s[:site] + syear + s[site + 4:]
- * return s
- */
- }
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
- /* "netcdftime/_datetime.pyx":136
- * for site in sites:
- * s = s[:site] + syear + s[site + 4:]
- * return s # <<<<<<<<<<<<<<
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_s);
- __pyx_r = __pyx_v_s;
- goto __pyx_L0;
-
- /* "netcdftime/_datetime.pyx":104
- *
- *
- * def _strftime(dt, fmt): # <<<<<<<<<<<<<<
- * if _illegal_s.search(fmt):
- * raise TypeError("This strftime implementation does not handle %s")
- */
-
- /* 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_6);
- __Pyx_AddTraceback("netcdftime._datetime._strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_year);
- __Pyx_XDECREF(__pyx_v_delta);
- __Pyx_XDECREF(__pyx_v_off);
- __Pyx_XDECREF(__pyx_v_timetuple);
- __Pyx_XDECREF(__pyx_v_s1);
- __Pyx_XDECREF(__pyx_v_sites1);
- __Pyx_XDECREF(__pyx_v_s2);
- __Pyx_XDECREF(__pyx_v_sites2);
- __Pyx_XDECREF(__pyx_v_sites);
- __Pyx_XDECREF(__pyx_v_site);
- __Pyx_XDECREF(__pyx_v_s);
- __Pyx_XDECREF(__pyx_v_syear);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
-}
-
-static PyObject *__pyx_tp_new_10netcdftime_9_datetime_datetime(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
- if (unlikely(!o)) return 0;
- return o;
-}
-
-static void __pyx_tp_dealloc_10netcdftime_9_datetime_datetime(PyObject *o) {
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
- (*Py_TYPE(o)->tp_free)(o);
-}
-
-static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_format(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_10netcdftime_9_datetime_8datetime_6format_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_year(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_10netcdftime_9_datetime_8datetime_4year_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_month(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_10netcdftime_9_datetime_8datetime_5month_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_day(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_10netcdftime_9_datetime_8datetime_3day_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_hour(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_10netcdftime_9_datetime_8datetime_4hour_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_minute(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_10netcdftime_9_datetime_8datetime_6minute_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_dayofwk(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_10netcdftime_9_datetime_8datetime_7dayofwk_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_dayofyr(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_10netcdftime_9_datetime_8datetime_7dayofyr_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_second(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_10netcdftime_9_datetime_8datetime_6second_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_10netcdftime_9_datetime_8datetime_microsecond(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_10netcdftime_9_datetime_8datetime_11microsecond_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_10netcdftime_9_datetime_datetime[] = {
- {"strftime", (PyCFunction)__pyx_pw_10netcdftime_9_datetime_8datetime_3strftime, METH_VARARGS|METH_KEYWORDS, 0},
- {"timetuple", (PyCFunction)__pyx_pw_10netcdftime_9_datetime_8datetime_5timetuple, METH_NOARGS, 0},
- {"_to_real_datetime", (PyCFunction)__pyx_pw_10netcdftime_9_datetime_8datetime_7_to_real_datetime, METH_NOARGS, 0},
- {"__reduce__", (PyCFunction)__pyx_pw_10netcdftime_9_datetime_8datetime_15__reduce__, METH_NOARGS, __pyx_doc_10netcdftime_9_datetime_8datetime_14__reduce__},
- {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_10netcdftime_9_datetime_datetime[] = {
- {(char *)"format", __pyx_getprop_10netcdftime_9_datetime_8datetime_format, 0, 0, 0},
- {(char *)"year", __pyx_getprop_10netcdftime_9_datetime_8datetime_year, 0, 0, 0},
- {(char *)"month", __pyx_getprop_10netcdftime_9_datetime_8datetime_month, 0, 0, 0},
- {(char *)"day", __pyx_getprop_10netcdftime_9_datetime_8datetime_day, 0, 0, 0},
- {(char *)"hour", __pyx_getprop_10netcdftime_9_datetime_8datetime_hour, 0, 0, 0},
- {(char *)"minute", __pyx_getprop_10netcdftime_9_datetime_8datetime_minute, 0, 0, 0},
- {(char *)"dayofwk", __pyx_getprop_10netcdftime_9_datetime_8datetime_dayofwk, 0, 0, 0},
- {(char *)"dayofyr", __pyx_getprop_10netcdftime_9_datetime_8datetime_dayofyr, 0, 0, 0},
- {(char *)"second", __pyx_getprop_10netcdftime_9_datetime_8datetime_second, 0, 0, 0},
- {(char *)"microsecond", __pyx_getprop_10netcdftime_9_datetime_8datetime_microsecond, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_10netcdftime_9_datetime_datetime = {
- PyVarObject_HEAD_INIT(0, 0)
- "netcdftime._datetime.datetime", /*tp_name*/
- sizeof(struct __pyx_obj_10netcdftime_9_datetime_datetime), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- __pyx_tp_dealloc_10netcdftime_9_datetime_datetime, /*tp_dealloc*/
- 0, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- #if PY_MAJOR_VERSION < 3
- 0, /*tp_compare*/
- #endif
- #if PY_MAJOR_VERSION >= 3
- 0, /*tp_as_async*/
- #endif
- __pyx_pw_10netcdftime_9_datetime_8datetime_9__repr__, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- __pyx_pw_10netcdftime_9_datetime_8datetime_11__hash__, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- 0, /*tp_getattro*/
- 0, /*tp_setattro*/
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- "\nPhony datetime object which mimics the python datetime object,\nbut allows for dates that don't exist in the proleptic gregorian calendar.\nDoesn't do timedelta operations, doesn't overload + and -.\n\nHas strftime, timetuple and __repr__ methods. The format\nof the string produced by __repr__ is controlled by self.format\n(default %Y-%m-%d %H:%M:%S). Does support comparisons with other\nphony datetime and with datetime.datetime objects.\n\nInstance variables are year,month,day,hou [...]
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- __pyx_pw_10netcdftime_9_datetime_8datetime_13__richcmp__, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_10netcdftime_9_datetime_datetime, /*tp_methods*/
- 0, /*tp_members*/
- __pyx_getsets_10netcdftime_9_datetime_datetime, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- __pyx_pw_10netcdftime_9_datetime_8datetime_1__init__, /*tp_init*/
- 0, /*tp_alloc*/
- __pyx_tp_new_10netcdftime_9_datetime_datetime, /*tp_new*/
- 0, /*tp_free*/
- 0, /*tp_is_gc*/
- 0, /*tp_bases*/
- 0, /*tp_mro*/
- 0, /*tp_cache*/
- 0, /*tp_subclasses*/
- 0, /*tp_weaklist*/
- 0, /*tp_del*/
- 0, /*tp_version_tag*/
- #if PY_VERSION_HEX >= 0x030400a1
- 0, /*tp_finalize*/
- #endif
-};
-
-static PyMethodDef __pyx_methods[] = {
- {0, 0, 0, 0}
-};
-
-#if PY_MAJOR_VERSION >= 3
-static struct PyModuleDef __pyx_moduledef = {
- #if PY_VERSION_HEX < 0x03020000
- { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
- #else
- PyModuleDef_HEAD_INIT,
- #endif
- "_datetime",
- 0, /* m_doc */
- -1, /* m_size */
- __pyx_methods /* m_methods */,
- NULL, /* m_reload */
- NULL, /* m_traverse */
- NULL, /* m_clear */
- NULL /* m_free */
-};
-#endif
-
-static __Pyx_StringTabEntry __pyx_string_tab[] = {
- {&__pyx_kp_s_4d, __pyx_k_4d, sizeof(__pyx_k_4d), 0, 0, 1, 0},
- {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
- {&__pyx_kp_s_This_strftime_implementation_doe, __pyx_k_This_strftime_implementation_doe, sizeof(__pyx_k_This_strftime_implementation_doe), 0, 0, 1, 0},
- {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
- {&__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_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
- {&__pyx_kp_s_Y_m_d_H_M_S, __pyx_k_Y_m_d_H_M_S, sizeof(__pyx_k_Y_m_d_H_M_S), 0, 0, 1, 0},
- {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
- {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1},
- {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
- {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1},
- {&__pyx_n_s_dayofwk, __pyx_k_dayofwk, sizeof(__pyx_k_dayofwk), 0, 0, 1, 1},
- {&__pyx_n_s_dayofyr, __pyx_k_dayofyr, sizeof(__pyx_k_dayofyr), 0, 0, 1, 1},
- {&__pyx_n_s_delta, __pyx_k_delta, sizeof(__pyx_k_delta), 0, 0, 1, 1},
- {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1},
- {&__pyx_n_s_find, __pyx_k_find, sizeof(__pyx_k_find), 0, 0, 1, 1},
- {&__pyx_n_s_findall, __pyx_k_findall, sizeof(__pyx_k_findall), 0, 0, 1, 1},
- {&__pyx_n_s_fmt, __pyx_k_fmt, sizeof(__pyx_k_fmt), 0, 0, 1, 1},
- {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
- {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1},
- {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
- {&__pyx_n_s_illegal_s, __pyx_k_illegal_s, sizeof(__pyx_k_illegal_s), 0, 0, 1, 1},
- {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
- {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
- {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
- {&__pyx_n_s_microsecond, __pyx_k_microsecond, sizeof(__pyx_k_microsecond), 0, 0, 1, 1},
- {&__pyx_n_s_minute, __pyx_k_minute, sizeof(__pyx_k_minute), 0, 0, 1, 1},
- {&__pyx_n_s_month, __pyx_k_month, sizeof(__pyx_k_month), 0, 0, 1, 1},
- {&__pyx_n_s_netcdftime__datetime, __pyx_k_netcdftime__datetime, sizeof(__pyx_k_netcdftime__datetime), 0, 0, 1, 1},
- {&__pyx_n_s_off, __pyx_k_off, sizeof(__pyx_k_off), 0, 0, 1, 1},
- {&__pyx_n_s_operator, __pyx_k_operator, sizeof(__pyx_k_operator), 0, 0, 1, 1},
- {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
- {&__pyx_n_s_real_datetime, __pyx_k_real_datetime, sizeof(__pyx_k_real_datetime), 0, 0, 1, 1},
- {&__pyx_kp_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 0},
- {&__pyx_n_s_s1, __pyx_k_s1, sizeof(__pyx_k_s1), 0, 0, 1, 1},
- {&__pyx_n_s_s2, __pyx_k_s2, sizeof(__pyx_k_s2), 0, 0, 1, 1},
- {&__pyx_n_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 1},
- {&__pyx_n_s_search, __pyx_k_search, sizeof(__pyx_k_search), 0, 0, 1, 1},
- {&__pyx_n_s_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 0, 1, 1},
- {&__pyx_n_s_site, __pyx_k_site, sizeof(__pyx_k_site), 0, 0, 1, 1},
- {&__pyx_n_s_sites, __pyx_k_sites, sizeof(__pyx_k_sites), 0, 0, 1, 1},
- {&__pyx_n_s_sites1, __pyx_k_sites1, sizeof(__pyx_k_sites1), 0, 0, 1, 1},
- {&__pyx_n_s_sites2, __pyx_k_sites2, sizeof(__pyx_k_sites2), 0, 0, 1, 1},
- {&__pyx_n_s_strftime, __pyx_k_strftime, sizeof(__pyx_k_strftime), 0, 0, 1, 1},
- {&__pyx_n_s_strftime_2, __pyx_k_strftime_2, sizeof(__pyx_k_strftime_2), 0, 0, 1, 1},
- {&__pyx_n_s_substr, __pyx_k_substr, sizeof(__pyx_k_substr), 0, 0, 1, 1},
- {&__pyx_n_s_syear, __pyx_k_syear, sizeof(__pyx_k_syear), 0, 0, 1, 1},
- {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
- {&__pyx_n_s_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1},
- {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
- {&__pyx_n_s_timetuple, __pyx_k_timetuple, sizeof(__pyx_k_timetuple), 0, 0, 1, 1},
- {&__pyx_n_s_to_real_datetime, __pyx_k_to_real_datetime, sizeof(__pyx_k_to_real_datetime), 0, 0, 1, 1},
- {&__pyx_n_s_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 0, 1, 1},
- {0, 0, 0, 0, 0, 0, 0}
-};
-static int __Pyx_InitCachedBuiltins(void) {
- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- return 0;
- __pyx_L1_error:;
- return -1;
-}
-
-static int __Pyx_InitCachedConstants(void) {
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
-
- /* "netcdftime/_datetime.pyx":71
- * def __richcmp__(self, other, int op):
- * if hasattr(other, 'strftime'):
- * self_str = self.strftime('%Y-%m-%d %H:%M:%S') # <<<<<<<<<<<<<<
- * other_str = other.strftime('%Y-%m-%d %H:%M:%S')
- * return PyObject_RichCompare(self_str, other_str, op)
- */
- __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Y_m_d_H_M_S); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_tuple_);
- __Pyx_GIVEREF(__pyx_tuple_);
-
- /* "netcdftime/_datetime.pyx":72
- * if hasattr(other, 'strftime'):
- * self_str = self.strftime('%Y-%m-%d %H:%M:%S')
- * other_str = other.strftime('%Y-%m-%d %H:%M:%S') # <<<<<<<<<<<<<<
- * return PyObject_RichCompare(self_str, other_str, op)
- * return NotImplemented
- */
- __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_Y_m_d_H_M_S); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_tuple__2);
- __Pyx_GIVEREF(__pyx_tuple__2);
-
- /* "netcdftime/_datetime.pyx":106
- * def _strftime(dt, fmt):
- * if _illegal_s.search(fmt):
- * raise TypeError("This strftime implementation does not handle %s") # <<<<<<<<<<<<<<
- * # don't use strftime method at all.
- * # if dt.year > 1900:
- */
- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_This_strftime_implementation_doe); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_tuple__3);
- __Pyx_GIVEREF(__pyx_tuple__3);
-
- /* "netcdftime/_datetime.pyx":121
- * year = year + ((2000 - year) // 28) * 28
- * timetuple = dt.timetuple()
- * s1 = time.strftime(fmt, (year,) + timetuple[1:]) # <<<<<<<<<<<<<<
- * sites1 = _findall(s1, str(year))
- *
- */
- __pyx_slice__4 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_slice__4);
- __Pyx_GIVEREF(__pyx_slice__4);
-
- /* "netcdftime/_datetime.pyx":124
- * sites1 = _findall(s1, str(year))
- *
- * s2 = time.strftime(fmt, (year + 28,) + timetuple[1:]) # <<<<<<<<<<<<<<
- * sites2 = _findall(s2, str(year + 28))
- *
- */
- __pyx_slice__5 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_slice__5);
- __Pyx_GIVEREF(__pyx_slice__5);
-
- /* "netcdftime/_datetime.pyx":84
- *
- *
- * _illegal_s = re.compile(r"((^|[^%])(%%)*%s)") # <<<<<<<<<<<<<<
- *
- *
- */
- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_s); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_tuple__6);
- __Pyx_GIVEREF(__pyx_tuple__6);
-
- /* "netcdftime/_datetime.pyx":87
- *
- *
- * def _findall(text, substr): # <<<<<<<<<<<<<<
- * # Also finds overlaps
- * sites = []
- */
- __pyx_tuple__7 = PyTuple_Pack(5, __pyx_n_s_text, __pyx_n_s_substr, __pyx_n_s_sites, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_tuple__7);
- __Pyx_GIVEREF(__pyx_tuple__7);
- __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_findall, 87, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
- /* "netcdftime/_datetime.pyx":104
- *
- *
- * def _strftime(dt, fmt): # <<<<<<<<<<<<<<
- * if _illegal_s.search(fmt):
- * raise TypeError("This strftime implementation does not handle %s")
- */
- __pyx_tuple__9 = PyTuple_Pack(14, __pyx_n_s_dt, __pyx_n_s_fmt, __pyx_n_s_year, __pyx_n_s_delta, __pyx_n_s_off, __pyx_n_s_timetuple, __pyx_n_s_s1, __pyx_n_s_sites1, __pyx_n_s_s2, __pyx_n_s_sites2, __pyx_n_s_sites, __pyx_n_s_site, __pyx_n_s_s_2, __pyx_n_s_syear); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_tuple__9);
- __Pyx_GIVEREF(__pyx_tuple__9);
- __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_strftime, 104, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_RefNannyFinishContext();
- return 0;
- __pyx_L1_error:;
- __Pyx_RefNannyFinishContext();
- return -1;
-}
-
-static int __Pyx_InitGlobals(void) {
- if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_int_28 = PyInt_FromLong(28); if (unlikely(!__pyx_int_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_int_400 = PyInt_FromLong(400); if (unlikely(!__pyx_int_400)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_int_2000 = PyInt_FromLong(2000); if (unlikely(!__pyx_int_2000)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- return 0;
- __pyx_L1_error:;
- return -1;
-}
-
-#if PY_MAJOR_VERSION < 3
-PyMODINIT_FUNC init_datetime(void); /*proto*/
-PyMODINIT_FUNC init_datetime(void)
-#else
-PyMODINIT_FUNC PyInit__datetime(void); /*proto*/
-PyMODINIT_FUNC PyInit__datetime(void)
-#endif
-{
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannyDeclarations
- #if CYTHON_REFNANNY
- __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
- if (!__Pyx_RefNanny) {
- PyErr_Clear();
- __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
- if (!__Pyx_RefNanny)
- Py_FatalError("failed to import 'refnanny' module");
- }
- #endif
- __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__datetime(void)", 0);
- if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #ifdef __Pyx_CyFunction_USED
- if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- #ifdef __Pyx_FusedFunction_USED
- if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- #ifdef __Pyx_Coroutine_USED
- if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- #ifdef __Pyx_Generator_USED
- if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- #ifdef __Pyx_StopAsyncIteration_USED
- if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- /*--- Library function declarations ---*/
- /*--- Threads initialization code ---*/
- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
- #ifdef WITH_THREAD /* Python build with threading support? */
- PyEval_InitThreads();
- #endif
- #endif
- /*--- Module creation code ---*/
- #if PY_MAJOR_VERSION < 3
- __pyx_m = Py_InitModule4("_datetime", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
- #else
- __pyx_m = PyModule_Create(&__pyx_moduledef);
- #endif
- if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_INCREF(__pyx_d);
- __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #if CYTHON_COMPILING_IN_PYPY
- Py_INCREF(__pyx_b);
- #endif
- if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- /*--- Initialize various global constants etc. ---*/
- if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
- if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- if (__pyx_module_is_main_netcdftime___datetime) {
- if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- #if PY_MAJOR_VERSION >= 3
- {
- PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (!PyDict_GetItemString(modules, "netcdftime._datetime")) {
- if (unlikely(PyDict_SetItemString(modules, "netcdftime._datetime", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- }
- #endif
- /*--- Builtin init code ---*/
- if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /*--- Constants init code ---*/
- if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /*--- Global init code ---*/
- /*--- Variable export code ---*/
- /*--- Function export code ---*/
- /*--- Type init code ---*/
- if (PyType_Ready(&__pyx_type_10netcdftime_9_datetime_datetime) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_10netcdftime_9_datetime_datetime.tp_print = 0;
- #if CYTHON_COMPILING_IN_CPYTHON
- {
- PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_10netcdftime_9_datetime_datetime, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
- __pyx_wrapperbase_10netcdftime_9_datetime_8datetime___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
- __pyx_wrapperbase_10netcdftime_9_datetime_8datetime___init__.doc = __pyx_doc_10netcdftime_9_datetime_8datetime___init__;
- ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10netcdftime_9_datetime_8datetime___init__;
- }
- }
- #endif
- if (PyObject_SetAttrString(__pyx_m, "datetime", (PyObject *)&__pyx_type_10netcdftime_9_datetime_datetime) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_10netcdftime_9_datetime_datetime = &__pyx_type_10netcdftime_9_datetime_datetime;
- /*--- Type import code ---*/
- __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type",
- #if CYTHON_COMPILING_IN_PYPY
- sizeof(PyTypeObject),
- #else
- sizeof(PyHeapTypeObject),
- #endif
- 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /*--- Variable import code ---*/
- /*--- Function import code ---*/
- /*--- Execution code ---*/
- #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
- if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
-
- /* "netcdftime/_datetime.pyx":1
- * from datetime import datetime as real_datetime # <<<<<<<<<<<<<<
- * import operator
- * import re
- */
- __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(__pyx_n_s_datetime);
- __Pyx_GIVEREF(__pyx_n_s_datetime);
- PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_datetime);
- __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_real_datetime, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
- /* "netcdftime/_datetime.pyx":2
- * from datetime import datetime as real_datetime
- * import operator # <<<<<<<<<<<<<<
- * import re
- * import time
- */
- __pyx_t_2 = __Pyx_Import(__pyx_n_s_operator, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_operator, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
- /* "netcdftime/_datetime.pyx":3
- * from datetime import datetime as real_datetime
- * import operator
- * import re # <<<<<<<<<<<<<<
- * import time
- *
- */
- __pyx_t_2 = __Pyx_Import(__pyx_n_s_re, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
- /* "netcdftime/_datetime.pyx":4
- * import operator
- * import re
- * import time # <<<<<<<<<<<<<<
- *
- * from cpython.object cimport PyObject_RichCompare
- */
- __pyx_t_2 = __Pyx_Import(__pyx_n_s_time, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
- /* "netcdftime/_datetime.pyx":84
- *
- *
- * _illegal_s = re.compile(r"((^|[^%])(%%)*%s)") # <<<<<<<<<<<<<<
- *
- *
- */
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __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__6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __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_illegal_s, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
- /* "netcdftime/_datetime.pyx":87
- *
- *
- * def _findall(text, substr): # <<<<<<<<<<<<<<
- * # Also finds overlaps
- * sites = []
- */
- __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_10netcdftime_9_datetime_1_findall, NULL, __pyx_n_s_netcdftime__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_findall, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
- /* "netcdftime/_datetime.pyx":104
- *
- *
- * def _strftime(dt, fmt): # <<<<<<<<<<<<<<
- * if _illegal_s.search(fmt):
- * raise TypeError("This strftime implementation does not handle %s")
- */
- __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_10netcdftime_9_datetime_3_strftime, NULL, __pyx_n_s_netcdftime__datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strftime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
- /* "netcdftime/_datetime.pyx":1
- * from datetime import datetime as real_datetime # <<<<<<<<<<<<<<
- * import operator
- * import re
- */
- __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
- /*--- Wrapped vars code ---*/
-
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- if (__pyx_m) {
- if (__pyx_d) {
- __Pyx_AddTraceback("init netcdftime._datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
- }
- Py_DECREF(__pyx_m); __pyx_m = 0;
- } else if (!PyErr_Occurred()) {
- PyErr_SetString(PyExc_ImportError, "init netcdftime._datetime");
- }
- __pyx_L0:;
- __Pyx_RefNannyFinishContext();
- #if PY_MAJOR_VERSION < 3
- return;
- #else
- return __pyx_m;
- #endif
-}
-
-/* --- Runtime support code --- */
-#if CYTHON_REFNANNY
-static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
- PyObject *m = NULL, *p = NULL;
- void *r = NULL;
- m = PyImport_ImportModule((char *)modname);
- if (!m) goto end;
- p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
- if (!p) goto end;
- r = PyLong_AsVoidPtr(p);
-end:
- Py_XDECREF(p);
- Py_XDECREF(m);
- return (__Pyx_RefNannyAPIStruct *)r;
-}
-#endif
-
-static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
- PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
- if (unlikely(!result)) {
- PyErr_Format(PyExc_NameError,
-#if PY_MAJOR_VERSION >= 3
- "name '%U' is not defined", name);
-#else
- "name '%.200s' is not defined", PyString_AS_STRING(name));
-#endif
- }
- return result;
-}
-
-static void __Pyx_RaiseArgtupleInvalid(
- const char* func_name,
- int exact,
- Py_ssize_t num_min,
- Py_ssize_t num_max,
- Py_ssize_t num_found)
-{
- Py_ssize_t num_expected;
- const char *more_or_less;
- if (num_found < num_min) {
- num_expected = num_min;
- more_or_less = "at least";
- } else {
- num_expected = num_max;
- more_or_less = "at most";
- }
- if (exact) {
- more_or_less = "exactly";
- }
- PyErr_Format(PyExc_TypeError,
- "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
- func_name, more_or_less, num_expected,
- (num_expected == 1) ? "" : "s", num_found);
-}
-
-static void __Pyx_RaiseDoubleKeywordsError(
- const char* func_name,
- PyObject* kw_name)
-{
- PyErr_Format(PyExc_TypeError,
- #if PY_MAJOR_VERSION >= 3
- "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
- #else
- "%s() got multiple values for keyword argument '%s'", func_name,
- PyString_AsString(kw_name));
- #endif
-}
-
-static int __Pyx_ParseOptionalKeywords(
- PyObject *kwds,
- PyObject **argnames[],
- PyObject *kwds2,
- PyObject *values[],
- Py_ssize_t num_pos_args,
- const char* function_name)
-{
- PyObject *key = 0, *value = 0;
- Py_ssize_t pos = 0;
- PyObject*** name;
- PyObject*** first_kw_arg = argnames + num_pos_args;
- while (PyDict_Next(kwds, &pos, &key, &value)) {
- name = first_kw_arg;
- while (*name && (**name != key)) name++;
- if (*name) {
- values[name-argnames] = value;
- continue;
- }
- name = first_kw_arg;
- #if PY_MAJOR_VERSION < 3
- if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
- while (*name) {
- if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
- && _PyString_Eq(**name, key)) {
- values[name-argnames] = value;
- break;
- }
- name++;
- }
- if (*name) continue;
- else {
- PyObject*** argname = argnames;
- while (argname != first_kw_arg) {
- if ((**argname == key) || (
- (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
- && _PyString_Eq(**argname, key))) {
- goto arg_passed_twice;
- }
- argname++;
- }
- }
- } else
- #endif
- if (likely(PyUnicode_Check(key))) {
- while (*name) {
- int cmp = (**name == key) ? 0 :
- #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
- (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
- #endif
- PyUnicode_Compare(**name, key);
- if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
- if (cmp == 0) {
- values[name-argnames] = value;
- break;
- }
- name++;
- }
- if (*name) continue;
- else {
- PyObject*** argname = argnames;
- while (argname != first_kw_arg) {
- int cmp = (**argname == key) ? 0 :
- #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
- (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
- #endif
- PyUnicode_Compare(**argname, key);
- if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
- if (cmp == 0) goto arg_passed_twice;
- argname++;
- }
- }
- } else
- goto invalid_keyword_type;
- if (kwds2) {
- if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
- } else {
- goto invalid_keyword;
- }
- }
- return 0;
-arg_passed_twice:
- __Pyx_RaiseDoubleKeywordsError(function_name, key);
- goto bad;
-invalid_keyword_type:
- PyErr_Format(PyExc_TypeError,
- "%.200s() keywords must be strings", function_name);
- goto bad;
-invalid_keyword:
- PyErr_Format(PyExc_TypeError,
- #if PY_MAJOR_VERSION < 3
- "%.200s() got an unexpected keyword argument '%.200s'",
- function_name, PyString_AsString(key));
- #else
- "%s() got an unexpected keyword argument '%U'",
- function_name, key);
- #endif
-bad:
- return -1;
-}
-
-static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
- PyObject *result;
-#if CYTHON_COMPILING_IN_CPYTHON
- result = PyDict_GetItem(__pyx_d, name);
- if (likely(result)) {
- Py_INCREF(result);
- } else {
-#else
- result = PyObject_GetItem(__pyx_d, name);
- if (!result) {
- PyErr_Clear();
-#endif
- result = __Pyx_GetBuiltinName(name);
- }
- return result;
-}
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
- PyObject *result;
- ternaryfunc call = func->ob_type->tp_call;
- if (unlikely(!call))
- return PyObject_Call(func, arg, kw);
- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
- return NULL;
- result = (*call)(func, arg, kw);
- Py_LeaveRecursiveCall();
- if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
- PyErr_SetString(
- PyExc_SystemError,
- "NULL result without error in PyObject_Call");
- }
- return result;
-}
-#endif
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
- PyObject *self, *result;
- PyCFunction cfunc;
- cfunc = PyCFunction_GET_FUNCTION(func);
- self = PyCFunction_GET_SELF(func);
- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
- return NULL;
- result = cfunc(self, arg);
- Py_LeaveRecursiveCall();
- if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
- PyErr_SetString(
- PyExc_SystemError,
- "NULL result without error in PyObject_Call");
- }
- return result;
-}
-#endif
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
- PyObject *result;
- PyObject *args = PyTuple_New(1);
- if (unlikely(!args)) return NULL;
- Py_INCREF(arg);
- PyTuple_SET_ITEM(args, 0, arg);
- result = __Pyx_PyObject_Call(func, args, NULL);
- Py_DECREF(args);
- return result;
-}
-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
-#ifdef __Pyx_CyFunction_USED
- if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
-#else
- if (likely(PyCFunction_Check(func))) {
-#endif
- if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
- return __Pyx_PyObject_CallMethO(func, arg);
- }
- }
- return __Pyx__PyObject_CallOneArg(func, arg);
-}
-#else
-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
- PyObject* args = PyTuple_Pack(1, arg);
- return (likely(args)) ? __Pyx_PyObject_Call(func, args, NULL) : NULL;
-}
-#endif
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
-#ifdef __Pyx_CyFunction_USED
- if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
-#else
- if (likely(PyCFunction_Check(func))) {
-#endif
- if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
- return __Pyx_PyObject_CallMethO(func, NULL);
- }
- }
- return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
-}
-#endif
-
-static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
-#if CYTHON_COMPILING_IN_CPYTHON
- PyThreadState *tstate = PyThreadState_GET();
- *type = tstate->exc_type;
- *value = tstate->exc_value;
- *tb = tstate->exc_traceback;
- Py_XINCREF(*type);
- Py_XINCREF(*value);
- Py_XINCREF(*tb);
-#else
- PyErr_GetExcInfo(type, value, tb);
-#endif
-}
-static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
-#if CYTHON_COMPILING_IN_CPYTHON
- PyObject *tmp_type, *tmp_value, *tmp_tb;
- PyThreadState *tstate = PyThreadState_GET();
- tmp_type = tstate->exc_type;
- tmp_value = tstate->exc_value;
- tmp_tb = tstate->exc_traceback;
- tstate->exc_type = type;
- tstate->exc_value = value;
- tstate->exc_traceback = tb;
- Py_XDECREF(tmp_type);
- Py_XDECREF(tmp_value);
- Py_XDECREF(tmp_tb);
-#else
- PyErr_SetExcInfo(type, value, tb);
-#endif
-}
-
-static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
- PyObject *local_type, *local_value, *local_tb;
-#if CYTHON_COMPILING_IN_CPYTHON
- PyObject *tmp_type, *tmp_value, *tmp_tb;
- PyThreadState *tstate = PyThreadState_GET();
- local_type = tstate->curexc_type;
- local_value = tstate->curexc_value;
- local_tb = tstate->curexc_traceback;
- tstate->curexc_type = 0;
- tstate->curexc_value = 0;
- tstate->curexc_traceback = 0;
-#else
- PyErr_Fetch(&local_type, &local_value, &local_tb);
-#endif
- PyErr_NormalizeException(&local_type, &local_value, &local_tb);
-#if CYTHON_COMPILING_IN_CPYTHON
- if (unlikely(tstate->curexc_type))
-#else
- if (unlikely(PyErr_Occurred()))
-#endif
- goto bad;
- #if PY_MAJOR_VERSION >= 3
- if (local_tb) {
- if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
- goto bad;
- }
- #endif
- Py_XINCREF(local_tb);
- Py_XINCREF(local_type);
- Py_XINCREF(local_value);
- *type = local_type;
- *value = local_value;
- *tb = local_tb;
-#if CYTHON_COMPILING_IN_CPYTHON
- tmp_type = tstate->exc_type;
- tmp_value = tstate->exc_value;
- tmp_tb = tstate->exc_traceback;
- tstate->exc_type = local_type;
- tstate->exc_value = local_value;
- tstate->exc_traceback = local_tb;
- Py_XDECREF(tmp_type);
- Py_XDECREF(tmp_value);
- Py_XDECREF(tmp_tb);
-#else
- PyErr_SetExcInfo(local_type, local_value, local_tb);
-#endif
- return 0;
-bad:
- *type = 0;
- *value = 0;
- *tb = 0;
- Py_XDECREF(local_type);
- Py_XDECREF(local_value);
- Py_XDECREF(local_tb);
- return -1;
-}
-
-#if CYTHON_USE_PYLONG_INTERNALS
- #include "longintrepr.h"
-#endif
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
- if (op1 == op2) {
- Py_RETURN_TRUE;
- }
- #if PY_MAJOR_VERSION < 3
- if (likely(PyInt_CheckExact(op1))) {
- const long b = intval;
- long a = PyInt_AS_LONG(op1);
- if (a == b) {
- Py_RETURN_TRUE;
- } else {
- Py_RETURN_FALSE;
- }
- }
- #endif
- #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3
- if (likely(PyLong_CheckExact(op1))) {
- const long b = intval;
- long a;
- const digit* digits = ((PyLongObject*)op1)->ob_digit;
- const Py_ssize_t size = Py_SIZE(op1);
- if (likely(__Pyx_sst_abs(size) <= 1)) {
- a = likely(size) ? digits[0] : 0;
- if (size == -1) a = -a;
- } else {
- switch (size) {
- case -2:
- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- }
- case 2:
- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- }
- case -3:
- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- }
- case 3:
- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- }
- case -4:
- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
- a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- }
- case 4:
- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
- a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- }
- #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
- default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
- #else
- default: Py_RETURN_FALSE;
- #endif
- }
- }
- if (a == b) {
- Py_RETURN_TRUE;
- } else {
- Py_RETURN_FALSE;
- }
- }
- #endif
- if (PyFloat_CheckExact(op1)) {
- const long b = intval;
- double a = PyFloat_AS_DOUBLE(op1);
- if ((double)a == (double)b) {
- Py_RETURN_TRUE;
- } else {
- Py_RETURN_FALSE;
- }
- }
- return PyObject_RichCompare(op1, op2, Py_EQ);
-}
-#endif
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
- #if PY_MAJOR_VERSION < 3
- if (likely(PyInt_CheckExact(op1))) {
- const long b = intval;
- long x;
- long a = PyInt_AS_LONG(op1);
- x = (long)((unsigned long)a + b);
- if (likely((x^a) >= 0 || (x^b) >= 0))
- return PyInt_FromLong(x);
- return PyLong_Type.tp_as_number->nb_add(op1, op2);
- }
- #endif
- #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3
- if (likely(PyLong_CheckExact(op1))) {
- const long b = intval;
- long a, x;
- const PY_LONG_LONG llb = intval;
- PY_LONG_LONG lla, llx;
- const digit* digits = ((PyLongObject*)op1)->ob_digit;
- const Py_ssize_t size = Py_SIZE(op1);
- if (likely(__Pyx_sst_abs(size) <= 1)) {
- a = likely(size) ? digits[0] : 0;
- if (size == -1) a = -a;
- } else {
- switch (size) {
- case -2:
- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
- lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case 2:
- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
- lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case -3:
- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
- lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case 3:
- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
- lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case -4:
- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
- a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
- lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case 4:
- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
- a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
- lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
- }
- }
- x = a + b;
- return PyLong_FromLong(x);
- long_long:
- llx = lla + llb;
- return PyLong_FromLongLong(llx);
- }
- #endif
- if (PyFloat_CheckExact(op1)) {
- const long b = intval;
- double a = PyFloat_AS_DOUBLE(op1);
- double result;
- PyFPE_START_PROTECT("add", return NULL)
- result = ((double)a) + (double)b;
- PyFPE_END_PROTECT(result)
- return PyFloat_FromDouble(result);
- }
- return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
-}
-#endif
-
-static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
-#if CYTHON_COMPILING_IN_CPYTHON
- PyObject *tmp_type, *tmp_value, *tmp_tb;
- PyThreadState *tstate = PyThreadState_GET();
- tmp_type = tstate->curexc_type;
- tmp_value = tstate->curexc_value;
- tmp_tb = tstate->curexc_traceback;
- tstate->curexc_type = type;
- tstate->curexc_value = value;
- tstate->curexc_traceback = tb;
- Py_XDECREF(tmp_type);
- Py_XDECREF(tmp_value);
- Py_XDECREF(tmp_tb);
-#else
- PyErr_Restore(type, value, tb);
-#endif
-}
-static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
-#if CYTHON_COMPILING_IN_CPYTHON
- PyThreadState *tstate = PyThreadState_GET();
- *type = tstate->curexc_type;
- *value = tstate->curexc_value;
- *tb = tstate->curexc_traceback;
- tstate->curexc_type = 0;
- tstate->curexc_value = 0;
- tstate->curexc_traceback = 0;
-#else
- PyErr_Fetch(type, value, tb);
-#endif
-}
-
-#if PY_MAJOR_VERSION < 3
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
- CYTHON_UNUSED PyObject *cause) {
- Py_XINCREF(type);
- if (!value || value == Py_None)
- value = NULL;
- else
- Py_INCREF(value);
- if (!tb || tb == Py_None)
- tb = NULL;
- else {
- Py_INCREF(tb);
- if (!PyTraceBack_Check(tb)) {
- PyErr_SetString(PyExc_TypeError,
- "raise: arg 3 must be a traceback or None");
- goto raise_error;
- }
- }
- if (PyType_Check(type)) {
-#if CYTHON_COMPILING_IN_PYPY
- if (!value) {
- Py_INCREF(Py_None);
- value = Py_None;
- }
-#endif
- PyErr_NormalizeException(&type, &value, &tb);
- } else {
- if (value) {
- PyErr_SetString(PyExc_TypeError,
- "instance exception may not have a separate value");
- goto raise_error;
- }
- value = type;
- type = (PyObject*) Py_TYPE(type);
- Py_INCREF(type);
- if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
- PyErr_SetString(PyExc_TypeError,
- "raise: exception class must be a subclass of BaseException");
- goto raise_error;
- }
- }
- __Pyx_ErrRestore(type, value, tb);
- return;
-raise_error:
- Py_XDECREF(value);
- Py_XDECREF(type);
- Py_XDECREF(tb);
- return;
-}
-#else
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
- PyObject* owned_instance = NULL;
- if (tb == Py_None) {
- tb = 0;
- } else if (tb && !PyTraceBack_Check(tb)) {
- PyErr_SetString(PyExc_TypeError,
- "raise: arg 3 must be a traceback or None");
- goto bad;
- }
- if (value == Py_None)
- value = 0;
- if (PyExceptionInstance_Check(type)) {
- if (value) {
- PyErr_SetString(PyExc_TypeError,
- "instance exception may not have a separate value");
- goto bad;
- }
- value = type;
- type = (PyObject*) Py_TYPE(value);
- } else if (PyExceptionClass_Check(type)) {
- PyObject *instance_class = NULL;
- if (value && PyExceptionInstance_Check(value)) {
- instance_class = (PyObject*) Py_TYPE(value);
- if (instance_class != type) {
- int is_subclass = PyObject_IsSubclass(instance_class, type);
- if (!is_subclass) {
- instance_class = NULL;
- } else if (unlikely(is_subclass == -1)) {
- goto bad;
- } else {
- type = instance_class;
- }
- }
- }
- if (!instance_class) {
- PyObject *args;
- if (!value)
- args = PyTuple_New(0);
- else if (PyTuple_Check(value)) {
- Py_INCREF(value);
- args = value;
- } else
- args = PyTuple_Pack(1, value);
- if (!args)
- goto bad;
- owned_instance = PyObject_Call(type, args, NULL);
- Py_DECREF(args);
- if (!owned_instance)
- goto bad;
- value = owned_instance;
- if (!PyExceptionInstance_Check(value)) {
- PyErr_Format(PyExc_TypeError,
- "calling %R should have returned an instance of "
- "BaseException, not %R",
- type, Py_TYPE(value));
- goto bad;
- }
- }
- } else {
- PyErr_SetString(PyExc_TypeError,
- "raise: exception class must be a subclass of BaseException");
- goto bad;
- }
-#if PY_VERSION_HEX >= 0x03030000
- if (cause) {
-#else
- if (cause && cause != Py_None) {
-#endif
- PyObject *fixed_cause;
- if (cause == Py_None) {
- fixed_cause = NULL;
- } else if (PyExceptionClass_Check(cause)) {
- fixed_cause = PyObject_CallObject(cause, NULL);
- if (fixed_cause == NULL)
- goto bad;
- } else if (PyExceptionInstance_Check(cause)) {
- fixed_cause = cause;
- Py_INCREF(fixed_cause);
- } else {
- PyErr_SetString(PyExc_TypeError,
- "exception causes must derive from "
- "BaseException");
- goto bad;
- }
- PyException_SetCause(value, fixed_cause);
- }
- PyErr_SetObject(type, value);
- if (tb) {
-#if CYTHON_COMPILING_IN_PYPY
- PyObject *tmp_type, *tmp_value, *tmp_tb;
- PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
- Py_INCREF(tb);
- PyErr_Restore(tmp_type, tmp_value, tb);
- Py_XDECREF(tmp_tb);
-#else
- PyThreadState *tstate = PyThreadState_GET();
- PyObject* tmp_tb = tstate->curexc_traceback;
- if (tb != tmp_tb) {
- Py_INCREF(tb);
- tstate->curexc_traceback = tb;
- Py_XDECREF(tmp_tb);
- }
-#endif
- }
-bad:
- Py_XDECREF(owned_instance);
- return;
-}
-#endif
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
- #if PY_MAJOR_VERSION < 3
- if (likely(PyInt_CheckExact(op2))) {
- const long a = intval;
- long x;
- long b = PyInt_AS_LONG(op2);
- x = (long)((unsigned long)a - b);
- if (likely((x^a) >= 0 || (x^~b) >= 0))
- return PyInt_FromLong(x);
- return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
- }
- #endif
- #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3
- if (likely(PyLong_CheckExact(op2))) {
- const long a = intval;
- long b, x;
- const PY_LONG_LONG lla = intval;
- PY_LONG_LONG llb, llx;
- const digit* digits = ((PyLongObject*)op2)->ob_digit;
- const Py_ssize_t size = Py_SIZE(op2);
- if (likely(__Pyx_sst_abs(size) <= 1)) {
- b = likely(size) ? digits[0] : 0;
- if (size == -1) b = -b;
- } else {
- switch (size) {
- case -2:
- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
- llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case 2:
- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
- llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case -3:
- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
- llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case 3:
- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
- llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case -4:
- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
- b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
- llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case 4:
- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
- b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
- llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
- }
- }
- x = a - b;
- return PyLong_FromLong(x);
- long_long:
- llx = lla - llb;
- return PyLong_FromLongLong(llx);
- }
- #endif
- if (PyFloat_CheckExact(op2)) {
- const long a = intval;
- double b = PyFloat_AS_DOUBLE(op2);
- double result;
- PyFPE_START_PROTECT("subtract", return NULL)
- result = ((double)a) - (double)b;
- PyFPE_END_PROTECT(result)
- return PyFloat_FromDouble(result);
- }
- return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
-}
-#endif
-
-#if CYTHON_COMPILING_IN_CPYTHON
-static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
- #if PY_MAJOR_VERSION < 3
- if (likely(PyInt_CheckExact(op1))) {
- const long b = intval;
- long x;
- long a = PyInt_AS_LONG(op1);
- if (unlikely(b == -1 && ((unsigned long)a) == 0-(unsigned long)a))
- return PyInt_Type.tp_as_number->nb_floor_divide(op1, op2);
- else {
- long q, r;
- q = a / b;
- r = a - q*b;
- q -= ((r != 0) & ((r ^ b) < 0));
- x = q;
- }
- return PyInt_FromLong(x);
- }
- #endif
- #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3
- if (likely(PyLong_CheckExact(op1))) {
- const long b = intval;
- long a, x;
- const PY_LONG_LONG llb = intval;
- PY_LONG_LONG lla, llx;
- const digit* digits = ((PyLongObject*)op1)->ob_digit;
- const Py_ssize_t size = Py_SIZE(op1);
- if (likely(__Pyx_sst_abs(size) <= 1)) {
- a = likely(size) ? digits[0] : 0;
- if (size == -1) a = -a;
- } else {
- switch (size) {
- case -2:
- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
- lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case 2:
- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
- lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case -3:
- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
- lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case 3:
- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
- lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case -4:
- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
- a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
- lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- case 4:
- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
- a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- break;
- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
- lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- goto long_long;
- }
- default: return PyLong_Type.tp_as_number->nb_floor_divide(op1, op2);
- }
- }
- {
- long q, r;
- q = a / b;
- r = a - q*b;
- q -= ((r != 0) & ((r ^ b) < 0));
- x = q;
- }
- return PyLong_FromLong(x);
- long_long:
- {
- PY_LONG_LONG q, r;
- q = lla / llb;
- r = lla - q*llb;
- q -= ((r != 0) & ((r ^ llb) < 0));
- llx = q;
- }
- return PyLong_FromLongLong(llx);
- }
- #endif
- return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2);
-}
-#endif
-
-static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
- Py_ssize_t cstart, Py_ssize_t cstop,
- PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
- int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
-#if CYTHON_COMPILING_IN_CPYTHON
- PyMappingMethods* mp;
-#if PY_MAJOR_VERSION < 3
- PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
- if (likely(ms && ms->sq_slice)) {
- if (!has_cstart) {
- if (_py_start && (*_py_start != Py_None)) {
- cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
- if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
- } else
- cstart = 0;
- }
- if (!has_cstop) {
- if (_py_stop && (*_py_stop != Py_None)) {
- cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
- if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
- } else
- cstop = PY_SSIZE_T_MAX;
- }
- if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
- Py_ssize_t l = ms->sq_length(obj);
- if (likely(l >= 0)) {
- if (cstop < 0) {
- cstop += l;
- if (cstop < 0) cstop = 0;
- }
- if (cstart < 0) {
- cstart += l;
- if (cstart < 0) cstart = 0;
- }
- } else {
- if (PyErr_ExceptionMatches(PyExc_OverflowError))
- PyErr_Clear();
- else
- goto bad;
- }
- }
- return ms->sq_slice(obj, cstart, cstop);
- }
-#endif
- mp = Py_TYPE(obj)->tp_as_mapping;
- if (likely(mp && mp->mp_subscript))
-#endif
- {
- PyObject* result;
- PyObject *py_slice, *py_start, *py_stop;
- if (_py_slice) {
- py_slice = *_py_slice;
- } else {
- PyObject* owned_start = NULL;
- PyObject* owned_stop = NULL;
- if (_py_start) {
- py_start = *_py_start;
- } else {
- if (has_cstart) {
- owned_start = py_start = PyInt_FromSsize_t(cstart);
- if (unlikely(!py_start)) goto bad;
- } else
- py_start = Py_None;
- }
- if (_py_stop) {
- py_stop = *_py_stop;
- } else {
- if (has_cstop) {
- owned_stop = py_stop = PyInt_FromSsize_t(cstop);
- if (unlikely(!py_stop)) {
- Py_XDECREF(owned_start);
- goto bad;
- }
- } else
- py_stop = Py_None;
- }
- py_slice = PySlice_New(py_start, py_stop, Py_None);
- Py_XDECREF(owned_start);
- Py_XDECREF(owned_stop);
- if (unlikely(!py_slice)) goto bad;
- }
-#if CYTHON_COMPILING_IN_CPYTHON
- result = mp->mp_subscript(obj, py_slice);
-#else
- result = PyObject_GetItem(obj, py_slice);
-#endif
- if (!_py_slice) {
- Py_DECREF(py_slice);
- }
- return result;
- }
- PyErr_Format(PyExc_TypeError,
- "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
-bad:
- return NULL;
-}
-
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
- PyObject *empty_list = 0;
- PyObject *module = 0;
- PyObject *global_dict = 0;
- PyObject *empty_dict = 0;
- PyObject *list;
- #if PY_VERSION_HEX < 0x03030000
- PyObject *py_import;
- py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
- if (!py_import)
- goto bad;
- #endif
- if (from_list)
- list = from_list;
- else {
- empty_list = PyList_New(0);
- if (!empty_list)
- goto bad;
- list = empty_list;
- }
- global_dict = PyModule_GetDict(__pyx_m);
- if (!global_dict)
- goto bad;
- empty_dict = PyDict_New();
- if (!empty_dict)
- goto bad;
- {
- #if PY_MAJOR_VERSION >= 3
- if (level == -1) {
- if (strchr(__Pyx_MODULE_NAME, '.')) {
- #if PY_VERSION_HEX < 0x03030000
- PyObject *py_level = PyInt_FromLong(1);
- if (!py_level)
- goto bad;
- module = PyObject_CallFunctionObjArgs(py_import,
- name, global_dict, empty_dict, list, py_level, NULL);
- Py_DECREF(py_level);
- #else
- module = PyImport_ImportModuleLevelObject(
- name, global_dict, empty_dict, list, 1);
- #endif
- if (!module) {
- if (!PyErr_ExceptionMatches(PyExc_ImportError))
- goto bad;
- PyErr_Clear();
- }
- }
- level = 0;
- }
- #endif
- if (!module) {
- #if PY_VERSION_HEX < 0x03030000
- PyObject *py_level = PyInt_FromLong(level);
- if (!py_level)
- goto bad;
- module = PyObject_CallFunctionObjArgs(py_import,
- name, global_dict, empty_dict, list, py_level, NULL);
- Py_DECREF(py_level);
- #else
- module = PyImport_ImportModuleLevelObject(
- name, global_dict, empty_dict, list, level);
- #endif
- }
- }
-bad:
- #if PY_VERSION_HEX < 0x03030000
- Py_XDECREF(py_import);
- #endif
- Py_XDECREF(empty_list);
- Py_XDECREF(empty_dict);
- return module;
-}
-
-static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
- PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
- if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
- PyErr_Format(PyExc_ImportError,
- #if PY_MAJOR_VERSION < 3
- "cannot import name %.230s", PyString_AS_STRING(name));
- #else
- "cannot import name %S", name);
- #endif
- }
- return value;
-}
-
-static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
- int start = 0, mid = 0, end = count - 1;
- if (end >= 0 && code_line > entries[end].code_line) {
- return count;
- }
- while (start < end) {
- mid = start + (end - start) / 2;
- if (code_line < entries[mid].code_line) {
- end = mid;
- } else if (code_line > entries[mid].code_line) {
- start = mid + 1;
- } else {
- return mid;
- }
- }
- if (code_line <= entries[mid].code_line) {
- return mid;
- } else {
- return mid + 1;
- }
-}
-static PyCodeObject *__pyx_find_code_object(int code_line) {
- PyCodeObject* code_object;
- int pos;
- if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
- return NULL;
- }
- pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
- if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
- return NULL;
- }
- code_object = __pyx_code_cache.entries[pos].code_object;
- Py_INCREF(code_object);
- return code_object;
-}
-static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
- int pos, i;
- __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
- if (unlikely(!code_line)) {
- return;
- }
- if (unlikely(!entries)) {
- entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
- if (likely(entries)) {
- __pyx_code_cache.entries = entries;
- __pyx_code_cache.max_count = 64;
- __pyx_code_cache.count = 1;
- entries[0].code_line = code_line;
- entries[0].code_object = code_object;
- Py_INCREF(code_object);
- }
- return;
- }
- pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
- if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
- PyCodeObject* tmp = entries[pos].code_object;
- entries[pos].code_object = code_object;
- Py_DECREF(tmp);
- return;
- }
- if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
- int new_max = __pyx_code_cache.max_count + 64;
- entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
- if (unlikely(!entries)) {
- return;
- }
- __pyx_code_cache.entries = entries;
- __pyx_code_cache.max_count = new_max;
- }
- for (i=__pyx_code_cache.count; i>pos; i--) {
- entries[i] = entries[i-1];
- }
- entries[pos].code_line = code_line;
- entries[pos].code_object = code_object;
- __pyx_code_cache.count++;
- Py_INCREF(code_object);
-}
-
-#include "compile.h"
-#include "frameobject.h"
-#include "traceback.h"
-static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
- const char *funcname, int c_line,
- int py_line, const char *filename) {
- PyCodeObject *py_code = 0;
- PyObject *py_srcfile = 0;
- PyObject *py_funcname = 0;
- #if PY_MAJOR_VERSION < 3
- py_srcfile = PyString_FromString(filename);
- #else
- py_srcfile = PyUnicode_FromString(filename);
- #endif
- if (!py_srcfile) goto bad;
- if (c_line) {
- #if PY_MAJOR_VERSION < 3
- py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
- #else
- py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
- #endif
- }
- else {
- #if PY_MAJOR_VERSION < 3
- py_funcname = PyString_FromString(funcname);
- #else
- py_funcname = PyUnicode_FromString(funcname);
- #endif
- }
- if (!py_funcname) goto bad;
- py_code = __Pyx_PyCode_New(
- 0,
- 0,
- 0,
- 0,
- 0,
- __pyx_empty_bytes, /*PyObject *code,*/
- __pyx_empty_tuple, /*PyObject *consts,*/
- __pyx_empty_tuple, /*PyObject *names,*/
- __pyx_empty_tuple, /*PyObject *varnames,*/
- __pyx_empty_tuple, /*PyObject *freevars,*/
- __pyx_empty_tuple, /*PyObject *cellvars,*/
- py_srcfile, /*PyObject *filename,*/
- py_funcname, /*PyObject *name,*/
- py_line,
- __pyx_empty_bytes /*PyObject *lnotab*/
- );
- Py_DECREF(py_srcfile);
- Py_DECREF(py_funcname);
- return py_code;
-bad:
- Py_XDECREF(py_srcfile);
- Py_XDECREF(py_funcname);
- return NULL;
-}
-static void __Pyx_AddTraceback(const char *funcname, int c_line,
- int py_line, const char *filename) {
- PyCodeObject *py_code = 0;
- PyFrameObject *py_frame = 0;
- py_code = __pyx_find_code_object(c_line ? c_line : py_line);
- if (!py_code) {
- py_code = __Pyx_CreateCodeObjectForTraceback(
- funcname, c_line, py_line, filename);
- if (!py_code) goto bad;
- __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
- }
- py_frame = PyFrame_New(
- PyThreadState_GET(), /*PyThreadState *tstate,*/
- py_code, /*PyCodeObject *code,*/
- __pyx_d, /*PyObject *globals,*/
- 0 /*PyObject *locals*/
- );
- if (!py_frame) goto bad;
- py_frame->f_lineno = py_line;
- PyTraceBack_Here(py_frame);
-bad:
- Py_XDECREF(py_code);
- Py_XDECREF(py_frame);
-}
-
-#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
-#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
-#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
- {\
- func_type value = func_value;\
- if (sizeof(target_type) < sizeof(func_type)) {\
- if (unlikely(value != (func_type) (target_type) value)) {\
- func_type zero = 0;\
- if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
- return (target_type) -1;\
- if (is_unsigned && unlikely(value < zero))\
- goto raise_neg_overflow;\
- else\
- goto raise_overflow;\
- }\
- }\
- return (target_type) value;\
- }
-
-static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
- const int neg_one = (int) -1, const_zero = (int) 0;
- const int is_unsigned = neg_one > const_zero;
-#if PY_MAJOR_VERSION < 3
- if (likely(PyInt_Check(x))) {
- if (sizeof(int) < sizeof(long)) {
- __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
- } else {
- long val = PyInt_AS_LONG(x);
- if (is_unsigned && unlikely(val < 0)) {
- goto raise_neg_overflow;
- }
- return (int) val;
- }
- } else
-#endif
- if (likely(PyLong_Check(x))) {
- if (is_unsigned) {
-#if CYTHON_USE_PYLONG_INTERNALS
- const digit* digits = ((PyLongObject*)x)->ob_digit;
- switch (Py_SIZE(x)) {
- case 0: return (int) 0;
- case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
- case 2:
- if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
- return (int) (((((int)digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- case 3:
- if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
- return (int) (((((((int)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- case 4:
- if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
- return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- }
-#endif
-#if CYTHON_COMPILING_IN_CPYTHON
- if (unlikely(Py_SIZE(x) < 0)) {
- goto raise_neg_overflow;
- }
-#else
- {
- int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
- if (unlikely(result < 0))
- return (int) -1;
- if (unlikely(result == 1))
- goto raise_neg_overflow;
- }
-#endif
- if (sizeof(int) <= sizeof(unsigned long)) {
- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
- }
- } else {
-#if CYTHON_USE_PYLONG_INTERNALS
- const digit* digits = ((PyLongObject*)x)->ob_digit;
- switch (Py_SIZE(x)) {
- case 0: return (int) 0;
- case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0])
- case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
- case -2:
- if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
- return (int) -(((((int)digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- case 2:
- if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
- return (int) (((((int)digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- case -3:
- if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
- return (int) -(((((((int)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- case 3:
- if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
- return (int) (((((((int)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- case -4:
- if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
- return (int) -(((((((((int)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- case 4:
- if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
- return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- }
-#endif
- if (sizeof(int) <= sizeof(long)) {
- __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
- __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
- }
- }
- {
-#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
- PyErr_SetString(PyExc_RuntimeError,
- "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
-#else
- int val;
- PyObject *v = __Pyx_PyNumber_Int(x);
- #if PY_MAJOR_VERSION < 3
- if (likely(v) && !PyLong_Check(v)) {
- PyObject *tmp = v;
- v = PyNumber_Long(tmp);
- Py_DECREF(tmp);
- }
- #endif
- if (likely(v)) {
- int one = 1; int is_little = (int)*(unsigned char *)&one;
- unsigned char *bytes = (unsigned char *)&val;
- int ret = _PyLong_AsByteArray((PyLongObject *)v,
- bytes, sizeof(val),
- is_little, !is_unsigned);
- Py_DECREF(v);
- if (likely(!ret))
- return val;
- }
-#endif
- return (int) -1;
- }
- } else {
- int val;
- PyObject *tmp = __Pyx_PyNumber_Int(x);
- if (!tmp) return (int) -1;
- val = __Pyx_PyInt_As_int(tmp);
- Py_DECREF(tmp);
- return val;
- }
-raise_overflow:
- PyErr_SetString(PyExc_OverflowError,
- "value too large to convert to int");
- return (int) -1;
-raise_neg_overflow:
- PyErr_SetString(PyExc_OverflowError,
- "can't convert negative value to int");
- return (int) -1;
-}
-
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
- const int neg_one = (int) -1, const_zero = (int) 0;
- const int is_unsigned = neg_one > const_zero;
- if (is_unsigned) {
- if (sizeof(int) < sizeof(long)) {
- return PyInt_FromLong((long) value);
- } else if (sizeof(int) <= sizeof(unsigned long)) {
- return PyLong_FromUnsignedLong((unsigned long) value);
- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
- }
- } else {
- if (sizeof(int) <= sizeof(long)) {
- return PyInt_FromLong((long) value);
- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
- return PyLong_FromLongLong((PY_LONG_LONG) value);
- }
- }
- {
- int one = 1; int little = (int)*(unsigned char *)&one;
- unsigned char *bytes = (unsigned char *)&value;
- return _PyLong_FromByteArray(bytes, sizeof(int),
- little, !is_unsigned);
- }
-}
-
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
- const long neg_one = (long) -1, const_zero = (long) 0;
- const int is_unsigned = neg_one > const_zero;
- if (is_unsigned) {
- if (sizeof(long) < sizeof(long)) {
- return PyInt_FromLong((long) value);
- } else if (sizeof(long) <= sizeof(unsigned long)) {
- return PyLong_FromUnsignedLong((unsigned long) value);
- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
- }
- } else {
- if (sizeof(long) <= sizeof(long)) {
- return PyInt_FromLong((long) value);
- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
- return PyLong_FromLongLong((PY_LONG_LONG) value);
- }
- }
- {
- int one = 1; int little = (int)*(unsigned char *)&one;
- unsigned char *bytes = (unsigned char *)&value;
- return _PyLong_FromByteArray(bytes, sizeof(long),
- little, !is_unsigned);
- }
-}
-
-static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
- const long neg_one = (long) -1, const_zero = (long) 0;
- const int is_unsigned = neg_one > const_zero;
-#if PY_MAJOR_VERSION < 3
- if (likely(PyInt_Check(x))) {
- if (sizeof(long) < sizeof(long)) {
- __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
- } else {
- long val = PyInt_AS_LONG(x);
- if (is_unsigned && unlikely(val < 0)) {
- goto raise_neg_overflow;
- }
- return (long) val;
- }
- } else
-#endif
- if (likely(PyLong_Check(x))) {
- if (is_unsigned) {
-#if CYTHON_USE_PYLONG_INTERNALS
- const digit* digits = ((PyLongObject*)x)->ob_digit;
- switch (Py_SIZE(x)) {
- case 0: return (long) 0;
- case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
- case 2:
- if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
- return (long) (((((long)digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- case 3:
- if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
- return (long) (((((((long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- case 4:
- if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
- return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- }
-#endif
-#if CYTHON_COMPILING_IN_CPYTHON
- if (unlikely(Py_SIZE(x) < 0)) {
- goto raise_neg_overflow;
- }
-#else
- {
- int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
- if (unlikely(result < 0))
- return (long) -1;
- if (unlikely(result == 1))
- goto raise_neg_overflow;
- }
-#endif
- if (sizeof(long) <= sizeof(unsigned long)) {
- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
- }
- } else {
-#if CYTHON_USE_PYLONG_INTERNALS
- const digit* digits = ((PyLongObject*)x)->ob_digit;
- switch (Py_SIZE(x)) {
- case 0: return (long) 0;
- case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0])
- case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
- case -2:
- if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- return (long) -(((((long)digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- case 2:
- if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- return (long) (((((long)digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- case -3:
- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- return (long) -(((((((long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- case 3:
- if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- return (long) (((((((long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- case -4:
- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
- return (long) -(((((((((long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- case 4:
- if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])))
- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
- return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- }
- break;
- }
-#endif
- if (sizeof(long) <= sizeof(long)) {
- __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
- __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
- }
- }
- {
-#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
- PyErr_SetString(PyExc_RuntimeError,
- "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
-#else
- long val;
- PyObject *v = __Pyx_PyNumber_Int(x);
- #if PY_MAJOR_VERSION < 3
- if (likely(v) && !PyLong_Check(v)) {
- PyObject *tmp = v;
- v = PyNumber_Long(tmp);
- Py_DECREF(tmp);
- }
- #endif
- if (likely(v)) {
- int one = 1; int is_little = (int)*(unsigned char *)&one;
- unsigned char *bytes = (unsigned char *)&val;
- int ret = _PyLong_AsByteArray((PyLongObject *)v,
- bytes, sizeof(val),
- is_little, !is_unsigned);
- Py_DECREF(v);
- if (likely(!ret))
- return val;
- }
-#endif
- return (long) -1;
- }
- } else {
- long val;
- PyObject *tmp = __Pyx_PyNumber_Int(x);
- if (!tmp) return (long) -1;
- val = __Pyx_PyInt_As_long(tmp);
- Py_DECREF(tmp);
- return val;
- }
-raise_overflow:
- PyErr_SetString(PyExc_OverflowError,
- "value too large to convert to long");
- return (long) -1;
-raise_neg_overflow:
- PyErr_SetString(PyExc_OverflowError,
- "can't convert negative value to long");
- return (long) -1;
-}
-
-static int __Pyx_check_binary_version(void) {
- char ctversion[4], rtversion[4];
- PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
- PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
- if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
- char message[200];
- PyOS_snprintf(message, sizeof(message),
- "compiletime version %s of module '%.100s' "
- "does not match runtime version %s",
- ctversion, __Pyx_MODULE_NAME, rtversion);
- return PyErr_WarnEx(NULL, message, 1);
- }
- return 0;
-}
-
-#ifndef __PYX_HAVE_RT_ImportModule
-#define __PYX_HAVE_RT_ImportModule
-static PyObject *__Pyx_ImportModule(const char *name) {
- PyObject *py_name = 0;
- PyObject *py_module = 0;
- py_name = __Pyx_PyIdentifier_FromString(name);
- if (!py_name)
- goto bad;
- py_module = PyImport_Import(py_name);
- Py_DECREF(py_name);
- return py_module;
-bad:
- Py_XDECREF(py_name);
- return 0;
-}
-#endif
-
-#ifndef __PYX_HAVE_RT_ImportType
-#define __PYX_HAVE_RT_ImportType
-static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
- size_t size, int strict)
-{
- PyObject *py_module = 0;
- PyObject *result = 0;
- PyObject *py_name = 0;
- char warning[200];
- Py_ssize_t basicsize;
-#ifdef Py_LIMITED_API
- PyObject *py_basicsize;
-#endif
- py_module = __Pyx_ImportModule(module_name);
- if (!py_module)
- goto bad;
- py_name = __Pyx_PyIdentifier_FromString(class_name);
- if (!py_name)
- goto bad;
- result = PyObject_GetAttr(py_module, py_name);
- Py_DECREF(py_name);
- py_name = 0;
- Py_DECREF(py_module);
- py_module = 0;
- if (!result)
- goto bad;
- if (!PyType_Check(result)) {
- PyErr_Format(PyExc_TypeError,
- "%.200s.%.200s is not a type object",
- module_name, class_name);
- goto bad;
- }
-#ifndef Py_LIMITED_API
- basicsize = ((PyTypeObject *)result)->tp_basicsize;
-#else
- py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
- if (!py_basicsize)
- goto bad;
- basicsize = PyLong_AsSsize_t(py_basicsize);
- Py_DECREF(py_basicsize);
- py_basicsize = 0;
- if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
- goto bad;
-#endif
- if (!strict && (size_t)basicsize > size) {
- PyOS_snprintf(warning, sizeof(warning),
- "%s.%s size changed, may indicate binary incompatibility",
- module_name, class_name);
- if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
- }
- else if ((size_t)basicsize != size) {
- PyErr_Format(PyExc_ValueError,
- "%.200s.%.200s has the wrong size, try recompiling",
- module_name, class_name);
- goto bad;
- }
- return (PyTypeObject *)result;
-bad:
- Py_XDECREF(py_module);
- Py_XDECREF(result);
- return NULL;
-}
-#endif
-
-static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
- while (t->p) {
- #if PY_MAJOR_VERSION < 3
- if (t->is_unicode) {
- *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
- } else if (t->intern) {
- *t->p = PyString_InternFromString(t->s);
- } else {
- *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
- }
- #else
- if (t->is_unicode | t->is_str) {
- if (t->intern) {
- *t->p = PyUnicode_InternFromString(t->s);
- } else if (t->encoding) {
- *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
- } else {
- *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
- }
- } else {
- *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
- }
- #endif
- if (!*t->p)
- return -1;
- ++t;
- }
- return 0;
-}
-
-static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
- return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
-}
-static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
- Py_ssize_t ignore;
- return __Pyx_PyObject_AsStringAndSize(o, &ignore);
-}
-static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
-#if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
- if (
-#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
- __Pyx_sys_getdefaultencoding_not_ascii &&
-#endif
- PyUnicode_Check(o)) {
-#if PY_VERSION_HEX < 0x03030000
- char* defenc_c;
- PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
- if (!defenc) return NULL;
- defenc_c = PyBytes_AS_STRING(defenc);
-#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
- {
- char* end = defenc_c + PyBytes_GET_SIZE(defenc);
- char* c;
- for (c = defenc_c; c < end; c++) {
- if ((unsigned char) (*c) >= 128) {
- PyUnicode_AsASCIIString(o);
- return NULL;
- }
- }
- }
-#endif
- *length = PyBytes_GET_SIZE(defenc);
- return defenc_c;
-#else
- if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
-#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
- if (PyUnicode_IS_ASCII(o)) {
- *length = PyUnicode_GET_LENGTH(o);
- return PyUnicode_AsUTF8(o);
- } else {
- PyUnicode_AsASCIIString(o);
- return NULL;
- }
-#else
- return PyUnicode_AsUTF8AndSize(o, length);
-#endif
-#endif
- } else
-#endif
-#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
- if (PyByteArray_Check(o)) {
- *length = PyByteArray_GET_SIZE(o);
- return PyByteArray_AS_STRING(o);
- } else
-#endif
- {
- char* result;
- int r = PyBytes_AsStringAndSize(o, &result, length);
- if (unlikely(r < 0)) {
- return NULL;
- } else {
- return result;
- }
- }
-}
-static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
- int is_true = x == Py_True;
- if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
- else return PyObject_IsTrue(x);
-}
-static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
- PyNumberMethods *m;
- const char *name = NULL;
- PyObject *res = NULL;
-#if PY_MAJOR_VERSION < 3
- if (PyInt_Check(x) || PyLong_Check(x))
-#else
- if (PyLong_Check(x))
-#endif
- return __Pyx_NewRef(x);
- m = Py_TYPE(x)->tp_as_number;
-#if PY_MAJOR_VERSION < 3
- if (m && m->nb_int) {
- name = "int";
- res = PyNumber_Int(x);
- }
- else if (m && m->nb_long) {
- name = "long";
- res = PyNumber_Long(x);
- }
-#else
- if (m && m->nb_int) {
- name = "int";
- res = PyNumber_Long(x);
- }
-#endif
- if (res) {
-#if PY_MAJOR_VERSION < 3
- if (!PyInt_Check(res) && !PyLong_Check(res)) {
-#else
- if (!PyLong_Check(res)) {
-#endif
- PyErr_Format(PyExc_TypeError,
- "__%.4s__ returned non-%.4s (type %.200s)",
- name, name, Py_TYPE(res)->tp_name);
- Py_DECREF(res);
- return NULL;
- }
- }
- else if (!PyErr_Occurred()) {
- PyErr_SetString(PyExc_TypeError,
- "an integer is required");
- }
- return res;
-}
-static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
- Py_ssize_t ival;
- PyObject *x;
-#if PY_MAJOR_VERSION < 3
- if (likely(PyInt_CheckExact(b))) {
- if (sizeof(Py_ssize_t) >= sizeof(long))
- return PyInt_AS_LONG(b);
- else
- return PyInt_AsSsize_t(x);
- }
-#endif
- if (likely(PyLong_CheckExact(b))) {
- #if CYTHON_USE_PYLONG_INTERNALS
- const digit* digits = ((PyLongObject*)b)->ob_digit;
- const Py_ssize_t size = Py_SIZE(b);
- if (likely(__Pyx_sst_abs(size) <= 1)) {
- ival = likely(size) ? digits[0] : 0;
- if (size == -1) ival = -ival;
- return ival;
- } else {
- switch (size) {
- case 2:
- if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
- return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- break;
- case -2:
- if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
- return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- break;
- case 3:
- if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
- return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- break;
- case -3:
- if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
- return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- break;
- case 4:
- if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
- return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- break;
- case -4:
- if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
- return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]));
- }
- break;
- }
- }
- #endif
- return PyLong_AsSsize_t(b);
- }
- x = PyNumber_Index(b);
- if (!x) return -1;
- ival = PyInt_AsSsize_t(x);
- Py_DECREF(x);
- return ival;
-}
-static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
- return PyInt_FromSize_t(ival);
-}
-
-
-#endif /* Py_PYTHON_H */
diff --git a/netcdftime/_datetime.pyx b/netcdftime/_datetime.pyx
deleted file mode 100644
index 8ac1791..0000000
--- a/netcdftime/_datetime.pyx
+++ /dev/null
@@ -1,136 +0,0 @@
-from datetime import datetime as real_datetime
-import operator
-import re
-import time
-
-from cpython.object cimport PyObject_RichCompare
-
-
-cdef class datetime(object):
-
- """
-Phony datetime object which mimics the python datetime object,
-but allows for dates that don't exist in the proleptic gregorian calendar.
-Doesn't do timedelta operations, doesn't overload + and -.
-
-Has strftime, timetuple and __repr__ methods. The format
-of the string produced by __repr__ is controlled by self.format
-(default %Y-%m-%d %H:%M:%S). Does support comparisons with other
-phony datetime and with datetime.datetime objects.
-
-Instance variables are year,month,day,hour,minute,second,dayofwk,dayofyr
-and format.
- """
- cdef readonly int year, month, day, hour, minute, dayofwk, dayofyr
- cdef readonly int second, microsecond
-
- def __init__(self, year, month, day, hour=0, minute=0, second=0,
- microsecond=0,dayofwk=-1, dayofyr=1):
- """dayofyr set to 1 by default - otherwise time.strftime will complain"""
-
- self.year = year
- self.month = month
- self.day = day
- self.hour = hour
- self.minute = minute
- self.dayofwk = dayofwk
- self.dayofyr = dayofyr
- self.second = second
- self.microsecond = microsecond
-
- property format:
- def __get__(self):
- return '%Y-%m-%d %H:%M:%S'
-
- def strftime(self, format=None):
- if format is None:
- format = self.format
- return _strftime(self, format)
-
- def timetuple(self):
- return (self.year, self.month, self.day, self.hour,
- self.minute, self.second, self.dayofwk, self.dayofyr, -1)
-
- def _to_real_datetime(self):
- return real_datetime(self.year, self.month, self.day,
- self.hour, self.minute, self.second,
- self.microsecond)
-
- def __repr__(self):
- return self.strftime(self.format)
-
- def __hash__(self):
- try:
- d = self._to_real_datetime()
- except ValueError:
- return hash(self.timetuple())
- return hash(d)
-
- def __richcmp__(self, other, int op):
- if hasattr(other, 'strftime'):
- self_str = self.strftime('%Y-%m-%d %H:%M:%S')
- other_str = other.strftime('%Y-%m-%d %H:%M:%S')
- return PyObject_RichCompare(self_str, other_str, op)
- return NotImplemented
-
- def __reduce__(self):
- """special method that allows instance to be pickled"""
- args = (self.year,self.month,self.day,self.hour,
- self.minute,self.second,self.microsecond,
- self.dayofwk,self.dayofyr)
- return (self.__class__,args)
-
-
-_illegal_s = re.compile(r"((^|[^%])(%%)*%s)")
-
-
-def _findall(text, substr):
- # Also finds overlaps
- sites = []
- i = 0
- while 1:
- j = text.find(substr, i)
- if j == -1:
- break
- sites.append(j)
- i = j + 1
- return sites
-
-# Every 28 years the calendar repeats, except through century leap
-# years where it's 6 years. But only if you're using the Gregorian
-# calendar. ;)
-
-
-def _strftime(dt, fmt):
- if _illegal_s.search(fmt):
- raise TypeError("This strftime implementation does not handle %s")
- # don't use strftime method at all.
- # if dt.year > 1900:
- # return dt.strftime(fmt)
-
- year = dt.year
- # For every non-leap year century, advance by
- # 6 years to get into the 28-year repeat cycle
- delta = 2000 - year
- off = 6 * (delta // 100 + delta // 400)
- year = year + off
-
- # Move to around the year 2000
- year = year + ((2000 - year) // 28) * 28
- timetuple = dt.timetuple()
- s1 = time.strftime(fmt, (year,) + timetuple[1:])
- sites1 = _findall(s1, str(year))
-
- s2 = time.strftime(fmt, (year + 28,) + timetuple[1:])
- sites2 = _findall(s2, str(year + 28))
-
- sites = []
- for site in sites1:
- if site in sites2:
- sites.append(site)
-
- s = s1
- syear = "%4d" % (dt.year,)
- for site in sites:
- s = s[:site] + syear + s[site + 4:]
- return s
diff --git a/netcdftime/_netcdftime.c b/netcdftime/_netcdftime.c
new file mode 100644
index 0000000..a671b8f
--- /dev/null
+++ b/netcdftime/_netcdftime.c
@@ -0,0 +1,35225 @@
+/* Generated by Cython 0.25.1 */
+
+#define PY_SSIZE_T_CLEAN
+#include "Python.h"
+#ifndef Py_PYTHON_H
+ #error Python headers needed to compile C extensions, please install development version of Python.
+#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"
+#include <stddef.h>
+#ifndef offsetof
+ #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+ #ifndef __stdcall
+ #define __stdcall
+ #endif
+ #ifndef __cdecl
+ #define __cdecl
+ #endif
+ #ifndef __fastcall
+ #define __fastcall
+ #endif
+#endif
+#ifndef DL_IMPORT
+ #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+ #define DL_EXPORT(t) t
+#endif
+#ifndef HAVE_LONG_LONG
+ #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
+ #define HAVE_LONG_LONG
+ #endif
+#endif
+#ifndef PY_LONG_LONG
+ #define PY_LONG_LONG LONG_LONG
+#endif
+#ifndef Py_HUGE_VAL
+ #define Py_HUGE_VAL HUGE_VAL
+#endif
+#ifdef PYPY_VERSION
+ #define CYTHON_COMPILING_IN_PYPY 1
+ #define CYTHON_COMPILING_IN_PYSTON 0
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #undef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 0
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #undef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 1
+ #undef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 0
+ #undef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 0
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
+#elif defined(PYSTON_VERSION)
+ #define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 1
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
+#else
+ #define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 0
+ #define CYTHON_COMPILING_IN_CPYTHON 1
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #elif !defined(CYTHON_USE_ASYNC_SLOTS)
+ #define CYTHON_USE_ASYNC_SLOTS 1
+ #endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
+ #define CYTHON_USE_PYLONG_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #if PY_VERSION_HEX < 0x030300F0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #elif !defined(CYTHON_USE_UNICODE_WRITER)
+ #define CYTHON_USE_UNICODE_WRITER 1
+ #endif
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #ifndef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 1
+ #endif
+ #ifndef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 1
+ #endif
+#endif
+#if !defined(CYTHON_FAST_PYCCALL)
+#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
+#endif
+#if CYTHON_USE_PYLONG_INTERNALS
+ #include "longintrepr.h"
+ #undef SHIFT
+ #undef BASE
+ #undef MASK
+#endif
+#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
+ #define Py_OptimizeFlag 0
+#endif
+#define __PYX_BUILD_PY_SSIZE_T "n"
+#define CYTHON_FORMAT_SSIZE_T "z"
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyClass_Type
+#else
+ #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyType_Type
+#endif
+#ifndef Py_TPFLAGS_CHECKTYPES
+ #define Py_TPFLAGS_CHECKTYPES 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_INDEX
+ #define Py_TPFLAGS_HAVE_INDEX 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
+ #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_FINALIZE
+ #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
+#ifndef METH_FASTCALL
+ #define METH_FASTCALL 0x80
+ typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args,
+ Py_ssize_t nargs, PyObject *kwnames);
+#else
+ #define __Pyx_PyCFunctionFast _PyCFunctionFast
+#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)))
+#else
+#define __Pyx_PyFastCFunction_Check(func) 0
+#endif
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+ #define CYTHON_PEP393_ENABLED 1
+ #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
+ 0 : _PyUnicode_Ready((PyObject *)(op)))
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
+ #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
+ #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
+ #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
+#else
+ #define CYTHON_PEP393_ENABLED 0
+ #define PyUnicode_1BYTE_KIND 1
+ #define PyUnicode_2BYTE_KIND 2
+ #define PyUnicode_4BYTE_KIND 4
+ #define __Pyx_PyUnicode_READY(op) (0)
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
+ #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
+ #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
+ #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+ #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
+#else
+ #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
+ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
+ #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
+ #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
+ #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
+ #define PyObject_Malloc(s) PyMem_Malloc(s)
+ #define PyObject_Free(p) PyMem_Free(p)
+ #define PyObject_Realloc(p) PyMem_Realloc(p)
+#endif
+#if CYTHON_COMPILING_IN_PYSTON
+ #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
+#else
+ #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
+#endif
+#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
+#else
+ #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
+#endif
+#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
+ #define PyObject_ASCII(o) PyObject_Repr(o)
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBaseString_Type PyUnicode_Type
+ #define PyStringObject PyUnicodeObject
+ #define PyString_Type PyUnicode_Type
+ #define PyString_Check PyUnicode_Check
+ #define PyString_CheckExact PyUnicode_CheckExact
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+ #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+ #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
+ #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
+#ifndef PySet_CheckExact
+ #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
+#endif
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
+#if PY_MAJOR_VERSION >= 3
+ #define PyIntObject PyLongObject
+ #define PyInt_Type PyLong_Type
+ #define PyInt_Check(op) PyLong_Check(op)
+ #define PyInt_CheckExact(op) PyLong_CheckExact(op)
+ #define PyInt_FromString PyLong_FromString
+ #define PyInt_FromUnicode PyLong_FromUnicode
+ #define PyInt_FromLong PyLong_FromLong
+ #define PyInt_FromSize_t PyLong_FromSize_t
+ #define PyInt_FromSsize_t PyLong_FromSsize_t
+ #define PyInt_AsLong PyLong_AsLong
+ #define PyInt_AS_LONG PyLong_AS_LONG
+ #define PyInt_AsSsize_t PyLong_AsSsize_t
+ #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
+ #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+ #define PyNumber_Int PyNumber_Long
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBoolObject PyLongObject
+#endif
+#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
+ #ifndef PyUnicode_InternFromString
+ #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
+ #endif
+#endif
+#if PY_VERSION_HEX < 0x030200A4
+ typedef long Py_hash_t;
+ #define __Pyx_PyInt_FromHash_t PyInt_FromLong
+ #define __Pyx_PyInt_AsHash_t PyInt_AsLong
+#else
+ #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
+ #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
+#else
+ #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
+#endif
+#if CYTHON_USE_ASYNC_SLOTS
+ #if PY_VERSION_HEX >= 0x030500B1
+ #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
+ #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
+ #else
+ typedef struct {
+ unaryfunc am_await;
+ unaryfunc am_aiter;
+ unaryfunc am_anext;
+ } __Pyx_PyAsyncMethodsStruct;
+ #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
+ #endif
+#else
+ #define __Pyx_PyType_AsAsync(obj) NULL
+#endif
+#ifndef CYTHON_RESTRICT
+ #if defined(__GNUC__)
+ #define CYTHON_RESTRICT __restrict__
+ #elif defined(_MSC_VER) && _MSC_VER >= 1400
+ #define CYTHON_RESTRICT __restrict
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_RESTRICT restrict
+ #else
+ #define CYTHON_RESTRICT
+ #endif
+#endif
+#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
+
+#ifndef CYTHON_INLINE
+ #if defined(__GNUC__)
+ #define CYTHON_INLINE __inline__
+ #elif defined(_MSC_VER)
+ #define CYTHON_INLINE __inline
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_INLINE inline
+ #else
+ #define CYTHON_INLINE
+ #endif
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+ #define _USE_MATH_DEFINES
+#endif
+#include <math.h>
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+ float value;
+ memset(&value, 0xFF, sizeof(value));
+ return value;
+}
+#endif
+#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
+#define __Pyx_truncl trunc
+#else
+#define __Pyx_truncl truncl
+#endif
+
+
+#define __PYX_ERR(f_index, lineno, Ln_error) \
+{ \
+ __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
+}
+
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
+#else
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
+#endif
+
+#ifndef __PYX_EXTERN_C
+ #ifdef __cplusplus
+ #define __PYX_EXTERN_C extern "C"
+ #else
+ #define __PYX_EXTERN_C extern
+ #endif
+#endif
+
+#define __PYX_HAVE__netcdftime___netcdftime
+#define __PYX_HAVE_API__netcdftime___netcdftime
+#include <string.h>
+#include <stdio.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif /* _OPENMP */
+
+#ifdef PYREX_WITHOUT_ASSERTIONS
+#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;
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_uchar_cast(c) ((unsigned char)c)
+#define __Pyx_long_cast(x) ((long)x)
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
+ (sizeof(type) < sizeof(Py_ssize_t)) ||\
+ (sizeof(type) > sizeof(Py_ssize_t) &&\
+ likely(v < (type)PY_SSIZE_T_MAX ||\
+ v == (type)PY_SSIZE_T_MAX) &&\
+ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
+ v == (type)PY_SSIZE_T_MIN))) ||\
+ (sizeof(type) == sizeof(Py_ssize_t) &&\
+ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
+ v == (type)PY_SSIZE_T_MAX))) )
+#if defined (__cplusplus) && __cplusplus >= 201103L
+ #include <cstdlib>
+ #define __Pyx_sst_abs(value) std::abs(value)
+#elif SIZEOF_INT >= SIZEOF_SIZE_T
+ #define __Pyx_sst_abs(value) abs(value)
+#elif SIZEOF_LONG >= SIZEOF_SIZE_T
+ #define __Pyx_sst_abs(value) labs(value)
+#elif defined (_MSC_VER) && defined (_M_X64)
+ #define __Pyx_sst_abs(value) _abs64(value)
+#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define __Pyx_sst_abs(value) llabs(value)
+#elif defined (__GNUC__)
+ #define __Pyx_sst_abs(value) __builtin_llabs(value)
+#else
+ #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
+#endif
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+ #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
+#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
+#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
+#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
+#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
+#if PY_MAJOR_VERSION < 3
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
+{
+ const Py_UNICODE *u_end = u;
+ while (*u_end++) ;
+ return (size_t)(u_end - u - 1);
+}
+#else
+#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
+#endif
+#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
+#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
+#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
+#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+#if CYTHON_ASSUME_SAFE_MACROS
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
+#else
+#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
+#endif
+#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ PyObject* ascii_chars_u = NULL;
+ PyObject* ascii_chars_b = NULL;
+ const char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ if (strcmp(default_encoding_c, "ascii") == 0) {
+ __Pyx_sys_getdefaultencoding_not_ascii = 0;
+ } else {
+ char ascii_chars[128];
+ int c;
+ for (c = 0; c < 128; c++) {
+ ascii_chars[c] = c;
+ }
+ __Pyx_sys_getdefaultencoding_not_ascii = 1;
+ ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+ if (!ascii_chars_u) goto bad;
+ ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+ if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+ PyErr_Format(
+ PyExc_ValueError,
+ "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+ default_encoding_c);
+ goto bad;
+ }
+ Py_DECREF(ascii_chars_u);
+ Py_DECREF(ascii_chars_b);
+ }
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ Py_XDECREF(ascii_chars_u);
+ Py_XDECREF(ascii_chars_b);
+ return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+ if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
+ strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ return -1;
+}
+#endif
+#endif
+
+
+/* Test for GCC > 2.95 */
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
+ #define likely(x) __builtin_expect(!!(x), 1)
+ #define unlikely(x) __builtin_expect(!!(x), 0)
+#else /* !__GNUC__ or GCC < 2.95 */
+ #define likely(x) (x)
+ #define unlikely(x) (x)
+#endif /* __GNUC__ */
+
+static PyObject *__pyx_m;
+static PyObject *__pyx_d;
+static PyObject *__pyx_b;
+static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
+static PyObject *__pyx_empty_unicode;
+static int __pyx_lineno;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+
+
+static const char *__pyx_f[] = {
+ "netcdftime/_netcdftime.pyx",
+ "type.pxd",
+};
+
+/*--- Type declarations ---*/
+struct __pyx_obj_10netcdftime_11_netcdftime_datetime;
+struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeNoLeap;
+struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeAllLeap;
+struct __pyx_obj_10netcdftime_11_netcdftime_Datetime360Day;
+struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeJulian;
+struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeGregorian;
+struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeProlepticGregorian;
+
+/* "netcdftime/_netcdftime.pyx":1188
+ * _converters[calendar] = utime("seconds since 1-1-1", calendar)
+ *
+ * cdef class datetime(object): # <<<<<<<<<<<<<<
+ * """
+ * The base class implementing most methods of datetime classes that
+ */
+struct __pyx_obj_10netcdftime_11_netcdftime_datetime {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime *__pyx_vtab;
+ int year;
+ int month;
+ int day;
+ int hour;
+ int minute;
+ int dayofwk;
+ int dayofyr;
+ int second;
+ int microsecond;
+ PyObject *calendar;
+ int datetime_compatible;
+};
+
+
+/* "netcdftime/_netcdftime.pyx":1352
+ * return NotImplemented
+ *
+ * cdef class DatetimeNoLeap(datetime): # <<<<<<<<<<<<<<
+ * """
+ * Phony datetime object which mimics the python datetime object,
+ */
+struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeNoLeap {
+ struct __pyx_obj_10netcdftime_11_netcdftime_datetime __pyx_base;
+};
+
+
+/* "netcdftime/_netcdftime.pyx":1365
+ * return DatetimeNoLeap(*add_timedelta(self, delta, no_leap, False))
+ *
+ * cdef class DatetimeAllLeap(datetime): # <<<<<<<<<<<<<<
+ * """
+ * Phony datetime object which mimics the python datetime object,
+ */
+struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeAllLeap {
+ struct __pyx_obj_10netcdftime_11_netcdftime_datetime __pyx_base;
+};
+
+
+/* "netcdftime/_netcdftime.pyx":1378
+ * return DatetimeAllLeap(*add_timedelta(self, delta, all_leap, False))
+ *
+ * cdef class Datetime360Day(datetime): # <<<<<<<<<<<<<<
+ * """
+ * Phony datetime object which mimics the python datetime object,
+ */
+struct __pyx_obj_10netcdftime_11_netcdftime_Datetime360Day {
+ struct __pyx_obj_10netcdftime_11_netcdftime_datetime __pyx_base;
+};
+
+
+/* "netcdftime/_netcdftime.pyx":1391
+ * return Datetime360Day(*add_timedelta_360_day(self, delta))
+ *
+ * cdef class DatetimeJulian(datetime): # <<<<<<<<<<<<<<
+ * """
+ * Phony datetime object which mimics the python datetime object,
+ */
+struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeJulian {
+ struct __pyx_obj_10netcdftime_11_netcdftime_datetime __pyx_base;
+};
+
+
+/* "netcdftime/_netcdftime.pyx":1404
+ * return DatetimeJulian(*add_timedelta(self, delta, is_leap_julian, False))
+ *
+ * cdef class DatetimeGregorian(datetime): # <<<<<<<<<<<<<<
+ * """
+ * Phony datetime object which mimics the python datetime object,
+ */
+struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeGregorian {
+ struct __pyx_obj_10netcdftime_11_netcdftime_datetime __pyx_base;
+};
+
+
+/* "netcdftime/_netcdftime.pyx":1431
+ * return DatetimeGregorian(*add_timedelta(self, delta, is_leap_gregorian, True))
+ *
+ * cdef class DatetimeProlepticGregorian(datetime): # <<<<<<<<<<<<<<
+ * """
+ * Phony datetime object which mimics the python datetime object,
+ */
+struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeProlepticGregorian {
+ struct __pyx_obj_10netcdftime_11_netcdftime_datetime __pyx_base;
+};
+
+
+
+/* "netcdftime/_netcdftime.pyx":1188
+ * _converters[calendar] = utime("seconds since 1-1-1", calendar)
+ *
+ * cdef class datetime(object): # <<<<<<<<<<<<<<
+ * """
+ * The base class implementing most methods of datetime classes that
+ */
+
+struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime {
+ PyObject *(*_to_real_datetime)(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *, int __pyx_skip_dispatch);
+ PyObject *(*to_tuple)(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *);
+ PyObject *(*_getstate)(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *);
+ PyObject *(*_add_timedelta)(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *, PyObject *);
+};
+static struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime *__pyx_vtabptr_10netcdftime_11_netcdftime_datetime;
+
+
+/* "netcdftime/_netcdftime.pyx":1352
+ * return NotImplemented
+ *
+ * cdef class DatetimeNoLeap(datetime): # <<<<<<<<<<<<<<
+ * """
+ * Phony datetime object which mimics the python datetime object,
+ */
+
+struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeNoLeap {
+ struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime __pyx_base;
+};
+static struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeNoLeap *__pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeNoLeap;
+
+
+/* "netcdftime/_netcdftime.pyx":1365
+ * return DatetimeNoLeap(*add_timedelta(self, delta, no_leap, False))
+ *
+ * cdef class DatetimeAllLeap(datetime): # <<<<<<<<<<<<<<
+ * """
+ * Phony datetime object which mimics the python datetime object,
+ */
+
+struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeAllLeap {
+ struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime __pyx_base;
+};
+static struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeAllLeap *__pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeAllLeap;
+
+
+/* "netcdftime/_netcdftime.pyx":1378
+ * return DatetimeAllLeap(*add_timedelta(self, delta, all_leap, False))
+ *
+ * cdef class Datetime360Day(datetime): # <<<<<<<<<<<<<<
+ * """
+ * Phony datetime object which mimics the python datetime object,
+ */
+
+struct __pyx_vtabstruct_10netcdftime_11_netcdftime_Datetime360Day {
+ struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime __pyx_base;
+};
+static struct __pyx_vtabstruct_10netcdftime_11_netcdftime_Datetime360Day *__pyx_vtabptr_10netcdftime_11_netcdftime_Datetime360Day;
+
+
+/* "netcdftime/_netcdftime.pyx":1391
+ * return Datetime360Day(*add_timedelta_360_day(self, delta))
+ *
+ * cdef class DatetimeJulian(datetime): # <<<<<<<<<<<<<<
+ * """
+ * Phony datetime object which mimics the python datetime object,
+ */
+
+struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeJulian {
+ struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime __pyx_base;
+};
+static struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeJulian *__pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeJulian;
+
+
+/* "netcdftime/_netcdftime.pyx":1404
+ * return DatetimeJulian(*add_timedelta(self, delta, is_leap_julian, False))
+ *
+ * cdef class DatetimeGregorian(datetime): # <<<<<<<<<<<<<<
+ * """
+ * Phony datetime object which mimics the python datetime object,
+ */
+
+struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeGregorian {
+ struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime __pyx_base;
+};
+static struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeGregorian *__pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeGregorian;
+
+
+/* "netcdftime/_netcdftime.pyx":1431
+ * return DatetimeGregorian(*add_timedelta(self, delta, is_leap_gregorian, True))
+ *
+ * cdef class DatetimeProlepticGregorian(datetime): # <<<<<<<<<<<<<<
+ * """
+ * Phony datetime object which mimics the python datetime object,
+ */
+
+struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeProlepticGregorian {
+ struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime __pyx_base;
+};
+static struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeProlepticGregorian *__pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeProlepticGregorian;
+
+/* --- Runtime support code (head) --- */
+/* Refnanny.proto */
+#ifndef CYTHON_REFNANNY
+ #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+ typedef struct {
+ void (*INCREF)(void*, PyObject*, int);
+ void (*DECREF)(void*, PyObject*, int);
+ void (*GOTREF)(void*, PyObject*, int);
+ void (*GIVEREF)(void*, PyObject*, int);
+ void* (*SetupContext)(const char*, int, const char*);
+ void (*FinishContext)(void**);
+ } __Pyx_RefNannyAPIStruct;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
+ #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ if (acquire_gil) {\
+ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ PyGILState_Release(__pyx_gilstate_save);\
+ } else {\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ }
+#else
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+ #define __Pyx_RefNannyFinishContext()\
+ __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+ #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+ #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+ #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+ #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+ #define __Pyx_RefNannyDeclarations
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)
+ #define __Pyx_RefNannyFinishContext()
+ #define __Pyx_INCREF(r) Py_INCREF(r)
+ #define __Pyx_DECREF(r) Py_DECREF(r)
+ #define __Pyx_GOTREF(r)
+ #define __Pyx_GIVEREF(r)
+ #define __Pyx_XINCREF(r) Py_XINCREF(r)
+ #define __Pyx_XDECREF(r) Py_XDECREF(r)
+ #define __Pyx_XGOTREF(r)
+ #define __Pyx_XGIVEREF(r)
+#endif
+#define __Pyx_XDECREF_SET(r, v) do {\
+ PyObject *tmp = (PyObject *) r;\
+ r = v; __Pyx_XDECREF(tmp);\
+ } while (0)
+#define __Pyx_DECREF_SET(r, v) do {\
+ PyObject *tmp = (PyObject *) r;\
+ r = v; __Pyx_DECREF(tmp);\
+ } while (0)
+#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+
+/* PyObjectGetAttrStr.proto */
+#if CYTHON_USE_TYPE_SLOTS
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_getattro))
+ return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_getattr))
+ return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+ return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+/* GetBuiltinName.proto */
+static PyObject *__Pyx_GetBuiltinName(PyObject *name);
+
+/* RaiseDoubleKeywords.proto */
+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
+
+/* ParseKeywords.proto */
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
+ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
+ const char* function_name);
+
+/* RaiseArgTupleInvalid.proto */
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+ Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
+
+/* GetItemInt.proto */
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
+ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
+ __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+ int is_list, int wraparound, int boundscheck);
+
+/* PyThreadStateGet.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
+#define __Pyx_PyThreadState_assign __pyx_tstate = PyThreadState_GET();
+#else
+#define __Pyx_PyThreadState_declare
+#define __Pyx_PyThreadState_assign
+#endif
+
+/* SaveResetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
+#else
+#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
+#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
+#endif
+
+/* GetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#else
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
+#endif
+
+/* GetModuleGlobalName.proto */
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
+
+/* PyCFunctionFastCall.proto */
+#if CYTHON_FAST_PYCCALL
+static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
+#else
+#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
+#endif
+
+/* PyFunctionFastCall.proto */
+#if CYTHON_FAST_PYCALL
+#define __Pyx_PyFunction_FastCall(func, args, nargs)\
+ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
+#else
+#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
+#endif
+#endif
+
+/* PyObjectCall.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
+/* PyObjectCallMethO.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
+#endif
+
+/* PyObjectCallOneArg.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
+
+/* PyObjectCallNoArg.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
+#else
+#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
+#endif
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
+ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
+#endif
+
+/* PyFloatBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace);
+#else
+#define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace)\
+ ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
+ #endif
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace)\
+ (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
+#endif
+
+/* PyFloatBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyFloat_AddObjC(PyObject *op1, PyObject *op2, double floatval, int inplace);
+#else
+#define __Pyx_PyFloat_AddObjC(op1, op2, floatval, inplace)\
+ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
+#endif
+
+/* IncludeStringH.proto */
+#include <string.h>
+
+/* BytesEquals.proto */
+static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
+
+/* UnicodeEquals.proto */
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
+
+/* StrEquals.proto */
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
+#else
+#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
+#endif
+
+/* PyErrFetchRestore.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
+#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
+#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
+#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
+static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#else
+#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
+#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
+#endif
+
+/* RaiseException.proto */
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_SubtractCObj(op1, op2, intval, inplace)\
+ (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
+#endif
+
+/* PyFloatBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyFloat_SubtractObjC(PyObject *op1, PyObject *op2, double floatval, int inplace);
+#else
+#define __Pyx_PyFloat_SubtractObjC(op1, op2, floatval, inplace)\
+ (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
+#endif
+
+/* PyFloatBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyFloat_AddCObj(PyObject *op1, PyObject *op2, double floatval, int inplace);
+#else
+#define __Pyx_PyFloat_AddCObj(op1, op2, floatval, inplace)\
+ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
+#endif
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
+ PyObject_RichCompare(op1, op2, Py_EQ)
+ #endif
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_RemainderObjC(op1, op2, intval, inplace)\
+ (inplace ? PyNumber_InPlaceRemainder(op1, op2) : PyNumber_Remainder(op1, op2))
+#endif
+
+/* PySequenceContains.proto */
+static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
+ int result = PySequence_Contains(seq, item);
+ return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+/* None.proto */
+static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
+
+/* ListCompAppend.proto */
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
+ PyListObject* L = (PyListObject*) list;
+ Py_ssize_t len = Py_SIZE(list);
+ if (likely(L->allocated > len)) {
+ Py_INCREF(x);
+ PyList_SET_ITEM(list, len, x);
+ Py_SIZE(list) = len+1;
+ return 0;
+ }
+ return PyList_Append(list, x);
+}
+#else
+#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
+#endif
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_FloorDivideObjC(op1, op2, intval, inplace)\
+ (inplace ? PyNumber_InPlaceFloorDivide(op1, op2) : PyNumber_FloorDivide(op1, op2))
+#endif
+
+/* RaiseTooManyValuesToUnpack.proto */
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+
+/* RaiseNeedMoreValuesToUnpack.proto */
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+/* IterFinish.proto */
+static CYTHON_INLINE int __Pyx_IterFinish(void);
+
+/* UnpackItemEndCheck.proto */
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
+
+/* SliceObject.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
+ PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
+ PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
+ int has_cstart, int has_cstop, int wraparound);
+
+/* PyObjectSetAttrStr.proto */
+#if CYTHON_USE_TYPE_SLOTS
+#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
+static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_setattro))
+ return tp->tp_setattro(obj, attr_name, value);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_setattr))
+ return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
+#endif
+ return PyObject_SetAttr(obj, attr_name, value);
+}
+#else
+#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
+#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
+#endif
+
+/* ListAppend.proto */
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+ PyListObject* L = (PyListObject*) list;
+ Py_ssize_t len = Py_SIZE(list);
+ if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
+ Py_INCREF(x);
+ PyList_SET_ITEM(list, len, x);
+ Py_SIZE(list) = len+1;
+ return 0;
+ }
+ return PyList_Append(list, x);
+}
+#else
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#endif
+
+/* PyObjectCallMethod1.proto */
+static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
+
+/* append.proto */
+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
+
+/* PyErrExceptionMatches.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
+static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
+#else
+#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
+#endif
+
+/* GetAttr.proto */
+static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
+
+/* GetAttr3.proto */
+static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
+
+/* Import.proto */
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
+
+/* pyobject_as_double.proto */
+static double __Pyx__PyObject_AsDouble(PyObject* obj);
+#if CYTHON_COMPILING_IN_PYPY
+#define __Pyx_PyObject_AsDouble(obj)\
+(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) :\
+ likely(PyInt_CheckExact(obj)) ?\
+ PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
+#else
+#define __Pyx_PyObject_AsDouble(obj)\
+((likely(PyFloat_CheckExact(obj))) ?\
+ PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
+#endif
+
+/* KeywordStringCheck.proto */
+static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
+
+/* py_dict_items.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);
+
+/* UnpackUnboundCMethod.proto */
+typedef struct {
+ PyObject *type;
+ PyObject **method_name;
+ PyCFunction func;
+ PyObject *method;
+ int flag;
+} __Pyx_CachedCFunction;
+
+/* CallUnboundCMethod0.proto */
+static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_CallUnboundCMethod0(cfunc, self)\
+ ((likely((cfunc)->func)) ?\
+ (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\
+ (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
+ ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\
+ (PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ? (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\
+ __Pyx__CallUnboundCMethod0(cfunc, self))))) :\
+ __Pyx__CallUnboundCMethod0(cfunc, self))
+#else
+#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
+#endif
+
+/* ExtTypeTest.proto */
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
+
+/* DictGetItem.proto */
+#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
+static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
+ PyObject *value;
+ value = PyDict_GetItemWithError(d, key);
+ if (unlikely(!value)) {
+ if (!PyErr_Occurred()) {
+ PyObject* args = PyTuple_Pack(1, key);
+ if (likely(args))
+ PyErr_SetObject(PyExc_KeyError, args);
+ Py_XDECREF(args);
+ }
+ return NULL;
+ }
+ Py_INCREF(value);
+ return value;
+}
+#else
+ #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
+#endif
+
+/* None.proto */
+static CYTHON_INLINE long __Pyx_mod_long(long, long);
+
+/* None.proto */
+static CYTHON_INLINE long __Pyx_div_long(long, long);
+
+/* SetVTable.proto */
+static int __Pyx_SetVtable(PyObject *dict, void *vtable);
+
+/* ImportFrom.proto */
+static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
+
+/* FetchCommonType.proto */
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
+
+/* CythonFunction.proto */
+#define __Pyx_CyFunction_USED 1
+#include <structmember.h>
+#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
+#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
+#define __Pyx_CYFUNCTION_CCLASS 0x04
+#define __Pyx_CyFunction_GetClosure(f)\
+ (((__pyx_CyFunctionObject *) (f))->func_closure)
+#define __Pyx_CyFunction_GetClassObj(f)\
+ (((__pyx_CyFunctionObject *) (f))->func_classobj)
+#define __Pyx_CyFunction_Defaults(type, f)\
+ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
+#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
+ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
+typedef struct {
+ PyCFunctionObject func;
+#if PY_VERSION_HEX < 0x030500A0
+ PyObject *func_weakreflist;
+#endif
+ PyObject *func_dict;
+ PyObject *func_name;
+ PyObject *func_qualname;
+ PyObject *func_doc;
+ PyObject *func_globals;
+ PyObject *func_code;
+ PyObject *func_closure;
+ PyObject *func_classobj;
+ void *defaults;
+ int defaults_pyobjects;
+ int flags;
+ PyObject *defaults_tuple;
+ PyObject *defaults_kwdict;
+ PyObject *(*defaults_getter)(PyObject *);
+ PyObject *func_annotations;
+} __pyx_CyFunctionObject;
+static PyTypeObject *__pyx_CyFunctionType = 0;
+#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
+ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
+ int flags, PyObject* qualname,
+ PyObject *self,
+ PyObject *module, PyObject *globals,
+ PyObject* code);
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
+ size_t size,
+ int pyobjects);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
+ PyObject *tuple);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
+ PyObject *dict);
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
+ PyObject *dict);
+static int __pyx_CyFunction_init(void);
+
+/* CalculateMetaclass.proto */
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
+
+/* Py3ClassCreate.proto */
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
+ PyObject *mkw, PyObject *modname, PyObject *doc);
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
+ PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
+
+/* CodeObjectCache.proto */
+typedef struct {
+ PyCodeObject* code_object;
+ int code_line;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+ int count;
+ int max_count;
+ __Pyx_CodeObjectCacheEntry* entries;
+};
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+
+/* AddTraceback.proto */
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+
+/* CheckBinaryVersion.proto */
+static int __Pyx_check_binary_version(void);
+
+/* PyIdentifierFromString.proto */
+#if !defined(__Pyx_PyIdentifier_FromString)
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
+#else
+ #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
+#endif
+#endif
+
+/* ModuleImport.proto */
+static PyObject *__Pyx_ImportModule(const char *name);
+
+/* TypeImport.proto */
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);
+
+/* InitStrings.proto */
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_8datetime__to_real_datetime(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_8datetime_to_tuple(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_8datetime__getstate(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_8datetime__add_timedelta(CYTHON_UNUSED struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_other); /* proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_14DatetimeNoLeap__add_timedelta(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeNoLeap *__pyx_v_self, PyObject *__pyx_v_delta); /* proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_15DatetimeAllLeap__add_timedelta(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeAllLeap *__pyx_v_self, PyObject *__pyx_v_delta); /* proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_14Datetime360Day__add_timedelta(struct __pyx_obj_10netcdftime_11_netcdftime_Datetime360Day *__pyx_v_self, PyObject *__pyx_v_delta); /* proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_14DatetimeJulian__add_timedelta(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeJulian *__pyx_v_self, PyObject *__pyx_v_delta); /* proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_17DatetimeGregorian__add_timedelta(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeGregorian *__pyx_v_self, PyObject *__pyx_v_delta); /* proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_26DatetimeProlepticGregorian__add_timedelta(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeProlepticGregorian *__pyx_v_self, PyObject *__pyx_v_delta); /* proto*/
+
+/* Module declarations from 'libc.string' */
+
+/* Module declarations from 'libc.stdio' */
+
+/* Module declarations from '__builtin__' */
+
+/* Module declarations from 'cpython.type' */
+static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
+
+/* Module declarations from 'cpython' */
+
+/* Module declarations from 'cpython.object' */
+
+/* Module declarations from 'netcdftime._netcdftime' */
+static PyTypeObject *__pyx_ptype_10netcdftime_11_netcdftime_datetime = 0;
+static PyTypeObject *__pyx_ptype_10netcdftime_11_netcdftime_DatetimeNoLeap = 0;
+static PyTypeObject *__pyx_ptype_10netcdftime_11_netcdftime_DatetimeAllLeap = 0;
+static PyTypeObject *__pyx_ptype_10netcdftime_11_netcdftime_Datetime360Day = 0;
+static PyTypeObject *__pyx_ptype_10netcdftime_11_netcdftime_DatetimeJulian = 0;
+static PyTypeObject *__pyx_ptype_10netcdftime_11_netcdftime_DatetimeGregorian = 0;
+static PyTypeObject *__pyx_ptype_10netcdftime_11_netcdftime_DatetimeProlepticGregorian = 0;
+static PyObject *__pyx_v_10netcdftime_11_netcdftime__converters = 0;
+static int __pyx_v_10netcdftime_11_netcdftime_month_lengths_365_day[13];
+static int __pyx_v_10netcdftime_11_netcdftime_month_lengths_366_day[13];
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__NoLeapDayFromDate(PyObject *); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__AllLeapFromDate(PyObject *); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__360DayFromDate(PyObject *); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__DateFromNoLeapDay(PyObject *); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__DateFromAllLeap(PyObject *); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__DateFrom360Day(PyObject *); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__dateparse(PyObject *); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__parse_timezone(PyObject *); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__parse_date(PyObject *, int __pyx_skip_dispatch); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__check_index(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__toscalar(PyObject *); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_to_tuple(PyObject *); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__findall(PyObject *, PyObject *); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__strftime(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *, PyObject *); /*proto*/
+static int __pyx_f_10netcdftime_11_netcdftime_is_leap_julian(int); /*proto*/
+static int __pyx_f_10netcdftime_11_netcdftime_is_leap_proleptic_gregorian(int); /*proto*/
+static int __pyx_f_10netcdftime_11_netcdftime_is_leap_gregorian(int); /*proto*/
+static int __pyx_f_10netcdftime_11_netcdftime_all_leap(int); /*proto*/
+static int __pyx_f_10netcdftime_11_netcdftime_no_leap(int); /*proto*/
+static int *__pyx_f_10netcdftime_11_netcdftime_month_lengths(int (*)(int), int); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_add_timedelta(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *, PyObject *, int (*)(int), int); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_add_timedelta_360_day(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *, PyObject *); /*proto*/
+#define __Pyx_MODULE_NAME "netcdftime._netcdftime"
+int __pyx_module_is_main_netcdftime___netcdftime = 0;
+
+/* Implementation of 'netcdftime._netcdftime' */
+static PyObject *__pyx_builtin_ImportError;
+static PyObject *__pyx_builtin_enumerate;
+static PyObject *__pyx_builtin_ValueError;
+static PyObject *__pyx_builtin_IndexError;
+static PyObject *__pyx_builtin_AttributeError;
+static PyObject *__pyx_builtin_TypeError;
+static PyObject *__pyx_builtin_NotImplemented;
+static const char __pyx_k_A[] = "A";
+static const char __pyx_k_B[] = "B";
+static const char __pyx_k_C[] = "C";
+static const char __pyx_k_D[] = "D";
+static const char __pyx_k_E[] = "E";
+static const char __pyx_k_F[] = "F";
+static const char __pyx_k_N[] = "N";
+static const char __pyx_k_Z[] = "Z";
+static const char __pyx_k_d[] = "d";
+static const char __pyx_k_h[] = "h";
+static const char __pyx_k_i[] = "i";
+static const char __pyx_k_j[] = "j";
+static const char __pyx_k_m[] = "m";
+static const char __pyx_k_n[] = "n";
+static const char __pyx_k_s[] = "s";
+static const char __pyx_k_4d[] = "%4d";
+static const char __pyx_k_JD[] = "JD";
+static const char __pyx_k_dt[] = "dt";
+static const char __pyx_k_hr[] = "hr";
+static const char __pyx_k_ii[] = "ii";
+static const char __pyx_k_jd[] = "jd";
+static const char __pyx_k_np[] = "np";
+static const char __pyx_k_re[] = "re";
+static const char __pyx_k_t0[] = "t0";
+static const char __pyx_k_t1[] = "t1";
+static const char __pyx_k__14[] = "-";
+static const char __pyx_k__23[] = "";
+static const char __pyx_k_abs[] = "abs";
+static const char __pyx_k_all[] = "all";
+static const char __pyx_k_any[] = "any";
+static const char __pyx_k_day[] = "day";
+static const char __pyx_k_doc[] = "__doc__";
+static const char __pyx_k_eps[] = "eps";
+static const char __pyx_k_hrs[] = "hrs";
+static const char __pyx_k_jd0[] = "_jd0";
+static const char __pyx_k_min[] = "min";
+static const char __pyx_k_msg[] = "msg";
+static const char __pyx_k_num[] = "num";
+static const char __pyx_k_s_2[] = "((^|[^%])(%%)*%s)";
+static const char __pyx_k_sec[] = "sec";
+static const char __pyx_k_zip[] = "zip";
+static const char __pyx_k_args[] = "args";
+static const char __pyx_k_ceil[] = "ceil";
+static const char __pyx_k_clip[] = "clip";
+static const char __pyx_k_copy[] = "copy";
+static const char __pyx_k_date[] = "date";
+static const char __pyx_k_days[] = "days";
+static const char __pyx_k_find[] = "find";
+static const char __pyx_k_flat[] = "flat";
+static const char __pyx_k_fmod[] = "fmod";
+static const char __pyx_k_hour[] = "hour";
+static const char __pyx_k_init[] = "__init__";
+static const char __pyx_k_item[] = "item";
+static const char __pyx_k_izip[] = "izip";
+static const char __pyx_k_leap[] = "leap";
+static const char __pyx_k_main[] = "__main__";
+static const char __pyx_k_mask[] = "mask";
+static const char __pyx_k_math[] = "math";
+static const char __pyx_k_mins[] = "mins";
+static const char __pyx_k_modf[] = "modf";
+static const char __pyx_k_name[] = "__name__";
+static const char __pyx_k_nday[] = "nday";
+static const char __pyx_k_secs[] = "secs";
+static const char __pyx_k_self[] = "self";
+static const char __pyx_k_size[] = "size";
+static const char __pyx_k_test[] = "__test__";
+static const char __pyx_k_time[] = "time";
+static const char __pyx_k_year[] = "year";
+static const char __pyx_k_0_1_2[] = "{0}.{1}{2}";
+static const char __pyx_k_1_4_1[] = "1.4.1";
+static const char __pyx_k_after[] = "after";
+static const char __pyx_k_alpha[] = "alpha";
+static const char __pyx_k_array[] = "array";
+static const char __pyx_k_class[] = "__class__";
+static const char __pyx_k_dates[] = "dates";
+static const char __pyx_k_dtype[] = "dtype";
+static const char __pyx_k_empty[] = "empty";
+static const char __pyx_k_exact[] = "exact";
+static const char __pyx_k_finfo[] = "finfo";
+static const char __pyx_k_hours[] = "hours";
+static const char __pyx_k_index[] = "index";
+static const char __pyx_k_int32[] = "int32";
+static const char __pyx_k_int64[] = "int64";
+static const char __pyx_k_items[] = "items";
+static const char __pyx_k_lower[] = "lower";
+static const char __pyx_k_match[] = "match";
+static const char __pyx_k_month[] = "month";
+static const char __pyx_k_ncnum[] = "ncnum";
+static const char __pyx_k_numpy[] = "numpy";
+static const char __pyx_k_round[] = "round";
+static const char __pyx_k_shape[] = "shape";
+static const char __pyx_k_since[] = "since";
+static const char __pyx_k_split[] = "split";
+static const char __pyx_k_strip[] = "strip";
+static const char __pyx_k_times[] = "times";
+static const char __pyx_k_units[] = "_units";
+static const char __pyx_k_utime[] = "utime";
+static const char __pyx_k_where[] = "where";
+static const char __pyx_k_zeros[] = "zeros";
+static const char __pyx_k_append[] = "append";
+static const char __pyx_k_around[] = "around";
+static const char __pyx_k_astype[] = "astype";
+static const char __pyx_k_before[] = "before";
+static const char __pyx_k_bisect[] = "bisect";
+static const char __pyx_k_format[] = "format";
+static const char __pyx_k_groups[] = "groups";
+static const char __pyx_k_import[] = "__import__";
+static const char __pyx_k_jdelta[] = "jdelta";
+static const char __pyx_k_julian[] = "julian";
+static const char __pyx_k_minute[] = "minute";
+static const char __pyx_k_module[] = "__module__";
+static const char __pyx_k_nctime[] = "nctime";
+static const char __pyx_k_noleap[] = "noleap";
+static const char __pyx_k_origin[] = "origin";
+static const char __pyx_k_search[] = "search";
+static const char __pyx_k_second[] = "second";
+static const char __pyx_k_select[] = "select";
+static const char __pyx_k_360_day[] = "360_day";
+static const char __pyx_k_365_day[] = "365_day";
+static const char __pyx_k_366_day[] = "366_day";
+static const char __pyx_k_cdftime[] = "cdftime";
+static const char __pyx_k_compile[] = "compile";
+static const char __pyx_k_dayofwk[] = "dayofwk";
+static const char __pyx_k_dayofyr[] = "dayofyr";
+static const char __pyx_k_float64[] = "float64";
+static const char __pyx_k_inc_idx[] = "inc_idx";
+static const char __pyx_k_maximum[] = "maximum";
+static const char __pyx_k_minutes[] = "minutes";
+static const char __pyx_k_nearest[] = "nearest";
+static const char __pyx_k_nonzero[] = "nonzero";
+static const char __pyx_k_prepare[] = "__prepare__";
+static const char __pyx_k_reshape[] = "reshape";
+static const char __pyx_k_seconds[] = "seconds";
+static const char __pyx_k_squeeze[] = "squeeze";
+static const char __pyx_k_units_2[] = "units";
+static const char __pyx_k_version[] = "__version__";
+static const char __pyx_k_all_leap[] = "all_leap";
+static const char __pyx_k_calendar[] = "calendar";
+static const char __pyx_k_date2num[] = "date2num";
+static const char __pyx_k_datetime[] = "datetime";
+static const char __pyx_k_hr_units[] = "hr_units";
+static const char __pyx_k_ismasked[] = "ismasked";
+static const char __pyx_k_isscalar[] = "isscalar";
+static const char __pyx_k_microsec[] = "microsec";
+static const char __pyx_k_millisec[] = "millisec";
+static const char __pyx_k_mismatch[] = "mismatch";
+static const char __pyx_k_num2date[] = "num2date";
+static const char __pyx_k_qualname[] = "__qualname__";
+static const char __pyx_k_standard[] = "standard";
+static const char __pyx_k_strftime[] = "strftime";
+static const char __pyx_k_timezone[] = "timezone";
+static const char __pyx_k_tzoffset[] = "tzoffset";
+static const char __pyx_k_TypeError[] = "TypeError";
+static const char __pyx_k_calendars[] = "_calendars";
+static const char __pyx_k_day_units[] = "day_units";
+static const char __pyx_k_enumerate[] = "enumerate";
+static const char __pyx_k_gregorian[] = "gregorian";
+static const char __pyx_k_groupdict[] = "groupdict";
+static const char __pyx_k_illegal_s[] = "_illegal_s";
+static const char __pyx_k_itertools[] = "itertools";
+static const char __pyx_k_metaclass[] = "__metaclass__";
+static const char __pyx_k_microsecs[] = "microsecs";
+static const char __pyx_k_millisecs[] = "millisecs";
+static const char __pyx_k_min_units[] = "min_units";
+static const char __pyx_k_sec_units[] = "sec_units";
+static const char __pyx_k_timedelta[] = "timedelta";
+static const char __pyx_k_timetuple[] = "timetuple";
+static const char __pyx_k_IndexError[] = "IndexError";
+static const char __pyx_k_ValueError[] = "ValueError";
+static const char __pyx_k_atleast_1d[] = "atleast_1d";
+static const char __pyx_k_date2index[] = "date2index";
+static const char __pyx_k_ind_before[] = "ind_before";
+static const char __pyx_k_month_lt_3[] = "month_lt_3";
+static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
+static const char __pyx_k_time2index[] = "time2index";
+static const char __pyx_k_time_value[] = "time_value";
+static const char __pyx_k_ImportError[] = "ImportError";
+static const char __pyx_k_Y_m_d_H_M_S[] = "%Y-%m-%d %H:%M:%S";
+static const char __pyx_k_bisect_left[] = "bisect_left";
+static const char __pyx_k_microsecond[] = "microsecond";
+static const char __pyx_k_millisecond[] = "millisecond";
+static const char __pyx_k_unit_string[] = "unit_string";
+static const char __pyx_k_bisect_right[] = "bisect_right";
+static const char __pyx_k_microseconds[] = "microseconds";
+static const char __pyx_k_milliseconds[] = "milliseconds";
+static const char __pyx_k_utime___init[] = "utime.__init__";
+static const char __pyx_k_ISO8601_REGEX[] = "ISO8601_REGEX";
+static const char __pyx_k_datetime_type[] = "datetime_type";
+static const char __pyx_k_real_datetime[] = "real_datetime";
+static const char __pyx_k_AttributeError[] = "AttributeError";
+static const char __pyx_k_NotImplemented[] = "NotImplemented";
+static const char __pyx_k_TIMEZONE_REGEX[] = "TIMEZONE_REGEX";
+static const char __pyx_k_microsec_units[] = "microsec_units";
+static const char __pyx_k_millisec_units[] = "millisec_units";
+static const char __pyx_k_utime_date2num[] = "utime.date2num";
+static const char __pyx_k_utime_num2date[] = "utime.num2date";
+static const char __pyx_k_ind_nday_before[] = "ind_nday_before";
+static const char __pyx_k_nearest_to_left[] = "nearest_to_left";
+static const char __pyx_k_to_real_datetime[] = "_to_real_datetime";
+static const char __pyx_k_DateFromJulianDay[] = "DateFromJulianDay";
+static const char __pyx_k_JulianDayFromDate[] = "JulianDayFromDate";
+static const char __pyx_k_datetime_compatible[] = "datetime_compatible";
+static const char __pyx_k_invalid_year_in_0_r[] = "invalid year in {0!r}";
+static const char __pyx_k_proleptic_gregorian[] = "proleptic_gregorian";
+static const char __pyx_k_seconds_since_1_1_1[] = "seconds since 1-1-1";
+static const char __pyx_k_Expecting_a_string_r[] = "Expecting a string %r";
+static const char __pyx_k_invalid_month_in_0_r[] = "invalid month in {0!r}";
+static const char __pyx_k_netcdftime__netcdftime[] = "netcdftime._netcdftime";
+static const char __pyx_k_unsupported_calendar_0[] = "unsupported calendar: {0}";
+static const char __pyx_k_unsupported_time_units[] = "unsupported time units";
+static const char __pyx_k_no_since_in_unit_string[] = "no 'since' in unit_string";
+static const char __pyx_k_invalid_day_number_in_0_r[] = "invalid day number in {0!r}";
+static const char __pyx_k_cannot_compare_0_r_and_1_r[] = "cannot compare {0!r} and {1!r}";
+static const char __pyx_k_Julian_Day_must_be_positive[] = "Julian Day must be positive";
+static const char __pyx_k_Unable_to_parse_date_string_r[] = "Unable to parse date string %r";
+static const char __pyx_k_P_year_0_9_1_4_P_month_0_9_1_2[] = "(?P<year>[+-]?[0-9]{1,4})(-(?P<month>[0-9]{1,2})(-(?P<day>[0-9]{1,2})(((?P<separator1>.)(?P<hour>[0-9]{1,2}):(?P<minute>[0-9]{1,2})(:(?P<second>[0-9]{1,2})(\\.(?P<fraction>[0-9]+))?)?)?((?P<separator2>.?)(?P<timezone>Z|(([-+])([0-9]{1,2}):([0-9]{1,2}))))?)?)?)?";
+static const char __pyx_k_Performs_conversions_of_netCDF[] = "\nPerforms conversions of netCDF time coordinate data to/from datetime objects.\n";
+static const char __pyx_k_0_r_is_not_present_in_the_mixed[] = "{0!r} is not present in the mixed Julian/Gregorian calendar";
+static const char __pyx_k_P_prefix_P_hours_0_9_1_2_P_minu[] = "(?P<prefix>[+-])(?P<hours>[0-9]{1,2}):(?P<minutes>[0-9]{1,2})";
+static const char __pyx_k_Volumes_Drobo_python_netcdf4_py[] = "/Volumes/Drobo/python/netcdf4-python.git/netcdftime/_netcdftime.pyx";
+static const char __pyx_k_calendar_must_be_one_of_s_got_s[] = "calendar must be one of %s, got '%s'";
+static const char __pyx_k_negative_reference_year_in_time[] = "negative reference year in time units, must be >= 1";
+static const char __pyx_k_netcdf_time_variable_is_missing[] = "netcdf time variable is missing a 'units' attribute";
+static const char __pyx_k_s_is_not_an_option_for_the_sele[] = "%s is not an option for the `select` argument.";
+static const char __pyx_k_there_are_only_30_days_in_every[] = "there are only 30 days in every month with the 360_day calendar";
+static const char __pyx_k_unknown_calendar_must_be_one_of[] = "unknown calendar, must be one of julian,standard,gregorian,proleptic_gregorian, got %s";
+static const char __pyx_k_zero_not_allowed_as_a_reference[] = "zero not allowed as a reference year, does not exist in Julian or Gregorian calendars";
+static const char __pyx_k_Performs_conversions_of_netCDF_2[] = "\nPerforms conversions of netCDF time coordinate\ndata to/from datetime objects.\n\nTo initialize: C{t = utime(unit_string,calendar='standard')}\n\nwhere\n\nB{C{unit_string}} is a string of the form\nC{'time-units since <time-origin>'} defining the time units.\n\nValid time-units are days, hours, minutes and seconds (the singular forms\nare also accepted). An example unit_string would be C{'hours\nsince 0001-01-01 00:00:00'} [...]
+static const char __pyx_k_Some_of_the_times_given_are_afte[] = "Some of the times given are after the last time in `nctime`.";
+static const char __pyx_k_Some_of_the_times_given_are_befo[] = "Some of the times given are before the first time in `nctime`.";
+static const char __pyx_k_Some_of_the_times_specified_were[] = "Some of the times specified were not found in the `nctime` variable.";
+static const char __pyx_k_This_strftime_implementation_doe[] = "This strftime implementation does not handle %s";
+static const char __pyx_k_cannot_compare_0_r_and_1_r_diffe[] = "cannot compare {0!r} and {1!r} (different calendars)";
+static const char __pyx_k_cannot_compute_the_time_differen[] = "cannot compute the time difference between dates with different calendars";
+static const char __pyx_k_cannot_specify_a_leap_day_as_the[] = "cannot specify a leap day as the reference time with the noleap calendar";
+static const char __pyx_k_impossible_date_falls_in_gap_bet[] = "impossible date (falls in gap between end of Julian calendar and beginning of Gregorian calendar";
+static const char __pyx_k_there_is_no_leap_day_in_the_nole[] = "there is no leap day in the noleap calendar";
+static const char __pyx_k_units_must_be_one_of_seconds_min[] = "units must be one of 'seconds', 'minutes', 'hours' or 'days' (or singular version of these), got '%s'";
+static const char __pyx_k_cannot_compute_the_time_differen_2[] = "cannot compute the time difference between dates that are not calendar-aware";
+static PyObject *__pyx_kp_s_0_1_2;
+static PyObject *__pyx_kp_s_0_r_is_not_present_in_the_mixed;
+static PyObject *__pyx_kp_s_1_4_1;
+static PyObject *__pyx_kp_s_360_day;
+static PyObject *__pyx_kp_s_365_day;
+static PyObject *__pyx_kp_s_366_day;
+static PyObject *__pyx_kp_s_4d;
+static PyObject *__pyx_n_s_A;
+static PyObject *__pyx_n_s_AttributeError;
+static PyObject *__pyx_n_s_B;
+static PyObject *__pyx_n_s_C;
+static PyObject *__pyx_n_s_D;
+static PyObject *__pyx_n_s_DateFromJulianDay;
+static PyObject *__pyx_n_s_E;
+static PyObject *__pyx_kp_s_Expecting_a_string_r;
+static PyObject *__pyx_n_s_F;
+static PyObject *__pyx_n_s_ISO8601_REGEX;
+static PyObject *__pyx_n_s_ImportError;
+static PyObject *__pyx_n_s_IndexError;
+static PyObject *__pyx_n_s_JD;
+static PyObject *__pyx_n_s_JulianDayFromDate;
+static PyObject *__pyx_kp_s_Julian_Day_must_be_positive;
+static PyObject *__pyx_n_s_N;
+static PyObject *__pyx_n_s_NotImplemented;
+static PyObject *__pyx_kp_s_P_prefix_P_hours_0_9_1_2_P_minu;
+static PyObject *__pyx_kp_s_P_year_0_9_1_4_P_month_0_9_1_2;
+static PyObject *__pyx_kp_s_Performs_conversions_of_netCDF_2;
+static PyObject *__pyx_kp_s_Some_of_the_times_given_are_afte;
+static PyObject *__pyx_kp_s_Some_of_the_times_given_are_befo;
+static PyObject *__pyx_kp_s_Some_of_the_times_specified_were;
+static PyObject *__pyx_n_s_TIMEZONE_REGEX;
+static PyObject *__pyx_kp_s_This_strftime_implementation_doe;
+static PyObject *__pyx_n_s_TypeError;
+static PyObject *__pyx_kp_s_Unable_to_parse_date_string_r;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_kp_s_Volumes_Drobo_python_netcdf4_py;
+static PyObject *__pyx_kp_s_Y_m_d_H_M_S;
+static PyObject *__pyx_n_s_Z;
+static PyObject *__pyx_kp_s__14;
+static PyObject *__pyx_kp_s__23;
+static PyObject *__pyx_n_s_abs;
+static PyObject *__pyx_n_s_after;
+static PyObject *__pyx_n_s_all;
+static PyObject *__pyx_n_s_all_leap;
+static PyObject *__pyx_n_s_alpha;
+static PyObject *__pyx_n_s_any;
+static PyObject *__pyx_n_s_append;
+static PyObject *__pyx_n_s_args;
+static PyObject *__pyx_n_s_around;
+static PyObject *__pyx_n_s_array;
+static PyObject *__pyx_n_s_astype;
+static PyObject *__pyx_n_s_atleast_1d;
+static PyObject *__pyx_n_s_before;
+static PyObject *__pyx_n_s_bisect;
+static PyObject *__pyx_n_s_bisect_left;
+static PyObject *__pyx_n_s_bisect_right;
+static PyObject *__pyx_n_s_calendar;
+static PyObject *__pyx_kp_s_calendar_must_be_one_of_s_got_s;
+static PyObject *__pyx_n_s_calendars;
+static PyObject *__pyx_kp_s_cannot_compare_0_r_and_1_r;
+static PyObject *__pyx_kp_s_cannot_compare_0_r_and_1_r_diffe;
+static PyObject *__pyx_kp_s_cannot_compute_the_time_differen;
+static PyObject *__pyx_kp_s_cannot_compute_the_time_differen_2;
+static PyObject *__pyx_kp_s_cannot_specify_a_leap_day_as_the;
+static PyObject *__pyx_n_s_cdftime;
+static PyObject *__pyx_n_s_ceil;
+static PyObject *__pyx_n_s_class;
+static PyObject *__pyx_n_s_clip;
+static PyObject *__pyx_n_s_compile;
+static PyObject *__pyx_n_s_copy;
+static PyObject *__pyx_n_s_d;
+static PyObject *__pyx_n_s_date;
+static PyObject *__pyx_n_s_date2index;
+static PyObject *__pyx_n_s_date2num;
+static PyObject *__pyx_n_s_dates;
+static PyObject *__pyx_n_s_datetime;
+static PyObject *__pyx_n_s_datetime_compatible;
+static PyObject *__pyx_n_s_datetime_type;
+static PyObject *__pyx_n_s_day;
+static PyObject *__pyx_n_s_day_units;
+static PyObject *__pyx_n_s_dayofwk;
+static PyObject *__pyx_n_s_dayofyr;
+static PyObject *__pyx_n_s_days;
+static PyObject *__pyx_n_s_doc;
+static PyObject *__pyx_n_s_dt;
+static PyObject *__pyx_n_s_dtype;
+static PyObject *__pyx_n_s_empty;
+static PyObject *__pyx_n_s_enumerate;
+static PyObject *__pyx_n_s_eps;
+static PyObject *__pyx_n_s_exact;
+static PyObject *__pyx_n_s_find;
+static PyObject *__pyx_n_s_finfo;
+static PyObject *__pyx_n_s_flat;
+static PyObject *__pyx_n_s_float64;
+static PyObject *__pyx_n_s_fmod;
+static PyObject *__pyx_n_s_format;
+static PyObject *__pyx_n_s_gregorian;
+static PyObject *__pyx_n_s_groupdict;
+static PyObject *__pyx_n_s_groups;
+static PyObject *__pyx_n_s_h;
+static PyObject *__pyx_n_s_hour;
+static PyObject *__pyx_n_s_hours;
+static PyObject *__pyx_n_s_hr;
+static PyObject *__pyx_n_s_hr_units;
+static PyObject *__pyx_n_s_hrs;
+static PyObject *__pyx_n_s_i;
+static PyObject *__pyx_n_s_ii;
+static PyObject *__pyx_n_s_illegal_s;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_kp_s_impossible_date_falls_in_gap_bet;
+static PyObject *__pyx_n_s_inc_idx;
+static PyObject *__pyx_n_s_ind_before;
+static PyObject *__pyx_n_s_ind_nday_before;
+static PyObject *__pyx_n_s_index;
+static PyObject *__pyx_n_s_init;
+static PyObject *__pyx_n_s_int32;
+static PyObject *__pyx_n_s_int64;
+static PyObject *__pyx_kp_s_invalid_day_number_in_0_r;
+static PyObject *__pyx_kp_s_invalid_month_in_0_r;
+static PyObject *__pyx_kp_s_invalid_year_in_0_r;
+static PyObject *__pyx_n_s_ismasked;
+static PyObject *__pyx_n_s_isscalar;
+static PyObject *__pyx_n_s_item;
+static PyObject *__pyx_n_s_items;
+static PyObject *__pyx_n_s_itertools;
+static PyObject *__pyx_n_s_izip;
+static PyObject *__pyx_n_s_j;
+static PyObject *__pyx_n_s_jd;
+static PyObject *__pyx_n_s_jd0;
+static PyObject *__pyx_n_s_jdelta;
+static PyObject *__pyx_n_s_julian;
+static PyObject *__pyx_n_s_leap;
+static PyObject *__pyx_n_s_lower;
+static PyObject *__pyx_n_s_m;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_mask;
+static PyObject *__pyx_n_s_match;
+static PyObject *__pyx_n_s_math;
+static PyObject *__pyx_n_s_maximum;
+static PyObject *__pyx_n_s_metaclass;
+static PyObject *__pyx_n_s_microsec;
+static PyObject *__pyx_n_s_microsec_units;
+static PyObject *__pyx_n_s_microsecond;
+static PyObject *__pyx_n_s_microseconds;
+static PyObject *__pyx_n_s_microsecs;
+static PyObject *__pyx_n_s_millisec;
+static PyObject *__pyx_n_s_millisec_units;
+static PyObject *__pyx_n_s_millisecond;
+static PyObject *__pyx_n_s_milliseconds;
+static PyObject *__pyx_n_s_millisecs;
+static PyObject *__pyx_n_s_min;
+static PyObject *__pyx_n_s_min_units;
+static PyObject *__pyx_n_s_mins;
+static PyObject *__pyx_n_s_minute;
+static PyObject *__pyx_n_s_minutes;
+static PyObject *__pyx_n_s_mismatch;
+static PyObject *__pyx_n_s_modf;
+static PyObject *__pyx_n_s_module;
+static PyObject *__pyx_n_s_month;
+static PyObject *__pyx_n_s_month_lt_3;
+static PyObject *__pyx_n_s_msg;
+static PyObject *__pyx_n_s_n;
+static PyObject *__pyx_n_s_name;
+static PyObject *__pyx_n_s_ncnum;
+static PyObject *__pyx_n_s_nctime;
+static PyObject *__pyx_n_s_nday;
+static PyObject *__pyx_n_s_nearest;
+static PyObject *__pyx_n_s_nearest_to_left;
+static PyObject *__pyx_kp_s_negative_reference_year_in_time;
+static PyObject *__pyx_kp_s_netcdf_time_variable_is_missing;
+static PyObject *__pyx_n_s_netcdftime__netcdftime;
+static PyObject *__pyx_kp_s_no_since_in_unit_string;
+static PyObject *__pyx_n_s_noleap;
+static PyObject *__pyx_n_s_nonzero;
+static PyObject *__pyx_n_s_np;
+static PyObject *__pyx_n_s_num;
+static PyObject *__pyx_n_s_num2date;
+static PyObject *__pyx_n_s_numpy;
+static PyObject *__pyx_n_s_origin;
+static PyObject *__pyx_n_s_prepare;
+static PyObject *__pyx_n_s_proleptic_gregorian;
+static PyObject *__pyx_n_s_pyx_vtable;
+static PyObject *__pyx_n_s_qualname;
+static PyObject *__pyx_n_s_re;
+static PyObject *__pyx_n_s_real_datetime;
+static PyObject *__pyx_n_s_reshape;
+static PyObject *__pyx_n_s_round;
+static PyObject *__pyx_n_s_s;
+static PyObject *__pyx_kp_s_s_2;
+static PyObject *__pyx_kp_s_s_is_not_an_option_for_the_sele;
+static PyObject *__pyx_n_s_search;
+static PyObject *__pyx_n_s_sec;
+static PyObject *__pyx_n_s_sec_units;
+static PyObject *__pyx_n_s_second;
+static PyObject *__pyx_n_s_seconds;
+static PyObject *__pyx_kp_s_seconds_since_1_1_1;
+static PyObject *__pyx_n_s_secs;
+static PyObject *__pyx_n_s_select;
+static PyObject *__pyx_n_s_self;
+static PyObject *__pyx_n_s_shape;
+static PyObject *__pyx_n_s_since;
+static PyObject *__pyx_n_s_size;
+static PyObject *__pyx_n_s_split;
+static PyObject *__pyx_n_s_squeeze;
+static PyObject *__pyx_n_s_standard;
+static PyObject *__pyx_n_s_strftime;
+static PyObject *__pyx_n_s_strip;
+static PyObject *__pyx_n_s_t0;
+static PyObject *__pyx_n_s_t1;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_kp_s_there_are_only_30_days_in_every;
+static PyObject *__pyx_kp_s_there_is_no_leap_day_in_the_nole;
+static PyObject *__pyx_n_s_time;
+static PyObject *__pyx_n_s_time2index;
+static PyObject *__pyx_n_s_time_value;
+static PyObject *__pyx_n_s_timedelta;
+static PyObject *__pyx_n_s_times;
+static PyObject *__pyx_n_s_timetuple;
+static PyObject *__pyx_n_s_timezone;
+static PyObject *__pyx_n_s_to_real_datetime;
+static PyObject *__pyx_n_s_tzoffset;
+static PyObject *__pyx_n_s_unit_string;
+static PyObject *__pyx_n_s_units;
+static PyObject *__pyx_n_s_units_2;
+static PyObject *__pyx_kp_s_units_must_be_one_of_seconds_min;
+static PyObject *__pyx_kp_s_unknown_calendar_must_be_one_of;
+static PyObject *__pyx_kp_s_unsupported_calendar_0;
+static PyObject *__pyx_kp_s_unsupported_time_units;
+static PyObject *__pyx_n_s_utime;
+static PyObject *__pyx_n_s_utime___init;
+static PyObject *__pyx_n_s_utime_date2num;
+static PyObject *__pyx_n_s_utime_num2date;
+static PyObject *__pyx_n_s_version;
+static PyObject *__pyx_n_s_where;
+static PyObject *__pyx_n_s_year;
+static PyObject *__pyx_kp_s_zero_not_allowed_as_a_reference;
+static PyObject *__pyx_n_s_zeros;
+static PyObject *__pyx_n_s_zip;
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_JulianDayFromDate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date, PyObject *__pyx_v_calendar); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_2DateFromJulianDay(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_JD, PyObject *__pyx_v_calendar); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_5utime___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit_string, PyObject *__pyx_v_calendar); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_5utime_2date2num(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_date); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_5utime_4num2date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_time_value); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_4_parse_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datestring); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_6date2index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_nctime, PyObject *__pyx_v_calendar, PyObject *__pyx_v_select); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8time2index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_times, PyObject *__pyx_v_nctime, PyObject *__pyx_v_calendar, PyObject *__pyx_v_select); /* proto */
+static int __pyx_pf_10netcdftime_11_netcdftime_8datetime___init__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self, int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, int __pyx_v_dayofwk, int __pyx_v_dayofyr); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_6format___get__(CYTHON_UNUSED struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_2strftime(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self, PyObject *__pyx_v_format); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_4replace(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_6timetuple(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_8_to_real_datetime(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_10__repr__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_12__str__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static Py_hash_t __pyx_pf_10netcdftime_11_netcdftime_8datetime_14__hash__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_16__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_18__reduce__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_20__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_22__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_4year___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_5month___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_3day___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_4hour___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_6minute___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_7dayofwk___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_7dayofyr___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_6second___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_11microsecond___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_8calendar___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_19datetime_compatible___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self); /* proto */
+static int __pyx_pf_10netcdftime_11_netcdftime_14DatetimeNoLeap___init__(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeNoLeap *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
+static int __pyx_pf_10netcdftime_11_netcdftime_15DatetimeAllLeap___init__(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeAllLeap *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
+static int __pyx_pf_10netcdftime_11_netcdftime_14Datetime360Day___init__(struct __pyx_obj_10netcdftime_11_netcdftime_Datetime360Day *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
+static int __pyx_pf_10netcdftime_11_netcdftime_14DatetimeJulian___init__(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeJulian *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
+static int __pyx_pf_10netcdftime_11_netcdftime_17DatetimeGregorian___init__(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeGregorian *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
+static int __pyx_pf_10netcdftime_11_netcdftime_26DatetimeProlepticGregorian___init__(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeProlepticGregorian *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_tp_new_10netcdftime_11_netcdftime_datetime(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_10netcdftime_11_netcdftime_DatetimeNoLeap(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_10netcdftime_11_netcdftime_DatetimeAllLeap(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_10netcdftime_11_netcdftime_Datetime360Day(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_10netcdftime_11_netcdftime_DatetimeJulian(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_10netcdftime_11_netcdftime_DatetimeGregorian(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_10netcdftime_11_netcdftime_DatetimeProlepticGregorian(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0};
+static PyObject *__pyx_float_1_;
+static PyObject *__pyx_float_2_;
+static PyObject *__pyx_float_0_5;
+static PyObject *__pyx_float_1_0;
+static PyObject *__pyx_float_1_5;
+static PyObject *__pyx_float_1e6;
+static PyObject *__pyx_float_24_;
+static PyObject *__pyx_float_30_;
+static PyObject *__pyx_float_60_;
+static PyObject *__pyx_float_0_25;
+static PyObject *__pyx_float_1_e3;
+static PyObject *__pyx_float_1_e6;
+static PyObject *__pyx_float_24_0;
+static PyObject *__pyx_float_360_;
+static PyObject *__pyx_float_365_;
+static PyObject *__pyx_float_366_;
+static PyObject *__pyx_float_60_0;
+static PyObject *__pyx_float_122_1;
+static PyObject *__pyx_float_1440_;
+static PyObject *__pyx_float_2000_;
+static PyObject *__pyx_float_6680_;
+static PyObject *__pyx_float_1440_0;
+static PyObject *__pyx_float_1524_5;
+static PyObject *__pyx_float_365_25;
+static PyObject *__pyx_float_86400_;
+static PyObject *__pyx_float_30_6001;
+static PyObject *__pyx_float_86400_0;
+static PyObject *__pyx_float_1867216_;
+static PyObject *__pyx_float_2439870_;
+static PyObject *__pyx_float_36524_25;
+static PyObject *__pyx_float_1718994_5;
+static PyObject *__pyx_float_2299160_5;
+static PyObject *__pyx_float_2299170_5;
+static PyObject *__pyx_float_86400000_;
+static PyObject *__pyx_float_86400000000_;
+static PyObject *__pyx_int_0;
+static PyObject *__pyx_int_1;
+static PyObject *__pyx_int_2;
+static PyObject *__pyx_int_3;
+static PyObject *__pyx_int_4;
+static PyObject *__pyx_int_6;
+static PyObject *__pyx_int_7;
+static PyObject *__pyx_int_10;
+static PyObject *__pyx_int_12;
+static PyObject *__pyx_int_13;
+static PyObject *__pyx_int_14;
+static PyObject *__pyx_int_15;
+static PyObject *__pyx_int_23;
+static PyObject *__pyx_int_28;
+static PyObject *__pyx_int_29;
+static PyObject *__pyx_int_30;
+static PyObject *__pyx_int_31;
+static PyObject *__pyx_int_59;
+static PyObject *__pyx_int_60;
+static PyObject *__pyx_int_100;
+static PyObject *__pyx_int_123;
+static PyObject *__pyx_int_305;
+static PyObject *__pyx_int_360;
+static PyObject *__pyx_int_365;
+static PyObject *__pyx_int_400;
+static PyObject *__pyx_int_1524;
+static PyObject *__pyx_int_1582;
+static PyObject *__pyx_int_2000;
+static PyObject *__pyx_int_4715;
+static PyObject *__pyx_int_4716;
+static PyObject *__pyx_int_999999;
+static PyObject *__pyx_int_neg_1;
+static PyObject *__pyx_tuple_;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__3;
+static PyObject *__pyx_tuple__4;
+static PyObject *__pyx_tuple__5;
+static PyObject *__pyx_tuple__6;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_slice__15;
+static PyObject *__pyx_slice__18;
+static PyObject *__pyx_slice__30;
+static PyObject *__pyx_slice__31;
+static PyObject *__pyx_tuple__10;
+static PyObject *__pyx_tuple__11;
+static PyObject *__pyx_tuple__12;
+static PyObject *__pyx_tuple__13;
+static PyObject *__pyx_tuple__16;
+static PyObject *__pyx_tuple__17;
+static PyObject *__pyx_tuple__19;
+static PyObject *__pyx_tuple__20;
+static PyObject *__pyx_tuple__21;
+static PyObject *__pyx_tuple__22;
+static PyObject *__pyx_tuple__24;
+static PyObject *__pyx_tuple__25;
+static PyObject *__pyx_tuple__26;
+static PyObject *__pyx_tuple__27;
+static PyObject *__pyx_tuple__28;
+static PyObject *__pyx_tuple__29;
+static PyObject *__pyx_tuple__32;
+static PyObject *__pyx_tuple__33;
+static PyObject *__pyx_tuple__34;
+static PyObject *__pyx_tuple__36;
+static PyObject *__pyx_tuple__38;
+static PyObject *__pyx_tuple__40;
+static PyObject *__pyx_tuple__41;
+static PyObject *__pyx_tuple__43;
+static PyObject *__pyx_tuple__45;
+static PyObject *__pyx_tuple__47;
+static PyObject *__pyx_tuple__49;
+static PyObject *__pyx_codeobj__35;
+static PyObject *__pyx_codeobj__37;
+static PyObject *__pyx_codeobj__39;
+static PyObject *__pyx_codeobj__42;
+static PyObject *__pyx_codeobj__44;
+static PyObject *__pyx_codeobj__46;
+static PyObject *__pyx_codeobj__48;
+
+/* "netcdftime/_netcdftime.pyx":41
+ * "(?P<prefix>[+-])(?P<hours>[0-9]{1,2}):(?P<minutes>[0-9]{1,2})")
+ *
+ * def JulianDayFromDate(date, calendar='standard'): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_1JulianDayFromDate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_10netcdftime_11_netcdftime_JulianDayFromDate[] = "\n\n creates a Julian Day from a 'datetime-like' object. Returns the fractional\n Julian Day (approximately millisecond accuracy).\n\n if calendar='standard' or 'gregorian' (default), Julian day follows Julian\n Calendar on and before 1582-10-5, Gregorian calendar after 1582-10-15.\n\n if calendar='proleptic_gregorian', Julian Day follows gregorian calendar.\n\n if calendar='julian', Julian Day fol [...]
+static PyMethodDef __pyx_mdef_10netcdftime_11_netcdftime_1JulianDayFromDate = {"JulianDayFromDate", (PyCFunction)__pyx_pw_10netcdftime_11_netcdftime_1JulianDayFromDate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10netcdftime_11_netcdftime_JulianDayFromDate};
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_1JulianDayFromDate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_date = 0;
+ PyObject *__pyx_v_calendar = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("JulianDayFromDate (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_date,&__pyx_n_s_calendar,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)__pyx_n_s_standard);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_date)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_calendar);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "JulianDayFromDate") < 0)) __PYX_ERR(0, 41, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_date = values[0];
+ __pyx_v_calendar = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("JulianDayFromDate", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 41, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("netcdftime._netcdftime.JulianDayFromDate", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_JulianDayFromDate(__pyx_self, __pyx_v_date, __pyx_v_calendar);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_JulianDayFromDate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_date, PyObject *__pyx_v_calendar) {
+ int __pyx_v_isscalar;
+ PyObject *__pyx_v_year = NULL;
+ PyObject *__pyx_v_month = NULL;
+ PyObject *__pyx_v_day = NULL;
+ PyObject *__pyx_v_hour = NULL;
+ PyObject *__pyx_v_minute = NULL;
+ PyObject *__pyx_v_second = NULL;
+ PyObject *__pyx_v_microsecond = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_v_d = NULL;
+ PyObject *__pyx_v_month_lt_3 = NULL;
+ PyObject *__pyx_v_A = NULL;
+ PyObject *__pyx_v_jd = NULL;
+ PyObject *__pyx_v_B = NULL;
+ PyObject *__pyx_v_ii = NULL;
+ PyObject *__pyx_v_eps = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ Py_ssize_t __pyx_t_10;
+ PyObject *(*__pyx_t_11)(PyObject *);
+ int __pyx_t_12;
+ int __pyx_t_13;
+ int __pyx_t_14;
+ __Pyx_RefNannySetupContext("JulianDayFromDate", 0);
+ __Pyx_INCREF(__pyx_v_date);
+
+ /* "netcdftime/_netcdftime.pyx":64
+ *
+ * # check if input was scalar and change return accordingly
+ * isscalar = False # <<<<<<<<<<<<<<
+ * try:
+ * date[0]
+ */
+ __pyx_v_isscalar = 0;
+
+ /* "netcdftime/_netcdftime.pyx":65
+ * # check if input was scalar and change return accordingly
+ * isscalar = False
+ * try: # <<<<<<<<<<<<<<
+ * date[0]
+ * except:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "netcdftime/_netcdftime.pyx":66
+ * isscalar = False
+ * try:
+ * date[0] # <<<<<<<<<<<<<<
+ * except:
+ * isscalar = True
+ */
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_date, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":65
+ * # check if input was scalar and change return accordingly
+ * isscalar = False
+ * try: # <<<<<<<<<<<<<<
+ * date[0]
+ * except:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L10_try_end;
+ __pyx_L3_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":67
+ * try:
+ * date[0]
+ * except: # <<<<<<<<<<<<<<
+ * isscalar = True
+ *
+ */
+ /*except:*/ {
+ __Pyx_AddTraceback("netcdftime._netcdftime.JulianDayFromDate", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 67, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_6);
+
+ /* "netcdftime/_netcdftime.pyx":68
+ * date[0]
+ * except:
+ * isscalar = True # <<<<<<<<<<<<<<
+ *
+ * date = np.atleast_1d(np.array(date))
+ */
+ __pyx_v_isscalar = 1;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L4_exception_handled;
+ }
+ __pyx_L5_except_error:;
+
+ /* "netcdftime/_netcdftime.pyx":65
+ * # check if input was scalar and change return accordingly
+ * isscalar = False
+ * try: # <<<<<<<<<<<<<<
+ * date[0]
+ * except:
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L1_error;
+ __pyx_L4_exception_handled:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ __pyx_L10_try_end:;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":70
+ * isscalar = True
+ *
+ * date = np.atleast_1d(np.array(date)) # <<<<<<<<<<<<<<
+ * year = np.empty(len(date), dtype=np.int32)
+ * month = year.copy()
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_atleast_1d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_date); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_date};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_date};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(__pyx_v_date);
+ __Pyx_GIVEREF(__pyx_v_date);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_date);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_5};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_5};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 70, __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_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF_SET(__pyx_v_date, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":71
+ *
+ * date = np.atleast_1d(np.array(date))
+ * year = np.empty(len(date), dtype=np.int32) # <<<<<<<<<<<<<<
+ * month = year.copy()
+ * day = year.copy()
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 71, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_10 = PyObject_Length(__pyx_v_date); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 71, __pyx_L1_error)
+ __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 71, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 71, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 71, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 71, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 71, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 71, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_year = __pyx_t_8;
+ __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":72
+ * date = np.atleast_1d(np.array(date))
+ * year = np.empty(len(date), dtype=np.int32)
+ * month = year.copy() # <<<<<<<<<<<<<<
+ * day = year.copy()
+ * hour = year.copy()
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_year, __pyx_n_s_copy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 72, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 72, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_month = __pyx_t_8;
+ __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":73
+ * year = np.empty(len(date), dtype=np.int32)
+ * month = year.copy()
+ * day = year.copy() # <<<<<<<<<<<<<<
+ * hour = year.copy()
+ * minute = year.copy()
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_year, __pyx_n_s_copy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 73, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 73, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_day = __pyx_t_8;
+ __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":74
+ * month = year.copy()
+ * day = year.copy()
+ * hour = year.copy() # <<<<<<<<<<<<<<
+ * minute = year.copy()
+ * second = year.copy()
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_year, __pyx_n_s_copy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 74, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 74, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_hour = __pyx_t_8;
+ __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":75
+ * day = year.copy()
+ * hour = year.copy()
+ * minute = year.copy() # <<<<<<<<<<<<<<
+ * second = year.copy()
+ * microsecond = year.copy()
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_year, __pyx_n_s_copy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 75, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 75, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 75, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_minute = __pyx_t_8;
+ __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":76
+ * hour = year.copy()
+ * minute = year.copy()
+ * second = year.copy() # <<<<<<<<<<<<<<
+ * microsecond = year.copy()
+ * for i, d in enumerate(date):
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_year, __pyx_n_s_copy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 76, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 76, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 76, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_second = __pyx_t_8;
+ __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":77
+ * minute = year.copy()
+ * second = year.copy()
+ * microsecond = year.copy() # <<<<<<<<<<<<<<
+ * for i, d in enumerate(date):
+ * year[i] = d.year
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_year, __pyx_n_s_copy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 77, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 77, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 77, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_microsecond = __pyx_t_8;
+ __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":78
+ * second = year.copy()
+ * microsecond = year.copy()
+ * for i, d in enumerate(date): # <<<<<<<<<<<<<<
+ * year[i] = d.year
+ * month[i] = d.month
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_8 = __pyx_int_0;
+ if (likely(PyList_CheckExact(__pyx_v_date)) || PyTuple_CheckExact(__pyx_v_date)) {
+ __pyx_t_6 = __pyx_v_date; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0;
+ __pyx_t_11 = NULL;
+ } else {
+ __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 78, __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, 78, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_11)) {
+ 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_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 78, __pyx_L1_error)
+ #else
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ #endif
+ } else {
+ if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 78, __pyx_L1_error)
+ #else
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ #endif
+ }
+ } else {
+ __pyx_t_9 = __pyx_t_11(__pyx_t_6);
+ if (unlikely(!__pyx_t_9)) {
+ 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, 78, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_9);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_8);
+ __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_8, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8);
+ __pyx_t_8 = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":79
+ * microsecond = year.copy()
+ * for i, d in enumerate(date):
+ * year[i] = d.year # <<<<<<<<<<<<<<
+ * month[i] = d.month
+ * day[i] = d.day
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_year); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 79, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (unlikely(PyObject_SetItem(__pyx_v_year, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(0, 79, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":80
+ * for i, d in enumerate(date):
+ * year[i] = d.year
+ * month[i] = d.month # <<<<<<<<<<<<<<
+ * day[i] = d.day
+ * hour[i] = d.hour
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_month); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 80, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (unlikely(PyObject_SetItem(__pyx_v_month, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(0, 80, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":81
+ * year[i] = d.year
+ * month[i] = d.month
+ * day[i] = d.day # <<<<<<<<<<<<<<
+ * hour[i] = d.hour
+ * minute[i] = d.minute
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_day); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 81, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (unlikely(PyObject_SetItem(__pyx_v_day, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(0, 81, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":82
+ * month[i] = d.month
+ * day[i] = d.day
+ * hour[i] = d.hour # <<<<<<<<<<<<<<
+ * minute[i] = d.minute
+ * second[i] = d.second
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_hour); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 82, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (unlikely(PyObject_SetItem(__pyx_v_hour, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(0, 82, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":83
+ * day[i] = d.day
+ * hour[i] = d.hour
+ * minute[i] = d.minute # <<<<<<<<<<<<<<
+ * second[i] = d.second
+ * microsecond[i] = d.microsecond
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_minute); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 83, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (unlikely(PyObject_SetItem(__pyx_v_minute, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(0, 83, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":84
+ * hour[i] = d.hour
+ * minute[i] = d.minute
+ * second[i] = d.second # <<<<<<<<<<<<<<
+ * microsecond[i] = d.microsecond
+ * # convert years in BC era to astronomical years (so that 1 BC is year zero)
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_second); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 84, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (unlikely(PyObject_SetItem(__pyx_v_second, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(0, 84, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":85
+ * minute[i] = d.minute
+ * second[i] = d.second
+ * microsecond[i] = d.microsecond # <<<<<<<<<<<<<<
+ * # convert years in BC era to astronomical years (so that 1 BC is year zero)
+ * # (fixes issue #596)
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (unlikely(PyObject_SetItem(__pyx_v_microsecond, __pyx_v_i, __pyx_t_9) < 0)) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":78
+ * second = year.copy()
+ * microsecond = year.copy()
+ * for i, d in enumerate(date): # <<<<<<<<<<<<<<
+ * year[i] = d.year
+ * month[i] = d.month
+ */
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":88
+ * # convert years in BC era to astronomical years (so that 1 BC is year zero)
+ * # (fixes issue #596)
+ * year[year < 0] = year[year < 0] + 1 # <<<<<<<<<<<<<<
+ * # Convert time to fractions of a day
+ * day = day + hour / 24.0 + minute / 1440.0 + (second + microsecond/1.e6) / 86400.0
+ */
+ __pyx_t_8 = PyObject_RichCompare(__pyx_v_year, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 88, __pyx_L1_error)
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_year, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyObject_RichCompare(__pyx_v_year, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_year, __pyx_t_6, __pyx_t_8) < 0)) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":90
+ * year[year < 0] = year[year < 0] + 1
+ * # Convert time to fractions of a day
+ * day = day + hour / 24.0 + minute / 1440.0 + (second + microsecond/1.e6) / 86400.0 # <<<<<<<<<<<<<<
+ *
+ * # Start Meeus algorithm (variables are in his notation)
+ */
+ __pyx_t_8 = __Pyx_PyFloat_DivideObjC(__pyx_v_hour, __pyx_float_24_0, 24.0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = PyNumber_Add(__pyx_v_day, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyFloat_DivideObjC(__pyx_v_minute, __pyx_float_1440_0, 1440.0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = PyNumber_Add(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyFloat_DivideObjC(__pyx_v_microsecond, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = PyNumber_Add(__pyx_v_second, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyFloat_DivideObjC(__pyx_t_6, __pyx_float_86400_0, 86400.0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Add(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF_SET(__pyx_v_day, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":93
+ *
+ * # Start Meeus algorithm (variables are in his notation)
+ * month_lt_3 = month < 3 # <<<<<<<<<<<<<<
+ * month[month_lt_3] = month[month_lt_3] + 12
+ * year[month_lt_3] = year[month_lt_3] - 1
+ */
+ __pyx_t_6 = PyObject_RichCompare(__pyx_v_month, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
+ __pyx_v_month_lt_3 = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":94
+ * # Start Meeus algorithm (variables are in his notation)
+ * month_lt_3 = month < 3
+ * month[month_lt_3] = month[month_lt_3] + 12 # <<<<<<<<<<<<<<
+ * year[month_lt_3] = year[month_lt_3] - 1
+ *
+ */
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_month, __pyx_v_month_lt_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_12, 12, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_v_month, __pyx_v_month_lt_3, __pyx_t_8) < 0)) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":95
+ * month_lt_3 = month < 3
+ * month[month_lt_3] = month[month_lt_3] + 12
+ * year[month_lt_3] = year[month_lt_3] - 1 # <<<<<<<<<<<<<<
+ *
+ * # MC - assure array
+ */
+ __pyx_t_8 = PyObject_GetItem(__pyx_v_year, __pyx_v_month_lt_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_t_8, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_v_year, __pyx_v_month_lt_3, __pyx_t_6) < 0)) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":99
+ * # MC - assure array
+ * # A = np.int64(year / 100)
+ * A = (year / 100).astype(np.int64) # <<<<<<<<<<<<<<
+ *
+ * # MC
+ */
+ __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_v_year, __pyx_int_100); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_astype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_v_A = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":104
+ * # jd = int(365.25 * (year + 4716)) + int(30.6001 * (month + 1)) + \
+ * # day - 1524.5
+ * jd = 365. * year + np.int32(0.25 * year + 2000.) + np.int32(30.6001 * (month + 1)) + \ # <<<<<<<<<<<<<<
+ * day + 1718994.5
+ *
+ */
+ __pyx_t_6 = PyNumber_Multiply(__pyx_float_365_, __pyx_v_year); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyNumber_Multiply(__pyx_float_0_25, __pyx_v_year); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_8 = __Pyx_PyFloat_AddObjC(__pyx_t_5, __pyx_float_2000_, 2000., 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
+ __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
+ __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 104, __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_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_month, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = PyNumber_Multiply(__pyx_float_30_6001, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
+ __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
+ __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 104, __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_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":105
+ * # day - 1524.5
+ * jd = 365. * year + np.int32(0.25 * year + 2000.) + np.int32(30.6001 * (month + 1)) + \
+ * day + 1718994.5 # <<<<<<<<<<<<<<
+ *
+ * # optionally adjust the jd for the switch from
+ */
+ __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_v_day); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyFloat_AddObjC(__pyx_t_9, __pyx_float_1718994_5, 1718994.5, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 105, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_v_jd = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":110
+ * # the Julian to Gregorian Calendar
+ * # here assumed to have occurred the day after 1582 October 4
+ * if calendar in ['standard', 'gregorian']: # <<<<<<<<<<<<<<
+ * # MC - do not have to be contiguous dates
+ * # if np.min(jd) >= 2299170.5:
+ */
+ __Pyx_INCREF(__pyx_v_calendar);
+ __pyx_t_7 = __pyx_v_calendar;
+ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 110, __pyx_L1_error)
+ if (!__pyx_t_13) {
+ } else {
+ __pyx_t_12 = __pyx_t_13;
+ goto __pyx_L16_bool_binop_done;
+ }
+ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __pyx_t_12 = __pyx_t_13;
+ __pyx_L16_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_13 = (__pyx_t_12 != 0);
+ if (__pyx_t_13) {
+
+ /* "netcdftime/_netcdftime.pyx":122
+ * # raise ValueError(
+ * # 'impossible date (falls in gap between end of Julian calendar and beginning of Gregorian calendar')
+ * if np.any((jd >= 2299160.5) & (jd < 2299170.5)): # missing days in Gregorian calendar # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'impossible date (falls in gap between end of Julian calendar and beginning of Gregorian calendar')
+ */
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_any); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyObject_RichCompare(__pyx_v_jd, __pyx_float_2299160_5, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_jd, __pyx_float_2299170_5, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __pyx_t_8 = PyNumber_And(__pyx_t_9, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 122, __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_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (__pyx_t_13) {
+
+ /* "netcdftime/_netcdftime.pyx":123
+ * # 'impossible date (falls in gap between end of Julian calendar and beginning of Gregorian calendar')
+ * if np.any((jd >= 2299160.5) & (jd < 2299170.5)): # missing days in Gregorian calendar
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'impossible date (falls in gap between end of Julian calendar and beginning of Gregorian calendar')
+ * B = np.zeros(len(jd)) # 1582 October 5 (Julian Calendar)
+ */
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 123, __pyx_L1_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, 123, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":122
+ * # raise ValueError(
+ * # 'impossible date (falls in gap between end of Julian calendar and beginning of Gregorian calendar')
+ * if np.any((jd >= 2299160.5) & (jd < 2299170.5)): # missing days in Gregorian calendar # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'impossible date (falls in gap between end of Julian calendar and beginning of Gregorian calendar')
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":125
+ * raise ValueError(
+ * 'impossible date (falls in gap between end of Julian calendar and beginning of Gregorian calendar')
+ * B = np.zeros(len(jd)) # 1582 October 5 (Julian Calendar) # <<<<<<<<<<<<<<
+ * ii = np.where(jd >= 2299170.5)[0] # 1582 October 15 (Gregorian Calendar)
+ * if ii.size>0:
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_10 = PyObject_Length(__pyx_v_jd); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 125, __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_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 125, __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
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 125, __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_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_v_B = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":126
+ * 'impossible date (falls in gap between end of Julian calendar and beginning of Gregorian calendar')
+ * B = np.zeros(len(jd)) # 1582 October 5 (Julian Calendar)
+ * ii = np.where(jd >= 2299170.5)[0] # 1582 October 15 (Gregorian Calendar) # <<<<<<<<<<<<<<
+ * if ii.size>0:
+ * B[ii] = 2 - A[ii] + np.int32(A[ii] / 4)
+ */
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_where); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyObject_RichCompare(__pyx_v_jd, __pyx_float_2299170_5, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_9};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_9};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 126, __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_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_v_ii = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":127
+ * B = np.zeros(len(jd)) # 1582 October 5 (Julian Calendar)
+ * ii = np.where(jd >= 2299170.5)[0] # 1582 October 15 (Gregorian Calendar)
+ * if ii.size>0: # <<<<<<<<<<<<<<
+ * B[ii] = 2 - A[ii] + np.int32(A[ii] / 4)
+ * elif calendar == 'proleptic_gregorian':
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ii, __pyx_n_s_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (__pyx_t_13) {
+
+ /* "netcdftime/_netcdftime.pyx":128
+ * ii = np.where(jd >= 2299170.5)[0] # 1582 October 15 (Gregorian Calendar)
+ * if ii.size>0:
+ * B[ii] = 2 - A[ii] + np.int32(A[ii] / 4) # <<<<<<<<<<<<<<
+ * elif calendar == 'proleptic_gregorian':
+ * B = 2 - A + np.int32(A / 4)
+ */
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_A, __pyx_v_ii); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_5 = __Pyx_PyInt_SubtractCObj(__pyx_int_2, __pyx_t_7, 2, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int32); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyObject_GetItem(__pyx_v_A, __pyx_v_ii); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_int_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 128, __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_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 128, __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
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 128, __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_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __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_4);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyNumber_Add(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_v_B, __pyx_v_ii, __pyx_t_9) < 0)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":127
+ * B = np.zeros(len(jd)) # 1582 October 5 (Julian Calendar)
+ * ii = np.where(jd >= 2299170.5)[0] # 1582 October 15 (Gregorian Calendar)
+ * if ii.size>0: # <<<<<<<<<<<<<<
+ * B[ii] = 2 - A[ii] + np.int32(A[ii] / 4)
+ * elif calendar == 'proleptic_gregorian':
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":110
+ * # the Julian to Gregorian Calendar
+ * # here assumed to have occurred the day after 1582 October 4
+ * if calendar in ['standard', 'gregorian']: # <<<<<<<<<<<<<<
+ * # MC - do not have to be contiguous dates
+ * # if np.min(jd) >= 2299170.5:
+ */
+ goto __pyx_L15;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":129
+ * if ii.size>0:
+ * B[ii] = 2 - A[ii] + np.int32(A[ii] / 4)
+ * elif calendar == 'proleptic_gregorian': # <<<<<<<<<<<<<<
+ * B = 2 - A + np.int32(A / 4)
+ * elif calendar == 'julian':
+ */
+ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 129, __pyx_L1_error)
+ if (__pyx_t_13) {
+
+ /* "netcdftime/_netcdftime.pyx":130
+ * B[ii] = 2 - A[ii] + np.int32(A[ii] / 4)
+ * elif calendar == 'proleptic_gregorian':
+ * B = 2 - A + np.int32(A / 4) # <<<<<<<<<<<<<<
+ * elif calendar == 'julian':
+ * B = np.zeros(len(jd))
+ */
+ __pyx_t_9 = __Pyx_PyInt_SubtractCObj(__pyx_int_2, __pyx_v_A, 2, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_v_A, __pyx_int_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 130, __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_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Add(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_v_B = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":129
+ * if ii.size>0:
+ * B[ii] = 2 - A[ii] + np.int32(A[ii] / 4)
+ * elif calendar == 'proleptic_gregorian': # <<<<<<<<<<<<<<
+ * B = 2 - A + np.int32(A / 4)
+ * elif calendar == 'julian':
+ */
+ goto __pyx_L15;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":131
+ * elif calendar == 'proleptic_gregorian':
+ * B = 2 - A + np.int32(A / 4)
+ * elif calendar == 'julian': # <<<<<<<<<<<<<<
+ * B = np.zeros(len(jd))
+ * else:
+ */
+ __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_julian, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 131, __pyx_L1_error)
+ if (__pyx_t_13) {
+
+ /* "netcdftime/_netcdftime.pyx":132
+ * B = 2 - A + np.int32(A / 4)
+ * elif calendar == 'julian':
+ * B = np.zeros(len(jd)) # <<<<<<<<<<<<<<
+ * else:
+ * raise ValueError(
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_10 = PyObject_Length(__pyx_v_jd); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_v_B = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":131
+ * elif calendar == 'proleptic_gregorian':
+ * B = 2 - A + np.int32(A / 4)
+ * elif calendar == 'julian': # <<<<<<<<<<<<<<
+ * B = np.zeros(len(jd))
+ * else:
+ */
+ goto __pyx_L15;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":134
+ * B = np.zeros(len(jd))
+ * else:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'unknown calendar, must be one of julian,standard,gregorian,proleptic_gregorian, got %s' % calendar)
+ *
+ */
+ /*else*/ {
+
+ /* "netcdftime/_netcdftime.pyx":135
+ * else:
+ * raise ValueError(
+ * 'unknown calendar, must be one of julian,standard,gregorian,proleptic_gregorian, got %s' % calendar) # <<<<<<<<<<<<<<
+ *
+ * # adjust for Julian calendar if necessary
+ */
+ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_unknown_calendar_must_be_one_of, __pyx_v_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+ /* "netcdftime/_netcdftime.pyx":134
+ * B = np.zeros(len(jd))
+ * else:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'unknown calendar, must be one of julian,standard,gregorian,proleptic_gregorian, got %s' % calendar)
+ *
+ */
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __PYX_ERR(0, 134, __pyx_L1_error)
+ }
+ __pyx_L15:;
+
+ /* "netcdftime/_netcdftime.pyx":138
+ *
+ * # adjust for Julian calendar if necessary
+ * jd = jd + B # <<<<<<<<<<<<<<
+ *
+ * # Add a small offset (proportional to Julian date) for correct re-conversion.
+ */
+ __pyx_t_6 = PyNumber_Add(__pyx_v_jd, __pyx_v_B); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF_SET(__pyx_v_jd, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":143
+ * # This is about 45 microseconds in 2000 for Julian date starting -4712.
+ * # (pull request #433).
+ * eps = np.finfo(float).eps # <<<<<<<<<<<<<<
+ * eps = np.maximum(eps*jd, eps)
+ * jd += eps
+ */
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_finfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)(&PyFloat_Type))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, ((PyObject *)(&PyFloat_Type))};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, ((PyObject *)(&PyFloat_Type))};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
+ __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, ((PyObject *)(&PyFloat_Type)));
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_eps); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_eps = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":144
+ * # (pull request #433).
+ * eps = np.finfo(float).eps
+ * eps = np.maximum(eps*jd, eps) # <<<<<<<<<<<<<<
+ * jd += eps
+ *
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_maximum); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_eps, __pyx_v_jd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = NULL;
+ __pyx_t_14 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ __pyx_t_14 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_6, __pyx_v_eps};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_6, __pyx_v_eps};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_14, __pyx_t_6);
+ __Pyx_INCREF(__pyx_v_eps);
+ __Pyx_GIVEREF(__pyx_v_eps);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_14, __pyx_v_eps);
+ __pyx_t_6 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF_SET(__pyx_v_eps, __pyx_t_5);
+ __pyx_t_5 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":145
+ * eps = np.finfo(float).eps
+ * eps = np.maximum(eps*jd, eps)
+ * jd += eps # <<<<<<<<<<<<<<
+ *
+ * if isscalar:
+ */
+ __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_jd, __pyx_v_eps); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF_SET(__pyx_v_jd, __pyx_t_5);
+ __pyx_t_5 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":147
+ * jd += eps
+ *
+ * if isscalar: # <<<<<<<<<<<<<<
+ * return jd[0]
+ * else:
+ */
+ __pyx_t_13 = (__pyx_v_isscalar != 0);
+ if (__pyx_t_13) {
+
+ /* "netcdftime/_netcdftime.pyx":148
+ *
+ * if isscalar:
+ * return jd[0] # <<<<<<<<<<<<<<
+ * else:
+ * return jd
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_jd, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":147
+ * jd += eps
+ *
+ * if isscalar: # <<<<<<<<<<<<<<
+ * return jd[0]
+ * else:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":150
+ * return jd[0]
+ * else:
+ * return jd # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_jd);
+ __pyx_r = __pyx_v_jd;
+ goto __pyx_L0;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":41
+ * "(?P<prefix>[+-])(?P<hours>[0-9]{1,2}):(?P<minutes>[0-9]{1,2})")
+ *
+ * def JulianDayFromDate(date, calendar='standard'): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("netcdftime._netcdftime.JulianDayFromDate", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_year);
+ __Pyx_XDECREF(__pyx_v_month);
+ __Pyx_XDECREF(__pyx_v_day);
+ __Pyx_XDECREF(__pyx_v_hour);
+ __Pyx_XDECREF(__pyx_v_minute);
+ __Pyx_XDECREF(__pyx_v_second);
+ __Pyx_XDECREF(__pyx_v_microsecond);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XDECREF(__pyx_v_d);
+ __Pyx_XDECREF(__pyx_v_month_lt_3);
+ __Pyx_XDECREF(__pyx_v_A);
+ __Pyx_XDECREF(__pyx_v_jd);
+ __Pyx_XDECREF(__pyx_v_B);
+ __Pyx_XDECREF(__pyx_v_ii);
+ __Pyx_XDECREF(__pyx_v_eps);
+ __Pyx_XDECREF(__pyx_v_date);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":153
+ *
+ *
+ * cdef _NoLeapDayFromDate(date): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__NoLeapDayFromDate(PyObject *__pyx_v_date) {
+ PyObject *__pyx_v_year = NULL;
+ PyObject *__pyx_v_month = NULL;
+ PyObject *__pyx_v_day = NULL;
+ PyObject *__pyx_v_hour = NULL;
+ PyObject *__pyx_v_minute = NULL;
+ PyObject *__pyx_v_second = NULL;
+ PyObject *__pyx_v_microsecond = NULL;
+ PyObject *__pyx_v_jd = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ __Pyx_RefNannySetupContext("_NoLeapDayFromDate", 0);
+
+ /* "netcdftime/_netcdftime.pyx":161
+ * """
+ *
+ * year = date.year # <<<<<<<<<<<<<<
+ * month = date.month
+ * day = date.day
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_year = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":162
+ *
+ * year = date.year
+ * month = date.month # <<<<<<<<<<<<<<
+ * day = date.day
+ * hour = date.hour
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_month = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":163
+ * year = date.year
+ * month = date.month
+ * day = date.day # <<<<<<<<<<<<<<
+ * hour = date.hour
+ * minute = date.minute
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_day = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":164
+ * month = date.month
+ * day = date.day
+ * hour = date.hour # <<<<<<<<<<<<<<
+ * minute = date.minute
+ * second = date.second
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_hour); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_hour = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":165
+ * day = date.day
+ * hour = date.hour
+ * minute = date.minute # <<<<<<<<<<<<<<
+ * second = date.second
+ * microsecond = date.microsecond
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_minute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_minute = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":166
+ * hour = date.hour
+ * minute = date.minute
+ * second = date.second # <<<<<<<<<<<<<<
+ * microsecond = date.microsecond
+ * # Convert time to fractions of a day
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_second = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":167
+ * minute = date.minute
+ * second = date.second
+ * microsecond = date.microsecond # <<<<<<<<<<<<<<
+ * # Convert time to fractions of a day
+ * day = day + hour / 24.0 + minute / 1440.0 + (second + microsecond/1.e6) / 86400.0
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_microsecond = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":169
+ * microsecond = date.microsecond
+ * # Convert time to fractions of a day
+ * day = day + hour / 24.0 + minute / 1440.0 + (second + microsecond/1.e6) / 86400.0 # <<<<<<<<<<<<<<
+ *
+ * # Start Meeus algorithm (variables are in his notation)
+ */
+ __pyx_t_1 = __Pyx_PyFloat_DivideObjC(__pyx_v_hour, __pyx_float_24_0, 24.0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Add(__pyx_v_day, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyFloat_DivideObjC(__pyx_v_minute, __pyx_float_1440_0, 1440.0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __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_1 = __Pyx_PyFloat_DivideObjC(__pyx_v_microsecond, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Add(__pyx_v_second, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyFloat_DivideObjC(__pyx_t_2, __pyx_float_86400_0, 86400.0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_day, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":172
+ *
+ * # Start Meeus algorithm (variables are in his notation)
+ * if (month < 3): # <<<<<<<<<<<<<<
+ * month = month + 12
+ * year = year - 1
+ */
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_month, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":173
+ * # Start Meeus algorithm (variables are in his notation)
+ * if (month < 3):
+ * month = month + 12 # <<<<<<<<<<<<<<
+ * year = year - 1
+ *
+ */
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_month, __pyx_int_12, 12, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v_month, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":174
+ * if (month < 3):
+ * month = month + 12
+ * year = year - 1 # <<<<<<<<<<<<<<
+ *
+ * jd = int(365. * (year + 4716)) + int(30.6001 * (month + 1)) + \
+ */
+ __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_year, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v_year, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":172
+ *
+ * # Start Meeus algorithm (variables are in his notation)
+ * if (month < 3): # <<<<<<<<<<<<<<
+ * month = month + 12
+ * year = year - 1
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":176
+ * year = year - 1
+ *
+ * jd = int(365. * (year + 4716)) + int(30.6001 * (month + 1)) + \ # <<<<<<<<<<<<<<
+ * day - 1524.5
+ *
+ */
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_year, __pyx_int_4716, 0x126C, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyNumber_Multiply(__pyx_float_365_, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_month, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_float_30_6001, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __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;
+
+ /* "netcdftime/_netcdftime.pyx":177
+ *
+ * jd = int(365. * (year + 4716)) + int(30.6001 * (month + 1)) + \
+ * day - 1524.5 # <<<<<<<<<<<<<<
+ *
+ * return jd
+ */
+ __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_v_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyFloat_SubtractObjC(__pyx_t_1, __pyx_float_1524_5, 1524.5, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_jd = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":179
+ * day - 1524.5
+ *
+ * return jd # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_jd);
+ __pyx_r = __pyx_v_jd;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":153
+ *
+ *
+ * cdef _NoLeapDayFromDate(date): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("netcdftime._netcdftime._NoLeapDayFromDate", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_year);
+ __Pyx_XDECREF(__pyx_v_month);
+ __Pyx_XDECREF(__pyx_v_day);
+ __Pyx_XDECREF(__pyx_v_hour);
+ __Pyx_XDECREF(__pyx_v_minute);
+ __Pyx_XDECREF(__pyx_v_second);
+ __Pyx_XDECREF(__pyx_v_microsecond);
+ __Pyx_XDECREF(__pyx_v_jd);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":182
+ *
+ *
+ * cdef _AllLeapFromDate(date): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__AllLeapFromDate(PyObject *__pyx_v_date) {
+ PyObject *__pyx_v_year = NULL;
+ PyObject *__pyx_v_month = NULL;
+ PyObject *__pyx_v_day = NULL;
+ PyObject *__pyx_v_hour = NULL;
+ PyObject *__pyx_v_minute = NULL;
+ PyObject *__pyx_v_second = NULL;
+ PyObject *__pyx_v_microsecond = NULL;
+ PyObject *__pyx_v_jd = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ __Pyx_RefNannySetupContext("_AllLeapFromDate", 0);
+
+ /* "netcdftime/_netcdftime.pyx":191
+ * """
+ *
+ * year = date.year # <<<<<<<<<<<<<<
+ * month = date.month
+ * day = date.day
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_year = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":192
+ *
+ * year = date.year
+ * month = date.month # <<<<<<<<<<<<<<
+ * day = date.day
+ * hour = date.hour
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_month = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":193
+ * year = date.year
+ * month = date.month
+ * day = date.day # <<<<<<<<<<<<<<
+ * hour = date.hour
+ * minute = date.minute
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_day = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":194
+ * month = date.month
+ * day = date.day
+ * hour = date.hour # <<<<<<<<<<<<<<
+ * minute = date.minute
+ * second = date.second
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_hour); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_hour = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":195
+ * day = date.day
+ * hour = date.hour
+ * minute = date.minute # <<<<<<<<<<<<<<
+ * second = date.second
+ * microsecond = date.microsecond
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_minute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_minute = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":196
+ * hour = date.hour
+ * minute = date.minute
+ * second = date.second # <<<<<<<<<<<<<<
+ * microsecond = date.microsecond
+ * # Convert time to fractions of a day
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_second = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":197
+ * minute = date.minute
+ * second = date.second
+ * microsecond = date.microsecond # <<<<<<<<<<<<<<
+ * # Convert time to fractions of a day
+ * day = day + hour / 24.0 + minute / 1440.0 + (second + microsecond/1.e6) / 86400.0
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_microsecond = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":199
+ * microsecond = date.microsecond
+ * # Convert time to fractions of a day
+ * day = day + hour / 24.0 + minute / 1440.0 + (second + microsecond/1.e6) / 86400.0 # <<<<<<<<<<<<<<
+ *
+ * # Start Meeus algorithm (variables are in his notation)
+ */
+ __pyx_t_1 = __Pyx_PyFloat_DivideObjC(__pyx_v_hour, __pyx_float_24_0, 24.0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Add(__pyx_v_day, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyFloat_DivideObjC(__pyx_v_minute, __pyx_float_1440_0, 1440.0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __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_1 = __Pyx_PyFloat_DivideObjC(__pyx_v_microsecond, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Add(__pyx_v_second, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyFloat_DivideObjC(__pyx_t_2, __pyx_float_86400_0, 86400.0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_day, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":202
+ *
+ * # Start Meeus algorithm (variables are in his notation)
+ * if (month < 3): # <<<<<<<<<<<<<<
+ * month = month + 12
+ * year = year - 1
+ */
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_month, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":203
+ * # Start Meeus algorithm (variables are in his notation)
+ * if (month < 3):
+ * month = month + 12 # <<<<<<<<<<<<<<
+ * year = year - 1
+ *
+ */
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_month, __pyx_int_12, 12, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v_month, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":204
+ * if (month < 3):
+ * month = month + 12
+ * year = year - 1 # <<<<<<<<<<<<<<
+ *
+ * jd = int(366. * (year + 4716)) + int(30.6001 * (month + 1)) + \
+ */
+ __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_year, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v_year, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":202
+ *
+ * # Start Meeus algorithm (variables are in his notation)
+ * if (month < 3): # <<<<<<<<<<<<<<
+ * month = month + 12
+ * year = year - 1
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":206
+ * year = year - 1
+ *
+ * jd = int(366. * (year + 4716)) + int(30.6001 * (month + 1)) + \ # <<<<<<<<<<<<<<
+ * day - 1524.5
+ *
+ */
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_year, __pyx_int_4716, 0x126C, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyNumber_Multiply(__pyx_float_366_, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_month, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_float_30_6001, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __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;
+
+ /* "netcdftime/_netcdftime.pyx":207
+ *
+ * jd = int(366. * (year + 4716)) + int(30.6001 * (month + 1)) + \
+ * day - 1524.5 # <<<<<<<<<<<<<<
+ *
+ * return jd
+ */
+ __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_v_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyFloat_SubtractObjC(__pyx_t_1, __pyx_float_1524_5, 1524.5, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_jd = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":209
+ * day - 1524.5
+ *
+ * return jd # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_jd);
+ __pyx_r = __pyx_v_jd;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":182
+ *
+ *
+ * cdef _AllLeapFromDate(date): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("netcdftime._netcdftime._AllLeapFromDate", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_year);
+ __Pyx_XDECREF(__pyx_v_month);
+ __Pyx_XDECREF(__pyx_v_day);
+ __Pyx_XDECREF(__pyx_v_hour);
+ __Pyx_XDECREF(__pyx_v_minute);
+ __Pyx_XDECREF(__pyx_v_second);
+ __Pyx_XDECREF(__pyx_v_microsecond);
+ __Pyx_XDECREF(__pyx_v_jd);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":212
+ *
+ *
+ * cdef _360DayFromDate(date): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__360DayFromDate(PyObject *__pyx_v_date) {
+ PyObject *__pyx_v_year = NULL;
+ PyObject *__pyx_v_month = NULL;
+ PyObject *__pyx_v_day = NULL;
+ PyObject *__pyx_v_hour = NULL;
+ PyObject *__pyx_v_minute = NULL;
+ PyObject *__pyx_v_second = NULL;
+ PyObject *__pyx_v_microsecond = NULL;
+ PyObject *__pyx_v_jd = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("_360DayFromDate", 0);
+
+ /* "netcdftime/_netcdftime.pyx":221
+ * """
+ *
+ * year = date.year # <<<<<<<<<<<<<<
+ * month = date.month
+ * day = date.day
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_year = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":222
+ *
+ * year = date.year
+ * month = date.month # <<<<<<<<<<<<<<
+ * day = date.day
+ * hour = date.hour
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_month = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":223
+ * year = date.year
+ * month = date.month
+ * day = date.day # <<<<<<<<<<<<<<
+ * hour = date.hour
+ * minute = date.minute
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_day = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":224
+ * month = date.month
+ * day = date.day
+ * hour = date.hour # <<<<<<<<<<<<<<
+ * minute = date.minute
+ * second = date.second
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_hour); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_hour = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":225
+ * day = date.day
+ * hour = date.hour
+ * minute = date.minute # <<<<<<<<<<<<<<
+ * second = date.second
+ * microsecond = date.microsecond
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_minute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_minute = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":226
+ * hour = date.hour
+ * minute = date.minute
+ * second = date.second # <<<<<<<<<<<<<<
+ * microsecond = date.microsecond
+ * # Convert time to fractions of a day
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_second = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":227
+ * minute = date.minute
+ * second = date.second
+ * microsecond = date.microsecond # <<<<<<<<<<<<<<
+ * # Convert time to fractions of a day
+ * day = day + hour / 24.0 + minute / 1440.0 + (second + microsecond/1.e6) / 86400.0
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_microsecond = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":229
+ * microsecond = date.microsecond
+ * # Convert time to fractions of a day
+ * day = day + hour / 24.0 + minute / 1440.0 + (second + microsecond/1.e6) / 86400.0 # <<<<<<<<<<<<<<
+ *
+ * jd = int(360. * (year + 4716)) + int(30. * (month - 1)) + day
+ */
+ __pyx_t_1 = __Pyx_PyFloat_DivideObjC(__pyx_v_hour, __pyx_float_24_0, 24.0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Add(__pyx_v_day, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyFloat_DivideObjC(__pyx_v_minute, __pyx_float_1440_0, 1440.0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __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_1 = __Pyx_PyFloat_DivideObjC(__pyx_v_microsecond, __pyx_float_1_e6, 1.e6, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Add(__pyx_v_second, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyFloat_DivideObjC(__pyx_t_2, __pyx_float_86400_0, 86400.0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_day, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":231
+ * day = day + hour / 24.0 + minute / 1440.0 + (second + microsecond/1.e6) / 86400.0
+ *
+ * jd = int(360. * (year + 4716)) + int(30. * (month - 1)) + day # <<<<<<<<<<<<<<
+ *
+ * return jd
+ */
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_year, __pyx_int_4716, 0x126C, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyNumber_Multiply(__pyx_float_360_, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_month, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_float_30_, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __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_1 = PyNumber_Add(__pyx_t_3, __pyx_v_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_jd = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":233
+ * jd = int(360. * (year + 4716)) + int(30. * (month - 1)) + day
+ *
+ * return jd # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_jd);
+ __pyx_r = __pyx_v_jd;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":212
+ *
+ *
+ * cdef _360DayFromDate(date): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("netcdftime._netcdftime._360DayFromDate", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_year);
+ __Pyx_XDECREF(__pyx_v_month);
+ __Pyx_XDECREF(__pyx_v_day);
+ __Pyx_XDECREF(__pyx_v_hour);
+ __Pyx_XDECREF(__pyx_v_minute);
+ __Pyx_XDECREF(__pyx_v_second);
+ __Pyx_XDECREF(__pyx_v_microsecond);
+ __Pyx_XDECREF(__pyx_v_jd);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":236
+ *
+ *
+ * def DateFromJulianDay(JD, calendar='standard'): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_3DateFromJulianDay(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_10netcdftime_11_netcdftime_2DateFromJulianDay[] = "\n\n returns a 'datetime-like' object given Julian Day. Julian Day is a\n fractional day with approximately millisecond accuracy.\n\n if calendar='standard' or 'gregorian' (default), Julian day follows Julian\n Calendar on and before 1582-10-5, Gregorian calendar after 1582-10-15.\n\n if calendar='proleptic_gregorian', Julian Day follows gregorian calendar.\n\n if calendar='julian', Julian Day fol [...]
+static PyMethodDef __pyx_mdef_10netcdftime_11_netcdftime_3DateFromJulianDay = {"DateFromJulianDay", (PyCFunction)__pyx_pw_10netcdftime_11_netcdftime_3DateFromJulianDay, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10netcdftime_11_netcdftime_2DateFromJulianDay};
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_3DateFromJulianDay(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_JD = 0;
+ PyObject *__pyx_v_calendar = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("DateFromJulianDay (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_JD,&__pyx_n_s_calendar,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)__pyx_n_s_standard);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_JD)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_calendar);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "DateFromJulianDay") < 0)) __PYX_ERR(0, 236, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_JD = values[0];
+ __pyx_v_calendar = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("DateFromJulianDay", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 236, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("netcdftime._netcdftime.DateFromJulianDay", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_2DateFromJulianDay(__pyx_self, __pyx_v_JD, __pyx_v_calendar);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_2DateFromJulianDay(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_JD, PyObject *__pyx_v_calendar) {
+ PyObject *__pyx_v_julian = NULL;
+ CYTHON_UNUSED PyObject *__pyx_v_dayofwk = NULL;
+ PyObject *__pyx_v_Z = NULL;
+ PyObject *__pyx_v_F = NULL;
+ PyObject *__pyx_v_alpha = NULL;
+ PyObject *__pyx_v_A = NULL;
+ PyObject *__pyx_v_ind_before = NULL;
+ PyObject *__pyx_v_B = NULL;
+ PyObject *__pyx_v_C = NULL;
+ PyObject *__pyx_v_D = NULL;
+ PyObject *__pyx_v_E = NULL;
+ PyObject *__pyx_v_day = NULL;
+ PyObject *__pyx_v_nday = NULL;
+ PyObject *__pyx_v_dayofyr = NULL;
+ PyObject *__pyx_v_ind_nday_before = NULL;
+ PyObject *__pyx_v_month = NULL;
+ PyObject *__pyx_v_year = NULL;
+ PyObject *__pyx_v_leap = NULL;
+ PyObject *__pyx_v_inc_idx = NULL;
+ PyObject *__pyx_v_eps = NULL;
+ PyObject *__pyx_v_hour = NULL;
+ PyObject *__pyx_v_minute = NULL;
+ PyObject *__pyx_v_second = NULL;
+ PyObject *__pyx_v_microsecond = NULL;
+ int __pyx_v_isscalar;
+ PyObject *__pyx_v_datetime_type = NULL;
+ PyObject *__pyx_v_args = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ int __pyx_t_13;
+ int __pyx_t_14;
+ Py_ssize_t __pyx_t_15;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ PyObject *(*__pyx_t_19)(PyObject *);
+ __Pyx_RefNannySetupContext("DateFromJulianDay", 0);
+
+ /* "netcdftime/_netcdftime.pyx":264
+ * # based on redate.py by David Finlayson.
+ *
+ * julian = np.array(JD, dtype=float) # <<<<<<<<<<<<<<
+ *
+ * if np.min(julian) < 0:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 264, __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, 264, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_JD);
+ __Pyx_GIVEREF(__pyx_v_JD);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_JD);
+ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 264, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 264, __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, 264, __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;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_julian = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":266
+ * julian = np.array(JD, dtype=float)
+ *
+ * if np.min(julian) < 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Julian Day must be positive')
+ *
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_julian); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __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_3, __pyx_v_julian};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_julian};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __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, 266, __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_julian);
+ __Pyx_GIVEREF(__pyx_v_julian);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_julian);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __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;
+ __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, 266, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 266, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_5) {
+
+ /* "netcdftime/_netcdftime.pyx":267
+ *
+ * if np.min(julian) < 0:
+ * raise ValueError('Julian Day must be positive') # <<<<<<<<<<<<<<
+ *
+ * dayofwk = np.atleast_1d(np.int32(np.fmod(np.int32(julian + 1.5), 7)))
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __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, 267, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":266
+ * julian = np.array(JD, dtype=float)
+ *
+ * if np.min(julian) < 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Julian Day must be positive')
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":269
+ * raise ValueError('Julian Day must be positive')
+ *
+ * dayofwk = np.atleast_1d(np.int32(np.fmod(np.int32(julian + 1.5), 7))) # <<<<<<<<<<<<<<
+ * # get the day (Z) and the fraction of the day (F)
+ * # add 0.000005 which is 452 ms in case of jd being after
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_atleast_1d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_fmod); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int32); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyFloat_AddObjC(__pyx_v_julian, __pyx_float_1_5, 1.5, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (!__pyx_t_11) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_9};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_9};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = NULL;
+ __pyx_t_13 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_7, __pyx_int_7};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_7, __pyx_int_7};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 269, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_t_7);
+ __Pyx_INCREF(__pyx_int_7);
+ __Pyx_GIVEREF(__pyx_int_7);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_int_7);
+ __pyx_t_7 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_3};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_3};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __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, 269, __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_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __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_6, __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, 269, __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
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __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, 269, __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_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 269, __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_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_dayofwk = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":273
+ * # add 0.000005 which is 452 ms in case of jd being after
+ * # second 23:59:59 of a day we want to round to the next day see issue #75
+ * Z = np.atleast_1d(np.int32(np.round(julian))) # <<<<<<<<<<<<<<
+ * F = np.atleast_1d(julian + 0.5 - Z).astype(np.float64)
+ * if calendar in ['standard', 'gregorian']:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_atleast_1d); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_round); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __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_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_julian); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_julian};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_julian};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 273, __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(__pyx_v_julian);
+ __Pyx_GIVEREF(__pyx_v_julian);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_julian);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __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_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 273, __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_2);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_2);
+ __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, 273, __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;
+ __pyx_v_Z = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":274
+ * # second 23:59:59 of a day we want to round to the next day see issue #75
+ * Z = np.atleast_1d(np.int32(np.round(julian)))
+ * F = np.atleast_1d(julian + 0.5 - Z).astype(np.float64) # <<<<<<<<<<<<<<
+ * if calendar in ['standard', 'gregorian']:
+ * # MC
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_atleast_1d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyFloat_AddObjC(__pyx_v_julian, __pyx_float_0_5, 0.5, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = PyNumber_Subtract(__pyx_t_7, __pyx_v_Z); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ __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, 274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_float64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __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_12, __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, 274, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __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, 274, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 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, 274, __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_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_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_F = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":275
+ * Z = np.atleast_1d(np.int32(np.round(julian)))
+ * F = np.atleast_1d(julian + 0.5 - Z).astype(np.float64)
+ * if calendar in ['standard', 'gregorian']: # <<<<<<<<<<<<<<
+ * # MC
+ * # alpha = int((Z - 1867216.25)/36524.25)
+ */
+ __Pyx_INCREF(__pyx_v_calendar);
+ __pyx_t_1 = __pyx_v_calendar;
+ __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 275, __pyx_L1_error)
+ if (!__pyx_t_14) {
+ } else {
+ __pyx_t_5 = __pyx_t_14;
+ goto __pyx_L5_bool_binop_done;
+ }
+ __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 275, __pyx_L1_error)
+ __pyx_t_5 = __pyx_t_14;
+ __pyx_L5_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_14 = (__pyx_t_5 != 0);
+ if (__pyx_t_14) {
+
+ /* "netcdftime/_netcdftime.pyx":279
+ * # alpha = int((Z - 1867216.25)/36524.25)
+ * # A = Z + 1 + alpha - int(alpha/4)
+ * alpha = np.int32(((Z - 1867216.) - 0.25) / 36524.25) # <<<<<<<<<<<<<<
+ * A = Z + 1 + alpha - np.int32(0.25 * alpha)
+ * # check if dates before oct 5th 1582 are in the array
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 279, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyFloat_SubtractObjC(__pyx_v_Z, __pyx_float_1867216_, 1867216., 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyFloat_SubtractObjC(__pyx_t_2, __pyx_float_0_25, 0.25, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_t_4, __pyx_float_36524_25, 36524.25, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __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_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __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
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __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_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 279, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_2);
+ __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, 279, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_alpha = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":280
+ * # A = Z + 1 + alpha - int(alpha/4)
+ * alpha = np.int32(((Z - 1867216.) - 0.25) / 36524.25)
+ * A = Z + 1 + alpha - np.int32(0.25 * alpha) # <<<<<<<<<<<<<<
+ * # check if dates before oct 5th 1582 are in the array
+ * ind_before = np.where(julian < 2299160.5)[0]
+ */
+ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_Z, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_v_alpha); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = PyNumber_Multiply(__pyx_float_0_25, __pyx_v_alpha); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Subtract(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __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;
+ __pyx_v_A = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":282
+ * A = Z + 1 + alpha - np.int32(0.25 * alpha)
+ * # check if dates before oct 5th 1582 are in the array
+ * ind_before = np.where(julian < 2299160.5)[0] # <<<<<<<<<<<<<<
+ * if len(ind_before) > 0:
+ * A[ind_before] = Z[ind_before]
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_where); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_julian, __pyx_float_2299160_5, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
+ __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, 282, __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, 282, __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, 282, __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_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_ind_before = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":283
+ * # check if dates before oct 5th 1582 are in the array
+ * ind_before = np.where(julian < 2299160.5)[0]
+ * if len(ind_before) > 0: # <<<<<<<<<<<<<<
+ * A[ind_before] = Z[ind_before]
+ *
+ */
+ __pyx_t_15 = PyObject_Length(__pyx_v_ind_before); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 283, __pyx_L1_error)
+ __pyx_t_14 = ((__pyx_t_15 > 0) != 0);
+ if (__pyx_t_14) {
+
+ /* "netcdftime/_netcdftime.pyx":284
+ * ind_before = np.where(julian < 2299160.5)[0]
+ * if len(ind_before) > 0:
+ * A[ind_before] = Z[ind_before] # <<<<<<<<<<<<<<
+ *
+ * elif calendar == 'proleptic_gregorian':
+ */
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_Z, __pyx_v_ind_before); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 284, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (unlikely(PyObject_SetItem(__pyx_v_A, __pyx_v_ind_before, __pyx_t_6) < 0)) __PYX_ERR(0, 284, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":283
+ * # check if dates before oct 5th 1582 are in the array
+ * ind_before = np.where(julian < 2299160.5)[0]
+ * if len(ind_before) > 0: # <<<<<<<<<<<<<<
+ * A[ind_before] = Z[ind_before]
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":275
+ * Z = np.atleast_1d(np.int32(np.round(julian)))
+ * F = np.atleast_1d(julian + 0.5 - Z).astype(np.float64)
+ * if calendar in ['standard', 'gregorian']: # <<<<<<<<<<<<<<
+ * # MC
+ * # alpha = int((Z - 1867216.25)/36524.25)
+ */
+ goto __pyx_L4;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":286
+ * A[ind_before] = Z[ind_before]
+ *
+ * elif calendar == 'proleptic_gregorian': # <<<<<<<<<<<<<<
+ * # MC
+ * # alpha = int((Z - 1867216.25)/36524.25)
+ */
+ __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 286, __pyx_L1_error)
+ if (__pyx_t_14) {
+
+ /* "netcdftime/_netcdftime.pyx":290
+ * # alpha = int((Z - 1867216.25)/36524.25)
+ * # A = Z + 1 + alpha - int(alpha/4)
+ * alpha = np.int32(((Z - 1867216.) - 0.25) / 36524.25) # <<<<<<<<<<<<<<
+ * A = Z + 1 + alpha - np.int32(0.25 * alpha)
+ * elif calendar == 'julian':
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 290, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyFloat_SubtractObjC(__pyx_v_Z, __pyx_float_1867216_, 1867216., 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyFloat_SubtractObjC(__pyx_t_2, __pyx_float_0_25, 0.25, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_t_1, __pyx_float_36524_25, 36524.25, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 290, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_2};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 290, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_2};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 290, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 290, __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 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 290, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_v_alpha = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":291
+ * # A = Z + 1 + alpha - int(alpha/4)
+ * alpha = np.int32(((Z - 1867216.) - 0.25) / 36524.25)
+ * A = Z + 1 + alpha - np.int32(0.25 * alpha) # <<<<<<<<<<<<<<
+ * elif calendar == 'julian':
+ * A = Z
+ */
+ __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_Z, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_12 = PyNumber_Add(__pyx_t_6, __pyx_v_alpha); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Multiply(__pyx_float_0_25, __pyx_v_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __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_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Subtract(__pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_A = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":286
+ * A[ind_before] = Z[ind_before]
+ *
+ * elif calendar == 'proleptic_gregorian': # <<<<<<<<<<<<<<
+ * # MC
+ * # alpha = int((Z - 1867216.25)/36524.25)
+ */
+ goto __pyx_L4;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":292
+ * alpha = np.int32(((Z - 1867216.) - 0.25) / 36524.25)
+ * A = Z + 1 + alpha - np.int32(0.25 * alpha)
+ * elif calendar == 'julian': # <<<<<<<<<<<<<<
+ * A = Z
+ * else:
+ */
+ __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_julian, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 292, __pyx_L1_error)
+ if (__pyx_t_14) {
+
+ /* "netcdftime/_netcdftime.pyx":293
+ * A = Z + 1 + alpha - np.int32(0.25 * alpha)
+ * elif calendar == 'julian':
+ * A = Z # <<<<<<<<<<<<<<
+ * else:
+ * raise ValueError(
+ */
+ __Pyx_INCREF(__pyx_v_Z);
+ __pyx_v_A = __pyx_v_Z;
+
+ /* "netcdftime/_netcdftime.pyx":292
+ * alpha = np.int32(((Z - 1867216.) - 0.25) / 36524.25)
+ * A = Z + 1 + alpha - np.int32(0.25 * alpha)
+ * elif calendar == 'julian': # <<<<<<<<<<<<<<
+ * A = Z
+ * else:
+ */
+ goto __pyx_L4;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":295
+ * A = Z
+ * else:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'unknown calendar, must be one of julian,standard,gregorian,proleptic_gregorian, got %s' % calendar)
+ *
+ */
+ /*else*/ {
+
+ /* "netcdftime/_netcdftime.pyx":296
+ * else:
+ * raise ValueError(
+ * 'unknown calendar, must be one of julian,standard,gregorian,proleptic_gregorian, got %s' % calendar) # <<<<<<<<<<<<<<
+ *
+ * B = A + 1524
+ */
+ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_unknown_calendar_must_be_one_of, __pyx_v_calendar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+
+ /* "netcdftime/_netcdftime.pyx":295
+ * A = Z
+ * else:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'unknown calendar, must be one of julian,standard,gregorian,proleptic_gregorian, got %s' % calendar)
+ *
+ */
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 295, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __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, 295, __pyx_L1_error)
+ }
+ __pyx_L4:;
+
+ /* "netcdftime/_netcdftime.pyx":298
+ * 'unknown calendar, must be one of julian,standard,gregorian,proleptic_gregorian, got %s' % calendar)
+ *
+ * B = A + 1524 # <<<<<<<<<<<<<<
+ * # MC
+ * # C = int((B - 122.1)/365.25)
+ */
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_A, __pyx_int_1524, 0x5F4, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_v_B = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":302
+ * # C = int((B - 122.1)/365.25)
+ * # D = int(365.25 * C)
+ * C = np.atleast_1d(np.int32(6680. + ((B - 2439870.) - 122.1) / 365.25)) # <<<<<<<<<<<<<<
+ * D = np.atleast_1d(np.int32(365 * C + np.int32(0.25 * C)))
+ * E = np.atleast_1d(np.int32((B - D) / 30.6001))
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_atleast_1d); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyFloat_SubtractObjC(__pyx_v_B, __pyx_float_2439870_, 2439870., 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_PyFloat_SubtractObjC(__pyx_t_4, __pyx_float_122_1, 122.1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyFloat_DivideObjC(__pyx_t_1, __pyx_float_365_25, 365.25, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyFloat_AddCObj(__pyx_float_6680_, __pyx_t_4, 6680., 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(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_7);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __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, 302, __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_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_v_C = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":303
+ * # D = int(365.25 * C)
+ * C = np.atleast_1d(np.int32(6680. + ((B - 2439870.) - 122.1) / 365.25))
+ * D = np.atleast_1d(np.int32(365 * C + np.int32(0.25 * C))) # <<<<<<<<<<<<<<
+ * E = np.atleast_1d(np.int32((B - D) / 30.6001))
+ *
+ */
+ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_atleast_1d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Multiply(__pyx_int_365, __pyx_v_C); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Multiply(__pyx_float_0_25, __pyx_v_C); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __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_10, __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, 303, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __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, 303, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 303, __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_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_3};
+ __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_3};
+ __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ __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, 303, __pyx_L1_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_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_12};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_12};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 303, __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_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __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_v_D = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":304
+ * C = np.atleast_1d(np.int32(6680. + ((B - 2439870.) - 122.1) / 365.25))
+ * D = np.atleast_1d(np.int32(365 * C + np.int32(0.25 * C)))
+ * E = np.atleast_1d(np.int32((B - D) / 30.6001)) # <<<<<<<<<<<<<<
+ *
+ * # Convert to date
+ */
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_atleast_1d); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = PyNumber_Subtract(__pyx_v_B, __pyx_v_D); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_t_12, __pyx_float_30_6001, 30.6001, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_3};
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_3};
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __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_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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_8};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __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_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_E = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":307
+ *
+ * # Convert to date
+ * day = np.clip(B - D - np.int64(30.6001 * E) + F, 1, None) # <<<<<<<<<<<<<<
+ * nday = B - D - 123
+ * dayofyr = nday - 305
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_clip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Subtract(__pyx_v_B, __pyx_v_D); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Multiply(__pyx_float_30_6001, __pyx_v_E); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_7};
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_7};
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Subtract(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_v_F); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ __pyx_t_13 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_8, __pyx_int_1, Py_None};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_8, __pyx_int_1, Py_None};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 307, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_13, __pyx_t_8);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_13, __pyx_int_1);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_13, Py_None);
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __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;
+ __pyx_v_day = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":308
+ * # Convert to date
+ * day = np.clip(B - D - np.int64(30.6001 * E) + F, 1, None)
+ * nday = B - D - 123 # <<<<<<<<<<<<<<
+ * dayofyr = nday - 305
+ * ind_nday_before = np.where(nday <= 305)[0]
+ */
+ __pyx_t_2 = PyNumber_Subtract(__pyx_v_B, __pyx_v_D); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_123, 0x7B, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_nday = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":309
+ * day = np.clip(B - D - np.int64(30.6001 * E) + F, 1, None)
+ * nday = B - D - 123
+ * dayofyr = nday - 305 # <<<<<<<<<<<<<<
+ * ind_nday_before = np.where(nday <= 305)[0]
+ * if len(ind_nday_before) > 0:
+ */
+ __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_nday, __pyx_int_305, 0x131, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_dayofyr = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":310
+ * nday = B - D - 123
+ * dayofyr = nday - 305
+ * ind_nday_before = np.where(nday <= 305)[0] # <<<<<<<<<<<<<<
+ * if len(ind_nday_before) > 0:
+ * dayofyr[ind_nday_before] = nday[ind_nday_before] + 60
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_where); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 310, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_nday, __pyx_int_305, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __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_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __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_t_6 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 310, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_ind_nday_before = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":311
+ * dayofyr = nday - 305
+ * ind_nday_before = np.where(nday <= 305)[0]
+ * if len(ind_nday_before) > 0: # <<<<<<<<<<<<<<
+ * dayofyr[ind_nday_before] = nday[ind_nday_before] + 60
+ * # MC
+ */
+ __pyx_t_15 = PyObject_Length(__pyx_v_ind_nday_before); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __pyx_t_14 = ((__pyx_t_15 > 0) != 0);
+ if (__pyx_t_14) {
+
+ /* "netcdftime/_netcdftime.pyx":312
+ * ind_nday_before = np.where(nday <= 305)[0]
+ * if len(ind_nday_before) > 0:
+ * dayofyr[ind_nday_before] = nday[ind_nday_before] + 60 # <<<<<<<<<<<<<<
+ * # MC
+ * # if E < 14:
+ */
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_nday, __pyx_v_ind_nday_before); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_60, 60, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_v_dayofyr, __pyx_v_ind_nday_before, __pyx_t_1) < 0)) __PYX_ERR(0, 312, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":311
+ * dayofyr = nday - 305
+ * ind_nday_before = np.where(nday <= 305)[0]
+ * if len(ind_nday_before) > 0: # <<<<<<<<<<<<<<
+ * dayofyr[ind_nday_before] = nday[ind_nday_before] + 60
+ * # MC
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":323
+ * # else:
+ * # year = C - 4715
+ * month = E - 1 # <<<<<<<<<<<<<<
+ * month[month > 12] = month[month > 12] - 12
+ * year = C - 4715
+ */
+ __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_E, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_month = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":324
+ * # year = C - 4715
+ * month = E - 1
+ * month[month > 12] = month[month > 12] - 12 # <<<<<<<<<<<<<<
+ * year = C - 4715
+ * year[month > 2] = year[month > 2] - 1
+ */
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_month, __pyx_int_12, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_month, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_6, __pyx_int_12, 12, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyObject_RichCompare(__pyx_v_month, __pyx_int_12, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 324, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_month, __pyx_t_6, __pyx_t_1) < 0)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":325
+ * month = E - 1
+ * month[month > 12] = month[month > 12] - 12
+ * year = C - 4715 # <<<<<<<<<<<<<<
+ * year[month > 2] = year[month > 2] - 1
+ * year[year <= 0] = year[year <= 0] - 1
+ */
+ __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_C, __pyx_int_4715, 0x126B, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_year = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":326
+ * month[month > 12] = month[month > 12] - 12
+ * year = C - 4715
+ * year[month > 2] = year[month > 2] - 1 # <<<<<<<<<<<<<<
+ * year[year <= 0] = year[year <= 0] - 1
+ *
+ */
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_month, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_year, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyObject_RichCompare(__pyx_v_month, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_year, __pyx_t_6, __pyx_t_1) < 0)) __PYX_ERR(0, 326, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":327
+ * year = C - 4715
+ * year[month > 2] = year[month > 2] - 1
+ * year[year <= 0] = year[year <= 0] - 1 # <<<<<<<<<<<<<<
+ *
+ * # a leap year?
+ */
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_year, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_year, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 327, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyObject_RichCompare(__pyx_v_year, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 327, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_v_year, __pyx_t_6, __pyx_t_1) < 0)) __PYX_ERR(0, 327, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":330
+ *
+ * # a leap year?
+ * leap = np.zeros(len(year),dtype=dayofyr.dtype) # <<<<<<<<<<<<<<
+ * leap[year % 4 == 0] = 1
+ * if calendar == 'proleptic_gregorian':
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_15 = PyObject_Length(__pyx_v_year); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 330, __pyx_L1_error)
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __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 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dayofyr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_leap = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":331
+ * # a leap year?
+ * leap = np.zeros(len(year),dtype=dayofyr.dtype)
+ * leap[year % 4 == 0] = 1 # <<<<<<<<<<<<<<
+ * if calendar == 'proleptic_gregorian':
+ * leap[(year % 100 == 0) & (year % 400 != 0)] = 0
+ */
+ __pyx_t_2 = __Pyx_PyInt_RemainderObjC(__pyx_v_year, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_v_leap, __pyx_t_1, __pyx_int_1) < 0)) __PYX_ERR(0, 331, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":332
+ * leap = np.zeros(len(year),dtype=dayofyr.dtype)
+ * leap[year % 4 == 0] = 1
+ * if calendar == 'proleptic_gregorian': # <<<<<<<<<<<<<<
+ * leap[(year % 100 == 0) & (year % 400 != 0)] = 0
+ * elif calendar in ['standard', 'gregorian']:
+ */
+ __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
+ if (__pyx_t_14) {
+
+ /* "netcdftime/_netcdftime.pyx":333
+ * leap[year % 4 == 0] = 1
+ * if calendar == 'proleptic_gregorian':
+ * leap[(year % 100 == 0) & (year % 400 != 0)] = 0 # <<<<<<<<<<<<<<
+ * elif calendar in ['standard', 'gregorian']:
+ * leap[(year % 100 == 0) & (year % 400 != 0) & (julian < 2299160.5)] = 0
+ */
+ __pyx_t_1 = __Pyx_PyInt_RemainderObjC(__pyx_v_year, __pyx_int_100, 0x64, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __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, 333, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_RemainderObjC(__pyx_v_year, __pyx_int_400, 0x190, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_And(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __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;
+ if (unlikely(PyObject_SetItem(__pyx_v_leap, __pyx_t_1, __pyx_int_0) < 0)) __PYX_ERR(0, 333, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":332
+ * leap = np.zeros(len(year),dtype=dayofyr.dtype)
+ * leap[year % 4 == 0] = 1
+ * if calendar == 'proleptic_gregorian': # <<<<<<<<<<<<<<
+ * leap[(year % 100 == 0) & (year % 400 != 0)] = 0
+ * elif calendar in ['standard', 'gregorian']:
+ */
+ goto __pyx_L9;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":334
+ * if calendar == 'proleptic_gregorian':
+ * leap[(year % 100 == 0) & (year % 400 != 0)] = 0
+ * elif calendar in ['standard', 'gregorian']: # <<<<<<<<<<<<<<
+ * leap[(year % 100 == 0) & (year % 400 != 0) & (julian < 2299160.5)] = 0
+ *
+ */
+ __Pyx_INCREF(__pyx_v_calendar);
+ __pyx_t_1 = __pyx_v_calendar;
+ __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 334, __pyx_L1_error)
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_14 = __pyx_t_5;
+ goto __pyx_L10_bool_binop_done;
+ }
+ __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 334, __pyx_L1_error)
+ __pyx_t_14 = __pyx_t_5;
+ __pyx_L10_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_5 = (__pyx_t_14 != 0);
+ if (__pyx_t_5) {
+
+ /* "netcdftime/_netcdftime.pyx":335
+ * leap[(year % 100 == 0) & (year % 400 != 0)] = 0
+ * elif calendar in ['standard', 'gregorian']:
+ * leap[(year % 100 == 0) & (year % 400 != 0) & (julian < 2299160.5)] = 0 # <<<<<<<<<<<<<<
+ *
+ * inc_idx = np.where((leap == 1) & (month > 2))[0]
+ */
+ __pyx_t_1 = __Pyx_PyInt_RemainderObjC(__pyx_v_year, __pyx_int_100, 0x64, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 335, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_RemainderObjC(__pyx_v_year, __pyx_int_400, 0x190, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_And(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_julian, __pyx_float_2299160_5, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error)
+ __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 335, __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_leap, __pyx_t_3, __pyx_int_0) < 0)) __PYX_ERR(0, 335, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":334
+ * if calendar == 'proleptic_gregorian':
+ * leap[(year % 100 == 0) & (year % 400 != 0)] = 0
+ * elif calendar in ['standard', 'gregorian']: # <<<<<<<<<<<<<<
+ * leap[(year % 100 == 0) & (year % 400 != 0) & (julian < 2299160.5)] = 0
+ *
+ */
+ }
+ __pyx_L9:;
+
+ /* "netcdftime/_netcdftime.pyx":337
+ * leap[(year % 100 == 0) & (year % 400 != 0) & (julian < 2299160.5)] = 0
+ *
+ * inc_idx = np.where((leap == 1) & (month > 2))[0] # <<<<<<<<<<<<<<
+ * dayofyr[inc_idx] = dayofyr[inc_idx] + leap[inc_idx]
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_where); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_leap, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyObject_RichCompare(__pyx_v_month, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
+ __pyx_t_8 = PyNumber_And(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 337, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ 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_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __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, 337, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __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_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_inc_idx = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":338
+ *
+ * inc_idx = np.where((leap == 1) & (month > 2))[0]
+ * dayofyr[inc_idx] = dayofyr[inc_idx] + leap[inc_idx] # <<<<<<<<<<<<<<
+ *
+ * # Subtract the offset from JulianDayFromDate from the microseconds (pull
+ */
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_dayofyr, __pyx_v_inc_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_leap, __pyx_v_inc_idx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __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;
+ if (unlikely(PyObject_SetItem(__pyx_v_dayofyr, __pyx_v_inc_idx, __pyx_t_2) < 0)) __PYX_ERR(0, 338, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":342
+ * # Subtract the offset from JulianDayFromDate from the microseconds (pull
+ * # request #433).
+ * eps = np.finfo(float).eps # <<<<<<<<<<<<<<
+ * eps = np.maximum(eps*julian, eps)
+ * hour = np.clip((F * 24.).astype(np.int64), 0, 23)
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_finfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)(&PyFloat_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __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 *)(&PyFloat_Type))};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)(&PyFloat_Type))};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 342, __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 = NULL;
+ __Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
+ __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, ((PyObject *)(&PyFloat_Type)));
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_eps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_eps = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":343
+ * # request #433).
+ * eps = np.finfo(float).eps
+ * eps = np.maximum(eps*julian, eps) # <<<<<<<<<<<<<<
+ * hour = np.clip((F * 24.).astype(np.int64), 0, 23)
+ * F -= hour / 24.
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_maximum); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 343, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_eps, __pyx_v_julian); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ __pyx_t_13 = 0;
+ 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_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_2, __pyx_v_eps};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_2, __pyx_v_eps};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 343, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_13, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_eps);
+ __Pyx_GIVEREF(__pyx_v_eps);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_13, __pyx_v_eps);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF_SET(__pyx_v_eps, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":344
+ * eps = np.finfo(float).eps
+ * eps = np.maximum(eps*julian, eps)
+ * hour = np.clip((F * 24.).astype(np.int64), 0, 23) # <<<<<<<<<<<<<<
+ * F -= hour / 24.
+ * minute = np.clip((F * 1440.).astype(np.int64), 0, 59)
+ */
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_clip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_F, __pyx_float_24_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_9};
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_9};
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ __pyx_t_13 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_8, __pyx_int_0, __pyx_int_23};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_8, __pyx_int_0, __pyx_int_23};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 344, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_13, __pyx_t_8);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_13, __pyx_int_0);
+ __Pyx_INCREF(__pyx_int_23);
+ __Pyx_GIVEREF(__pyx_int_23);
+ PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_13, __pyx_int_23);
+ __pyx_t_8 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_hour = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":345
+ * eps = np.maximum(eps*julian, eps)
+ * hour = np.clip((F * 24.).astype(np.int64), 0, 23)
+ * F -= hour / 24. # <<<<<<<<<<<<<<
+ * minute = np.clip((F * 1440.).astype(np.int64), 0, 59)
+ * # this is an overestimation due to added offset in JulianDayFromDate
+ */
+ __pyx_t_1 = __Pyx_PyFloat_DivideObjC(__pyx_v_hour, __pyx_float_24_, 24., 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PyNumber_InPlaceSubtract(__pyx_v_F, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 345, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_F, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":346
+ * hour = np.clip((F * 24.).astype(np.int64), 0, 23)
+ * F -= hour / 24.
+ * minute = np.clip((F * 1440.).astype(np.int64), 0, 59) # <<<<<<<<<<<<<<
+ * # this is an overestimation due to added offset in JulianDayFromDate
+ * second = np.clip((F - minute / 1440.) * 86400., 0, None)
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_clip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = PyNumber_Multiply(__pyx_v_F, __pyx_float_1440_); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 346, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __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_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 346, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 346, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_9};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_9};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __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 = NULL;
+ __pyx_t_13 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_1, __pyx_int_0, __pyx_int_59};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_1, __pyx_int_0, __pyx_int_59};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_13, __pyx_t_1);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_13, __pyx_int_0);
+ __Pyx_INCREF(__pyx_int_59);
+ __Pyx_GIVEREF(__pyx_int_59);
+ PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_13, __pyx_int_59);
+ __pyx_t_1 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_v_minute = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":348
+ * minute = np.clip((F * 1440.).astype(np.int64), 0, 59)
+ * # this is an overestimation due to added offset in JulianDayFromDate
+ * second = np.clip((F - minute / 1440.) * 86400., 0, None) # <<<<<<<<<<<<<<
+ * microsecond = (second % 1)*1.e6
+ * # remove the offset from the microsecond calculation.
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_clip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyFloat_DivideObjC(__pyx_v_minute, __pyx_float_1440_, 1440., 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = PyNumber_Subtract(__pyx_v_F, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Multiply(__pyx_t_1, __pyx_float_86400_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ __pyx_t_13 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_7, __pyx_int_0, Py_None};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_7, __pyx_int_0, Py_None};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__pyx_t_1) {
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_t_7);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_int_0);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_13, Py_None);
+ __pyx_t_7 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_second = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":349
+ * # this is an overestimation due to added offset in JulianDayFromDate
+ * second = np.clip((F - minute / 1440.) * 86400., 0, None)
+ * microsecond = (second % 1)*1.e6 # <<<<<<<<<<<<<<
+ * # remove the offset from the microsecond calculation.
+ * microsecond = np.clip(microsecond - eps*86400.*1e6, 0, 999999)
+ */
+ __pyx_t_6 = __Pyx_PyInt_RemainderObjC(__pyx_v_second, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_t_6, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_microsecond = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":351
+ * microsecond = (second % 1)*1.e6
+ * # remove the offset from the microsecond calculation.
+ * microsecond = np.clip(microsecond - eps*86400.*1e6, 0, 999999) # <<<<<<<<<<<<<<
+ *
+ * # convert year, month, day, hour, minute, second to int32
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 351, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_clip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 351, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_eps, __pyx_float_86400_); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 351, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = PyNumber_Multiply(__pyx_t_6, __pyx_float_1e6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 351, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Subtract(__pyx_v_microsecond, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 351, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ __pyx_t_13 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_6, __pyx_int_0, __pyx_int_999999};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_6, __pyx_int_0, __pyx_int_999999};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_13, __pyx_t_6);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_13, __pyx_int_0);
+ __Pyx_INCREF(__pyx_int_999999);
+ __Pyx_GIVEREF(__pyx_int_999999);
+ PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_13, __pyx_int_999999);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __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;
+ __Pyx_DECREF_SET(__pyx_v_microsecond, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":354
+ *
+ * # convert year, month, day, hour, minute, second to int32
+ * year = year.astype(np.int32) # <<<<<<<<<<<<<<
+ * month = month.astype(np.int32)
+ * day = day.astype(np.int32)
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_year, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 354, __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 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_year, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":355
+ * # convert year, month, day, hour, minute, second to int32
+ * year = year.astype(np.int32)
+ * month = month.astype(np.int32) # <<<<<<<<<<<<<<
+ * day = day.astype(np.int32)
+ * hour = hour.astype(np.int32)
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_month, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 355, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 355, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 355, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __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_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __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;
+ __Pyx_DECREF_SET(__pyx_v_month, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":356
+ * year = year.astype(np.int32)
+ * month = month.astype(np.int32)
+ * day = day.astype(np.int32) # <<<<<<<<<<<<<<
+ * hour = hour.astype(np.int32)
+ * minute = minute.astype(np.int32)
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_day, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 356, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 356, __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 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_day, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":357
+ * month = month.astype(np.int32)
+ * day = day.astype(np.int32)
+ * hour = hour.astype(np.int32) # <<<<<<<<<<<<<<
+ * minute = minute.astype(np.int32)
+ * second = second.astype(np.int32)
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_hour, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __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_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __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;
+ __Pyx_DECREF_SET(__pyx_v_hour, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":358
+ * day = day.astype(np.int32)
+ * hour = hour.astype(np.int32)
+ * minute = minute.astype(np.int32) # <<<<<<<<<<<<<<
+ * second = second.astype(np.int32)
+ * microsecond = microsecond.astype(np.int32)
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_minute, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 358, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 358, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 358, __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 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_minute, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":359
+ * hour = hour.astype(np.int32)
+ * minute = minute.astype(np.int32)
+ * second = second.astype(np.int32) # <<<<<<<<<<<<<<
+ * microsecond = microsecond.astype(np.int32)
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_second, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 359, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 359, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __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_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __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;
+ __Pyx_DECREF_SET(__pyx_v_second, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":360
+ * minute = minute.astype(np.int32)
+ * second = second.astype(np.int32)
+ * microsecond = microsecond.astype(np.int32) # <<<<<<<<<<<<<<
+ *
+ * # check if input was scalar and change return accordingly
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_microsecond, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 360, __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 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_microsecond, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":363
+ *
+ * # check if input was scalar and change return accordingly
+ * isscalar = False # <<<<<<<<<<<<<<
+ * try:
+ * JD[0]
+ */
+ __pyx_v_isscalar = 0;
+
+ /* "netcdftime/_netcdftime.pyx":364
+ * # check if input was scalar and change return accordingly
+ * isscalar = False
+ * try: # <<<<<<<<<<<<<<
+ * JD[0]
+ * except:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
+ __Pyx_XGOTREF(__pyx_t_16);
+ __Pyx_XGOTREF(__pyx_t_17);
+ __Pyx_XGOTREF(__pyx_t_18);
+ /*try:*/ {
+
+ /* "netcdftime/_netcdftime.pyx":365
+ * isscalar = False
+ * try:
+ * JD[0] # <<<<<<<<<<<<<<
+ * except:
+ * isscalar = True
+ */
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_JD, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L12_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":364
+ * # check if input was scalar and change return accordingly
+ * isscalar = False
+ * try: # <<<<<<<<<<<<<<
+ * JD[0]
+ * except:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ goto __pyx_L19_try_end;
+ __pyx_L12_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":366
+ * try:
+ * JD[0]
+ * except: # <<<<<<<<<<<<<<
+ * isscalar = True
+ *
+ */
+ /*except:*/ {
+ __Pyx_AddTraceback("netcdftime._netcdftime.DateFromJulianDay", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_7) < 0) __PYX_ERR(0, 366, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "netcdftime/_netcdftime.pyx":367
+ * JD[0]
+ * except:
+ * isscalar = True # <<<<<<<<<<<<<<
+ *
+ * if calendar in 'proleptic_gregorian':
+ */
+ __pyx_v_isscalar = 1;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L13_exception_handled;
+ }
+ __pyx_L14_except_error:;
+
+ /* "netcdftime/_netcdftime.pyx":364
+ * # check if input was scalar and change return accordingly
+ * isscalar = False
+ * try: # <<<<<<<<<<<<<<
+ * JD[0]
+ * except:
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_16);
+ __Pyx_XGIVEREF(__pyx_t_17);
+ __Pyx_XGIVEREF(__pyx_t_18);
+ __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+ goto __pyx_L1_error;
+ __pyx_L13_exception_handled:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_16);
+ __Pyx_XGIVEREF(__pyx_t_17);
+ __Pyx_XGIVEREF(__pyx_t_18);
+ __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+ __pyx_L19_try_end:;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":369
+ * isscalar = True
+ *
+ * if calendar in 'proleptic_gregorian': # <<<<<<<<<<<<<<
+ * # FIXME: datetime.datetime does not support years < 1
+ * if (year < 0).any():
+ */
+ __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 369, __pyx_L1_error)
+ __pyx_t_14 = (__pyx_t_5 != 0);
+ if (__pyx_t_14) {
+
+ /* "netcdftime/_netcdftime.pyx":371
+ * if calendar in 'proleptic_gregorian':
+ * # FIXME: datetime.datetime does not support years < 1
+ * if (year < 0).any(): # <<<<<<<<<<<<<<
+ * datetime_type = DatetimeProlepticGregorian
+ * else:
+ */
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_year, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 371, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 371, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 371, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (__pyx_t_14) {
+
+ /* "netcdftime/_netcdftime.pyx":372
+ * # FIXME: datetime.datetime does not support years < 1
+ * if (year < 0).any():
+ * datetime_type = DatetimeProlepticGregorian # <<<<<<<<<<<<<<
+ * else:
+ * datetime_type = real_datetime
+ */
+ __Pyx_INCREF(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_DatetimeProlepticGregorian));
+ __pyx_v_datetime_type = ((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_DatetimeProlepticGregorian);
+
+ /* "netcdftime/_netcdftime.pyx":371
+ * if calendar in 'proleptic_gregorian':
+ * # FIXME: datetime.datetime does not support years < 1
+ * if (year < 0).any(): # <<<<<<<<<<<<<<
+ * datetime_type = DatetimeProlepticGregorian
+ * else:
+ */
+ goto __pyx_L23;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":374
+ * datetime_type = DatetimeProlepticGregorian
+ * else:
+ * datetime_type = real_datetime # <<<<<<<<<<<<<<
+ * elif calendar in ('standard', 'gregorian'):
+ * # return a 'real' datetime instance if calendar is proleptic
+ */
+ /*else*/ {
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_real_datetime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 374, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_v_datetime_type = __pyx_t_7;
+ __pyx_t_7 = 0;
+ }
+ __pyx_L23:;
+
+ /* "netcdftime/_netcdftime.pyx":369
+ * isscalar = True
+ *
+ * if calendar in 'proleptic_gregorian': # <<<<<<<<<<<<<<
+ * # FIXME: datetime.datetime does not support years < 1
+ * if (year < 0).any():
+ */
+ goto __pyx_L22;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":375
+ * else:
+ * datetime_type = real_datetime
+ * elif calendar in ('standard', 'gregorian'): # <<<<<<<<<<<<<<
+ * # return a 'real' datetime instance if calendar is proleptic
+ * # Gregorian or Gregorian and all dates are after the
+ */
+ __Pyx_INCREF(__pyx_v_calendar);
+ __pyx_t_7 = __pyx_v_calendar;
+ __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 375, __pyx_L1_error)
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_14 = __pyx_t_5;
+ goto __pyx_L24_bool_binop_done;
+ }
+ __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __pyx_t_14 = __pyx_t_5;
+ __pyx_L24_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_5 = (__pyx_t_14 != 0);
+ if (__pyx_t_5) {
+
+ /* "netcdftime/_netcdftime.pyx":379
+ * # Gregorian or Gregorian and all dates are after the
+ * # Julian/Gregorian transition
+ * if len(ind_before) == 0: # <<<<<<<<<<<<<<
+ * datetime_type = real_datetime
+ * else:
+ */
+ if (unlikely(!__pyx_v_ind_before)) { __Pyx_RaiseUnboundLocalError("ind_before"); __PYX_ERR(0, 379, __pyx_L1_error) }
+ __pyx_t_15 = PyObject_Length(__pyx_v_ind_before); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 379, __pyx_L1_error)
+ __pyx_t_5 = ((__pyx_t_15 == 0) != 0);
+ if (__pyx_t_5) {
+
+ /* "netcdftime/_netcdftime.pyx":380
+ * # Julian/Gregorian transition
+ * if len(ind_before) == 0:
+ * datetime_type = real_datetime # <<<<<<<<<<<<<<
+ * else:
+ * datetime_type = DatetimeGregorian
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_real_datetime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 380, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_v_datetime_type = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":379
+ * # Gregorian or Gregorian and all dates are after the
+ * # Julian/Gregorian transition
+ * if len(ind_before) == 0: # <<<<<<<<<<<<<<
+ * datetime_type = real_datetime
+ * else:
+ */
+ goto __pyx_L26;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":382
+ * datetime_type = real_datetime
+ * else:
+ * datetime_type = DatetimeGregorian # <<<<<<<<<<<<<<
+ * elif calendar == "julian":
+ * datetime_type = DatetimeJulian
+ */
+ /*else*/ {
+ __Pyx_INCREF(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_DatetimeGregorian));
+ __pyx_v_datetime_type = ((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_DatetimeGregorian);
+ }
+ __pyx_L26:;
+
+ /* "netcdftime/_netcdftime.pyx":375
+ * else:
+ * datetime_type = real_datetime
+ * elif calendar in ('standard', 'gregorian'): # <<<<<<<<<<<<<<
+ * # return a 'real' datetime instance if calendar is proleptic
+ * # Gregorian or Gregorian and all dates are after the
+ */
+ goto __pyx_L22;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":383
+ * else:
+ * datetime_type = DatetimeGregorian
+ * elif calendar == "julian": # <<<<<<<<<<<<<<
+ * datetime_type = DatetimeJulian
+ * else:
+ */
+ __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_julian, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 383, __pyx_L1_error)
+ if (__pyx_t_5) {
+
+ /* "netcdftime/_netcdftime.pyx":384
+ * datetime_type = DatetimeGregorian
+ * elif calendar == "julian":
+ * datetime_type = DatetimeJulian # <<<<<<<<<<<<<<
+ * else:
+ * raise ValueError("unsupported calendar: {0}".format(calendar))
+ */
+ __Pyx_INCREF(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_DatetimeJulian));
+ __pyx_v_datetime_type = ((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_DatetimeJulian);
+
+ /* "netcdftime/_netcdftime.pyx":383
+ * else:
+ * datetime_type = DatetimeGregorian
+ * elif calendar == "julian": # <<<<<<<<<<<<<<
+ * datetime_type = DatetimeJulian
+ * else:
+ */
+ goto __pyx_L22;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":386
+ * datetime_type = DatetimeJulian
+ * else:
+ * raise ValueError("unsupported calendar: {0}".format(calendar)) # <<<<<<<<<<<<<<
+ *
+ * if not isscalar:
+ */
+ /*else*/ {
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_unsupported_calendar_0, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_calendar); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 386, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_calendar};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 386, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_calendar};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 386, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 386, __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_calendar);
+ __Pyx_GIVEREF(__pyx_v_calendar);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_calendar);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 386, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 386, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __PYX_ERR(0, 386, __pyx_L1_error)
+ }
+ __pyx_L22:;
+
+ /* "netcdftime/_netcdftime.pyx":388
+ * raise ValueError("unsupported calendar: {0}".format(calendar))
+ *
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * return np.array([datetime_type(*args)
+ * for args in
+ */
+ __pyx_t_5 = ((!(__pyx_v_isscalar != 0)) != 0);
+ if (__pyx_t_5) {
+
+ /* "netcdftime/_netcdftime.pyx":389
+ *
+ * if not isscalar:
+ * return np.array([datetime_type(*args) # <<<<<<<<<<<<<<
+ * for args in
+ * zip(year, month, day, hour, minute, second,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 389, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+
+ /* "netcdftime/_netcdftime.pyx":391
+ * return np.array([datetime_type(*args)
+ * for args in
+ * zip(year, month, day, hour, minute, second, # <<<<<<<<<<<<<<
+ * microsecond)])
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "netcdftime/_netcdftime.pyx":392
+ * for args in
+ * zip(year, month, day, hour, minute, second,
+ * microsecond)]) # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_t_9 = NULL;
+ __pyx_t_13 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[8] = {__pyx_t_9, __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 7+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[8] = {__pyx_t_9, __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 7+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(7+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 391, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_year);
+ __Pyx_GIVEREF(__pyx_v_year);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_13, __pyx_v_year);
+ __Pyx_INCREF(__pyx_v_month);
+ __Pyx_GIVEREF(__pyx_v_month);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_13, __pyx_v_month);
+ __Pyx_INCREF(__pyx_v_day);
+ __Pyx_GIVEREF(__pyx_v_day);
+ PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_13, __pyx_v_day);
+ __Pyx_INCREF(__pyx_v_hour);
+ __Pyx_GIVEREF(__pyx_v_hour);
+ PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_13, __pyx_v_hour);
+ __Pyx_INCREF(__pyx_v_minute);
+ __Pyx_GIVEREF(__pyx_v_minute);
+ PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_13, __pyx_v_minute);
+ __Pyx_INCREF(__pyx_v_second);
+ __Pyx_GIVEREF(__pyx_v_second);
+ PyTuple_SET_ITEM(__pyx_t_8, 5+__pyx_t_13, __pyx_v_second);
+ __Pyx_INCREF(__pyx_v_microsecond);
+ __Pyx_GIVEREF(__pyx_v_microsecond);
+ PyTuple_SET_ITEM(__pyx_t_8, 6+__pyx_t_13, __pyx_v_microsecond);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":391
+ * return np.array([datetime_type(*args)
+ * for args in
+ * zip(year, month, day, hour, minute, second, # <<<<<<<<<<<<<<
+ * microsecond)])
+ *
+ */
+ 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_15 = 0;
+ __pyx_t_19 = NULL;
+ } else {
+ __pyx_t_15 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_19 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 391, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_19)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_15 >= 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_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 391, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_15 >= 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_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 391, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_19(__pyx_t_1);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 391, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_args, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":389
+ *
+ * if not isscalar:
+ * return np.array([datetime_type(*args) # <<<<<<<<<<<<<<
+ * for args in
+ * zip(year, month, day, hour, minute, second,
+ */
+ __pyx_t_3 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_v_datetime_type, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 389, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 389, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":390
+ * if not isscalar:
+ * return np.array([datetime_type(*args)
+ * for args in # <<<<<<<<<<<<<<
+ * zip(year, month, day, hour, minute, second,
+ * microsecond)])
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 389, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_2};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 389, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_2};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 389, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __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, 389, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 389, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_r = __pyx_t_7;
+ __pyx_t_7 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":388
+ * raise ValueError("unsupported calendar: {0}".format(calendar))
+ *
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * return np.array([datetime_type(*args)
+ * for args in
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":395
+ *
+ * else:
+ * return datetime_type(year[0], month[0], day[0], hour[0], # <<<<<<<<<<<<<<
+ * minute[0], second[0], microsecond[0])
+ *
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_year, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_month, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_day, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_hour, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "netcdftime/_netcdftime.pyx":396
+ * else:
+ * return datetime_type(year[0], month[0], day[0], hour[0],
+ * minute[0], second[0], microsecond[0]) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_minute, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 396, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_second, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 396, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_microsecond, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 396, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v_datetime_type);
+ __pyx_t_4 = __pyx_v_datetime_type; __pyx_t_10 = NULL;
+ __pyx_t_13 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[8] = {__pyx_t_10, __pyx_t_6, __pyx_t_8, __pyx_t_2, __pyx_t_1, __pyx_t_3, __pyx_t_9, __pyx_t_12};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 7+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[8] = {__pyx_t_10, __pyx_t_6, __pyx_t_8, __pyx_t_2, __pyx_t_1, __pyx_t_3, __pyx_t_9, __pyx_t_12};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 7+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(7+__pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_10) {
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_13, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_13, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_13, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_13, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_13, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_11, 5+__pyx_t_13, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_11, 6+__pyx_t_13, __pyx_t_12);
+ __pyx_t_6 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_1 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_9 = 0;
+ __pyx_t_12 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_7;
+ __pyx_t_7 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":236
+ *
+ *
+ * def DateFromJulianDay(JD, calendar='standard'): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+ /* 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_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_AddTraceback("netcdftime._netcdftime.DateFromJulianDay", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_julian);
+ __Pyx_XDECREF(__pyx_v_dayofwk);
+ __Pyx_XDECREF(__pyx_v_Z);
+ __Pyx_XDECREF(__pyx_v_F);
+ __Pyx_XDECREF(__pyx_v_alpha);
+ __Pyx_XDECREF(__pyx_v_A);
+ __Pyx_XDECREF(__pyx_v_ind_before);
+ __Pyx_XDECREF(__pyx_v_B);
+ __Pyx_XDECREF(__pyx_v_C);
+ __Pyx_XDECREF(__pyx_v_D);
+ __Pyx_XDECREF(__pyx_v_E);
+ __Pyx_XDECREF(__pyx_v_day);
+ __Pyx_XDECREF(__pyx_v_nday);
+ __Pyx_XDECREF(__pyx_v_dayofyr);
+ __Pyx_XDECREF(__pyx_v_ind_nday_before);
+ __Pyx_XDECREF(__pyx_v_month);
+ __Pyx_XDECREF(__pyx_v_year);
+ __Pyx_XDECREF(__pyx_v_leap);
+ __Pyx_XDECREF(__pyx_v_inc_idx);
+ __Pyx_XDECREF(__pyx_v_eps);
+ __Pyx_XDECREF(__pyx_v_hour);
+ __Pyx_XDECREF(__pyx_v_minute);
+ __Pyx_XDECREF(__pyx_v_second);
+ __Pyx_XDECREF(__pyx_v_microsecond);
+ __Pyx_XDECREF(__pyx_v_datetime_type);
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":399
+ *
+ *
+ * cdef _DateFromNoLeapDay(JD): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__DateFromNoLeapDay(PyObject *__pyx_v_JD) {
+ PyObject *__pyx_v_year_offset = NULL;
+ PyObject *__pyx_v_dayofwk = NULL;
+ PyObject *__pyx_v_F = NULL;
+ PyObject *__pyx_v_Z = NULL;
+ PyObject *__pyx_v_A = NULL;
+ PyObject *__pyx_v_B = NULL;
+ PyObject *__pyx_v_C = NULL;
+ PyObject *__pyx_v_D = NULL;
+ PyObject *__pyx_v_E = NULL;
+ PyObject *__pyx_v_day = NULL;
+ PyObject *__pyx_v_nday = NULL;
+ PyObject *__pyx_v_dayofyr = NULL;
+ PyObject *__pyx_v_month = NULL;
+ PyObject *__pyx_v_year = NULL;
+ PyObject *__pyx_v_dfrac = NULL;
+ PyObject *__pyx_v_days = NULL;
+ PyObject *__pyx_v_hfrac = NULL;
+ PyObject *__pyx_v_hours = NULL;
+ PyObject *__pyx_v_mfrac = NULL;
+ PyObject *__pyx_v_minutes = NULL;
+ PyObject *__pyx_v_sfrac = NULL;
+ PyObject *__pyx_v_seconds = NULL;
+ PyObject *__pyx_v_microseconds = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ __Pyx_RefNannySetupContext("_DateFromNoLeapDay", 0);
+ __Pyx_INCREF(__pyx_v_JD);
+
+ /* "netcdftime/_netcdftime.pyx":409
+ * # based on redate.py by David Finlayson.
+ *
+ * if JD < 0: # <<<<<<<<<<<<<<
+ * year_offset = int(-JD) // 365 + 1
+ * JD += year_offset * 365
+ */
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_JD, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 409, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":410
+ *
+ * if JD < 0:
+ * year_offset = int(-JD) // 365 + 1 # <<<<<<<<<<<<<<
+ * JD += year_offset * 365
+ * else:
+ */
+ __pyx_t_1 = PyNumber_Negative(__pyx_v_JD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_3, __pyx_int_365, 0x16D, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_year_offset = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":411
+ * if JD < 0:
+ * year_offset = int(-JD) // 365 + 1
+ * JD += year_offset * 365 # <<<<<<<<<<<<<<
+ * else:
+ * year_offset = 0
+ */
+ __pyx_t_3 = PyNumber_Multiply(__pyx_v_year_offset, __pyx_int_365); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_JD, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_JD, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":409
+ * # based on redate.py by David Finlayson.
+ *
+ * if JD < 0: # <<<<<<<<<<<<<<
+ * year_offset = int(-JD) // 365 + 1
+ * JD += year_offset * 365
+ */
+ goto __pyx_L3;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":413
+ * JD += year_offset * 365
+ * else:
+ * year_offset = 0 # <<<<<<<<<<<<<<
+ *
+ * dayofwk = int(math.fmod(int(JD + 1.5), 7))
+ */
+ /*else*/ {
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_v_year_offset = __pyx_int_0;
+ }
+ __pyx_L3:;
+
+ /* "netcdftime/_netcdftime.pyx":415
+ * year_offset = 0
+ *
+ * dayofwk = int(math.fmod(int(JD + 1.5), 7)) # <<<<<<<<<<<<<<
+ * (F, Z) = math.modf(JD + 0.5)
+ * Z = int(Z)
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_fmod); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyFloat_AddObjC(__pyx_v_JD, __pyx_float_1_5, 1.5, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_int_7};
+ __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, 415, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_int_7};
+ __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, 415, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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, 415, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5);
+ __Pyx_INCREF(__pyx_int_7);
+ __Pyx_GIVEREF(__pyx_int_7);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_int_7);
+ __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, 415, __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_t_4 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_dayofwk = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":416
+ *
+ * dayofwk = int(math.fmod(int(JD + 1.5), 7))
+ * (F, Z) = math.modf(JD + 0.5) # <<<<<<<<<<<<<<
+ * Z = int(Z)
+ * A = Z
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_modf); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyFloat_AddObjC(__pyx_v_JD, __pyx_float_0_5, 0.5, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __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
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __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_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L1_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_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 416, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_7 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
+ }
+ __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, 416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __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_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext;
+ index = 0; __pyx_t_7 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L4_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_7);
+ index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_1), 2) < 0) __PYX_ERR(0, 416, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L5_unpacking_done;
+ __pyx_L4_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 416, __pyx_L1_error)
+ __pyx_L5_unpacking_done:;
+ }
+ __pyx_v_F = __pyx_t_7;
+ __pyx_t_7 = 0;
+ __pyx_v_Z = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":417
+ * dayofwk = int(math.fmod(int(JD + 1.5), 7))
+ * (F, Z) = math.modf(JD + 0.5)
+ * Z = int(Z) # <<<<<<<<<<<<<<
+ * A = Z
+ * B = A + 1524
+ */
+ __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_Z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 417, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF_SET(__pyx_v_Z, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":418
+ * (F, Z) = math.modf(JD + 0.5)
+ * Z = int(Z)
+ * A = Z # <<<<<<<<<<<<<<
+ * B = A + 1524
+ * C = int((B - 122.1) / 365.)
+ */
+ __Pyx_INCREF(__pyx_v_Z);
+ __pyx_v_A = __pyx_v_Z;
+
+ /* "netcdftime/_netcdftime.pyx":419
+ * Z = int(Z)
+ * A = Z
+ * B = A + 1524 # <<<<<<<<<<<<<<
+ * C = int((B - 122.1) / 365.)
+ * D = int(365. * C)
+ */
+ __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_A, __pyx_int_1524, 0x5F4, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_B = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":420
+ * A = Z
+ * B = A + 1524
+ * C = int((B - 122.1) / 365.) # <<<<<<<<<<<<<<
+ * D = int(365. * C)
+ * E = int((B - D) / 30.6001)
+ */
+ __pyx_t_4 = __Pyx_PyFloat_SubtractObjC(__pyx_v_B, __pyx_float_122_1, 122.1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 420, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_t_4, __pyx_float_365_, 365., 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 420, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_C = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":421
+ * B = A + 1524
+ * C = int((B - 122.1) / 365.)
+ * D = int(365. * C) # <<<<<<<<<<<<<<
+ * E = int((B - D) / 30.6001)
+ *
+ */
+ __pyx_t_4 = PyNumber_Multiply(__pyx_float_365_, __pyx_v_C); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 421, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_D = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":422
+ * C = int((B - 122.1) / 365.)
+ * D = int(365. * C)
+ * E = int((B - D) / 30.6001) # <<<<<<<<<<<<<<
+ *
+ * # Convert to date
+ */
+ __pyx_t_3 = PyNumber_Subtract(__pyx_v_B, __pyx_v_D); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyFloat_DivideObjC(__pyx_t_3, __pyx_float_30_6001, 30.6001, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_E = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":425
+ *
+ * # Convert to date
+ * day = B - D - int(30.6001 * E) + F # <<<<<<<<<<<<<<
+ * nday = B - D - 123
+ * if nday <= 305:
+ */
+ __pyx_t_3 = PyNumber_Subtract(__pyx_v_B, __pyx_v_D); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyNumber_Multiply(__pyx_float_30_6001, __pyx_v_E); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_v_F); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_day = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":426
+ * # Convert to date
+ * day = B - D - int(30.6001 * E) + F
+ * nday = B - D - 123 # <<<<<<<<<<<<<<
+ * if nday <= 305:
+ * dayofyr = nday + 60
+ */
+ __pyx_t_7 = PyNumber_Subtract(__pyx_v_B, __pyx_v_D); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 426, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_t_7, __pyx_int_123, 0x7B, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 426, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_v_nday = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":427
+ * day = B - D - int(30.6001 * E) + F
+ * nday = B - D - 123
+ * if nday <= 305: # <<<<<<<<<<<<<<
+ * dayofyr = nday + 60
+ * else:
+ */
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_nday, __pyx_int_305, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 427, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":428
+ * nday = B - D - 123
+ * if nday <= 305:
+ * dayofyr = nday + 60 # <<<<<<<<<<<<<<
+ * else:
+ * dayofyr = nday - 305
+ */
+ __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_nday, __pyx_int_60, 60, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 428, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_dayofyr = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":427
+ * day = B - D - int(30.6001 * E) + F
+ * nday = B - D - 123
+ * if nday <= 305: # <<<<<<<<<<<<<<
+ * dayofyr = nday + 60
+ * else:
+ */
+ goto __pyx_L6;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":430
+ * dayofyr = nday + 60
+ * else:
+ * dayofyr = nday - 305 # <<<<<<<<<<<<<<
+ * if E < 14:
+ * month = E - 1
+ */
+ /*else*/ {
+ __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_v_nday, __pyx_int_305, 0x131, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_dayofyr = __pyx_t_4;
+ __pyx_t_4 = 0;
+ }
+ __pyx_L6:;
+
+ /* "netcdftime/_netcdftime.pyx":431
+ * else:
+ * dayofyr = nday - 305
+ * if E < 14: # <<<<<<<<<<<<<<
+ * month = E - 1
+ * else:
+ */
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_E, __pyx_int_14, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 431, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":432
+ * dayofyr = nday - 305
+ * if E < 14:
+ * month = E - 1 # <<<<<<<<<<<<<<
+ * else:
+ * month = E - 13
+ */
+ __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_v_E, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_month = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":431
+ * else:
+ * dayofyr = nday - 305
+ * if E < 14: # <<<<<<<<<<<<<<
+ * month = E - 1
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":434
+ * month = E - 1
+ * else:
+ * month = E - 13 # <<<<<<<<<<<<<<
+ *
+ * if month > 2:
+ */
+ /*else*/ {
+ __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_v_E, __pyx_int_13, 13, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 434, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_month = __pyx_t_4;
+ __pyx_t_4 = 0;
+ }
+ __pyx_L7:;
+
+ /* "netcdftime/_netcdftime.pyx":436
+ * month = E - 13
+ *
+ * if month > 2: # <<<<<<<<<<<<<<
+ * year = C - 4716
+ * else:
+ */
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_month, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 436, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 436, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":437
+ *
+ * if month > 2:
+ * year = C - 4716 # <<<<<<<<<<<<<<
+ * else:
+ * year = C - 4715
+ */
+ __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_v_C, __pyx_int_4716, 0x126C, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 437, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_year = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":436
+ * month = E - 13
+ *
+ * if month > 2: # <<<<<<<<<<<<<<
+ * year = C - 4716
+ * else:
+ */
+ goto __pyx_L8;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":439
+ * year = C - 4716
+ * else:
+ * year = C - 4715 # <<<<<<<<<<<<<<
+ *
+ * # Convert fractions of a day to time
+ */
+ /*else*/ {
+ __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_v_C, __pyx_int_4715, 0x126B, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 439, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_year = __pyx_t_4;
+ __pyx_t_4 = 0;
+ }
+ __pyx_L8:;
+
+ /* "netcdftime/_netcdftime.pyx":442
+ *
+ * # Convert fractions of a day to time
+ * (dfrac, days) = math.modf(day / 1.0) # <<<<<<<<<<<<<<
+ * (hfrac, hours) = math.modf(dfrac * 24.0)
+ * (mfrac, minutes) = math.modf(hfrac * 60.0)
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 442, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_modf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyFloat_DivideObjC(__pyx_v_day, __pyx_float_1_0, 1.0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 442, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __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_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 442, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ #else
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 442, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
+ index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L9_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L9_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 442, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L10_unpacking_done;
+ __pyx_L9_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 442, __pyx_L1_error)
+ __pyx_L10_unpacking_done:;
+ }
+ __pyx_v_dfrac = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __pyx_v_days = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":443
+ * # Convert fractions of a day to time
+ * (dfrac, days) = math.modf(day / 1.0)
+ * (hfrac, hours) = math.modf(dfrac * 24.0) # <<<<<<<<<<<<<<
+ * (mfrac, minutes) = math.modf(hfrac * 60.0)
+ * (sfrac, seconds) = math.modf(mfrac * 60.0)
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 443, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_modf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 443, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyNumber_Multiply(__pyx_v_dfrac, __pyx_float_24_0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 443, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __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_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __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;
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 443, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ #else
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 443, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 443, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext;
+ index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L11_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ index = 1; __pyx_t_1 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_5), 2) < 0) __PYX_ERR(0, 443, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L12_unpacking_done;
+ __pyx_L11_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 443, __pyx_L1_error)
+ __pyx_L12_unpacking_done:;
+ }
+ __pyx_v_hfrac = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __pyx_v_hours = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":444
+ * (dfrac, days) = math.modf(day / 1.0)
+ * (hfrac, hours) = math.modf(dfrac * 24.0)
+ * (mfrac, minutes) = math.modf(hfrac * 60.0) # <<<<<<<<<<<<<<
+ * (sfrac, seconds) = math.modf(mfrac * 60.0)
+ * microseconds = sfrac*1.e6
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_modf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 444, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_hfrac, __pyx_float_60_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(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_3, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 444, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 444, __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
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 444, __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_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 444, __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_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 444, __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;
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 444, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_7 = PyList_GET_ITEM(sequence, 1);
+ }
+ __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, 444, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 444, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ #endif
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext;
+ index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L13_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ index = 1; __pyx_t_7 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L13_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_1), 2) < 0) __PYX_ERR(0, 444, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L14_unpacking_done;
+ __pyx_L13_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 444, __pyx_L1_error)
+ __pyx_L14_unpacking_done:;
+ }
+ __pyx_v_mfrac = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __pyx_v_minutes = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":445
+ * (hfrac, hours) = math.modf(dfrac * 24.0)
+ * (mfrac, minutes) = math.modf(hfrac * 60.0)
+ * (sfrac, seconds) = math.modf(mfrac * 60.0) # <<<<<<<<<<<<<<
+ * microseconds = sfrac*1.e6
+ *
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 445, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_modf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 445, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Multiply(__pyx_v_mfrac, __pyx_float_60_0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 445, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 445, __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_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 445, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ #else
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 445, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 445, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 445, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
+ index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L15_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L15_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 445, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L16_unpacking_done;
+ __pyx_L15_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 445, __pyx_L1_error)
+ __pyx_L16_unpacking_done:;
+ }
+ __pyx_v_sfrac = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __pyx_v_seconds = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":446
+ * (mfrac, minutes) = math.modf(hfrac * 60.0)
+ * (sfrac, seconds) = math.modf(mfrac * 60.0)
+ * microseconds = sfrac*1.e6 # <<<<<<<<<<<<<<
+ *
+ * if year_offset > 0:
+ */
+ __pyx_t_4 = PyNumber_Multiply(__pyx_v_sfrac, __pyx_float_1_e6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_microseconds = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":448
+ * microseconds = sfrac*1.e6
+ *
+ * if year_offset > 0: # <<<<<<<<<<<<<<
+ * # correct dayofwk
+ *
+ */
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_year_offset, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 448, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":453
+ * # 365 mod 7 = 1, so the day of the week changes by one day for
+ * # every year in year_offset
+ * dayofwk -= int(math.fmod(year_offset, 7)) # <<<<<<<<<<<<<<
+ *
+ * if dayofwk < 0:
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 453, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_fmod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(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_3, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_year_offset, __pyx_int_7};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_year_offset, __pyx_int_7};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 453, __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_INCREF(__pyx_v_year_offset);
+ __Pyx_GIVEREF(__pyx_v_year_offset);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_year_offset);
+ __Pyx_INCREF(__pyx_int_7);
+ __Pyx_GIVEREF(__pyx_int_7);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_int_7);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __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_t_3 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_v_dayofwk, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_dayofwk, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":455
+ * dayofwk -= int(math.fmod(year_offset, 7))
+ *
+ * if dayofwk < 0: # <<<<<<<<<<<<<<
+ * dayofwk += 7
+ *
+ */
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_dayofwk, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 455, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 455, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":456
+ *
+ * if dayofwk < 0:
+ * dayofwk += 7 # <<<<<<<<<<<<<<
+ *
+ * return DatetimeNoLeap(year - year_offset, month, int(days), int(hours), int(minutes),
+ */
+ __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_dayofwk, __pyx_int_7, 7, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 456, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF_SET(__pyx_v_dayofwk, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":455
+ * dayofwk -= int(math.fmod(year_offset, 7))
+ *
+ * if dayofwk < 0: # <<<<<<<<<<<<<<
+ * dayofwk += 7
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":448
+ * microseconds = sfrac*1.e6
+ *
+ * if year_offset > 0: # <<<<<<<<<<<<<<
+ * # correct dayofwk
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":458
+ * dayofwk += 7
+ *
+ * return DatetimeNoLeap(year - year_offset, month, int(days), int(hours), int(minutes), # <<<<<<<<<<<<<<
+ * int(seconds), int(microseconds),dayofwk, dayofyr)
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = PyNumber_Subtract(__pyx_v_year, __pyx_v_year_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 458, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_days); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_v_hours); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 458, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_minutes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 458, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+
+ /* "netcdftime/_netcdftime.pyx":459
+ *
+ * return DatetimeNoLeap(year - year_offset, month, int(days), int(hours), int(minutes),
+ * int(seconds), int(microseconds),dayofwk, dayofyr) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_seconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_v_microseconds); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 459, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+
+ /* "netcdftime/_netcdftime.pyx":458
+ * dayofwk += 7
+ *
+ * return DatetimeNoLeap(year - year_offset, month, int(days), int(hours), int(minutes), # <<<<<<<<<<<<<<
+ * int(seconds), int(microseconds),dayofwk, dayofyr)
+ *
+ */
+ __pyx_t_10 = PyTuple_New(9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 458, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4);
+ __Pyx_INCREF(__pyx_v_month);
+ __Pyx_GIVEREF(__pyx_v_month);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_month);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_t_9);
+ __Pyx_INCREF(__pyx_v_dayofwk);
+ __Pyx_GIVEREF(__pyx_v_dayofwk);
+ PyTuple_SET_ITEM(__pyx_t_10, 7, __pyx_v_dayofwk);
+ __Pyx_INCREF(__pyx_v_dayofyr);
+ __Pyx_GIVEREF(__pyx_v_dayofyr);
+ PyTuple_SET_ITEM(__pyx_t_10, 8, __pyx_v_dayofyr);
+ __pyx_t_4 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_7 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_1 = 0;
+ __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_DatetimeNoLeap), __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 458, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_r = __pyx_t_9;
+ __pyx_t_9 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":399
+ *
+ *
+ * cdef _DateFromNoLeapDay(JD): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_AddTraceback("netcdftime._netcdftime._DateFromNoLeapDay", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_year_offset);
+ __Pyx_XDECREF(__pyx_v_dayofwk);
+ __Pyx_XDECREF(__pyx_v_F);
+ __Pyx_XDECREF(__pyx_v_Z);
+ __Pyx_XDECREF(__pyx_v_A);
+ __Pyx_XDECREF(__pyx_v_B);
+ __Pyx_XDECREF(__pyx_v_C);
+ __Pyx_XDECREF(__pyx_v_D);
+ __Pyx_XDECREF(__pyx_v_E);
+ __Pyx_XDECREF(__pyx_v_day);
+ __Pyx_XDECREF(__pyx_v_nday);
+ __Pyx_XDECREF(__pyx_v_dayofyr);
+ __Pyx_XDECREF(__pyx_v_month);
+ __Pyx_XDECREF(__pyx_v_year);
+ __Pyx_XDECREF(__pyx_v_dfrac);
+ __Pyx_XDECREF(__pyx_v_days);
+ __Pyx_XDECREF(__pyx_v_hfrac);
+ __Pyx_XDECREF(__pyx_v_hours);
+ __Pyx_XDECREF(__pyx_v_mfrac);
+ __Pyx_XDECREF(__pyx_v_minutes);
+ __Pyx_XDECREF(__pyx_v_sfrac);
+ __Pyx_XDECREF(__pyx_v_seconds);
+ __Pyx_XDECREF(__pyx_v_microseconds);
+ __Pyx_XDECREF(__pyx_v_JD);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":462
+ *
+ *
+ * cdef _DateFromAllLeap(JD): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__DateFromAllLeap(PyObject *__pyx_v_JD) {
+ PyObject *__pyx_v_dayofwk = NULL;
+ PyObject *__pyx_v_F = NULL;
+ PyObject *__pyx_v_Z = NULL;
+ PyObject *__pyx_v_A = NULL;
+ PyObject *__pyx_v_B = NULL;
+ PyObject *__pyx_v_C = NULL;
+ PyObject *__pyx_v_D = NULL;
+ PyObject *__pyx_v_E = NULL;
+ PyObject *__pyx_v_day = NULL;
+ PyObject *__pyx_v_nday = NULL;
+ PyObject *__pyx_v_dayofyr = NULL;
+ PyObject *__pyx_v_month = NULL;
+ PyObject *__pyx_v_year = NULL;
+ PyObject *__pyx_v_dfrac = NULL;
+ PyObject *__pyx_v_days = NULL;
+ PyObject *__pyx_v_hfrac = NULL;
+ PyObject *__pyx_v_hours = NULL;
+ PyObject *__pyx_v_mfrac = NULL;
+ PyObject *__pyx_v_minutes = NULL;
+ PyObject *__pyx_v_sfrac = NULL;
+ PyObject *__pyx_v_seconds = NULL;
+ PyObject *__pyx_v_microseconds = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ PyObject *__pyx_t_9 = NULL;
+ __Pyx_RefNannySetupContext("_DateFromAllLeap", 0);
+
+ /* "netcdftime/_netcdftime.pyx":473
+ * # based on redate.py by David Finlayson.
+ *
+ * if JD < 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Julian Day must be positive')
+ *
+ */
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_JD, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 473, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":474
+ *
+ * if JD < 0:
+ * raise ValueError('Julian Day must be positive') # <<<<<<<<<<<<<<
+ *
+ * dayofwk = int(math.fmod(int(JD + 1.5), 7))
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __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, 474, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":473
+ * # based on redate.py by David Finlayson.
+ *
+ * if JD < 0: # <<<<<<<<<<<<<<
+ * raise ValueError('Julian Day must be positive')
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":476
+ * raise ValueError('Julian Day must be positive')
+ *
+ * dayofwk = int(math.fmod(int(JD + 1.5), 7)) # <<<<<<<<<<<<<<
+ * (F, Z) = math.modf(JD + 0.5)
+ * Z = int(Z)
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 476, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_fmod); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 476, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyFloat_AddObjC(__pyx_v_JD, __pyx_float_1_5, 1.5, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 476, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 476, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_int_7};
+ __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, 476, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_5, __pyx_int_7};
+ __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, 476, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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, 476, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5);
+ __Pyx_INCREF(__pyx_int_7);
+ __Pyx_GIVEREF(__pyx_int_7);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_int_7);
+ __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, 476, __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_t_4 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 476, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_dayofwk = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":477
+ *
+ * dayofwk = int(math.fmod(int(JD + 1.5), 7))
+ * (F, Z) = math.modf(JD + 0.5) # <<<<<<<<<<<<<<
+ * Z = int(Z)
+ * A = Z
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_modf); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyFloat_AddObjC(__pyx_v_JD, __pyx_float_0_5, 0.5, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 477, __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
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 477, __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_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 477, __pyx_L1_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_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 477, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_7 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
+ }
+ __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, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 477, __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_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext;
+ index = 0; __pyx_t_7 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L4_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_7);
+ index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_1), 2) < 0) __PYX_ERR(0, 477, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L5_unpacking_done;
+ __pyx_L4_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 477, __pyx_L1_error)
+ __pyx_L5_unpacking_done:;
+ }
+ __pyx_v_F = __pyx_t_7;
+ __pyx_t_7 = 0;
+ __pyx_v_Z = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":478
+ * dayofwk = int(math.fmod(int(JD + 1.5), 7))
+ * (F, Z) = math.modf(JD + 0.5)
+ * Z = int(Z) # <<<<<<<<<<<<<<
+ * A = Z
+ * B = A + 1524
+ */
+ __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_Z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF_SET(__pyx_v_Z, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":479
+ * (F, Z) = math.modf(JD + 0.5)
+ * Z = int(Z)
+ * A = Z # <<<<<<<<<<<<<<
+ * B = A + 1524
+ * C = int((B - 122.1) / 366.)
+ */
+ __Pyx_INCREF(__pyx_v_Z);
+ __pyx_v_A = __pyx_v_Z;
+
+ /* "netcdftime/_netcdftime.pyx":480
+ * Z = int(Z)
+ * A = Z
+ * B = A + 1524 # <<<<<<<<<<<<<<
+ * C = int((B - 122.1) / 366.)
+ * D = int(366. * C)
+ */
+ __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_A, __pyx_int_1524, 0x5F4, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 480, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_B = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":481
+ * A = Z
+ * B = A + 1524
+ * C = int((B - 122.1) / 366.) # <<<<<<<<<<<<<<
+ * D = int(366. * C)
+ * E = int((B - D) / 30.6001)
+ */
+ __pyx_t_4 = __Pyx_PyFloat_SubtractObjC(__pyx_v_B, __pyx_float_122_1, 122.1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 481, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyFloat_DivideObjC(__pyx_t_4, __pyx_float_366_, 366., 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 481, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 481, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_C = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":482
+ * B = A + 1524
+ * C = int((B - 122.1) / 366.)
+ * D = int(366. * C) # <<<<<<<<<<<<<<
+ * E = int((B - D) / 30.6001)
+ *
+ */
+ __pyx_t_4 = PyNumber_Multiply(__pyx_float_366_, __pyx_v_C); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 482, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 482, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_D = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":483
+ * C = int((B - 122.1) / 366.)
+ * D = int(366. * C)
+ * E = int((B - D) / 30.6001) # <<<<<<<<<<<<<<
+ *
+ * # Convert to date
+ */
+ __pyx_t_3 = PyNumber_Subtract(__pyx_v_B, __pyx_v_D); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 483, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyFloat_DivideObjC(__pyx_t_3, __pyx_float_30_6001, 30.6001, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 483, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 483, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_E = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":486
+ *
+ * # Convert to date
+ * day = B - D - int(30.6001 * E) + F # <<<<<<<<<<<<<<
+ * nday = B - D - 123
+ * if nday <= 305:
+ */
+ __pyx_t_3 = PyNumber_Subtract(__pyx_v_B, __pyx_v_D); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyNumber_Multiply(__pyx_float_30_6001, __pyx_v_E); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_v_F); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_day = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":487
+ * # Convert to date
+ * day = B - D - int(30.6001 * E) + F
+ * nday = B - D - 123 # <<<<<<<<<<<<<<
+ * if nday <= 305:
+ * dayofyr = nday + 60
+ */
+ __pyx_t_7 = PyNumber_Subtract(__pyx_v_B, __pyx_v_D); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 487, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_t_7, __pyx_int_123, 0x7B, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_v_nday = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":488
+ * day = B - D - int(30.6001 * E) + F
+ * nday = B - D - 123
+ * if nday <= 305: # <<<<<<<<<<<<<<
+ * dayofyr = nday + 60
+ * else:
+ */
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_nday, __pyx_int_305, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":489
+ * nday = B - D - 123
+ * if nday <= 305:
+ * dayofyr = nday + 60 # <<<<<<<<<<<<<<
+ * else:
+ * dayofyr = nday - 305
+ */
+ __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_nday, __pyx_int_60, 60, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 489, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_dayofyr = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":488
+ * day = B - D - int(30.6001 * E) + F
+ * nday = B - D - 123
+ * if nday <= 305: # <<<<<<<<<<<<<<
+ * dayofyr = nday + 60
+ * else:
+ */
+ goto __pyx_L6;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":491
+ * dayofyr = nday + 60
+ * else:
+ * dayofyr = nday - 305 # <<<<<<<<<<<<<<
+ * if E < 14:
+ * month = E - 1
+ */
+ /*else*/ {
+ __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_v_nday, __pyx_int_305, 0x131, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_dayofyr = __pyx_t_4;
+ __pyx_t_4 = 0;
+ }
+ __pyx_L6:;
+
+ /* "netcdftime/_netcdftime.pyx":492
+ * else:
+ * dayofyr = nday - 305
+ * if E < 14: # <<<<<<<<<<<<<<
+ * month = E - 1
+ * else:
+ */
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_E, __pyx_int_14, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 492, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 492, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":493
+ * dayofyr = nday - 305
+ * if E < 14:
+ * month = E - 1 # <<<<<<<<<<<<<<
+ * else:
+ * month = E - 13
+ */
+ __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_v_E, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 493, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_month = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":492
+ * else:
+ * dayofyr = nday - 305
+ * if E < 14: # <<<<<<<<<<<<<<
+ * month = E - 1
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":495
+ * month = E - 1
+ * else:
+ * month = E - 13 # <<<<<<<<<<<<<<
+ * if month > 2:
+ * dayofyr = dayofyr + 1
+ */
+ /*else*/ {
+ __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_v_E, __pyx_int_13, 13, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 495, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_month = __pyx_t_4;
+ __pyx_t_4 = 0;
+ }
+ __pyx_L7:;
+
+ /* "netcdftime/_netcdftime.pyx":496
+ * else:
+ * month = E - 13
+ * if month > 2: # <<<<<<<<<<<<<<
+ * dayofyr = dayofyr + 1
+ *
+ */
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_month, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 496, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 496, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":497
+ * month = E - 13
+ * if month > 2:
+ * dayofyr = dayofyr + 1 # <<<<<<<<<<<<<<
+ *
+ * if month > 2:
+ */
+ __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_dayofyr, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF_SET(__pyx_v_dayofyr, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":496
+ * else:
+ * month = E - 13
+ * if month > 2: # <<<<<<<<<<<<<<
+ * dayofyr = dayofyr + 1
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":499
+ * dayofyr = dayofyr + 1
+ *
+ * if month > 2: # <<<<<<<<<<<<<<
+ * year = C - 4716
+ * else:
+ */
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_month, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":500
+ *
+ * if month > 2:
+ * year = C - 4716 # <<<<<<<<<<<<<<
+ * else:
+ * year = C - 4715
+ */
+ __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_v_C, __pyx_int_4716, 0x126C, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 500, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_year = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":499
+ * dayofyr = dayofyr + 1
+ *
+ * if month > 2: # <<<<<<<<<<<<<<
+ * year = C - 4716
+ * else:
+ */
+ goto __pyx_L9;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":502
+ * year = C - 4716
+ * else:
+ * year = C - 4715 # <<<<<<<<<<<<<<
+ *
+ * # Convert fractions of a day to time
+ */
+ /*else*/ {
+ __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_v_C, __pyx_int_4715, 0x126B, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 502, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_year = __pyx_t_4;
+ __pyx_t_4 = 0;
+ }
+ __pyx_L9:;
+
+ /* "netcdftime/_netcdftime.pyx":505
+ *
+ * # Convert fractions of a day to time
+ * (dfrac, days) = math.modf(day / 1.0) # <<<<<<<<<<<<<<
+ * (hfrac, hours) = math.modf(dfrac * 24.0)
+ * (mfrac, minutes) = math.modf(hfrac * 60.0)
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_modf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyFloat_DivideObjC(__pyx_v_day, __pyx_float_1_0, 1.0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 505, __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_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 505, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ #else
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
+ index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L10_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L10_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 505, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L11_unpacking_done;
+ __pyx_L10_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 505, __pyx_L1_error)
+ __pyx_L11_unpacking_done:;
+ }
+ __pyx_v_dfrac = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __pyx_v_days = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":506
+ * # Convert fractions of a day to time
+ * (dfrac, days) = math.modf(day / 1.0)
+ * (hfrac, hours) = math.modf(dfrac * 24.0) # <<<<<<<<<<<<<<
+ * (mfrac, minutes) = math.modf(hfrac * 60.0)
+ * (sfrac, seconds) = math.modf(mfrac * 60.0)
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 506, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_modf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 506, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyNumber_Multiply(__pyx_v_dfrac, __pyx_float_24_0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 506, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __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_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __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;
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 506, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ #else
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 506, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 506, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext;
+ index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L12_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ index = 1; __pyx_t_1 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L12_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_5), 2) < 0) __PYX_ERR(0, 506, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L13_unpacking_done;
+ __pyx_L12_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 506, __pyx_L1_error)
+ __pyx_L13_unpacking_done:;
+ }
+ __pyx_v_hfrac = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __pyx_v_hours = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":507
+ * (dfrac, days) = math.modf(day / 1.0)
+ * (hfrac, hours) = math.modf(dfrac * 24.0)
+ * (mfrac, minutes) = math.modf(hfrac * 60.0) # <<<<<<<<<<<<<<
+ * (sfrac, seconds) = math.modf(mfrac * 60.0)
+ * microseconds = sfrac*1.e6
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_modf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_hfrac, __pyx_float_60_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(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_3, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __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
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __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_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 507, __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_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __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;
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 507, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_7 = PyList_GET_ITEM(sequence, 1);
+ }
+ __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, 507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ #endif
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext;
+ index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L14_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ index = 1; __pyx_t_7 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L14_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_1), 2) < 0) __PYX_ERR(0, 507, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L15_unpacking_done;
+ __pyx_L14_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 507, __pyx_L1_error)
+ __pyx_L15_unpacking_done:;
+ }
+ __pyx_v_mfrac = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __pyx_v_minutes = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":508
+ * (hfrac, hours) = math.modf(dfrac * 24.0)
+ * (mfrac, minutes) = math.modf(hfrac * 60.0)
+ * (sfrac, seconds) = math.modf(mfrac * 60.0) # <<<<<<<<<<<<<<
+ * microseconds = sfrac*1.e6
+ *
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_modf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Multiply(__pyx_v_mfrac, __pyx_float_60_0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 508, __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_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 508, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ #else
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
+ index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L16_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L16_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 508, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L17_unpacking_done;
+ __pyx_L16_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 508, __pyx_L1_error)
+ __pyx_L17_unpacking_done:;
+ }
+ __pyx_v_sfrac = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __pyx_v_seconds = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":509
+ * (mfrac, minutes) = math.modf(hfrac * 60.0)
+ * (sfrac, seconds) = math.modf(mfrac * 60.0)
+ * microseconds = sfrac*1.e6 # <<<<<<<<<<<<<<
+ *
+ * return DatetimeAllLeap(year, month, int(days), int(hours), int(minutes),
+ */
+ __pyx_t_4 = PyNumber_Multiply(__pyx_v_sfrac, __pyx_float_1_e6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 509, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_microseconds = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":511
+ * microseconds = sfrac*1.e6
+ *
+ * return DatetimeAllLeap(year, month, int(days), int(hours), int(minutes), # <<<<<<<<<<<<<<
+ * int(seconds), int(microseconds),dayofwk, dayofyr)
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_days); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_hours); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_minutes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+
+ /* "netcdftime/_netcdftime.pyx":512
+ *
+ * return DatetimeAllLeap(year, month, int(days), int(hours), int(minutes),
+ * int(seconds), int(microseconds),dayofwk, dayofyr) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_v_seconds); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 512, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_microseconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "netcdftime/_netcdftime.pyx":511
+ * microseconds = sfrac*1.e6
+ *
+ * return DatetimeAllLeap(year, month, int(days), int(hours), int(minutes), # <<<<<<<<<<<<<<
+ * int(seconds), int(microseconds),dayofwk, dayofyr)
+ *
+ */
+ __pyx_t_9 = PyTuple_New(9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_INCREF(__pyx_v_year);
+ __Pyx_GIVEREF(__pyx_v_year);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_year);
+ __Pyx_INCREF(__pyx_v_month);
+ __Pyx_GIVEREF(__pyx_v_month);
+ PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_month);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_1);
+ __Pyx_INCREF(__pyx_v_dayofwk);
+ __Pyx_GIVEREF(__pyx_v_dayofwk);
+ PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_v_dayofwk);
+ __Pyx_INCREF(__pyx_v_dayofyr);
+ __Pyx_GIVEREF(__pyx_v_dayofyr);
+ PyTuple_SET_ITEM(__pyx_t_9, 8, __pyx_v_dayofyr);
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_7 = 0;
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_DatetimeAllLeap), __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":462
+ *
+ *
+ * cdef _DateFromAllLeap(JD): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("netcdftime._netcdftime._DateFromAllLeap", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_dayofwk);
+ __Pyx_XDECREF(__pyx_v_F);
+ __Pyx_XDECREF(__pyx_v_Z);
+ __Pyx_XDECREF(__pyx_v_A);
+ __Pyx_XDECREF(__pyx_v_B);
+ __Pyx_XDECREF(__pyx_v_C);
+ __Pyx_XDECREF(__pyx_v_D);
+ __Pyx_XDECREF(__pyx_v_E);
+ __Pyx_XDECREF(__pyx_v_day);
+ __Pyx_XDECREF(__pyx_v_nday);
+ __Pyx_XDECREF(__pyx_v_dayofyr);
+ __Pyx_XDECREF(__pyx_v_month);
+ __Pyx_XDECREF(__pyx_v_year);
+ __Pyx_XDECREF(__pyx_v_dfrac);
+ __Pyx_XDECREF(__pyx_v_days);
+ __Pyx_XDECREF(__pyx_v_hfrac);
+ __Pyx_XDECREF(__pyx_v_hours);
+ __Pyx_XDECREF(__pyx_v_mfrac);
+ __Pyx_XDECREF(__pyx_v_minutes);
+ __Pyx_XDECREF(__pyx_v_sfrac);
+ __Pyx_XDECREF(__pyx_v_seconds);
+ __Pyx_XDECREF(__pyx_v_microseconds);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":515
+ *
+ *
+ * cdef _DateFrom360Day(JD): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__DateFrom360Day(PyObject *__pyx_v_JD) {
+ PyObject *__pyx_v_year_offset = NULL;
+ PyObject *__pyx_v_F = NULL;
+ PyObject *__pyx_v_Z = NULL;
+ PyObject *__pyx_v_year = NULL;
+ PyObject *__pyx_v_dayofyr = NULL;
+ PyObject *__pyx_v_month = NULL;
+ PyObject *__pyx_v_day = NULL;
+ PyObject *__pyx_v_dfrac = NULL;
+ PyObject *__pyx_v_days = NULL;
+ PyObject *__pyx_v_hfrac = NULL;
+ PyObject *__pyx_v_hours = NULL;
+ PyObject *__pyx_v_mfrac = NULL;
+ PyObject *__pyx_v_minutes = NULL;
+ PyObject *__pyx_v_sfrac = NULL;
+ PyObject *__pyx_v_seconds = NULL;
+ PyObject *__pyx_v_microseconds = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *(*__pyx_t_6)(PyObject *);
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ __Pyx_RefNannySetupContext("_DateFrom360Day", 0);
+ __Pyx_INCREF(__pyx_v_JD);
+
+ /* "netcdftime/_netcdftime.pyx":524
+ * """
+ *
+ * if JD < 0: # <<<<<<<<<<<<<<
+ * year_offset = int(-JD) // 360 + 1
+ * JD += year_offset * 360
+ */
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_JD, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 524, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":525
+ *
+ * if JD < 0:
+ * year_offset = int(-JD) // 360 + 1 # <<<<<<<<<<<<<<
+ * JD += year_offset * 360
+ * else:
+ */
+ __pyx_t_1 = PyNumber_Negative(__pyx_v_JD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_3, __pyx_int_360, 0x168, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_year_offset = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":526
+ * if JD < 0:
+ * year_offset = int(-JD) // 360 + 1
+ * JD += year_offset * 360 # <<<<<<<<<<<<<<
+ * else:
+ * year_offset = 0
+ */
+ __pyx_t_3 = PyNumber_Multiply(__pyx_v_year_offset, __pyx_int_360); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 526, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_JD, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_JD, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":524
+ * """
+ *
+ * if JD < 0: # <<<<<<<<<<<<<<
+ * year_offset = int(-JD) // 360 + 1
+ * JD += year_offset * 360
+ */
+ goto __pyx_L3;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":528
+ * JD += year_offset * 360
+ * else:
+ * year_offset = 0 # <<<<<<<<<<<<<<
+ *
+ * #jd = int(360. * (year + 4716)) + int(30. * (month - 1)) + day
+ */
+ /*else*/ {
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_v_year_offset = __pyx_int_0;
+ }
+ __pyx_L3:;
+
+ /* "netcdftime/_netcdftime.pyx":531
+ *
+ * #jd = int(360. * (year + 4716)) + int(30. * (month - 1)) + day
+ * (F, Z) = math.modf(JD) # <<<<<<<<<<<<<<
+ * year = int((Z - 0.5) / 360.) - 4716
+ * dayofyr = Z - (year + 4716) * 360
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_modf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_JD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __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_JD};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_JD};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __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, 531, __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_JD);
+ __Pyx_GIVEREF(__pyx_v_JD);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_JD);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __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(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 531, __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_5 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ #else
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #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, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_4);
+ index = 1; __pyx_t_5 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_3), 2) < 0) __PYX_ERR(0, 531, __pyx_L1_error)
+ __pyx_t_6 = NULL;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L5_unpacking_done;
+ __pyx_L4_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 531, __pyx_L1_error)
+ __pyx_L5_unpacking_done:;
+ }
+ __pyx_v_F = __pyx_t_4;
+ __pyx_t_4 = 0;
+ __pyx_v_Z = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":532
+ * #jd = int(360. * (year + 4716)) + int(30. * (month - 1)) + day
+ * (F, Z) = math.modf(JD)
+ * year = int((Z - 0.5) / 360.) - 4716 # <<<<<<<<<<<<<<
+ * dayofyr = Z - (year + 4716) * 360
+ * month = int((dayofyr - 0.5) / 30) + 1
+ */
+ __pyx_t_1 = __Pyx_PyFloat_SubtractObjC(__pyx_v_Z, __pyx_float_0_5, 0.5, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyFloat_DivideObjC(__pyx_t_1, __pyx_float_360_, 360., 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 532, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_4716, 0x126C, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 532, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_year = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":533
+ * (F, Z) = math.modf(JD)
+ * year = int((Z - 0.5) / 360.) - 4716
+ * dayofyr = Z - (year + 4716) * 360 # <<<<<<<<<<<<<<
+ * month = int((dayofyr - 0.5) / 30) + 1
+ * day = dayofyr - (month - 1) * 30 + F
+ */
+ __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_year, __pyx_int_4716, 0x126C, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = PyNumber_Multiply(__pyx_t_5, __pyx_int_360); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyNumber_Subtract(__pyx_v_Z, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_dayofyr = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":534
+ * year = int((Z - 0.5) / 360.) - 4716
+ * dayofyr = Z - (year + 4716) * 360
+ * month = int((dayofyr - 0.5) / 30) + 1 # <<<<<<<<<<<<<<
+ * day = dayofyr - (month - 1) * 30 + F
+ *
+ */
+ __pyx_t_5 = __Pyx_PyFloat_SubtractObjC(__pyx_v_dayofyr, __pyx_float_0_5, 0.5, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_int_30); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_v_month = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":535
+ * dayofyr = Z - (year + 4716) * 360
+ * month = int((dayofyr - 0.5) / 30) + 1
+ * day = dayofyr - (month - 1) * 30 + F # <<<<<<<<<<<<<<
+ *
+ * # Convert fractions of a day to time
+ */
+ __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_month, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_int_30); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 535, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Subtract(__pyx_v_dayofyr, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_v_F); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 535, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_day = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":538
+ *
+ * # Convert fractions of a day to time
+ * (dfrac, days) = math.modf(day / 1.0) # <<<<<<<<<<<<<<
+ * (hfrac, hours) = math.modf(dfrac * 24.0)
+ * (mfrac, minutes) = math.modf(hfrac * 60.0)
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_modf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 538, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyFloat_DivideObjC(__pyx_v_day, __pyx_float_1_0, 1.0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 538, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_1};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 538, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_1};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 538, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __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, 538, __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_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 538, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
+ PyObject* sequence = __pyx_t_5;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 538, __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_7 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_7 = PyList_GET_ITEM(sequence, 1);
+ }
+ __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, 538, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 538, __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_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
+ index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_4);
+ index = 1; __pyx_t_7 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_1), 2) < 0) __PYX_ERR(0, 538, __pyx_L1_error)
+ __pyx_t_6 = NULL;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L7_unpacking_done;
+ __pyx_L6_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_6 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 538, __pyx_L1_error)
+ __pyx_L7_unpacking_done:;
+ }
+ __pyx_v_dfrac = __pyx_t_4;
+ __pyx_t_4 = 0;
+ __pyx_v_days = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":539
+ * # Convert fractions of a day to time
+ * (dfrac, days) = math.modf(day / 1.0)
+ * (hfrac, hours) = math.modf(dfrac * 24.0) # <<<<<<<<<<<<<<
+ * (mfrac, minutes) = math.modf(hfrac * 60.0)
+ * (sfrac, seconds) = math.modf(mfrac * 60.0)
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_modf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = PyNumber_Multiply(__pyx_v_dfrac, __pyx_float_24_0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 539, __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 = NULL;
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
+ PyObject* sequence = __pyx_t_5;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 539, __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);
+ } else {
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ #else
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_6 = Py_TYPE(__pyx_t_7)->tp_iternext;
+ index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_4);
+ index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_7), 2) < 0) __PYX_ERR(0, 539, __pyx_L1_error)
+ __pyx_t_6 = NULL;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L9_unpacking_done;
+ __pyx_L8_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_6 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 539, __pyx_L1_error)
+ __pyx_L9_unpacking_done:;
+ }
+ __pyx_v_hfrac = __pyx_t_4;
+ __pyx_t_4 = 0;
+ __pyx_v_hours = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":540
+ * (dfrac, days) = math.modf(day / 1.0)
+ * (hfrac, hours) = math.modf(dfrac * 24.0)
+ * (mfrac, minutes) = math.modf(hfrac * 60.0) # <<<<<<<<<<<<<<
+ * (sfrac, seconds) = math.modf(mfrac * 60.0)
+ * microseconds = sfrac*1.e6
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_modf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Multiply(__pyx_v_hfrac, __pyx_float_60_0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __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_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
+ PyObject* sequence = __pyx_t_5;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 540, __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_1 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_1);
+ #else
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L10_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_4);
+ index = 1; __pyx_t_1 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L10_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_3), 2) < 0) __PYX_ERR(0, 540, __pyx_L1_error)
+ __pyx_t_6 = NULL;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L11_unpacking_done;
+ __pyx_L10_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 540, __pyx_L1_error)
+ __pyx_L11_unpacking_done:;
+ }
+ __pyx_v_mfrac = __pyx_t_4;
+ __pyx_t_4 = 0;
+ __pyx_v_minutes = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":541
+ * (hfrac, hours) = math.modf(dfrac * 24.0)
+ * (mfrac, minutes) = math.modf(hfrac * 60.0)
+ * (sfrac, seconds) = math.modf(mfrac * 60.0) # <<<<<<<<<<<<<<
+ * microseconds = sfrac*1.e6
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_modf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_mfrac, __pyx_float_60_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_1};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_1};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __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, 541, __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_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
+ PyObject* sequence = __pyx_t_5;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 541, __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_7 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_7 = PyList_GET_ITEM(sequence, 1);
+ }
+ __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, 541, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 541, __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_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
+ index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L12_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_4);
+ index = 1; __pyx_t_7 = __pyx_t_6(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L12_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_1), 2) < 0) __PYX_ERR(0, 541, __pyx_L1_error)
+ __pyx_t_6 = NULL;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L13_unpacking_done;
+ __pyx_L12_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_6 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 541, __pyx_L1_error)
+ __pyx_L13_unpacking_done:;
+ }
+ __pyx_v_sfrac = __pyx_t_4;
+ __pyx_t_4 = 0;
+ __pyx_v_seconds = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":542
+ * (mfrac, minutes) = math.modf(hfrac * 60.0)
+ * (sfrac, seconds) = math.modf(mfrac * 60.0)
+ * microseconds = sfrac*1.e6 # <<<<<<<<<<<<<<
+ *
+ * return Datetime360Day(year - year_offset, month, int(days), int(hours), int(minutes),
+ */
+ __pyx_t_5 = PyNumber_Multiply(__pyx_v_sfrac, __pyx_float_1_e6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 542, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_v_microseconds = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":544
+ * microseconds = sfrac*1.e6
+ *
+ * return Datetime360Day(year - year_offset, month, int(days), int(hours), int(minutes), # <<<<<<<<<<<<<<
+ * int(seconds), int(microseconds), -1, dayofyr)
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = PyNumber_Subtract(__pyx_v_year, __pyx_v_year_offset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_v_days); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_hours); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_minutes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "netcdftime/_netcdftime.pyx":545
+ *
+ * return Datetime360Day(year - year_offset, month, int(days), int(hours), int(minutes),
+ * int(seconds), int(microseconds), -1, dayofyr) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_seconds); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = __Pyx_PyNumber_Int(__pyx_v_microseconds); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+
+ /* "netcdftime/_netcdftime.pyx":544
+ * microseconds = sfrac*1.e6
+ *
+ * return Datetime360Day(year - year_offset, month, int(days), int(hours), int(minutes), # <<<<<<<<<<<<<<
+ * int(seconds), int(microseconds), -1, dayofyr)
+ *
+ */
+ __pyx_t_9 = PyTuple_New(9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5);
+ __Pyx_INCREF(__pyx_v_month);
+ __Pyx_GIVEREF(__pyx_v_month);
+ PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_month);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_8);
+ __Pyx_INCREF(__pyx_int_neg_1);
+ __Pyx_GIVEREF(__pyx_int_neg_1);
+ PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_int_neg_1);
+ __Pyx_INCREF(__pyx_v_dayofyr);
+ __Pyx_GIVEREF(__pyx_v_dayofyr);
+ PyTuple_SET_ITEM(__pyx_t_9, 8, __pyx_v_dayofyr);
+ __pyx_t_5 = 0;
+ __pyx_t_7 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_1 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_Datetime360Day), __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":515
+ *
+ *
+ * cdef _DateFrom360Day(JD): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("netcdftime._netcdftime._DateFrom360Day", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_year_offset);
+ __Pyx_XDECREF(__pyx_v_F);
+ __Pyx_XDECREF(__pyx_v_Z);
+ __Pyx_XDECREF(__pyx_v_year);
+ __Pyx_XDECREF(__pyx_v_dayofyr);
+ __Pyx_XDECREF(__pyx_v_month);
+ __Pyx_XDECREF(__pyx_v_day);
+ __Pyx_XDECREF(__pyx_v_dfrac);
+ __Pyx_XDECREF(__pyx_v_days);
+ __Pyx_XDECREF(__pyx_v_hfrac);
+ __Pyx_XDECREF(__pyx_v_hours);
+ __Pyx_XDECREF(__pyx_v_mfrac);
+ __Pyx_XDECREF(__pyx_v_minutes);
+ __Pyx_XDECREF(__pyx_v_sfrac);
+ __Pyx_XDECREF(__pyx_v_seconds);
+ __Pyx_XDECREF(__pyx_v_microseconds);
+ __Pyx_XDECREF(__pyx_v_JD);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":548
+ *
+ *
+ * cdef _dateparse(timestr): # <<<<<<<<<<<<<<
+ * """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss
+ * return a tuple (units,utc_offset, datetimeinstance)"""
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__dateparse(PyObject *__pyx_v_timestr) {
+ PyObject *__pyx_v_timestr_split = NULL;
+ PyObject *__pyx_v_units = NULL;
+ PyObject *__pyx_v_n = NULL;
+ PyObject *__pyx_v_year = NULL;
+ PyObject *__pyx_v_month = NULL;
+ PyObject *__pyx_v_day = NULL;
+ PyObject *__pyx_v_hour = NULL;
+ PyObject *__pyx_v_minute = NULL;
+ PyObject *__pyx_v_second = NULL;
+ PyObject *__pyx_v_utc_offset = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *(*__pyx_t_12)(PyObject *);
+ __Pyx_RefNannySetupContext("_dateparse", 0);
+
+ /* "netcdftime/_netcdftime.pyx":551
+ * """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss
+ * return a tuple (units,utc_offset, datetimeinstance)"""
+ * timestr_split = timestr.split() # <<<<<<<<<<<<<<
+ * units = timestr_split[0].lower()
+ * if units not in _units:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __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, 551, __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;
+
+ /* "netcdftime/_netcdftime.pyx":552
+ * return a tuple (units,utc_offset, datetimeinstance)"""
+ * timestr_split = timestr.split()
+ * units = timestr_split[0].lower() # <<<<<<<<<<<<<<
+ * if units not in _units:
+ * raise ValueError(
+ */
+ __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, 552, __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, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __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, 552, __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;
+
+ /* "netcdftime/_netcdftime.pyx":553
+ * timestr_split = timestr.split()
+ * units = timestr_split[0].lower()
+ * if units not in _units: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * "units must be one of 'seconds', 'minutes', 'hours' or 'days' (or singular version of these), got '%s'" % units)
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_units, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 553, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (__pyx_t_5) {
+
+ /* "netcdftime/_netcdftime.pyx":555
+ * if units not in _units:
+ * raise ValueError(
+ * "units must be one of 'seconds', 'minutes', 'hours' or 'days' (or singular version of these), got '%s'" % units) # <<<<<<<<<<<<<<
+ * if timestr_split[1].lower() != 'since':
+ * raise ValueError("no 'since' in unit_string")
+ */
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_units_must_be_one_of_seconds_min, __pyx_v_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "netcdftime/_netcdftime.pyx":554
+ * units = timestr_split[0].lower()
+ * if units not in _units:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * "units must be one of 'seconds', 'minutes', 'hours' or 'days' (or singular version of these), got '%s'" % units)
+ * if timestr_split[1].lower() != 'since':
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __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 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 554, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":553
+ * timestr_split = timestr.split()
+ * units = timestr_split[0].lower()
+ * if units not in _units: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * "units must be one of 'seconds', 'minutes', 'hours' or 'days' (or singular version of these), got '%s'" % units)
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":556
+ * raise ValueError(
+ * "units must be one of 'seconds', 'minutes', 'hours' or 'days' (or singular version of these), got '%s'" % units)
+ * 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, 556, __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, 556, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __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, 556, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_since, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 556, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_5) {
+
+ /* "netcdftime/_netcdftime.pyx":557
+ * "units must be one of 'seconds', 'minutes', 'hours' or 'days' (or singular version of these), got '%s'" % units)
+ * 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__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __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, 557, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":556
+ * raise ValueError(
+ * "units must be one of 'seconds', 'minutes', 'hours' or 'days' (or singular version of these), got '%s'" % units)
+ * if timestr_split[1].lower() != 'since': # <<<<<<<<<<<<<<
+ * raise ValueError("no 'since' in unit_string")
+ * # parse the date string.
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":559
+ * raise ValueError("no 'since' in unit_string")
+ * # parse the date string.
+ * n = timestr.find('since') + 6 # <<<<<<<<<<<<<<
+ * year, month, day, hour, minute, second, utc_offset = _parse_date(
+ * timestr[n:].strip())
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_find); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __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, 559, __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;
+
+ /* "netcdftime/_netcdftime.pyx":561
+ * n = timestr.find('since') + 6
+ * year, month, day, hour, minute, second, utc_offset = _parse_date(
+ * timestr[n:].strip()) # <<<<<<<<<<<<<<
+ * return units, utc_offset, datetime(year, month, day, hour, minute, second)
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_timestr, 0, 0, &__pyx_v_n, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __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, 561, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":560
+ * # parse the date string.
+ * n = timestr.find('since') + 6
+ * year, month, day, hour, minute, second, utc_offset = _parse_date( # <<<<<<<<<<<<<<
+ * timestr[n:].strip())
+ * return units, utc_offset, datetime(year, month, day, hour, minute, second)
+ */
+ __pyx_t_3 = __pyx_f_10netcdftime_11_netcdftime__parse_date(__pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ 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
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 7)) {
+ if (size > 7) __Pyx_RaiseTooManyValuesError(7);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 560, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2);
+ __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3);
+ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 4);
+ __pyx_t_9 = PyTuple_GET_ITEM(sequence, 5);
+ __pyx_t_10 = PyTuple_GET_ITEM(sequence, 6);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 2);
+ __pyx_t_7 = PyList_GET_ITEM(sequence, 3);
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 4);
+ __pyx_t_9 = PyList_GET_ITEM(sequence, 5);
+ __pyx_t_10 = PyList_GET_ITEM(sequence, 6);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_10);
+ #else
+ {
+ Py_ssize_t i;
+ PyObject** temps[7] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10};
+ for (i=0; i < 7; i++) {
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 560, __pyx_L1_error)
+ __Pyx_GOTREF(item);
+ *(temps[i]) = item;
+ }
+ }
+ #endif
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ PyObject** temps[7] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10};
+ __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 560, __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;
+ for (index=0; index < 7; index++) {
+ PyObject* item = __pyx_t_12(__pyx_t_11); if (unlikely(!item)) goto __pyx_L5_unpacking_failed;
+ __Pyx_GOTREF(item);
+ *(temps[index]) = item;
+ }
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 7) < 0) __PYX_ERR(0, 560, __pyx_L1_error)
+ __pyx_t_12 = NULL;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ goto __pyx_L6_unpacking_done;
+ __pyx_L5_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, 560, __pyx_L1_error)
+ __pyx_L6_unpacking_done:;
+ }
+ __pyx_v_year = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __pyx_v_month = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __pyx_v_day = __pyx_t_6;
+ __pyx_t_6 = 0;
+ __pyx_v_hour = __pyx_t_7;
+ __pyx_t_7 = 0;
+ __pyx_v_minute = __pyx_t_8;
+ __pyx_t_8 = 0;
+ __pyx_v_second = __pyx_t_9;
+ __pyx_t_9 = 0;
+ __pyx_v_utc_offset = __pyx_t_10;
+ __pyx_t_10 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":562
+ * year, month, day, hour, minute, second, utc_offset = _parse_date(
+ * timestr[n:].strip())
+ * return units, utc_offset, datetime(year, month, day, hour, minute, second) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_year);
+ __Pyx_GIVEREF(__pyx_v_year);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_year);
+ __Pyx_INCREF(__pyx_v_month);
+ __Pyx_GIVEREF(__pyx_v_month);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_month);
+ __Pyx_INCREF(__pyx_v_day);
+ __Pyx_GIVEREF(__pyx_v_day);
+ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_day);
+ __Pyx_INCREF(__pyx_v_hour);
+ __Pyx_GIVEREF(__pyx_v_hour);
+ PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_hour);
+ __Pyx_INCREF(__pyx_v_minute);
+ __Pyx_GIVEREF(__pyx_v_minute);
+ PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_minute);
+ __Pyx_INCREF(__pyx_v_second);
+ __Pyx_GIVEREF(__pyx_v_second);
+ PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_second);
+ __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_datetime), __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 562, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_units);
+ __Pyx_GIVEREF(__pyx_v_units);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_units);
+ __Pyx_INCREF(__pyx_v_utc_offset);
+ __Pyx_GIVEREF(__pyx_v_utc_offset);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_utc_offset);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":548
+ *
+ *
+ * cdef _dateparse(timestr): # <<<<<<<<<<<<<<
+ * """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss
+ * return a tuple (units,utc_offset, datetimeinstance)"""
+ */
+
+ /* 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_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("netcdftime._netcdftime._dateparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_timestr_split);
+ __Pyx_XDECREF(__pyx_v_units);
+ __Pyx_XDECREF(__pyx_v_n);
+ __Pyx_XDECREF(__pyx_v_year);
+ __Pyx_XDECREF(__pyx_v_month);
+ __Pyx_XDECREF(__pyx_v_day);
+ __Pyx_XDECREF(__pyx_v_hour);
+ __Pyx_XDECREF(__pyx_v_minute);
+ __Pyx_XDECREF(__pyx_v_second);
+ __Pyx_XDECREF(__pyx_v_utc_offset);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":666
+ * """
+ *
+ * def __init__(self, unit_string, calendar='standard'): # <<<<<<<<<<<<<<
+ * """
+ * @param unit_string: a string of the form
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_5utime_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_10netcdftime_11_netcdftime_5utime___init__[] = "\n at param unit_string: a string of the form\nC{'time-units since <time-origin>'} defining the time units.\n\nValid time-units are days, hours, minutes and seconds (the singular forms\nare also accepted). An example unit_string would be C{'hours\nsince 0001-01-01 00:00:00'}.\n\n at keyword calendar: describes the calendar used in the time calculations.\nAll the values currently defined in the U{CF metadata convention\n<http [...]
+static PyMethodDef __pyx_mdef_10netcdftime_11_netcdftime_5utime_1__init__ = {"__init__", (PyCFunction)__pyx_pw_10netcdftime_11_netcdftime_5utime_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10netcdftime_11_netcdftime_5utime___init__};
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_5utime_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_unit_string = 0;
+ PyObject *__pyx_v_calendar = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_unit_string,&__pyx_n_s_calendar,0};
+ PyObject* values[3] = {0,0,0};
+ values[2] = ((PyObject *)((PyObject*)__pyx_n_s_standard));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_unit_string)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 666, __pyx_L3_error)
+ }
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_calendar);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 666, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_unit_string = values[1];
+ __pyx_v_calendar = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 666, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("netcdftime._netcdftime.utime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_5utime___init__(__pyx_self, __pyx_v_self, __pyx_v_unit_string, __pyx_v_calendar);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_5utime___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unit_string, PyObject *__pyx_v_calendar) {
+ PyObject *__pyx_v_units = NULL;
+ PyObject *__pyx_v_tzoffset = NULL;
+ PyObject *__pyx_v_msg = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ int __pyx_t_9;
+ __Pyx_RefNannySetupContext("__init__", 0);
+ __Pyx_INCREF(__pyx_v_calendar);
+
+ /* "netcdftime/_netcdftime.pyx":701
+ * units to datetime objects.
+ * """
+ * calendar = calendar.lower() # <<<<<<<<<<<<<<
+ * if calendar in _calendars:
+ * self.calendar = calendar
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __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, 701, __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;
+
+ /* "netcdftime/_netcdftime.pyx":702
+ * """
+ * calendar = calendar.lower()
+ * if calendar in _calendars: # <<<<<<<<<<<<<<
+ * self.calendar = calendar
+ * else:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_calendars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_calendar, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 702, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (__pyx_t_5) {
+
+ /* "netcdftime/_netcdftime.pyx":703
+ * calendar = calendar.lower()
+ * if calendar in _calendars:
+ * self.calendar = calendar # <<<<<<<<<<<<<<
+ * else:
+ * raise ValueError(
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_calendar, __pyx_v_calendar) < 0) __PYX_ERR(0, 703, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":702
+ * """
+ * calendar = calendar.lower()
+ * if calendar in _calendars: # <<<<<<<<<<<<<<
+ * self.calendar = calendar
+ * else:
+ */
+ goto __pyx_L3;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":705
+ * self.calendar = calendar
+ * else:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * "calendar must be one of %s, got '%s'" % (str(_calendars), calendar))
+ * units, tzoffset, self.origin = _dateparse(unit_string)
+ */
+ /*else*/ {
+
+ /* "netcdftime/_netcdftime.pyx":706
+ * else:
+ * raise ValueError(
+ * "calendar must be one of %s, got '%s'" % (str(_calendars), calendar)) # <<<<<<<<<<<<<<
+ * units, tzoffset, self.origin = _dateparse(unit_string)
+ * # real-world calendars limited to positive reference years.
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_calendars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __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 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __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, 706, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_INCREF(__pyx_v_calendar);
+ __Pyx_GIVEREF(__pyx_v_calendar);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_calendar);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_calendar_must_be_one_of_s_got_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":705
+ * self.calendar = calendar
+ * else:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * "calendar must be one of %s, got '%s'" % (str(_calendars), calendar))
+ * units, tzoffset, self.origin = _dateparse(unit_string)
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __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 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __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, 705, __pyx_L1_error)
+ }
+ __pyx_L3:;
+
+ /* "netcdftime/_netcdftime.pyx":707
+ * raise ValueError(
+ * "calendar must be one of %s, got '%s'" % (str(_calendars), calendar))
+ * units, tzoffset, self.origin = _dateparse(unit_string) # <<<<<<<<<<<<<<
+ * # real-world calendars limited to positive reference years.
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ */
+ __pyx_t_1 = __pyx_f_10netcdftime_11_netcdftime__dateparse(__pyx_v_unit_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __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;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 3)) {
+ if (size > 3) __Pyx_RaiseTooManyValuesError(3);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 707, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2);
+ } else {
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 2);
+ }
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ #else
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 707, __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, 707, __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;
+ index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ index = 2; __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), 3) < 0) __PYX_ERR(0, 707, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L5_unpacking_done;
+ __pyx_L4_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 707, __pyx_L1_error)
+ __pyx_L5_unpacking_done:;
+ }
+ __pyx_v_units = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __pyx_v_tzoffset = __pyx_t_3;
+ __pyx_t_3 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_origin, __pyx_t_6) < 0) __PYX_ERR(0, 707, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":709
+ * units, tzoffset, self.origin = _dateparse(unit_string)
+ * # real-world calendars limited to positive reference years.
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<<
+ * if self.origin.year == 0:
+ * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars'
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_julian, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 709, __pyx_L1_error)
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_5 = __pyx_t_4;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 709, __pyx_L1_error)
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_5 = __pyx_t_4;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 709, __pyx_L1_error)
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_5 = __pyx_t_4;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 709, __pyx_L1_error)
+ __pyx_t_5 = __pyx_t_4;
+ __pyx_L7_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = (__pyx_t_5 != 0);
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":710
+ * # real-world calendars limited to positive reference years.
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ * if self.origin.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_self, __pyx_n_s_origin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_year); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 710, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 710, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":711
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ * if self.origin.year == 0:
+ * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars' # <<<<<<<<<<<<<<
+ * raise ValueError(msg)
+ * elif self.origin.year < 0:
+ */
+ __Pyx_INCREF(__pyx_kp_s_zero_not_allowed_as_a_reference);
+ __pyx_v_msg = __pyx_kp_s_zero_not_allowed_as_a_reference;
+
+ /* "netcdftime/_netcdftime.pyx":712
+ * if self.origin.year == 0:
+ * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars'
+ * raise ValueError(msg) # <<<<<<<<<<<<<<
+ * elif self.origin.year < 0:
+ * msg='negative reference year in time units, must be >= 1'
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __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_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 712, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __PYX_ERR(0, 712, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":710
+ * # real-world calendars limited to positive reference years.
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ * if self.origin.year == 0: # <<<<<<<<<<<<<<
+ * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars'
+ * raise ValueError(msg)
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":713
+ * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars'
+ * raise ValueError(msg)
+ * elif self.origin.year < 0: # <<<<<<<<<<<<<<
+ * msg='negative reference year in time units, must be >= 1'
+ * raise ValueError(msg)
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_origin); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 713, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 713, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 713, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":714
+ * raise ValueError(msg)
+ * elif self.origin.year < 0:
+ * msg='negative reference year in time units, must be >= 1' # <<<<<<<<<<<<<<
+ * raise ValueError(msg)
+ * self.tzoffset = tzoffset # time zone offset in minutes
+ */
+ __Pyx_INCREF(__pyx_kp_s_negative_reference_year_in_time);
+ __pyx_v_msg = __pyx_kp_s_negative_reference_year_in_time;
+
+ /* "netcdftime/_netcdftime.pyx":715
+ * elif self.origin.year < 0:
+ * msg='negative reference year in time units, must be >= 1'
+ * raise ValueError(msg) # <<<<<<<<<<<<<<
+ * self.tzoffset = tzoffset # time zone offset in minutes
+ * self.units = units
+ */
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 715, __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_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __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, 715, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":713
+ * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars'
+ * raise ValueError(msg)
+ * elif self.origin.year < 0: # <<<<<<<<<<<<<<
+ * msg='negative reference year in time units, must be >= 1'
+ * raise ValueError(msg)
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":709
+ * units, tzoffset, self.origin = _dateparse(unit_string)
+ * # real-world calendars limited to positive reference years.
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<<
+ * if self.origin.year == 0:
+ * msg='zero not allowed as a reference year, does not exist in Julian or Gregorian calendars'
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":716
+ * msg='negative reference year in time units, must be >= 1'
+ * raise ValueError(msg)
+ * self.tzoffset = tzoffset # time zone offset in minutes # <<<<<<<<<<<<<<
+ * self.units = units
+ * self.unit_string = unit_string
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tzoffset, __pyx_v_tzoffset) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":717
+ * raise ValueError(msg)
+ * self.tzoffset = tzoffset # time zone offset in minutes
+ * self.units = units # <<<<<<<<<<<<<<
+ * self.unit_string = unit_string
+ * if self.calendar in ['noleap', '365_day'] and self.origin.month == 2 and self.origin.day == 29:
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_units_2, __pyx_v_units) < 0) __PYX_ERR(0, 717, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":718
+ * self.tzoffset = tzoffset # time zone offset in minutes
+ * self.units = units
+ * self.unit_string = unit_string # <<<<<<<<<<<<<<
+ * if self.calendar in ['noleap', '365_day'] and self.origin.month == 2 and self.origin.day == 29:
+ * raise ValueError(
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_unit_string, __pyx_v_unit_string) < 0) __PYX_ERR(0, 718, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":719
+ * self.units = units
+ * self.unit_string = unit_string
+ * if self.calendar in ['noleap', '365_day'] and self.origin.month == 2 and self.origin.day == 29: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'cannot specify a leap day as the reference time with the noleap calendar')
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_noleap, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 719, __pyx_L1_error)
+ if (!__pyx_t_9) {
+ } else {
+ __pyx_t_5 = __pyx_t_9;
+ goto __pyx_L15_bool_binop_done;
+ }
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_365_day, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __pyx_t_5 = __pyx_t_9;
+ __pyx_L15_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_9 = (__pyx_t_5 != 0);
+ if (__pyx_t_9) {
+ } else {
+ __pyx_t_4 = __pyx_t_9;
+ goto __pyx_L13_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_origin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_month); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_9) {
+ } else {
+ __pyx_t_4 = __pyx_t_9;
+ goto __pyx_L13_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_origin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_29, 29, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __pyx_t_9;
+ __pyx_L13_bool_binop_done:;
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":720
+ * self.unit_string = unit_string
+ * if self.calendar in ['noleap', '365_day'] and self.origin.month == 2 and self.origin.day == 29:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'cannot specify a leap day as the reference time with the noleap calendar')
+ * if self.calendar == '360_day' and self.origin.day > 30:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __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, 720, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":719
+ * self.units = units
+ * self.unit_string = unit_string
+ * if self.calendar in ['noleap', '365_day'] and self.origin.month == 2 and self.origin.day == 29: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'cannot specify a leap day as the reference time with the noleap calendar')
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":722
+ * raise ValueError(
+ * 'cannot specify a leap day as the reference time with the noleap calendar')
+ * if self.calendar == '360_day' and self.origin.day > 30: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'there are only 30 days in every month with the 360_day calendar')
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_360_day, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 722, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_9) {
+ } else {
+ __pyx_t_4 = __pyx_t_9;
+ goto __pyx_L19_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_origin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 722, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_int_30, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 722, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __pyx_t_9;
+ __pyx_L19_bool_binop_done:;
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":723
+ * 'cannot specify a leap day as the reference time with the noleap calendar')
+ * if self.calendar == '360_day' and self.origin.day > 30:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'there are only 30 days in every month with the 360_day calendar')
+ * if self.calendar in ['noleap', '365_day']:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __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, 723, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":722
+ * raise ValueError(
+ * 'cannot specify a leap day as the reference time with the noleap calendar')
+ * if self.calendar == '360_day' and self.origin.day > 30: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'there are only 30 days in every month with the 360_day calendar')
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":725
+ * raise ValueError(
+ * 'there are only 30 days in every month with the 360_day calendar')
+ * if self.calendar in ['noleap', '365_day']: # <<<<<<<<<<<<<<
+ * self._jd0 = _NoLeapDayFromDate(self.origin)
+ * elif self.calendar in ['all_leap', '366_day']:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_noleap, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 725, __pyx_L1_error)
+ if (!__pyx_t_9) {
+ } else {
+ __pyx_t_4 = __pyx_t_9;
+ goto __pyx_L22_bool_binop_done;
+ }
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_365_day, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 725, __pyx_L1_error)
+ __pyx_t_4 = __pyx_t_9;
+ __pyx_L22_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_9 = (__pyx_t_4 != 0);
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":726
+ * 'there are only 30 days in every month with the 360_day calendar')
+ * if self.calendar in ['noleap', '365_day']:
+ * self._jd0 = _NoLeapDayFromDate(self.origin) # <<<<<<<<<<<<<<
+ * elif self.calendar in ['all_leap', '366_day']:
+ * self._jd0 = _AllLeapFromDate(self.origin)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_origin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __pyx_f_10netcdftime_11_netcdftime__NoLeapDayFromDate(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 726, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_jd0, __pyx_t_6) < 0) __PYX_ERR(0, 726, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":725
+ * raise ValueError(
+ * 'there are only 30 days in every month with the 360_day calendar')
+ * if self.calendar in ['noleap', '365_day']: # <<<<<<<<<<<<<<
+ * self._jd0 = _NoLeapDayFromDate(self.origin)
+ * elif self.calendar in ['all_leap', '366_day']:
+ */
+ goto __pyx_L21;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":727
+ * if self.calendar in ['noleap', '365_day']:
+ * self._jd0 = _NoLeapDayFromDate(self.origin)
+ * elif self.calendar in ['all_leap', '366_day']: # <<<<<<<<<<<<<<
+ * self._jd0 = _AllLeapFromDate(self.origin)
+ * elif self.calendar == '360_day':
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_all_leap, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 727, __pyx_L1_error)
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_9 = __pyx_t_4;
+ goto __pyx_L24_bool_binop_done;
+ }
+ __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_kp_s_366_day, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 727, __pyx_L1_error)
+ __pyx_t_9 = __pyx_t_4;
+ __pyx_L24_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_4 = (__pyx_t_9 != 0);
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":728
+ * self._jd0 = _NoLeapDayFromDate(self.origin)
+ * elif self.calendar in ['all_leap', '366_day']:
+ * self._jd0 = _AllLeapFromDate(self.origin) # <<<<<<<<<<<<<<
+ * elif self.calendar == '360_day':
+ * self._jd0 = _360DayFromDate(self.origin)
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_origin); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 728, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = __pyx_f_10netcdftime_11_netcdftime__AllLeapFromDate(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_jd0, __pyx_t_1) < 0) __PYX_ERR(0, 728, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":727
+ * if self.calendar in ['noleap', '365_day']:
+ * self._jd0 = _NoLeapDayFromDate(self.origin)
+ * elif self.calendar in ['all_leap', '366_day']: # <<<<<<<<<<<<<<
+ * self._jd0 = _AllLeapFromDate(self.origin)
+ * elif self.calendar == '360_day':
+ */
+ goto __pyx_L21;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":729
+ * elif self.calendar in ['all_leap', '366_day']:
+ * self._jd0 = _AllLeapFromDate(self.origin)
+ * elif self.calendar == '360_day': # <<<<<<<<<<<<<<
+ * self._jd0 = _360DayFromDate(self.origin)
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s_360_day, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 729, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":730
+ * self._jd0 = _AllLeapFromDate(self.origin)
+ * elif self.calendar == '360_day':
+ * self._jd0 = _360DayFromDate(self.origin) # <<<<<<<<<<<<<<
+ * else:
+ * self._jd0 = JulianDayFromDate(self.origin, calendar=self.calendar)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_origin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __pyx_f_10netcdftime_11_netcdftime__360DayFromDate(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 730, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_jd0, __pyx_t_6) < 0) __PYX_ERR(0, 730, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":729
+ * elif self.calendar in ['all_leap', '366_day']:
+ * self._jd0 = _AllLeapFromDate(self.origin)
+ * elif self.calendar == '360_day': # <<<<<<<<<<<<<<
+ * self._jd0 = _360DayFromDate(self.origin)
+ * else:
+ */
+ goto __pyx_L21;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":732
+ * self._jd0 = _360DayFromDate(self.origin)
+ * else:
+ * self._jd0 = JulianDayFromDate(self.origin, calendar=self.calendar) # <<<<<<<<<<<<<<
+ *
+ * def date2num(self, date):
+ */
+ /*else*/ {
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_JulianDayFromDate); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 732, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_origin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 732, __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 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_calendar, __pyx_t_2) < 0) __PYX_ERR(0, 732, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_jd0, __pyx_t_2) < 0) __PYX_ERR(0, 732, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __pyx_L21:;
+
+ /* "netcdftime/_netcdftime.pyx":666
+ * """
+ *
+ * def __init__(self, unit_string, calendar='standard'): # <<<<<<<<<<<<<<
+ * """
+ * @param unit_string: a string of the form
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("netcdftime._netcdftime.utime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_units);
+ __Pyx_XDECREF(__pyx_v_tzoffset);
+ __Pyx_XDECREF(__pyx_v_msg);
+ __Pyx_XDECREF(__pyx_v_calendar);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":734
+ * self._jd0 = JulianDayFromDate(self.origin, calendar=self.calendar)
+ *
+ * def date2num(self, date): # <<<<<<<<<<<<<<
+ * """
+ * Returns C{time_value} in units described by L{unit_string}, using
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_5utime_3date2num(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_10netcdftime_11_netcdftime_5utime_2date2num[] = "\n Returns C{time_value} in units described by L{unit_string}, using\n the specified L{calendar}, given a 'datetime-like' object.\n\n The datetime object must represent UTC with no time-zone offset.\n If there is a time-zone offset implied by L{unit_string}, it will\n be applied to the returned numeric values.\n\n Resolution is approximately a millisecond.\n\n If C{cale [...]
+static PyMethodDef __pyx_mdef_10netcdftime_11_netcdftime_5utime_3date2num = {"date2num", (PyCFunction)__pyx_pw_10netcdftime_11_netcdftime_5utime_3date2num, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10netcdftime_11_netcdftime_5utime_2date2num};
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_5utime_3date2num(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_date = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("date2num (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_date,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_date)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("date2num", 1, 2, 2, 1); __PYX_ERR(0, 734, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date2num") < 0)) __PYX_ERR(0, 734, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_date = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("date2num", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 734, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("netcdftime._netcdftime.utime.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_5utime_2date2num(__pyx_self, __pyx_v_self, __pyx_v_date);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_5utime_2date2num(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_date) {
+ int __pyx_v_isscalar;
+ PyObject *__pyx_v_shape = NULL;
+ PyObject *__pyx_v_jdelta = NULL;
+ PyObject *__pyx_v_d = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ int __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ Py_ssize_t __pyx_t_13;
+ PyObject *(*__pyx_t_14)(PyObject *);
+ int __pyx_t_15;
+ __Pyx_RefNannySetupContext("date2num", 0);
+ __Pyx_INCREF(__pyx_v_date);
+
+ /* "netcdftime/_netcdftime.pyx":753
+ * Returns a scalar if input is a scalar, else returns a numpy array.
+ * """
+ * isscalar = False # <<<<<<<<<<<<<<
+ * try:
+ * date[0]
+ */
+ __pyx_v_isscalar = 0;
+
+ /* "netcdftime/_netcdftime.pyx":754
+ * """
+ * isscalar = False
+ * try: # <<<<<<<<<<<<<<
+ * date[0]
+ * except:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "netcdftime/_netcdftime.pyx":755
+ * isscalar = False
+ * try:
+ * date[0] # <<<<<<<<<<<<<<
+ * except:
+ * isscalar = True
+ */
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_date, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 755, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":754
+ * """
+ * isscalar = False
+ * try: # <<<<<<<<<<<<<<
+ * date[0]
+ * except:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L10_try_end;
+ __pyx_L3_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":756
+ * try:
+ * date[0]
+ * except: # <<<<<<<<<<<<<<
+ * isscalar = True
+ * if not isscalar:
+ */
+ /*except:*/ {
+ __Pyx_AddTraceback("netcdftime._netcdftime.utime.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 756, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_6);
+
+ /* "netcdftime/_netcdftime.pyx":757
+ * date[0]
+ * except:
+ * isscalar = True # <<<<<<<<<<<<<<
+ * if not isscalar:
+ * date = numpy.array(date)
+ */
+ __pyx_v_isscalar = 1;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L4_exception_handled;
+ }
+ __pyx_L5_except_error:;
+
+ /* "netcdftime/_netcdftime.pyx":754
+ * """
+ * isscalar = False
+ * try: # <<<<<<<<<<<<<<
+ * date[0]
+ * except:
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L1_error;
+ __pyx_L4_exception_handled:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ __pyx_L10_try_end:;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":758
+ * except:
+ * isscalar = True
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * date = numpy.array(date)
+ * shape = date.shape
+ */
+ __pyx_t_7 = ((!(__pyx_v_isscalar != 0)) != 0);
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":759
+ * isscalar = True
+ * if not isscalar:
+ * date = numpy.array(date) # <<<<<<<<<<<<<<
+ * shape = date.shape
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 759, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 759, __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_5, __pyx_v_date};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 759, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_date};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 759, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 759, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_date);
+ __Pyx_GIVEREF(__pyx_v_date);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_date);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 759, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF_SET(__pyx_v_date, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":760
+ * if not isscalar:
+ * date = numpy.array(date)
+ * shape = date.shape # <<<<<<<<<<<<<<
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ * if isscalar:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 760, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_shape = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":758
+ * except:
+ * isscalar = True
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * date = numpy.array(date)
+ * shape = date.shape
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":761
+ * date = numpy.array(date)
+ * shape = date.shape
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<<
+ * if isscalar:
+ * jdelta = JulianDayFromDate(date, self.calendar) - self._jd0
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 761, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_julian, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 761, __pyx_L1_error)
+ if (!__pyx_t_9) {
+ } else {
+ __pyx_t_7 = __pyx_t_9;
+ goto __pyx_L15_bool_binop_done;
+ }
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 761, __pyx_L1_error)
+ if (!__pyx_t_9) {
+ } else {
+ __pyx_t_7 = __pyx_t_9;
+ goto __pyx_L15_bool_binop_done;
+ }
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 761, __pyx_L1_error)
+ if (!__pyx_t_9) {
+ } else {
+ __pyx_t_7 = __pyx_t_9;
+ goto __pyx_L15_bool_binop_done;
+ }
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 761, __pyx_L1_error)
+ __pyx_t_7 = __pyx_t_9;
+ __pyx_L15_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_9 = (__pyx_t_7 != 0);
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":762
+ * shape = date.shape
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ * if isscalar: # <<<<<<<<<<<<<<
+ * jdelta = JulianDayFromDate(date, self.calendar) - self._jd0
+ * else:
+ */
+ __pyx_t_9 = (__pyx_v_isscalar != 0);
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":763
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ * if isscalar:
+ * jdelta = JulianDayFromDate(date, self.calendar) - self._jd0 # <<<<<<<<<<<<<<
+ * else:
+ * jdelta = JulianDayFromDate(
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_JulianDayFromDate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 763, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 763, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_date, __pyx_t_8};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 763, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_date, __pyx_t_8};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 763, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 763, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_date);
+ __Pyx_GIVEREF(__pyx_v_date);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_date);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 763, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jd0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 763, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_11 = PyNumber_Subtract(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 763, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_jdelta = __pyx_t_11;
+ __pyx_t_11 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":762
+ * shape = date.shape
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ * if isscalar: # <<<<<<<<<<<<<<
+ * jdelta = JulianDayFromDate(date, self.calendar) - self._jd0
+ * else:
+ */
+ goto __pyx_L19;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":766
+ * else:
+ * jdelta = JulianDayFromDate(
+ * date.flat, self.calendar) - self._jd0 # <<<<<<<<<<<<<<
+ * elif self.calendar in ['noleap', '365_day']:
+ * if isscalar:
+ */
+ /*else*/ {
+
+ /* "netcdftime/_netcdftime.pyx":765
+ * jdelta = JulianDayFromDate(date, self.calendar) - self._jd0
+ * else:
+ * jdelta = JulianDayFromDate( # <<<<<<<<<<<<<<
+ * date.flat, self.calendar) - self._jd0
+ * elif self.calendar in ['noleap', '365_day']:
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_JulianDayFromDate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 765, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "netcdftime/_netcdftime.pyx":766
+ * else:
+ * jdelta = JulianDayFromDate(
+ * date.flat, self.calendar) - self._jd0 # <<<<<<<<<<<<<<
+ * elif self.calendar in ['noleap', '365_day']:
+ * if isscalar:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_flat); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 766, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 766, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_8};
+ __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 765, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_8};
+ __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 765, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 765, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_10, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_10, __pyx_t_8);
+ __pyx_t_6 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 765, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jd0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 766, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_12 = PyNumber_Subtract(__pyx_t_11, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 766, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_jdelta = __pyx_t_12;
+ __pyx_t_12 = 0;
+ }
+ __pyx_L19:;
+
+ /* "netcdftime/_netcdftime.pyx":761
+ * date = numpy.array(date)
+ * shape = date.shape
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<<
+ * if isscalar:
+ * jdelta = JulianDayFromDate(date, self.calendar) - self._jd0
+ */
+ goto __pyx_L14;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":767
+ * jdelta = JulianDayFromDate(
+ * date.flat, self.calendar) - self._jd0
+ * elif self.calendar in ['noleap', '365_day']: # <<<<<<<<<<<<<<
+ * if isscalar:
+ * if date.month == 2 and date.day == 29:
+ */
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 767, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_noleap, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 767, __pyx_L1_error)
+ if (!__pyx_t_7) {
+ } else {
+ __pyx_t_9 = __pyx_t_7;
+ goto __pyx_L20_bool_binop_done;
+ }
+ __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_kp_s_365_day, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 767, __pyx_L1_error)
+ __pyx_t_9 = __pyx_t_7;
+ __pyx_L20_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_7 = (__pyx_t_9 != 0);
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":768
+ * date.flat, self.calendar) - self._jd0
+ * elif self.calendar in ['noleap', '365_day']:
+ * if isscalar: # <<<<<<<<<<<<<<
+ * if date.month == 2 and date.day == 29:
+ * raise ValueError(
+ */
+ __pyx_t_7 = (__pyx_v_isscalar != 0);
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":769
+ * elif self.calendar in ['noleap', '365_day']:
+ * if isscalar:
+ * if date.month == 2 and date.day == 29: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'there is no leap day in the noleap calendar')
+ */
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_month); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 769, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_12, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 769, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 769, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_9) {
+ } else {
+ __pyx_t_7 = __pyx_t_9;
+ goto __pyx_L24_bool_binop_done;
+ }
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_day); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 769, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_12 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_29, 29, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 769, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 769, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_7 = __pyx_t_9;
+ __pyx_L24_bool_binop_done:;
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":770
+ * if isscalar:
+ * if date.month == 2 and date.day == 29:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'there is no leap day in the noleap calendar')
+ * jdelta = _NoLeapDayFromDate(date) - self._jd0
+ */
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 770, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_Raise(__pyx_t_12, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __PYX_ERR(0, 770, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":769
+ * elif self.calendar in ['noleap', '365_day']:
+ * if isscalar:
+ * if date.month == 2 and date.day == 29: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'there is no leap day in the noleap calendar')
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":772
+ * raise ValueError(
+ * 'there is no leap day in the noleap calendar')
+ * jdelta = _NoLeapDayFromDate(date) - self._jd0 # <<<<<<<<<<<<<<
+ * else:
+ * jdelta = []
+ */
+ __pyx_t_12 = __pyx_f_10netcdftime_11_netcdftime__NoLeapDayFromDate(__pyx_v_date); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 772, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jd0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 772, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_11 = PyNumber_Subtract(__pyx_t_12, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 772, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_jdelta = __pyx_t_11;
+ __pyx_t_11 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":768
+ * date.flat, self.calendar) - self._jd0
+ * elif self.calendar in ['noleap', '365_day']:
+ * if isscalar: # <<<<<<<<<<<<<<
+ * if date.month == 2 and date.day == 29:
+ * raise ValueError(
+ */
+ goto __pyx_L22;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":774
+ * jdelta = _NoLeapDayFromDate(date) - self._jd0
+ * else:
+ * jdelta = [] # <<<<<<<<<<<<<<
+ * for d in date.flat:
+ * if d.month == 2 and d.day == 29:
+ */
+ /*else*/ {
+ __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 774, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_v_jdelta = __pyx_t_11;
+ __pyx_t_11 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":775
+ * else:
+ * jdelta = []
+ * for d in date.flat: # <<<<<<<<<<<<<<
+ * if d.month == 2 and d.day == 29:
+ * raise ValueError(
+ */
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_flat); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 775, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
+ __pyx_t_4 = __pyx_t_11; __Pyx_INCREF(__pyx_t_4); __pyx_t_13 = 0;
+ __pyx_t_14 = NULL;
+ } else {
+ __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_14 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 775, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_14)) {
+ if (likely(PyList_CheckExact(__pyx_t_4))) {
+ if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_11 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_11); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 775, __pyx_L1_error)
+ #else
+ __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 775, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ #endif
+ } else {
+ if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_11); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 775, __pyx_L1_error)
+ #else
+ __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 775, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ #endif
+ }
+ } else {
+ __pyx_t_11 = __pyx_t_14(__pyx_t_4);
+ if (unlikely(!__pyx_t_11)) {
+ 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, 775, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_11);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_11);
+ __pyx_t_11 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":776
+ * jdelta = []
+ * for d in date.flat:
+ * if d.month == 2 and d.day == 29: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'there is no leap day in the noleap calendar')
+ */
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_month); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 776, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyInt_EqObjC(__pyx_t_11, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 776, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 776, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ if (__pyx_t_9) {
+ } else {
+ __pyx_t_7 = __pyx_t_9;
+ goto __pyx_L29_bool_binop_done;
+ }
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_day); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 776, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_11 = __Pyx_PyInt_EqObjC(__pyx_t_12, __pyx_int_29, 29, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 776, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 776, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_7 = __pyx_t_9;
+ __pyx_L29_bool_binop_done:;
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":777
+ * for d in date.flat:
+ * if d.month == 2 and d.day == 29:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'there is no leap day in the noleap calendar')
+ * jdelta.append(_NoLeapDayFromDate(d) - self._jd0)
+ */
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_Raise(__pyx_t_11, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __PYX_ERR(0, 777, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":776
+ * jdelta = []
+ * for d in date.flat:
+ * if d.month == 2 and d.day == 29: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'there is no leap day in the noleap calendar')
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":779
+ * raise ValueError(
+ * 'there is no leap day in the noleap calendar')
+ * jdelta.append(_NoLeapDayFromDate(d) - self._jd0) # <<<<<<<<<<<<<<
+ * elif self.calendar in ['all_leap', '366_day']:
+ * if isscalar:
+ */
+ __pyx_t_11 = __pyx_f_10netcdftime_11_netcdftime__NoLeapDayFromDate(__pyx_v_d); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 779, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jd0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 779, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_8 = PyNumber_Subtract(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 779, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_jdelta, __pyx_t_8); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 779, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":775
+ * else:
+ * jdelta = []
+ * for d in date.flat: # <<<<<<<<<<<<<<
+ * if d.month == 2 and d.day == 29:
+ * raise ValueError(
+ */
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __pyx_L22:;
+
+ /* "netcdftime/_netcdftime.pyx":767
+ * jdelta = JulianDayFromDate(
+ * date.flat, self.calendar) - self._jd0
+ * elif self.calendar in ['noleap', '365_day']: # <<<<<<<<<<<<<<
+ * if isscalar:
+ * if date.month == 2 and date.day == 29:
+ */
+ goto __pyx_L14;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":780
+ * 'there is no leap day in the noleap calendar')
+ * jdelta.append(_NoLeapDayFromDate(d) - self._jd0)
+ * elif self.calendar in ['all_leap', '366_day']: # <<<<<<<<<<<<<<
+ * if isscalar:
+ * jdelta = _AllLeapFromDate(date) - self._jd0
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 780, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_all_leap, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 780, __pyx_L1_error)
+ if (!__pyx_t_9) {
+ } else {
+ __pyx_t_7 = __pyx_t_9;
+ goto __pyx_L31_bool_binop_done;
+ }
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_kp_s_366_day, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 780, __pyx_L1_error)
+ __pyx_t_7 = __pyx_t_9;
+ __pyx_L31_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_9 = (__pyx_t_7 != 0);
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":781
+ * jdelta.append(_NoLeapDayFromDate(d) - self._jd0)
+ * elif self.calendar in ['all_leap', '366_day']:
+ * if isscalar: # <<<<<<<<<<<<<<
+ * jdelta = _AllLeapFromDate(date) - self._jd0
+ * else:
+ */
+ __pyx_t_9 = (__pyx_v_isscalar != 0);
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":782
+ * elif self.calendar in ['all_leap', '366_day']:
+ * if isscalar:
+ * jdelta = _AllLeapFromDate(date) - self._jd0 # <<<<<<<<<<<<<<
+ * else:
+ * jdelta = [_AllLeapFromDate(d) - self._jd0 for d in date.flat]
+ */
+ __pyx_t_4 = __pyx_f_10netcdftime_11_netcdftime__AllLeapFromDate(__pyx_v_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 782, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jd0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 782, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_12 = PyNumber_Subtract(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 782, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_v_jdelta = __pyx_t_12;
+ __pyx_t_12 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":781
+ * jdelta.append(_NoLeapDayFromDate(d) - self._jd0)
+ * elif self.calendar in ['all_leap', '366_day']:
+ * if isscalar: # <<<<<<<<<<<<<<
+ * jdelta = _AllLeapFromDate(date) - self._jd0
+ * else:
+ */
+ goto __pyx_L33;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":784
+ * jdelta = _AllLeapFromDate(date) - self._jd0
+ * else:
+ * jdelta = [_AllLeapFromDate(d) - self._jd0 for d in date.flat] # <<<<<<<<<<<<<<
+ * elif self.calendar == '360_day':
+ * if isscalar:
+ */
+ /*else*/ {
+ __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_flat); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
+ __pyx_t_4 = __pyx_t_8; __Pyx_INCREF(__pyx_t_4); __pyx_t_13 = 0;
+ __pyx_t_14 = NULL;
+ } else {
+ __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_14 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 784, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_14)) {
+ if (likely(PyList_CheckExact(__pyx_t_4))) {
+ if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_8); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 784, __pyx_L1_error)
+ #else
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ } else {
+ if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_8); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 784, __pyx_L1_error)
+ #else
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_4, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ }
+ } else {
+ __pyx_t_8 = __pyx_t_14(__pyx_t_4);
+ if (unlikely(!__pyx_t_8)) {
+ 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, 784, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_8 = __pyx_f_10netcdftime_11_netcdftime__AllLeapFromDate(__pyx_v_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jd0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_6 = PyNumber_Subtract(__pyx_t_8, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_12, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_jdelta = __pyx_t_12;
+ __pyx_t_12 = 0;
+ }
+ __pyx_L33:;
+
+ /* "netcdftime/_netcdftime.pyx":780
+ * 'there is no leap day in the noleap calendar')
+ * jdelta.append(_NoLeapDayFromDate(d) - self._jd0)
+ * elif self.calendar in ['all_leap', '366_day']: # <<<<<<<<<<<<<<
+ * if isscalar:
+ * jdelta = _AllLeapFromDate(date) - self._jd0
+ */
+ goto __pyx_L14;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":785
+ * else:
+ * jdelta = [_AllLeapFromDate(d) - self._jd0 for d in date.flat]
+ * elif self.calendar == '360_day': # <<<<<<<<<<<<<<
+ * if isscalar:
+ * if date.day > 30:
+ */
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 785, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_kp_s_360_day, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 785, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":786
+ * jdelta = [_AllLeapFromDate(d) - self._jd0 for d in date.flat]
+ * elif self.calendar == '360_day':
+ * if isscalar: # <<<<<<<<<<<<<<
+ * if date.day > 30:
+ * raise ValueError(
+ */
+ __pyx_t_9 = (__pyx_v_isscalar != 0);
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":787
+ * elif self.calendar == '360_day':
+ * if isscalar:
+ * if date.day > 30: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'there are only 30 days in every month with the 360_day calendar')
+ */
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_day); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 787, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_12, __pyx_int_30, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 787, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":788
+ * if isscalar:
+ * if date.day > 30:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'there are only 30 days in every month with the 360_day calendar')
+ * jdelta = _360DayFromDate(date) - self._jd0
+ */
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 788, __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, 788, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":787
+ * elif self.calendar == '360_day':
+ * if isscalar:
+ * if date.day > 30: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'there are only 30 days in every month with the 360_day calendar')
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":790
+ * raise ValueError(
+ * 'there are only 30 days in every month with the 360_day calendar')
+ * jdelta = _360DayFromDate(date) - self._jd0 # <<<<<<<<<<<<<<
+ * else:
+ * jdelta = []
+ */
+ __pyx_t_4 = __pyx_f_10netcdftime_11_netcdftime__360DayFromDate(__pyx_v_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 790, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jd0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 790, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_6 = PyNumber_Subtract(__pyx_t_4, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 790, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_v_jdelta = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":786
+ * jdelta = [_AllLeapFromDate(d) - self._jd0 for d in date.flat]
+ * elif self.calendar == '360_day':
+ * if isscalar: # <<<<<<<<<<<<<<
+ * if date.day > 30:
+ * raise ValueError(
+ */
+ goto __pyx_L36;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":792
+ * jdelta = _360DayFromDate(date) - self._jd0
+ * else:
+ * jdelta = [] # <<<<<<<<<<<<<<
+ * for d in date.flat:
+ * if d.day > 30:
+ */
+ /*else*/ {
+ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 792, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_jdelta = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":793
+ * else:
+ * jdelta = []
+ * for d in date.flat: # <<<<<<<<<<<<<<
+ * if d.day > 30:
+ * raise ValueError(
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_flat); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
+ __pyx_t_12 = __pyx_t_6; __Pyx_INCREF(__pyx_t_12); __pyx_t_13 = 0;
+ __pyx_t_14 = NULL;
+ } else {
+ __pyx_t_13 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 793, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_14 = Py_TYPE(__pyx_t_12)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 793, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_14)) {
+ if (likely(PyList_CheckExact(__pyx_t_12))) {
+ if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_12)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 793, __pyx_L1_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_12, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ } else {
+ if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_13); __Pyx_INCREF(__pyx_t_6); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 793, __pyx_L1_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_12, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ }
+ } else {
+ __pyx_t_6 = __pyx_t_14(__pyx_t_12);
+ if (unlikely(!__pyx_t_6)) {
+ 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, 793, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":794
+ * jdelta = []
+ * for d in date.flat:
+ * if d.day > 30: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'there are only 30 days in every month with the 360_day calendar')
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 794, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_int_30, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 794, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":795
+ * for d in date.flat:
+ * if d.day > 30:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'there are only 30 days in every month with the 360_day calendar')
+ * jdelta.append(_360DayFromDate(d) - self._jd0)
+ */
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 795, __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, 795, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":794
+ * jdelta = []
+ * for d in date.flat:
+ * if d.day > 30: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'there are only 30 days in every month with the 360_day calendar')
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":797
+ * raise ValueError(
+ * 'there are only 30 days in every month with the 360_day calendar')
+ * jdelta.append(_360DayFromDate(d) - self._jd0) # <<<<<<<<<<<<<<
+ * if not isscalar:
+ * jdelta = numpy.array(jdelta)
+ */
+ __pyx_t_4 = __pyx_f_10netcdftime_11_netcdftime__360DayFromDate(__pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 797, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jd0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 797, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_11 = PyNumber_Subtract(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 797, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_jdelta, __pyx_t_11); if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 797, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":793
+ * else:
+ * jdelta = []
+ * for d in date.flat: # <<<<<<<<<<<<<<
+ * if d.day > 30:
+ * raise ValueError(
+ */
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __pyx_L36:;
+
+ /* "netcdftime/_netcdftime.pyx":785
+ * else:
+ * jdelta = [_AllLeapFromDate(d) - self._jd0 for d in date.flat]
+ * elif self.calendar == '360_day': # <<<<<<<<<<<<<<
+ * if isscalar:
+ * if date.day > 30:
+ */
+ }
+ __pyx_L14:;
+
+ /* "netcdftime/_netcdftime.pyx":798
+ * 'there are only 30 days in every month with the 360_day calendar')
+ * jdelta.append(_360DayFromDate(d) - self._jd0)
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * jdelta = numpy.array(jdelta)
+ * # convert to desired units, subtract time zone offset.
+ */
+ __pyx_t_9 = ((!(__pyx_v_isscalar != 0)) != 0);
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":799
+ * jdelta.append(_360DayFromDate(d) - self._jd0)
+ * if not isscalar:
+ * jdelta = numpy.array(jdelta) # <<<<<<<<<<<<<<
+ * # convert to desired units, subtract time zone offset.
+ * if self.units in microsec_units:
+ */
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ if (unlikely(!__pyx_v_jdelta)) { __Pyx_RaiseUnboundLocalError("jdelta"); __PYX_ERR(0, 799, __pyx_L1_error) }
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_11) {
+ __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_jdelta); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_jdelta};
+ __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_jdelta};
+ __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ __Pyx_INCREF(__pyx_v_jdelta);
+ __Pyx_GIVEREF(__pyx_v_jdelta);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_jdelta);
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_jdelta, __pyx_t_12);
+ __pyx_t_12 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":798
+ * 'there are only 30 days in every month with the 360_day calendar')
+ * jdelta.append(_360DayFromDate(d) - self._jd0)
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * jdelta = numpy.array(jdelta)
+ * # convert to desired units, subtract time zone offset.
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":801
+ * jdelta = numpy.array(jdelta)
+ * # convert to desired units, subtract time zone offset.
+ * if self.units in microsec_units: # <<<<<<<<<<<<<<
+ * jdelta = jdelta * 86400. * 1.e6 - self.tzoffset * 60. * 1.e6
+ * elif self.units in millisec_units:
+ */
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 801, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_microsec_units); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 801, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_12, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 801, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_7 = (__pyx_t_9 != 0);
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":802
+ * # convert to desired units, subtract time zone offset.
+ * if self.units in microsec_units:
+ * jdelta = jdelta * 86400. * 1.e6 - self.tzoffset * 60. * 1.e6 # <<<<<<<<<<<<<<
+ * elif self.units in millisec_units:
+ * jdelta = jdelta * 86400. * 1.e3 - self.tzoffset * 60. * 1.e3
+ */
+ if (unlikely(!__pyx_v_jdelta)) { __Pyx_RaiseUnboundLocalError("jdelta"); __PYX_ERR(0, 802, __pyx_L1_error) }
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_jdelta, __pyx_float_86400_); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_12 = PyNumber_Multiply(__pyx_t_6, __pyx_float_1_e6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 802, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzoffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = PyNumber_Multiply(__pyx_t_6, __pyx_float_60_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 802, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Multiply(__pyx_t_4, __pyx_float_1_e6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Subtract(__pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 802, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_jdelta, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":801
+ * jdelta = numpy.array(jdelta)
+ * # convert to desired units, subtract time zone offset.
+ * if self.units in microsec_units: # <<<<<<<<<<<<<<
+ * jdelta = jdelta * 86400. * 1.e6 - self.tzoffset * 60. * 1.e6
+ * elif self.units in millisec_units:
+ */
+ goto __pyx_L42;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":803
+ * if self.units in microsec_units:
+ * jdelta = jdelta * 86400. * 1.e6 - self.tzoffset * 60. * 1.e6
+ * elif self.units in millisec_units: # <<<<<<<<<<<<<<
+ * jdelta = jdelta * 86400. * 1.e3 - self.tzoffset * 60. * 1.e3
+ * elif self.units in sec_units:
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 803, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_millisec_units); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 803, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_9 = (__pyx_t_7 != 0);
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":804
+ * jdelta = jdelta * 86400. * 1.e6 - self.tzoffset * 60. * 1.e6
+ * elif self.units in millisec_units:
+ * jdelta = jdelta * 86400. * 1.e3 - self.tzoffset * 60. * 1.e3 # <<<<<<<<<<<<<<
+ * elif self.units in sec_units:
+ * jdelta = jdelta * 86400. - self.tzoffset * 60.
+ */
+ if (unlikely(!__pyx_v_jdelta)) { __Pyx_RaiseUnboundLocalError("jdelta"); __PYX_ERR(0, 804, __pyx_L1_error) }
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_jdelta, __pyx_float_86400_); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = PyNumber_Multiply(__pyx_t_6, __pyx_float_1_e3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 804, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzoffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_12 = PyNumber_Multiply(__pyx_t_6, __pyx_float_60_); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 804, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Multiply(__pyx_t_12, __pyx_float_1_e3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = PyNumber_Subtract(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 804, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_jdelta, __pyx_t_12);
+ __pyx_t_12 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":803
+ * if self.units in microsec_units:
+ * jdelta = jdelta * 86400. * 1.e6 - self.tzoffset * 60. * 1.e6
+ * elif self.units in millisec_units: # <<<<<<<<<<<<<<
+ * jdelta = jdelta * 86400. * 1.e3 - self.tzoffset * 60. * 1.e3
+ * elif self.units in sec_units:
+ */
+ goto __pyx_L42;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":805
+ * elif self.units in millisec_units:
+ * jdelta = jdelta * 86400. * 1.e3 - self.tzoffset * 60. * 1.e3
+ * elif self.units in sec_units: # <<<<<<<<<<<<<<
+ * jdelta = jdelta * 86400. - self.tzoffset * 60.
+ * elif self.units in min_units:
+ */
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 805, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sec_units); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 805, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_12, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 805, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_7 = (__pyx_t_9 != 0);
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":806
+ * jdelta = jdelta * 86400. * 1.e3 - self.tzoffset * 60. * 1.e3
+ * elif self.units in sec_units:
+ * jdelta = jdelta * 86400. - self.tzoffset * 60. # <<<<<<<<<<<<<<
+ * elif self.units in min_units:
+ * jdelta = jdelta * 1440. - self.tzoffset
+ */
+ if (unlikely(!__pyx_v_jdelta)) { __Pyx_RaiseUnboundLocalError("jdelta"); __PYX_ERR(0, 806, __pyx_L1_error) }
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_jdelta, __pyx_float_86400_); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 806, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzoffset); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 806, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_4 = PyNumber_Multiply(__pyx_t_12, __pyx_float_60_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 806, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = PyNumber_Subtract(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 806, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_jdelta, __pyx_t_12);
+ __pyx_t_12 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":805
+ * elif self.units in millisec_units:
+ * jdelta = jdelta * 86400. * 1.e3 - self.tzoffset * 60. * 1.e3
+ * elif self.units in sec_units: # <<<<<<<<<<<<<<
+ * jdelta = jdelta * 86400. - self.tzoffset * 60.
+ * elif self.units in min_units:
+ */
+ goto __pyx_L42;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":807
+ * elif self.units in sec_units:
+ * jdelta = jdelta * 86400. - self.tzoffset * 60.
+ * elif self.units in min_units: # <<<<<<<<<<<<<<
+ * jdelta = jdelta * 1440. - self.tzoffset
+ * elif self.units in hr_units:
+ */
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 807, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_min_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 807, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_12, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 807, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_9 = (__pyx_t_7 != 0);
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":808
+ * jdelta = jdelta * 86400. - self.tzoffset * 60.
+ * elif self.units in min_units:
+ * jdelta = jdelta * 1440. - self.tzoffset # <<<<<<<<<<<<<<
+ * elif self.units in hr_units:
+ * jdelta = jdelta * 24. - self.tzoffset / 60.
+ */
+ if (unlikely(!__pyx_v_jdelta)) { __Pyx_RaiseUnboundLocalError("jdelta"); __PYX_ERR(0, 808, __pyx_L1_error) }
+ __pyx_t_4 = PyNumber_Multiply(__pyx_v_jdelta, __pyx_float_1440_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 808, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzoffset); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 808, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_6 = PyNumber_Subtract(__pyx_t_4, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 808, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_jdelta, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":807
+ * elif self.units in sec_units:
+ * jdelta = jdelta * 86400. - self.tzoffset * 60.
+ * elif self.units in min_units: # <<<<<<<<<<<<<<
+ * jdelta = jdelta * 1440. - self.tzoffset
+ * elif self.units in hr_units:
+ */
+ goto __pyx_L42;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":809
+ * elif self.units in min_units:
+ * jdelta = jdelta * 1440. - self.tzoffset
+ * elif self.units in hr_units: # <<<<<<<<<<<<<<
+ * jdelta = jdelta * 24. - self.tzoffset / 60.
+ * elif self.units in day_units:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 809, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_hr_units); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 809, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_t_12, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 809, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_7 = (__pyx_t_9 != 0);
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":810
+ * jdelta = jdelta * 1440. - self.tzoffset
+ * elif self.units in hr_units:
+ * jdelta = jdelta * 24. - self.tzoffset / 60. # <<<<<<<<<<<<<<
+ * elif self.units in day_units:
+ * jdelta = jdelta - self.tzoffset / 1440.
+ */
+ if (unlikely(!__pyx_v_jdelta)) { __Pyx_RaiseUnboundLocalError("jdelta"); __PYX_ERR(0, 810, __pyx_L1_error) }
+ __pyx_t_12 = PyNumber_Multiply(__pyx_v_jdelta, __pyx_float_24_); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 810, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzoffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyFloat_DivideObjC(__pyx_t_6, __pyx_float_60_, 60., 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 810, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Subtract(__pyx_t_12, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_jdelta, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":809
+ * elif self.units in min_units:
+ * jdelta = jdelta * 1440. - self.tzoffset
+ * elif self.units in hr_units: # <<<<<<<<<<<<<<
+ * jdelta = jdelta * 24. - self.tzoffset / 60.
+ * elif self.units in day_units:
+ */
+ goto __pyx_L42;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":811
+ * elif self.units in hr_units:
+ * jdelta = jdelta * 24. - self.tzoffset / 60.
+ * elif self.units in day_units: # <<<<<<<<<<<<<<
+ * jdelta = jdelta - self.tzoffset / 1440.
+ * else:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_day_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 811, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_9 = (__pyx_t_7 != 0);
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":812
+ * jdelta = jdelta * 24. - self.tzoffset / 60.
+ * elif self.units in day_units:
+ * jdelta = jdelta - self.tzoffset / 1440. # <<<<<<<<<<<<<<
+ * else:
+ * raise ValueError('unsupported time units')
+ */
+ if (unlikely(!__pyx_v_jdelta)) { __Pyx_RaiseUnboundLocalError("jdelta"); __PYX_ERR(0, 812, __pyx_L1_error) }
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzoffset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 812, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_PyFloat_DivideObjC(__pyx_t_4, __pyx_float_1440_, 1440., 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 812, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Subtract(__pyx_v_jdelta, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 812, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_jdelta, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":811
+ * elif self.units in hr_units:
+ * jdelta = jdelta * 24. - self.tzoffset / 60.
+ * elif self.units in day_units: # <<<<<<<<<<<<<<
+ * jdelta = jdelta - self.tzoffset / 1440.
+ * else:
+ */
+ goto __pyx_L42;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":814
+ * jdelta = jdelta - self.tzoffset / 1440.
+ * else:
+ * raise ValueError('unsupported time units') # <<<<<<<<<<<<<<
+ * if isscalar:
+ * return jdelta
+ */
+ /*else*/ {
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 814, __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, 814, __pyx_L1_error)
+ }
+ __pyx_L42:;
+
+ /* "netcdftime/_netcdftime.pyx":815
+ * else:
+ * raise ValueError('unsupported time units')
+ * if isscalar: # <<<<<<<<<<<<<<
+ * return jdelta
+ * else:
+ */
+ __pyx_t_9 = (__pyx_v_isscalar != 0);
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":816
+ * raise ValueError('unsupported time units')
+ * if isscalar:
+ * return jdelta # <<<<<<<<<<<<<<
+ * else:
+ * return numpy.reshape(jdelta, shape)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_jdelta);
+ __pyx_r = __pyx_v_jdelta;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":815
+ * else:
+ * raise ValueError('unsupported time units')
+ * if isscalar: # <<<<<<<<<<<<<<
+ * return jdelta
+ * else:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":818
+ * return jdelta
+ * else:
+ * return numpy.reshape(jdelta, shape) # <<<<<<<<<<<<<<
+ *
+ * def num2date(self, time_value):
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 818, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_reshape); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 818, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (unlikely(!__pyx_v_shape)) { __Pyx_RaiseUnboundLocalError("shape"); __PYX_ERR(0, 818, __pyx_L1_error) }
+ __pyx_t_6 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_jdelta, __pyx_v_shape};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 818, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_jdelta, __pyx_v_shape};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 818, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 818, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_jdelta);
+ __Pyx_GIVEREF(__pyx_v_jdelta);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_jdelta);
+ __Pyx_INCREF(__pyx_v_shape);
+ __Pyx_GIVEREF(__pyx_v_shape);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v_shape);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 818, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":734
+ * self._jd0 = JulianDayFromDate(self.origin, calendar=self.calendar)
+ *
+ * def date2num(self, date): # <<<<<<<<<<<<<<
+ * """
+ * Returns C{time_value} in units described by L{unit_string}, using
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_AddTraceback("netcdftime._netcdftime.utime.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_shape);
+ __Pyx_XDECREF(__pyx_v_jdelta);
+ __Pyx_XDECREF(__pyx_v_d);
+ __Pyx_XDECREF(__pyx_v_date);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":820
+ * return numpy.reshape(jdelta, shape)
+ *
+ * def num2date(self, time_value): # <<<<<<<<<<<<<<
+ * """
+ * Return a 'datetime-like' object given a C{time_value} in units
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_5utime_5num2date(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_10netcdftime_11_netcdftime_5utime_4num2date[] = "\n Return a 'datetime-like' object given a C{time_value} in units\n described by L{unit_string}, using L{calendar}.\n\n dates are in UTC with no offset, even if L{unit_string} contains\n a time zone offset from UTC.\n\n Resolution is approximately a millisecond.\n\n Works for scalars, sequences and numpy arrays.\n Returns a scalar if input is a scalar, else returns a nu [...]
+static PyMethodDef __pyx_mdef_10netcdftime_11_netcdftime_5utime_5num2date = {"num2date", (PyCFunction)__pyx_pw_10netcdftime_11_netcdftime_5utime_5num2date, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10netcdftime_11_netcdftime_5utime_4num2date};
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_5utime_5num2date(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_time_value = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("num2date (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_time_value,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time_value)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("num2date", 1, 2, 2, 1); __PYX_ERR(0, 820, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "num2date") < 0)) __PYX_ERR(0, 820, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_time_value = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("num2date", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 820, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("netcdftime._netcdftime.utime.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_5utime_4num2date(__pyx_self, __pyx_v_self, __pyx_v_time_value);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_5utime_4num2date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_time_value) {
+ int __pyx_v_isscalar;
+ int __pyx_v_ismasked;
+ PyObject *__pyx_v_mask = NULL;
+ PyObject *__pyx_v_shape = NULL;
+ PyObject *__pyx_v_jdelta = NULL;
+ PyObject *__pyx_v_jd = NULL;
+ PyObject *__pyx_v_date = NULL;
+ PyObject *__pyx_v_j = NULL;
+ PyObject *__pyx_v_m = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ int __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ int __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
+ Py_ssize_t __pyx_t_13;
+ PyObject *(*__pyx_t_14)(PyObject *);
+ PyObject *(*__pyx_t_15)(PyObject *);
+ int __pyx_t_16;
+ __Pyx_RefNannySetupContext("num2date", 0);
+ __Pyx_INCREF(__pyx_v_time_value);
+
+ /* "netcdftime/_netcdftime.pyx":842
+ * do not exist in any real world calendar.
+ * """
+ * isscalar = False # <<<<<<<<<<<<<<
+ * try:
+ * time_value[0]
+ */
+ __pyx_v_isscalar = 0;
+
+ /* "netcdftime/_netcdftime.pyx":843
+ * """
+ * isscalar = False
+ * try: # <<<<<<<<<<<<<<
+ * time_value[0]
+ * except:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "netcdftime/_netcdftime.pyx":844
+ * isscalar = False
+ * try:
+ * time_value[0] # <<<<<<<<<<<<<<
+ * except:
+ * isscalar = True
+ */
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_time_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 844, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":843
+ * """
+ * isscalar = False
+ * try: # <<<<<<<<<<<<<<
+ * time_value[0]
+ * except:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L10_try_end;
+ __pyx_L3_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":845
+ * try:
+ * time_value[0]
+ * except: # <<<<<<<<<<<<<<
+ * isscalar = True
+ * ismasked = False
+ */
+ /*except:*/ {
+ __Pyx_AddTraceback("netcdftime._netcdftime.utime.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 845, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_6);
+
+ /* "netcdftime/_netcdftime.pyx":846
+ * time_value[0]
+ * except:
+ * isscalar = True # <<<<<<<<<<<<<<
+ * ismasked = False
+ * if hasattr(time_value, 'mask'):
+ */
+ __pyx_v_isscalar = 1;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L4_exception_handled;
+ }
+ __pyx_L5_except_error:;
+
+ /* "netcdftime/_netcdftime.pyx":843
+ * """
+ * isscalar = False
+ * try: # <<<<<<<<<<<<<<
+ * time_value[0]
+ * except:
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L1_error;
+ __pyx_L4_exception_handled:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ __pyx_L10_try_end:;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":847
+ * except:
+ * isscalar = True
+ * ismasked = False # <<<<<<<<<<<<<<
+ * if hasattr(time_value, 'mask'):
+ * mask = time_value.mask
+ */
+ __pyx_v_ismasked = 0;
+
+ /* "netcdftime/_netcdftime.pyx":848
+ * isscalar = True
+ * ismasked = False
+ * if hasattr(time_value, 'mask'): # <<<<<<<<<<<<<<
+ * mask = time_value.mask
+ * ismasked = True
+ */
+ __pyx_t_7 = PyObject_HasAttr(__pyx_v_time_value, __pyx_n_s_mask); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 848, __pyx_L1_error)
+ __pyx_t_8 = (__pyx_t_7 != 0);
+ if (__pyx_t_8) {
+
+ /* "netcdftime/_netcdftime.pyx":849
+ * ismasked = False
+ * if hasattr(time_value, 'mask'):
+ * mask = time_value.mask # <<<<<<<<<<<<<<
+ * ismasked = True
+ * if not isscalar:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_time_value, __pyx_n_s_mask); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 849, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_mask = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":850
+ * if hasattr(time_value, 'mask'):
+ * mask = time_value.mask
+ * ismasked = True # <<<<<<<<<<<<<<
+ * if not isscalar:
+ * time_value = numpy.array(time_value, dtype='d')
+ */
+ __pyx_v_ismasked = 1;
+
+ /* "netcdftime/_netcdftime.pyx":848
+ * isscalar = True
+ * ismasked = False
+ * if hasattr(time_value, 'mask'): # <<<<<<<<<<<<<<
+ * mask = time_value.mask
+ * ismasked = True
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":851
+ * mask = time_value.mask
+ * ismasked = True
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * time_value = numpy.array(time_value, dtype='d')
+ * shape = time_value.shape
+ */
+ __pyx_t_8 = ((!(__pyx_v_isscalar != 0)) != 0);
+ if (__pyx_t_8) {
+
+ /* "netcdftime/_netcdftime.pyx":852
+ * ismasked = True
+ * if not isscalar:
+ * time_value = numpy.array(time_value, dtype='d') # <<<<<<<<<<<<<<
+ * shape = time_value.shape
+ * # convert to desired units, add time zone offset.
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 852, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 852, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 852, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v_time_value);
+ __Pyx_GIVEREF(__pyx_v_time_value);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_time_value);
+ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 852, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_n_s_d) < 0) __PYX_ERR(0, 852, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 852, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF_SET(__pyx_v_time_value, __pyx_t_9);
+ __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":853
+ * if not isscalar:
+ * time_value = numpy.array(time_value, dtype='d')
+ * shape = time_value.shape # <<<<<<<<<<<<<<
+ * # convert to desired units, add time zone offset.
+ * if self.units in microsec_units:
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_time_value, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 853, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_v_shape = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":851
+ * mask = time_value.mask
+ * ismasked = True
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * time_value = numpy.array(time_value, dtype='d')
+ * shape = time_value.shape
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":855
+ * shape = time_value.shape
+ * # convert to desired units, add time zone offset.
+ * if self.units in microsec_units: # <<<<<<<<<<<<<<
+ * jdelta = time_value / 86400000000. + self.tzoffset / 1440.
+ * elif self.units in millisec_units:
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 855, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_microsec_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_9, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 855, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_7 = (__pyx_t_8 != 0);
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":856
+ * # convert to desired units, add time zone offset.
+ * if self.units in microsec_units:
+ * jdelta = time_value / 86400000000. + self.tzoffset / 1440. # <<<<<<<<<<<<<<
+ * elif self.units in millisec_units:
+ * jdelta = time_value / 86400000. + self.tzoffset / 1440.
+ */
+ __pyx_t_4 = __Pyx_PyFloat_DivideObjC(__pyx_v_time_value, __pyx_float_86400000000_, 86400000000., 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 856, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzoffset); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 856, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_6 = __Pyx_PyFloat_DivideObjC(__pyx_t_9, __pyx_float_1440_, 1440., 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 856, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyNumber_Add(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 856, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_jdelta = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":855
+ * shape = time_value.shape
+ * # convert to desired units, add time zone offset.
+ * if self.units in microsec_units: # <<<<<<<<<<<<<<
+ * jdelta = time_value / 86400000000. + self.tzoffset / 1440.
+ * elif self.units in millisec_units:
+ */
+ goto __pyx_L15;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":857
+ * if self.units in microsec_units:
+ * jdelta = time_value / 86400000000. + self.tzoffset / 1440.
+ * elif self.units in millisec_units: # <<<<<<<<<<<<<<
+ * jdelta = time_value / 86400000. + self.tzoffset / 1440.
+ * elif self.units in sec_units:
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 857, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_millisec_units); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 857, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_9, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 857, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_8 = (__pyx_t_7 != 0);
+ if (__pyx_t_8) {
+
+ /* "netcdftime/_netcdftime.pyx":858
+ * jdelta = time_value / 86400000000. + self.tzoffset / 1440.
+ * elif self.units in millisec_units:
+ * jdelta = time_value / 86400000. + self.tzoffset / 1440. # <<<<<<<<<<<<<<
+ * elif self.units in sec_units:
+ * jdelta = time_value / 86400. + self.tzoffset / 1440.
+ */
+ __pyx_t_6 = __Pyx_PyFloat_DivideObjC(__pyx_v_time_value, __pyx_float_86400000_, 86400000., 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 858, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzoffset); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 858, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_4 = __Pyx_PyFloat_DivideObjC(__pyx_t_9, __pyx_float_1440_, 1440., 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 858, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyNumber_Add(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 858, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_jdelta = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":857
+ * if self.units in microsec_units:
+ * jdelta = time_value / 86400000000. + self.tzoffset / 1440.
+ * elif self.units in millisec_units: # <<<<<<<<<<<<<<
+ * jdelta = time_value / 86400000. + self.tzoffset / 1440.
+ * elif self.units in sec_units:
+ */
+ goto __pyx_L15;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":859
+ * elif self.units in millisec_units:
+ * jdelta = time_value / 86400000. + self.tzoffset / 1440.
+ * elif self.units in sec_units: # <<<<<<<<<<<<<<
+ * jdelta = time_value / 86400. + self.tzoffset / 1440.
+ * elif self.units in min_units:
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 859, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sec_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_9, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 859, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_7 = (__pyx_t_8 != 0);
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":860
+ * jdelta = time_value / 86400000. + self.tzoffset / 1440.
+ * elif self.units in sec_units:
+ * jdelta = time_value / 86400. + self.tzoffset / 1440. # <<<<<<<<<<<<<<
+ * elif self.units in min_units:
+ * jdelta = time_value / 1440. + self.tzoffset / 1440.
+ */
+ __pyx_t_4 = __Pyx_PyFloat_DivideObjC(__pyx_v_time_value, __pyx_float_86400_, 86400., 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 860, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzoffset); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 860, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_6 = __Pyx_PyFloat_DivideObjC(__pyx_t_9, __pyx_float_1440_, 1440., 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 860, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyNumber_Add(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 860, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_jdelta = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":859
+ * elif self.units in millisec_units:
+ * jdelta = time_value / 86400000. + self.tzoffset / 1440.
+ * elif self.units in sec_units: # <<<<<<<<<<<<<<
+ * jdelta = time_value / 86400. + self.tzoffset / 1440.
+ * elif self.units in min_units:
+ */
+ goto __pyx_L15;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":861
+ * elif self.units in sec_units:
+ * jdelta = time_value / 86400. + self.tzoffset / 1440.
+ * elif self.units in min_units: # <<<<<<<<<<<<<<
+ * jdelta = time_value / 1440. + self.tzoffset / 1440.
+ * elif self.units in hr_units:
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 861, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_min_units); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 861, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_9, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 861, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_8 = (__pyx_t_7 != 0);
+ if (__pyx_t_8) {
+
+ /* "netcdftime/_netcdftime.pyx":862
+ * jdelta = time_value / 86400. + self.tzoffset / 1440.
+ * elif self.units in min_units:
+ * jdelta = time_value / 1440. + self.tzoffset / 1440. # <<<<<<<<<<<<<<
+ * elif self.units in hr_units:
+ * jdelta = time_value / 24. + self.tzoffset / 1440.
+ */
+ __pyx_t_6 = __Pyx_PyFloat_DivideObjC(__pyx_v_time_value, __pyx_float_1440_, 1440., 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 862, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzoffset); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 862, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_4 = __Pyx_PyFloat_DivideObjC(__pyx_t_9, __pyx_float_1440_, 1440., 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 862, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyNumber_Add(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 862, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_jdelta = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":861
+ * elif self.units in sec_units:
+ * jdelta = time_value / 86400. + self.tzoffset / 1440.
+ * elif self.units in min_units: # <<<<<<<<<<<<<<
+ * jdelta = time_value / 1440. + self.tzoffset / 1440.
+ * elif self.units in hr_units:
+ */
+ goto __pyx_L15;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":863
+ * elif self.units in min_units:
+ * jdelta = time_value / 1440. + self.tzoffset / 1440.
+ * elif self.units in hr_units: # <<<<<<<<<<<<<<
+ * jdelta = time_value / 24. + self.tzoffset / 1440.
+ * elif self.units in day_units:
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 863, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_hr_units); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 863, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_9, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 863, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_7 = (__pyx_t_8 != 0);
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":864
+ * jdelta = time_value / 1440. + self.tzoffset / 1440.
+ * elif self.units in hr_units:
+ * jdelta = time_value / 24. + self.tzoffset / 1440. # <<<<<<<<<<<<<<
+ * elif self.units in day_units:
+ * jdelta = time_value + self.tzoffset / 1440.
+ */
+ __pyx_t_4 = __Pyx_PyFloat_DivideObjC(__pyx_v_time_value, __pyx_float_24_, 24., 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 864, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzoffset); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 864, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_6 = __Pyx_PyFloat_DivideObjC(__pyx_t_9, __pyx_float_1440_, 1440., 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 864, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyNumber_Add(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 864, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_jdelta = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":863
+ * elif self.units in min_units:
+ * jdelta = time_value / 1440. + self.tzoffset / 1440.
+ * elif self.units in hr_units: # <<<<<<<<<<<<<<
+ * jdelta = time_value / 24. + self.tzoffset / 1440.
+ * elif self.units in day_units:
+ */
+ goto __pyx_L15;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":865
+ * elif self.units in hr_units:
+ * jdelta = time_value / 24. + self.tzoffset / 1440.
+ * elif self.units in day_units: # <<<<<<<<<<<<<<
+ * jdelta = time_value + self.tzoffset / 1440.
+ * else:
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 865, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_day_units); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 865, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_9, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 865, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_8 = (__pyx_t_7 != 0);
+ if (__pyx_t_8) {
+
+ /* "netcdftime/_netcdftime.pyx":866
+ * jdelta = time_value / 24. + self.tzoffset / 1440.
+ * elif self.units in day_units:
+ * jdelta = time_value + self.tzoffset / 1440. # <<<<<<<<<<<<<<
+ * else:
+ * raise ValueError('unsupported time units')
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tzoffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = __Pyx_PyFloat_DivideObjC(__pyx_t_6, __pyx_float_1440_, 1440., 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Add(__pyx_v_time_value, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_v_jdelta = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":865
+ * elif self.units in hr_units:
+ * jdelta = time_value / 24. + self.tzoffset / 1440.
+ * elif self.units in day_units: # <<<<<<<<<<<<<<
+ * jdelta = time_value + self.tzoffset / 1440.
+ * else:
+ */
+ goto __pyx_L15;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":868
+ * jdelta = time_value + self.tzoffset / 1440.
+ * else:
+ * raise ValueError('unsupported time units') # <<<<<<<<<<<<<<
+ * jd = self._jd0 + jdelta
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ */
+ /*else*/ {
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 868, __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, 868, __pyx_L1_error)
+ }
+ __pyx_L15:;
+
+ /* "netcdftime/_netcdftime.pyx":869
+ * else:
+ * raise ValueError('unsupported time units')
+ * jd = self._jd0 + jdelta # <<<<<<<<<<<<<<
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ * if not isscalar:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jd0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 869, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = PyNumber_Add(__pyx_t_6, __pyx_v_jdelta); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 869, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_jd = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":870
+ * raise ValueError('unsupported time units')
+ * jd = self._jd0 + jdelta
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<<
+ * if not isscalar:
+ * if ismasked:
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 870, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_julian, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 870, __pyx_L1_error)
+ if (!__pyx_t_7) {
+ } else {
+ __pyx_t_8 = __pyx_t_7;
+ goto __pyx_L17_bool_binop_done;
+ }
+ __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 870, __pyx_L1_error)
+ if (!__pyx_t_7) {
+ } else {
+ __pyx_t_8 = __pyx_t_7;
+ goto __pyx_L17_bool_binop_done;
+ }
+ __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 870, __pyx_L1_error)
+ if (!__pyx_t_7) {
+ } else {
+ __pyx_t_8 = __pyx_t_7;
+ goto __pyx_L17_bool_binop_done;
+ }
+ __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 870, __pyx_L1_error)
+ __pyx_t_8 = __pyx_t_7;
+ __pyx_L17_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_7 = (__pyx_t_8 != 0);
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":871
+ * jd = self._jd0 + jdelta
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * if ismasked:
+ * date = []
+ */
+ __pyx_t_7 = ((!(__pyx_v_isscalar != 0)) != 0);
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":872
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ * if not isscalar:
+ * if ismasked: # <<<<<<<<<<<<<<
+ * date = []
+ * for j, m in zip(jd.flat, mask.flat):
+ */
+ __pyx_t_7 = (__pyx_v_ismasked != 0);
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":873
+ * if not isscalar:
+ * if ismasked:
+ * date = [] # <<<<<<<<<<<<<<
+ * for j, m in zip(jd.flat, mask.flat):
+ * if not m:
+ */
+ __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 873, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_v_date = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":874
+ * if ismasked:
+ * date = []
+ * for j, m in zip(jd.flat, mask.flat): # <<<<<<<<<<<<<<
+ * if not m:
+ * date.append(DateFromJulianDay(j, self.calendar))
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 874, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_jd, __pyx_n_s_flat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 874, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (unlikely(!__pyx_v_mask)) { __Pyx_RaiseUnboundLocalError("mask"); __PYX_ERR(0, 874, __pyx_L1_error) }
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_n_s_flat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 874, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_10 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_4, __pyx_t_5};
+ __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 874, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_4, __pyx_t_5};
+ __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 874, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 874, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_5);
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 874, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
+ __pyx_t_6 = __pyx_t_9; __Pyx_INCREF(__pyx_t_6); __pyx_t_13 = 0;
+ __pyx_t_14 = NULL;
+ } else {
+ __pyx_t_13 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 874, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_14 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 874, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_14)) {
+ if (likely(PyList_CheckExact(__pyx_t_6))) {
+ if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_13); __Pyx_INCREF(__pyx_t_9); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 874, __pyx_L1_error)
+ #else
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 874, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ #endif
+ } else {
+ if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_13); __Pyx_INCREF(__pyx_t_9); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 874, __pyx_L1_error)
+ #else
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_6, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 874, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ #endif
+ }
+ } else {
+ __pyx_t_9 = __pyx_t_14(__pyx_t_6);
+ if (unlikely(!__pyx_t_9)) {
+ 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, 874, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_9);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
+ PyObject* sequence = __pyx_t_9;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 874, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_12 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_12 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_5);
+ #else
+ __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 874, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 874, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_4 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 874, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_15 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_12 = __pyx_t_15(__pyx_t_4); if (unlikely(!__pyx_t_12)) goto __pyx_L25_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_12);
+ index = 1; __pyx_t_5 = __pyx_t_15(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L25_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_4), 2) < 0) __PYX_ERR(0, 874, __pyx_L1_error)
+ __pyx_t_15 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L26_unpacking_done;
+ __pyx_L25_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_15 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 874, __pyx_L1_error)
+ __pyx_L26_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_5);
+ __pyx_t_5 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":875
+ * date = []
+ * for j, m in zip(jd.flat, mask.flat):
+ * if not m: # <<<<<<<<<<<<<<
+ * date.append(DateFromJulianDay(j, self.calendar))
+ * else:
+ */
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_m); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 875, __pyx_L1_error)
+ __pyx_t_8 = ((!__pyx_t_7) != 0);
+ if (__pyx_t_8) {
+
+ /* "netcdftime/_netcdftime.pyx":876
+ * for j, m in zip(jd.flat, mask.flat):
+ * if not m:
+ * date.append(DateFromJulianDay(j, self.calendar)) # <<<<<<<<<<<<<<
+ * else:
+ * date.append(None)
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_DateFromJulianDay); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 876, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 876, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_4 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_j, __pyx_t_12};
+ __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 876, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_j, __pyx_t_12};
+ __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 876, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 876, __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;
+ }
+ __Pyx_INCREF(__pyx_v_j);
+ __Pyx_GIVEREF(__pyx_v_j);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_11, __pyx_v_j);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_11, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 876, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_16 = __Pyx_PyObject_Append(__pyx_v_date, __pyx_t_9); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 876, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":875
+ * date = []
+ * for j, m in zip(jd.flat, mask.flat):
+ * if not m: # <<<<<<<<<<<<<<
+ * date.append(DateFromJulianDay(j, self.calendar))
+ * else:
+ */
+ goto __pyx_L27;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":878
+ * date.append(DateFromJulianDay(j, self.calendar))
+ * else:
+ * date.append(None) # <<<<<<<<<<<<<<
+ * else:
+ * date = DateFromJulianDay(jd.flat, self.calendar)
+ */
+ /*else*/ {
+ __pyx_t_16 = __Pyx_PyObject_Append(__pyx_v_date, Py_None); if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 878, __pyx_L1_error)
+ }
+ __pyx_L27:;
+
+ /* "netcdftime/_netcdftime.pyx":874
+ * if ismasked:
+ * date = []
+ * for j, m in zip(jd.flat, mask.flat): # <<<<<<<<<<<<<<
+ * if not m:
+ * date.append(DateFromJulianDay(j, self.calendar))
+ */
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":872
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ * if not isscalar:
+ * if ismasked: # <<<<<<<<<<<<<<
+ * date = []
+ * for j, m in zip(jd.flat, mask.flat):
+ */
+ goto __pyx_L22;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":880
+ * date.append(None)
+ * else:
+ * date = DateFromJulianDay(jd.flat, self.calendar) # <<<<<<<<<<<<<<
+ * else:
+ * if ismasked and mask.item():
+ */
+ /*else*/ {
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_DateFromJulianDay); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 880, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_jd, __pyx_n_s_flat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 880, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 880, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_12 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_5, __pyx_t_10};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 880, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_5, __pyx_t_10};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 880, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 880, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__pyx_t_12) {
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_11, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_11, __pyx_t_10);
+ __pyx_t_5 = 0;
+ __pyx_t_10 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 880, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_v_date = __pyx_t_6;
+ __pyx_t_6 = 0;
+ }
+ __pyx_L22:;
+
+ /* "netcdftime/_netcdftime.pyx":871
+ * jd = self._jd0 + jdelta
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * if ismasked:
+ * date = []
+ */
+ goto __pyx_L21;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":882
+ * date = DateFromJulianDay(jd.flat, self.calendar)
+ * else:
+ * if ismasked and mask.item(): # <<<<<<<<<<<<<<
+ * date = None
+ * else:
+ */
+ /*else*/ {
+ __pyx_t_7 = (__pyx_v_ismasked != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_8 = __pyx_t_7;
+ goto __pyx_L29_bool_binop_done;
+ }
+ if (unlikely(!__pyx_v_mask)) { __Pyx_RaiseUnboundLocalError("mask"); __PYX_ERR(0, 882, __pyx_L1_error) }
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_n_s_item); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 882, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 882, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 882, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 882, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_8 = __pyx_t_7;
+ __pyx_L29_bool_binop_done:;
+ if (__pyx_t_8) {
+
+ /* "netcdftime/_netcdftime.pyx":883
+ * else:
+ * if ismasked and mask.item():
+ * date = None # <<<<<<<<<<<<<<
+ * else:
+ * date = DateFromJulianDay(jd, self.calendar)
+ */
+ __Pyx_INCREF(Py_None);
+ __pyx_v_date = Py_None;
+
+ /* "netcdftime/_netcdftime.pyx":882
+ * date = DateFromJulianDay(jd.flat, self.calendar)
+ * else:
+ * if ismasked and mask.item(): # <<<<<<<<<<<<<<
+ * date = None
+ * else:
+ */
+ goto __pyx_L28;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":885
+ * date = None
+ * else:
+ * date = DateFromJulianDay(jd, self.calendar) # <<<<<<<<<<<<<<
+ * elif self.calendar in ['noleap', '365_day']:
+ * if not isscalar:
+ */
+ /*else*/ {
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_DateFromJulianDay); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 885, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 885, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_10 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_jd, __pyx_t_4};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 885, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_jd, __pyx_t_4};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 885, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 885, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_10) {
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_jd);
+ __Pyx_GIVEREF(__pyx_v_jd);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_11, __pyx_v_jd);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_11, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 885, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_v_date = __pyx_t_6;
+ __pyx_t_6 = 0;
+ }
+ __pyx_L28:;
+ }
+ __pyx_L21:;
+
+ /* "netcdftime/_netcdftime.pyx":870
+ * raise ValueError('unsupported time units')
+ * jd = self._jd0 + jdelta
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']: # <<<<<<<<<<<<<<
+ * if not isscalar:
+ * if ismasked:
+ */
+ goto __pyx_L16;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":886
+ * else:
+ * date = DateFromJulianDay(jd, self.calendar)
+ * elif self.calendar in ['noleap', '365_day']: # <<<<<<<<<<<<<<
+ * if not isscalar:
+ * date = [_DateFromNoLeapDay(j) for j in jd.flat]
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 886, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_noleap, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 886, __pyx_L1_error)
+ if (!__pyx_t_7) {
+ } else {
+ __pyx_t_8 = __pyx_t_7;
+ goto __pyx_L31_bool_binop_done;
+ }
+ __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_kp_s_365_day, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 886, __pyx_L1_error)
+ __pyx_t_8 = __pyx_t_7;
+ __pyx_L31_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_7 = (__pyx_t_8 != 0);
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":887
+ * date = DateFromJulianDay(jd, self.calendar)
+ * elif self.calendar in ['noleap', '365_day']:
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * date = [_DateFromNoLeapDay(j) for j in jd.flat]
+ * else:
+ */
+ __pyx_t_7 = ((!(__pyx_v_isscalar != 0)) != 0);
+ if (__pyx_t_7) {
+
+ /* "netcdftime/_netcdftime.pyx":888
+ * elif self.calendar in ['noleap', '365_day']:
+ * if not isscalar:
+ * date = [_DateFromNoLeapDay(j) for j in jd.flat] # <<<<<<<<<<<<<<
+ * else:
+ * date = _DateFromNoLeapDay(jd)
+ */
+ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 888, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_jd, __pyx_n_s_flat); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 888, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
+ __pyx_t_5 = __pyx_t_9; __Pyx_INCREF(__pyx_t_5); __pyx_t_13 = 0;
+ __pyx_t_14 = NULL;
+ } else {
+ __pyx_t_13 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 888, __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, 888, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_14)) {
+ if (likely(PyList_CheckExact(__pyx_t_5))) {
+ if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_5)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_9 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_9); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 888, __pyx_L1_error)
+ #else
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 888, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ #endif
+ } else {
+ if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_9); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 888, __pyx_L1_error)
+ #else
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 888, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ #endif
+ }
+ } else {
+ __pyx_t_9 = __pyx_t_14(__pyx_t_5);
+ if (unlikely(!__pyx_t_9)) {
+ 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, 888, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_9);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_9 = __pyx_f_10netcdftime_11_netcdftime__DateFromNoLeapDay(__pyx_v_j); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 888, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 888, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_v_date = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":887
+ * date = DateFromJulianDay(jd, self.calendar)
+ * elif self.calendar in ['noleap', '365_day']:
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * date = [_DateFromNoLeapDay(j) for j in jd.flat]
+ * else:
+ */
+ goto __pyx_L33;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":890
+ * date = [_DateFromNoLeapDay(j) for j in jd.flat]
+ * else:
+ * date = _DateFromNoLeapDay(jd) # <<<<<<<<<<<<<<
+ * elif self.calendar in ['all_leap', '366_day']:
+ * if not isscalar:
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_f_10netcdftime_11_netcdftime__DateFromNoLeapDay(__pyx_v_jd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 890, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_date = __pyx_t_6;
+ __pyx_t_6 = 0;
+ }
+ __pyx_L33:;
+
+ /* "netcdftime/_netcdftime.pyx":886
+ * else:
+ * date = DateFromJulianDay(jd, self.calendar)
+ * elif self.calendar in ['noleap', '365_day']: # <<<<<<<<<<<<<<
+ * if not isscalar:
+ * date = [_DateFromNoLeapDay(j) for j in jd.flat]
+ */
+ goto __pyx_L16;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":891
+ * else:
+ * date = _DateFromNoLeapDay(jd)
+ * elif self.calendar in ['all_leap', '366_day']: # <<<<<<<<<<<<<<
+ * if not isscalar:
+ * date = [_DateFromAllLeap(j) for j in jd.flat]
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 891, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_all_leap, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 891, __pyx_L1_error)
+ if (!__pyx_t_8) {
+ } else {
+ __pyx_t_7 = __pyx_t_8;
+ goto __pyx_L36_bool_binop_done;
+ }
+ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_kp_s_366_day, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 891, __pyx_L1_error)
+ __pyx_t_7 = __pyx_t_8;
+ __pyx_L36_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_8 = (__pyx_t_7 != 0);
+ if (__pyx_t_8) {
+
+ /* "netcdftime/_netcdftime.pyx":892
+ * date = _DateFromNoLeapDay(jd)
+ * elif self.calendar in ['all_leap', '366_day']:
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * date = [_DateFromAllLeap(j) for j in jd.flat]
+ * else:
+ */
+ __pyx_t_8 = ((!(__pyx_v_isscalar != 0)) != 0);
+ if (__pyx_t_8) {
+
+ /* "netcdftime/_netcdftime.pyx":893
+ * elif self.calendar in ['all_leap', '366_day']:
+ * if not isscalar:
+ * date = [_DateFromAllLeap(j) for j in jd.flat] # <<<<<<<<<<<<<<
+ * else:
+ * date = _DateFromAllLeap(jd)
+ */
+ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_jd, __pyx_n_s_flat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
+ __pyx_t_9 = __pyx_t_5; __Pyx_INCREF(__pyx_t_9); __pyx_t_13 = 0;
+ __pyx_t_14 = NULL;
+ } else {
+ __pyx_t_13 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_14 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 893, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_14)) {
+ if (likely(PyList_CheckExact(__pyx_t_9))) {
+ if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_9)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_13); __Pyx_INCREF(__pyx_t_5); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 893, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ } else {
+ if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_13); __Pyx_INCREF(__pyx_t_5); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 893, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ }
+ } else {
+ __pyx_t_5 = __pyx_t_14(__pyx_t_9);
+ if (unlikely(!__pyx_t_5)) {
+ 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, 893, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_5 = __pyx_f_10netcdftime_11_netcdftime__DateFromAllLeap(__pyx_v_j); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_v_date = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":892
+ * date = _DateFromNoLeapDay(jd)
+ * elif self.calendar in ['all_leap', '366_day']:
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * date = [_DateFromAllLeap(j) for j in jd.flat]
+ * else:
+ */
+ goto __pyx_L38;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":895
+ * date = [_DateFromAllLeap(j) for j in jd.flat]
+ * else:
+ * date = _DateFromAllLeap(jd) # <<<<<<<<<<<<<<
+ * elif self.calendar == '360_day':
+ * if not isscalar:
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_f_10netcdftime_11_netcdftime__DateFromAllLeap(__pyx_v_jd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 895, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_date = __pyx_t_6;
+ __pyx_t_6 = 0;
+ }
+ __pyx_L38:;
+
+ /* "netcdftime/_netcdftime.pyx":891
+ * else:
+ * date = _DateFromNoLeapDay(jd)
+ * elif self.calendar in ['all_leap', '366_day']: # <<<<<<<<<<<<<<
+ * if not isscalar:
+ * date = [_DateFromAllLeap(j) for j in jd.flat]
+ */
+ goto __pyx_L16;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":896
+ * else:
+ * date = _DateFromAllLeap(jd)
+ * elif self.calendar == '360_day': # <<<<<<<<<<<<<<
+ * if not isscalar:
+ * date = [_DateFrom360Day(j) for j in jd.flat]
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 896, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_kp_s_360_day, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 896, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_8) {
+
+ /* "netcdftime/_netcdftime.pyx":897
+ * date = _DateFromAllLeap(jd)
+ * elif self.calendar == '360_day':
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * date = [_DateFrom360Day(j) for j in jd.flat]
+ * else:
+ */
+ __pyx_t_8 = ((!(__pyx_v_isscalar != 0)) != 0);
+ if (__pyx_t_8) {
+
+ /* "netcdftime/_netcdftime.pyx":898
+ * elif self.calendar == '360_day':
+ * if not isscalar:
+ * date = [_DateFrom360Day(j) for j in jd.flat] # <<<<<<<<<<<<<<
+ * else:
+ * date = _DateFrom360Day(jd)
+ */
+ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 898, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_jd, __pyx_n_s_flat); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 898, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
+ __pyx_t_5 = __pyx_t_9; __Pyx_INCREF(__pyx_t_5); __pyx_t_13 = 0;
+ __pyx_t_14 = NULL;
+ } else {
+ __pyx_t_13 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 898, __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, 898, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_14)) {
+ if (likely(PyList_CheckExact(__pyx_t_5))) {
+ if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_5)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_9 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_9); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 898, __pyx_L1_error)
+ #else
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 898, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ #endif
+ } else {
+ if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_9); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 898, __pyx_L1_error)
+ #else
+ __pyx_t_9 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 898, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ #endif
+ }
+ } else {
+ __pyx_t_9 = __pyx_t_14(__pyx_t_5);
+ if (unlikely(!__pyx_t_9)) {
+ 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, 898, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_9);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_9 = __pyx_f_10netcdftime_11_netcdftime__DateFrom360Day(__pyx_v_j); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 898, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 898, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_v_date = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":897
+ * date = _DateFromAllLeap(jd)
+ * elif self.calendar == '360_day':
+ * if not isscalar: # <<<<<<<<<<<<<<
+ * date = [_DateFrom360Day(j) for j in jd.flat]
+ * else:
+ */
+ goto __pyx_L41;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":900
+ * date = [_DateFrom360Day(j) for j in jd.flat]
+ * else:
+ * date = _DateFrom360Day(jd) # <<<<<<<<<<<<<<
+ * if isscalar:
+ * return date
+ */
+ /*else*/ {
+ __pyx_t_6 = __pyx_f_10netcdftime_11_netcdftime__DateFrom360Day(__pyx_v_jd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 900, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_date = __pyx_t_6;
+ __pyx_t_6 = 0;
+ }
+ __pyx_L41:;
+
+ /* "netcdftime/_netcdftime.pyx":896
+ * else:
+ * date = _DateFromAllLeap(jd)
+ * elif self.calendar == '360_day': # <<<<<<<<<<<<<<
+ * if not isscalar:
+ * date = [_DateFrom360Day(j) for j in jd.flat]
+ */
+ }
+ __pyx_L16:;
+
+ /* "netcdftime/_netcdftime.pyx":901
+ * else:
+ * date = _DateFrom360Day(jd)
+ * if isscalar: # <<<<<<<<<<<<<<
+ * return date
+ * else:
+ */
+ __pyx_t_8 = (__pyx_v_isscalar != 0);
+ if (__pyx_t_8) {
+
+ /* "netcdftime/_netcdftime.pyx":902
+ * date = _DateFrom360Day(jd)
+ * if isscalar:
+ * return date # <<<<<<<<<<<<<<
+ * else:
+ * return numpy.reshape(numpy.array(date), shape)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ if (unlikely(!__pyx_v_date)) { __Pyx_RaiseUnboundLocalError("date"); __PYX_ERR(0, 902, __pyx_L1_error) }
+ __Pyx_INCREF(__pyx_v_date);
+ __pyx_r = __pyx_v_date;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":901
+ * else:
+ * date = _DateFrom360Day(jd)
+ * if isscalar: # <<<<<<<<<<<<<<
+ * return date
+ * else:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":904
+ * return date
+ * else:
+ * return numpy.reshape(numpy.array(date), shape) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 904, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_reshape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 904, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 904, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 904, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (unlikely(!__pyx_v_date)) { __Pyx_RaiseUnboundLocalError("date"); __PYX_ERR(0, 904, __pyx_L1_error) }
+ __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_10, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_date); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 904, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_date};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 904, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_date};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 904, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 904, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_INCREF(__pyx_v_date);
+ __Pyx_GIVEREF(__pyx_v_date);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_date);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 904, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ if (unlikely(!__pyx_v_shape)) { __Pyx_RaiseUnboundLocalError("shape"); __PYX_ERR(0, 904, __pyx_L1_error) }
+ __pyx_t_10 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_5, __pyx_v_shape};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 904, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_5, __pyx_v_shape};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 904, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 904, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_5);
+ __Pyx_INCREF(__pyx_v_shape);
+ __Pyx_GIVEREF(__pyx_v_shape);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_shape);
+ __pyx_t_5 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 904, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":820
+ * return numpy.reshape(jdelta, shape)
+ *
+ * def num2date(self, time_value): # <<<<<<<<<<<<<<
+ * """
+ * Return a 'datetime-like' object given a C{time_value} in units
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_AddTraceback("netcdftime._netcdftime.utime.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_mask);
+ __Pyx_XDECREF(__pyx_v_shape);
+ __Pyx_XDECREF(__pyx_v_jdelta);
+ __Pyx_XDECREF(__pyx_v_jd);
+ __Pyx_XDECREF(__pyx_v_date);
+ __Pyx_XDECREF(__pyx_v_j);
+ __Pyx_XDECREF(__pyx_v_m);
+ __Pyx_XDECREF(__pyx_v_time_value);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":907
+ *
+ *
+ * cdef _parse_timezone(tzstring): # <<<<<<<<<<<<<<
+ * """Parses ISO 8601 time zone specs into tzinfo offsets
+ *
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__parse_timezone(PyObject *__pyx_v_tzstring) {
+ PyObject *__pyx_v_m = NULL;
+ PyObject *__pyx_v_prefix = NULL;
+ PyObject *__pyx_v_hours = NULL;
+ PyObject *__pyx_v_minutes = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ __Pyx_RefNannySetupContext("_parse_timezone", 0);
+
+ /* "netcdftime/_netcdftime.pyx":912
+ * Adapted from pyiso8601 (http://code.google.com/p/pyiso8601/)
+ * """
+ * if tzstring == "Z": # <<<<<<<<<<<<<<
+ * return 0
+ * # This isn't strictly correct, but it's common to encounter dates without
+ */
+ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_tzstring, __pyx_n_s_Z, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 912, __pyx_L1_error)
+ if (__pyx_t_1) {
+
+ /* "netcdftime/_netcdftime.pyx":913
+ * """
+ * if tzstring == "Z":
+ * return 0 # <<<<<<<<<<<<<<
+ * # This isn't strictly correct, but it's common to encounter dates without
+ * # time zones so I'll assume the default (which defaults to UTC).
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":912
+ * Adapted from pyiso8601 (http://code.google.com/p/pyiso8601/)
+ * """
+ * if tzstring == "Z": # <<<<<<<<<<<<<<
+ * return 0
+ * # This isn't strictly correct, but it's common to encounter dates without
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":916
+ * # This isn't strictly correct, but it's common to encounter dates without
+ * # time zones so I'll assume the default (which defaults to UTC).
+ * if tzstring is None: # <<<<<<<<<<<<<<
+ * return 0
+ * m = TIMEZONE_REGEX.match(tzstring)
+ */
+ __pyx_t_1 = (__pyx_v_tzstring == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":917
+ * # time zones so I'll assume the default (which defaults to UTC).
+ * if tzstring is None:
+ * return 0 # <<<<<<<<<<<<<<
+ * m = TIMEZONE_REGEX.match(tzstring)
+ * prefix, hours, minutes = m.groups()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":916
+ * # This isn't strictly correct, but it's common to encounter dates without
+ * # time zones so I'll assume the default (which defaults to UTC).
+ * if tzstring is None: # <<<<<<<<<<<<<<
+ * return 0
+ * m = TIMEZONE_REGEX.match(tzstring)
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":918
+ * if tzstring is None:
+ * return 0
+ * m = TIMEZONE_REGEX.match(tzstring) # <<<<<<<<<<<<<<
+ * prefix, hours, minutes = m.groups()
+ * hours, minutes = int(hours), int(minutes)
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_TIMEZONE_REGEX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 918, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_match); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 918, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_tzstring); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 918, __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_4, __pyx_v_tzstring};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 918, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_tzstring};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 918, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 918, __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_tzstring);
+ __Pyx_GIVEREF(__pyx_v_tzstring);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_tzstring);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 918, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_v_m = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":919
+ * return 0
+ * m = TIMEZONE_REGEX.match(tzstring)
+ * prefix, hours, minutes = m.groups() # <<<<<<<<<<<<<<
+ * hours, minutes = int(hours), int(minutes)
+ * if prefix == "-":
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_groups); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 919, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 919, __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, 919, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ 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
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 3)) {
+ if (size > 3) __Pyx_RaiseTooManyValuesError(3);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 919, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
+ } else {
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
+ }
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_4);
+ #else
+ __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 919, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 919, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 919, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #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, 919, __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;
+ index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ 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);
+ index = 2; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 3) < 0) __PYX_ERR(0, 919, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L6_unpacking_done;
+ __pyx_L5_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 919, __pyx_L1_error)
+ __pyx_L6_unpacking_done:;
+ }
+ __pyx_v_prefix = __pyx_t_5;
+ __pyx_t_5 = 0;
+ __pyx_v_hours = __pyx_t_6;
+ __pyx_t_6 = 0;
+ __pyx_v_minutes = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":920
+ * m = TIMEZONE_REGEX.match(tzstring)
+ * prefix, hours, minutes = m.groups()
+ * hours, minutes = int(hours), int(minutes) # <<<<<<<<<<<<<<
+ * if prefix == "-":
+ * hours = -hours
+ */
+ __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_hours); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 920, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_minutes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 920, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF_SET(__pyx_v_hours, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_minutes, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":921
+ * prefix, hours, minutes = m.groups()
+ * hours, minutes = int(hours), int(minutes)
+ * if prefix == "-": # <<<<<<<<<<<<<<
+ * hours = -hours
+ * minutes = -minutes
+ */
+ __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_prefix, __pyx_kp_s__14, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 921, __pyx_L1_error)
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":922
+ * hours, minutes = int(hours), int(minutes)
+ * if prefix == "-":
+ * hours = -hours # <<<<<<<<<<<<<<
+ * minutes = -minutes
+ * return minutes + hours * 60.
+ */
+ __pyx_t_4 = PyNumber_Negative(__pyx_v_hours); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 922, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF_SET(__pyx_v_hours, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":923
+ * if prefix == "-":
+ * hours = -hours
+ * minutes = -minutes # <<<<<<<<<<<<<<
+ * return minutes + hours * 60.
+ *
+ */
+ __pyx_t_4 = PyNumber_Negative(__pyx_v_minutes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 923, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF_SET(__pyx_v_minutes, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":921
+ * prefix, hours, minutes = m.groups()
+ * hours, minutes = int(hours), int(minutes)
+ * if prefix == "-": # <<<<<<<<<<<<<<
+ * hours = -hours
+ * minutes = -minutes
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":924
+ * hours = -hours
+ * minutes = -minutes
+ * return minutes + hours * 60. # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = PyNumber_Multiply(__pyx_v_hours, __pyx_float_60_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 924, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyNumber_Add(__pyx_v_minutes, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 924, __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;
+
+ /* "netcdftime/_netcdftime.pyx":907
+ *
+ *
+ * cdef _parse_timezone(tzstring): # <<<<<<<<<<<<<<
+ * """Parses ISO 8601 time zone specs into tzinfo offsets
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __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_AddTraceback("netcdftime._netcdftime._parse_timezone", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_m);
+ __Pyx_XDECREF(__pyx_v_prefix);
+ __Pyx_XDECREF(__pyx_v_hours);
+ __Pyx_XDECREF(__pyx_v_minutes);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":927
+ *
+ *
+ * cpdef _parse_date(datestring): # <<<<<<<<<<<<<<
+ * """Parses ISO 8601 dates into datetime objects
+ *
+ */
+
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_5_parse_date(PyObject *__pyx_self, PyObject *__pyx_v_datestring); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__parse_date(PyObject *__pyx_v_datestring, CYTHON_UNUSED int __pyx_skip_dispatch) {
+ PyObject *__pyx_v_m = NULL;
+ PyObject *__pyx_v_groups = NULL;
+ PyObject *__pyx_v_tzoffset_mins = NULL;
+ PyObject *__pyx_v_iyear = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ __Pyx_RefNannySetupContext("_parse_date", 0);
+
+ /* "netcdftime/_netcdftime.pyx":935
+ * Adapted from pyiso8601 (http://code.google.com/p/pyiso8601/)
+ * """
+ * if not isinstance(datestring, str) and not isinstance(datestring, unicode): # <<<<<<<<<<<<<<
+ * raise ValueError("Expecting a string %r" % datestring)
+ * m = ISO8601_REGEX.match(datestring.strip())
+ */
+ __pyx_t_2 = PyString_Check(__pyx_v_datestring);
+ __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_1 = __pyx_t_3;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_3 = PyUnicode_Check(__pyx_v_datestring);
+ __pyx_t_2 = ((!(__pyx_t_3 != 0)) != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "netcdftime/_netcdftime.pyx":936
+ * """
+ * if not isinstance(datestring, str) and not isinstance(datestring, unicode):
+ * raise ValueError("Expecting a string %r" % datestring) # <<<<<<<<<<<<<<
+ * m = ISO8601_REGEX.match(datestring.strip())
+ * if not m:
+ */
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Expecting_a_string_r, __pyx_v_datestring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 936, __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 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __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, 936, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":935
+ * Adapted from pyiso8601 (http://code.google.com/p/pyiso8601/)
+ * """
+ * if not isinstance(datestring, str) and not isinstance(datestring, unicode): # <<<<<<<<<<<<<<
+ * raise ValueError("Expecting a string %r" % datestring)
+ * m = ISO8601_REGEX.match(datestring.strip())
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":937
+ * if not isinstance(datestring, str) and not isinstance(datestring, unicode):
+ * raise ValueError("Expecting a string %r" % datestring)
+ * m = ISO8601_REGEX.match(datestring.strip()) # <<<<<<<<<<<<<<
+ * if not m:
+ * raise ValueError("Unable to parse date string %r" % datestring)
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ISO8601_REGEX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 937, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_match); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 937, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datestring, __pyx_n_s_strip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 937, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 937, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 937, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __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_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 937, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 937, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 937, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 937, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 937, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_m = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":938
+ * raise ValueError("Expecting a string %r" % datestring)
+ * m = ISO8601_REGEX.match(datestring.strip())
+ * if not m: # <<<<<<<<<<<<<<
+ * raise ValueError("Unable to parse date string %r" % datestring)
+ * groups = m.groupdict()
+ */
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_m); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 938, __pyx_L1_error)
+ __pyx_t_2 = ((!__pyx_t_1) != 0);
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":939
+ * m = ISO8601_REGEX.match(datestring.strip())
+ * if not m:
+ * raise ValueError("Unable to parse date string %r" % datestring) # <<<<<<<<<<<<<<
+ * groups = m.groupdict()
+ * tzoffset_mins = _parse_timezone(groups["timezone"])
+ */
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Unable_to_parse_date_string_r, __pyx_v_datestring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 939, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 939, __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_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 939, __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, 939, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":938
+ * raise ValueError("Expecting a string %r" % datestring)
+ * m = ISO8601_REGEX.match(datestring.strip())
+ * if not m: # <<<<<<<<<<<<<<
+ * raise ValueError("Unable to parse date string %r" % datestring)
+ * groups = m.groupdict()
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":940
+ * if not m:
+ * raise ValueError("Unable to parse date string %r" % datestring)
+ * groups = m.groupdict() # <<<<<<<<<<<<<<
+ * tzoffset_mins = _parse_timezone(groups["timezone"])
+ * if groups["hour"] is None:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_groupdict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 940, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 940, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 940, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_groups = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":941
+ * raise ValueError("Unable to parse date string %r" % datestring)
+ * groups = m.groupdict()
+ * tzoffset_mins = _parse_timezone(groups["timezone"]) # <<<<<<<<<<<<<<
+ * if groups["hour"] is None:
+ * groups["hour"] = 0
+ */
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_groups, __pyx_n_s_timezone); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 941, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __pyx_f_10netcdftime_11_netcdftime__parse_timezone(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 941, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_tzoffset_mins = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":942
+ * groups = m.groupdict()
+ * tzoffset_mins = _parse_timezone(groups["timezone"])
+ * if groups["hour"] is None: # <<<<<<<<<<<<<<
+ * groups["hour"] = 0
+ * if groups["minute"] is None:
+ */
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_groups, __pyx_n_s_hour); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 942, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = (__pyx_t_6 == Py_None);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "netcdftime/_netcdftime.pyx":943
+ * tzoffset_mins = _parse_timezone(groups["timezone"])
+ * if groups["hour"] is None:
+ * groups["hour"] = 0 # <<<<<<<<<<<<<<
+ * if groups["minute"] is None:
+ * groups["minute"] = 0
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_groups, __pyx_n_s_hour, __pyx_int_0) < 0)) __PYX_ERR(0, 943, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":942
+ * groups = m.groupdict()
+ * tzoffset_mins = _parse_timezone(groups["timezone"])
+ * if groups["hour"] is None: # <<<<<<<<<<<<<<
+ * groups["hour"] = 0
+ * if groups["minute"] is None:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":944
+ * if groups["hour"] is None:
+ * groups["hour"] = 0
+ * if groups["minute"] is None: # <<<<<<<<<<<<<<
+ * groups["minute"] = 0
+ * if groups["second"] is None:
+ */
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_groups, __pyx_n_s_minute); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 944, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = (__pyx_t_6 == Py_None);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":945
+ * groups["hour"] = 0
+ * if groups["minute"] is None:
+ * groups["minute"] = 0 # <<<<<<<<<<<<<<
+ * if groups["second"] is None:
+ * groups["second"] = 0
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_groups, __pyx_n_s_minute, __pyx_int_0) < 0)) __PYX_ERR(0, 945, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":944
+ * if groups["hour"] is None:
+ * groups["hour"] = 0
+ * if groups["minute"] is None: # <<<<<<<<<<<<<<
+ * groups["minute"] = 0
+ * if groups["second"] is None:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":946
+ * if groups["minute"] is None:
+ * groups["minute"] = 0
+ * if groups["second"] is None: # <<<<<<<<<<<<<<
+ * groups["second"] = 0
+ * # if groups["fraction"] is None:
+ */
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_groups, __pyx_n_s_second); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 946, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = (__pyx_t_6 == Py_None);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "netcdftime/_netcdftime.pyx":947
+ * groups["minute"] = 0
+ * if groups["second"] is None:
+ * groups["second"] = 0 # <<<<<<<<<<<<<<
+ * # if groups["fraction"] is None:
+ * # groups["fraction"] = 0
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_groups, __pyx_n_s_second, __pyx_int_0) < 0)) __PYX_ERR(0, 947, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":946
+ * if groups["minute"] is None:
+ * groups["minute"] = 0
+ * if groups["second"] is None: # <<<<<<<<<<<<<<
+ * groups["second"] = 0
+ * # if groups["fraction"] is None:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":952
+ * # else:
+ * # groups["fraction"] = int(float("0.%s" % groups["fraction"]) * 1e6)
+ * iyear = int(groups["year"]) # <<<<<<<<<<<<<<
+ * return iyear, int(groups["month"]), int(groups["day"]),\
+ * int(groups["hour"]), int(groups["minute"]), int(groups["second"]),\
+ */
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_groups, __pyx_n_s_year); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 952, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_iyear = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":953
+ * # groups["fraction"] = int(float("0.%s" % groups["fraction"]) * 1e6)
+ * iyear = int(groups["year"])
+ * return iyear, int(groups["month"]), int(groups["day"]),\ # <<<<<<<<<<<<<<
+ * int(groups["hour"]), int(groups["minute"]), int(groups["second"]),\
+ * tzoffset_mins
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_groups, __pyx_n_s_month); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 953, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 953, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_groups, __pyx_n_s_day); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 953, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 953, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":954
+ * iyear = int(groups["year"])
+ * return iyear, int(groups["month"]), int(groups["day"]),\
+ * int(groups["hour"]), int(groups["minute"]), int(groups["second"]),\ # <<<<<<<<<<<<<<
+ * tzoffset_mins
+ *
+ */
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_groups, __pyx_n_s_hour); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 954, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_groups, __pyx_n_s_minute); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 954, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_groups, __pyx_n_s_second); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 954, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":953
+ * # groups["fraction"] = int(float("0.%s" % groups["fraction"]) * 1e6)
+ * iyear = int(groups["year"])
+ * return iyear, int(groups["month"]), int(groups["day"]),\ # <<<<<<<<<<<<<<
+ * int(groups["hour"]), int(groups["minute"]), int(groups["second"]),\
+ * tzoffset_mins
+ */
+ __pyx_t_4 = PyTuple_New(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 953, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_iyear);
+ __Pyx_GIVEREF(__pyx_v_iyear);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_iyear);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_9);
+ __Pyx_INCREF(__pyx_v_tzoffset_mins);
+ __Pyx_GIVEREF(__pyx_v_tzoffset_mins);
+ PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_v_tzoffset_mins);
+ __pyx_t_6 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_7 = 0;
+ __pyx_t_9 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":927
+ *
+ *
+ * cpdef _parse_date(datestring): # <<<<<<<<<<<<<<
+ * """Parses ISO 8601 dates into datetime objects
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("netcdftime._netcdftime._parse_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_m);
+ __Pyx_XDECREF(__pyx_v_groups);
+ __Pyx_XDECREF(__pyx_v_tzoffset_mins);
+ __Pyx_XDECREF(__pyx_v_iyear);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_5_parse_date(PyObject *__pyx_self, PyObject *__pyx_v_datestring); /*proto*/
+static char __pyx_doc_10netcdftime_11_netcdftime_4_parse_date[] = "Parses ISO 8601 dates into datetime objects\n\n The timezone is parsed from the date string, assuming UTC\n by default.\n\n Adapted from pyiso8601 (http://code.google.com/p/pyiso8601/)\n ";
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_5_parse_date(PyObject *__pyx_self, PyObject *__pyx_v_datestring) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_parse_date (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_4_parse_date(__pyx_self, ((PyObject *)__pyx_v_datestring));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_4_parse_date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datestring) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("_parse_date", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __pyx_f_10netcdftime_11_netcdftime__parse_date(__pyx_v_datestring, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 927, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netcdftime._netcdftime._parse_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":957
+ * tzoffset_mins
+ *
+ * cdef _check_index(indices, times, nctime, calendar, select): # <<<<<<<<<<<<<<
+ * """Return True if the time indices given correspond to the given times,
+ * False otherwise.
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__check_index(PyObject *__pyx_v_indices, PyObject *__pyx_v_times, PyObject *__pyx_v_nctime, CYTHON_UNUSED PyObject *__pyx_v_calendar, PyObject *__pyx_v_select) {
+ PyObject *__pyx_v_N = NULL;
+ PyObject *__pyx_v_t = NULL;
+ PyObject *__pyx_v_ta = NULL;
+ PyObject *__pyx_v_tb = NULL;
+ PyObject *__pyx_v_delta_after = NULL;
+ PyObject *__pyx_v_delta_before = NULL;
+ PyObject *__pyx_v_delta_check = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ __Pyx_RefNannySetupContext("_check_index", 0);
+ __Pyx_INCREF(__pyx_v_nctime);
+
+ /* "netcdftime/_netcdftime.pyx":978
+ * Index selection method.
+ * """
+ * N = nctime.shape[0] # <<<<<<<<<<<<<<
+ * if (indices < 0).any():
+ * return False
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __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, 978, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_N = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":979
+ * """
+ * N = nctime.shape[0]
+ * if (indices < 0).any(): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_indices, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_any); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 979, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __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, 979, __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, 979, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":980
+ * N = nctime.shape[0]
+ * if (indices < 0).any():
+ * return False # <<<<<<<<<<<<<<
+ *
+ * if (indices >= N).any():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":979
+ * """
+ * N = nctime.shape[0]
+ * if (indices < 0).any(): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":982
+ * return False
+ *
+ * if (indices >= N).any(): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_indices, __pyx_v_N, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_any); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __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, 982, __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, 982, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":983
+ *
+ * if (indices >= N).any():
+ * return False # <<<<<<<<<<<<<<
+ *
+ * try:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":982
+ * return False
+ *
+ * if (indices >= N).any(): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":985
+ * return False
+ *
+ * try: # <<<<<<<<<<<<<<
+ * t = nctime[indices]
+ * nctime = nctime
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ /*try:*/ {
+
+ /* "netcdftime/_netcdftime.pyx":986
+ *
+ * try:
+ * t = nctime[indices] # <<<<<<<<<<<<<<
+ * nctime = nctime
+ * # WORKAROUND TO CHANGES IN SLICING BEHAVIOUR in 1.1.2
+ */
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_nctime, __pyx_v_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_v_t = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":987
+ * try:
+ * t = nctime[indices]
+ * nctime = nctime # <<<<<<<<<<<<<<
+ * # WORKAROUND TO CHANGES IN SLICING BEHAVIOUR in 1.1.2
+ * # this may be unacceptably slow...
+ */
+ __Pyx_INCREF(__pyx_v_nctime);
+ __Pyx_DECREF_SET(__pyx_v_nctime, __pyx_v_nctime);
+
+ /* "netcdftime/_netcdftime.pyx":985
+ * return False
+ *
+ * try: # <<<<<<<<<<<<<<
+ * t = nctime[indices]
+ * nctime = nctime
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L12_try_end;
+ __pyx_L5_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":993
+ * # values in indices, read entire time variable into numpy
+ * # array so numpy slicing rules can be used.
+ * except IndexError: # <<<<<<<<<<<<<<
+ * nctime = nctime[:]
+ * t = nctime[indices]
+ */
+ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
+ if (__pyx_t_8) {
+ __Pyx_AddTraceback("netcdftime._netcdftime._check_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 993, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_3);
+
+ /* "netcdftime/_netcdftime.pyx":994
+ * # array so numpy slicing rules can be used.
+ * except IndexError:
+ * nctime = nctime[:] # <<<<<<<<<<<<<<
+ * t = nctime[indices]
+ * # if fancy indexing not available, fall back on this.
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_nctime, 0, 0, NULL, NULL, &__pyx_slice__15, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 994, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF_SET(__pyx_v_nctime, __pyx_t_9);
+ __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":995
+ * except IndexError:
+ * nctime = nctime[:]
+ * t = nctime[indices] # <<<<<<<<<<<<<<
+ * # if fancy indexing not available, fall back on this.
+ * # t=[]
+ */
+ __pyx_t_9 = PyObject_GetItem(__pyx_v_nctime, __pyx_v_indices); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 995, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L6_exception_handled;
+ }
+ goto __pyx_L7_except_error;
+ __pyx_L7_except_error:;
+
+ /* "netcdftime/_netcdftime.pyx":985
+ * return False
+ *
+ * try: # <<<<<<<<<<<<<<
+ * t = nctime[indices]
+ * nctime = nctime
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L1_error;
+ __pyx_L6_exception_handled:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ __pyx_L12_try_end:;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1001
+ * # t.append(nctime[ind])
+ *
+ * if select == 'exact': # <<<<<<<<<<<<<<
+ * return numpy.all(t == times)
+ *
+ */
+ __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_select, __pyx_n_s_exact, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1001, __pyx_L1_error)
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":1002
+ *
+ * if select == 'exact':
+ * return numpy.all(t == times) # <<<<<<<<<<<<<<
+ *
+ * elif select == 'before':
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_all); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_t, __pyx_v_times, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error)
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1002, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_1};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1002, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_1};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1002, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1002, __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_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1002, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1001
+ * # t.append(nctime[ind])
+ *
+ * if select == 'exact': # <<<<<<<<<<<<<<
+ * return numpy.all(t == times)
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1004
+ * return numpy.all(t == times)
+ *
+ * elif select == 'before': # <<<<<<<<<<<<<<
+ * ta = nctime[numpy.clip(indices + 1, 0, N - 1)]
+ * return numpy.all(t <= times) and numpy.all(ta > times)
+ */
+ __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_select, __pyx_n_s_before, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1004, __pyx_L1_error)
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":1005
+ *
+ * elif select == 'before':
+ * ta = nctime[numpy.clip(indices + 1, 0, N - 1)] # <<<<<<<<<<<<<<
+ * return numpy.all(t <= times) and numpy.all(ta > times)
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clip); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1005, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_indices, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_N, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_t_2, __pyx_int_0, __pyx_t_1};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1005, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_t_2, __pyx_int_0, __pyx_t_1};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1005, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1005, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_8, __pyx_t_2);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_8, __pyx_int_0);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_8, __pyx_t_1);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1005, __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;
+ __pyx_t_10 = PyObject_GetItem(__pyx_v_nctime, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1005, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_ta = __pyx_t_10;
+ __pyx_t_10 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1006
+ * elif select == 'before':
+ * ta = nctime[numpy.clip(indices + 1, 0, N - 1)]
+ * return numpy.all(t <= times) and numpy.all(ta > times) # <<<<<<<<<<<<<<
+ *
+ * elif select == 'after':
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_all); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = PyObject_RichCompare(__pyx_v_t, __pyx_v_times, Py_LE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 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_11};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_11};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_11);
+ __pyx_t_11 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ if (__pyx_t_4) {
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_10 = __pyx_t_3;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L16_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_all); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_ta, __pyx_v_times, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+ if (!__pyx_t_11) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_1};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_1};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __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_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_10 = __pyx_t_3;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_L16_bool_binop_done:;
+ __pyx_r = __pyx_t_10;
+ __pyx_t_10 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1004
+ * return numpy.all(t == times)
+ *
+ * elif select == 'before': # <<<<<<<<<<<<<<
+ * ta = nctime[numpy.clip(indices + 1, 0, N - 1)]
+ * return numpy.all(t <= times) and numpy.all(ta > times)
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1008
+ * return numpy.all(t <= times) and numpy.all(ta > times)
+ *
+ * elif select == 'after': # <<<<<<<<<<<<<<
+ * tb = nctime[numpy.clip(indices - 1, 0, N - 1)]
+ * return numpy.all(t >= times) and numpy.all(tb < times)
+ */
+ __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_select, __pyx_n_s_after, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1008, __pyx_L1_error)
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":1009
+ *
+ * elif select == 'after':
+ * tb = nctime[numpy.clip(indices - 1, 0, N - 1)] # <<<<<<<<<<<<<<
+ * return numpy.all(t >= times) and numpy.all(tb < times)
+ *
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1009, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_clip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1009, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_indices, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1009, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_N, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1009, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_3, __pyx_int_0, __pyx_t_2};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1009, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_3, __pyx_int_0, __pyx_t_2};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1009, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1009, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_1) {
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_8, __pyx_t_3);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_8, __pyx_int_0);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_8, __pyx_t_2);
+ __pyx_t_3 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1009, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyObject_GetItem(__pyx_v_nctime, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1009, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_v_tb = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1010
+ * elif select == 'after':
+ * tb = nctime[numpy.clip(indices - 1, 0, N - 1)]
+ * return numpy.all(t >= times) and numpy.all(tb < times) # <<<<<<<<<<<<<<
+ *
+ * elif select == 'nearest':
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_all); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = PyObject_RichCompare(__pyx_v_t, __pyx_v_times, Py_GE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_11};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_11};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_11);
+ __pyx_t_11 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ if (__pyx_t_4) {
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_10);
+ __pyx_t_9 = __pyx_t_10;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ goto __pyx_L18_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_tb, __pyx_v_times, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_11) {
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_2};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_2};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_INCREF(__pyx_t_10);
+ __pyx_t_9 = __pyx_t_10;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_L18_bool_binop_done:;
+ __pyx_r = __pyx_t_9;
+ __pyx_t_9 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1008
+ * return numpy.all(t <= times) and numpy.all(ta > times)
+ *
+ * elif select == 'after': # <<<<<<<<<<<<<<
+ * tb = nctime[numpy.clip(indices - 1, 0, N - 1)]
+ * return numpy.all(t >= times) and numpy.all(tb < times)
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1012
+ * return numpy.all(t >= times) and numpy.all(tb < times)
+ *
+ * elif select == 'nearest': # <<<<<<<<<<<<<<
+ * ta = nctime[numpy.clip(indices + 1, 0, N - 1)]
+ * tb = nctime[numpy.clip(indices - 1, 0, N - 1)]
+ */
+ __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_select, __pyx_n_s_nearest, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1012, __pyx_L1_error)
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":1013
+ *
+ * elif select == 'nearest':
+ * ta = nctime[numpy.clip(indices + 1, 0, N - 1)] # <<<<<<<<<<<<<<
+ * tb = nctime[numpy.clip(indices - 1, 0, N - 1)]
+ * delta_after = ta - t
+ */
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1013, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_clip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_v_indices, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1013, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_N, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_10, __pyx_int_0, __pyx_t_3};
+ __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1013, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_10, __pyx_int_0, __pyx_t_3};
+ __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1013, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1013, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_2) {
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_8, __pyx_t_10);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_8, __pyx_int_0);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_8, __pyx_t_3);
+ __pyx_t_10 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1013, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_nctime, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_v_ta = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1014
+ * elif select == 'nearest':
+ * ta = nctime[numpy.clip(indices + 1, 0, N - 1)]
+ * tb = nctime[numpy.clip(indices - 1, 0, N - 1)] # <<<<<<<<<<<<<<
+ * delta_after = ta - t
+ * delta_before = t - tb
+ */
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1014, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_clip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1014, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyInt_SubtractObjC(__pyx_v_indices, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1014, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_N, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_9, __pyx_int_0, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_9, __pyx_int_0, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__pyx_t_10) {
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_8, __pyx_t_9);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_8, __pyx_int_0);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_8, __pyx_t_3);
+ __pyx_t_9 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = PyObject_GetItem(__pyx_v_nctime, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1014, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_tb = __pyx_t_11;
+ __pyx_t_11 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1015
+ * ta = nctime[numpy.clip(indices + 1, 0, N - 1)]
+ * tb = nctime[numpy.clip(indices - 1, 0, N - 1)]
+ * delta_after = ta - t # <<<<<<<<<<<<<<
+ * delta_before = t - tb
+ * delta_check = numpy.abs(times - t)
+ */
+ __pyx_t_11 = PyNumber_Subtract(__pyx_v_ta, __pyx_v_t); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1015, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_v_delta_after = __pyx_t_11;
+ __pyx_t_11 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1016
+ * tb = nctime[numpy.clip(indices - 1, 0, N - 1)]
+ * delta_after = ta - t
+ * delta_before = t - tb # <<<<<<<<<<<<<<
+ * delta_check = numpy.abs(times - t)
+ * return numpy.all(delta_check <= delta_after) and numpy.all(delta_check <= delta_before)
+ */
+ __pyx_t_11 = PyNumber_Subtract(__pyx_v_t, __pyx_v_tb); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1016, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_v_delta_before = __pyx_t_11;
+ __pyx_t_11 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1017
+ * delta_after = ta - t
+ * delta_before = t - tb
+ * delta_check = numpy.abs(times - t) # <<<<<<<<<<<<<<
+ * return numpy.all(delta_check <= delta_after) and numpy.all(delta_check <= delta_before)
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_abs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1017, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Subtract(__pyx_v_times, __pyx_v_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1017, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_1};
+ __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1017, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_1};
+ __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1017, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1017, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1017, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_delta_check = __pyx_t_11;
+ __pyx_t_11 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1018
+ * delta_before = t - tb
+ * delta_check = numpy.abs(times - t)
+ * return numpy.all(delta_check <= delta_after) and numpy.all(delta_check <= delta_before) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_all); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyObject_RichCompare(__pyx_v_delta_check, __pyx_v_delta_after, Py_LE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_9};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_9};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __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, 1018, __pyx_L1_error)
+ if (__pyx_t_4) {
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_11 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L20_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_all); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_delta_check, __pyx_v_delta_before, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __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_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_1};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 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_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_1};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_11 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_L20_bool_binop_done:;
+ __pyx_r = __pyx_t_11;
+ __pyx_t_11 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1012
+ * return numpy.all(t >= times) and numpy.all(tb < times)
+ *
+ * elif select == 'nearest': # <<<<<<<<<<<<<<
+ * ta = nctime[numpy.clip(indices + 1, 0, N - 1)]
+ * tb = nctime[numpy.clip(indices - 1, 0, N - 1)]
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":957
+ * tzoffset_mins
+ *
+ * cdef _check_index(indices, times, nctime, calendar, select): # <<<<<<<<<<<<<<
+ * """Return True if the time indices given correspond to the given times,
+ * False otherwise.
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("netcdftime._netcdftime._check_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_N);
+ __Pyx_XDECREF(__pyx_v_t);
+ __Pyx_XDECREF(__pyx_v_ta);
+ __Pyx_XDECREF(__pyx_v_tb);
+ __Pyx_XDECREF(__pyx_v_delta_after);
+ __Pyx_XDECREF(__pyx_v_delta_before);
+ __Pyx_XDECREF(__pyx_v_delta_check);
+ __Pyx_XDECREF(__pyx_v_nctime);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1021
+ *
+ *
+ * def date2index(dates, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<<
+ * """
+ * date2index(dates, nctime, calendar=None, select='exact')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_7date2index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_10netcdftime_11_netcdftime_6date2index[] = "\n date2index(dates, nctime, calendar=None, select='exact')\n\n Return indices of a netCDF time variable corresponding to the given dates.\n\n @param dates: A datetime object or a sequence of datetime objects.\n The datetime objects should not include a time-zone offset.\n\n @param nctime: A netCDF time variable object. The nctime object must have a\n C{units} attribute. The entries are assumed to be stor [...]
+static PyMethodDef __pyx_mdef_10netcdftime_11_netcdftime_7date2index = {"date2index", (PyCFunction)__pyx_pw_10netcdftime_11_netcdftime_7date2index, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10netcdftime_11_netcdftime_6date2index};
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_7date2index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_dates = 0;
+ PyObject *__pyx_v_nctime = 0;
+ PyObject *__pyx_v_calendar = 0;
+ PyObject *__pyx_v_select = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("date2index (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dates,&__pyx_n_s_nctime,&__pyx_n_s_calendar,&__pyx_n_s_select,0};
+ PyObject* values[4] = {0,0,0,0};
+ values[2] = ((PyObject *)Py_None);
+ values[3] = ((PyObject *)__pyx_n_s_exact);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dates)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ 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, 1021, __pyx_L3_error)
+ }
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_calendar);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_select);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date2index") < 0)) __PYX_ERR(0, 1021, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_dates = values[0];
+ __pyx_v_nctime = values[1];
+ __pyx_v_calendar = values[2];
+ __pyx_v_select = values[3];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("date2index", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1021, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("netcdftime._netcdftime.date2index", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_6date2index(__pyx_self, __pyx_v_dates, __pyx_v_nctime, __pyx_v_calendar, __pyx_v_select);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_6date2index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_nctime, PyObject *__pyx_v_calendar, PyObject *__pyx_v_select) {
+ PyObject *__pyx_v_cdftime = NULL;
+ PyObject *__pyx_v_times = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ __Pyx_RefNannySetupContext("date2index", 0);
+ __Pyx_INCREF(__pyx_v_calendar);
+
+ /* "netcdftime/_netcdftime.pyx":1048
+ * correspond to the closest dates.
+ * """
+ * try: # <<<<<<<<<<<<<<
+ * nctime.units
+ * except AttributeError:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "netcdftime/_netcdftime.pyx":1049
+ * """
+ * 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_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1049, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1048
+ * correspond to the closest dates.
+ * """
+ * try: # <<<<<<<<<<<<<<
+ * nctime.units
+ * except AttributeError:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L10_try_end;
+ __pyx_L3_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1050
+ * try:
+ * nctime.units
+ * except AttributeError: # <<<<<<<<<<<<<<
+ * raise AttributeError("netcdf time variable is missing a 'units' attribute")
+ * # Setting the calendar.
+ */
+ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
+ if (__pyx_t_5) {
+ __Pyx_AddTraceback("netcdftime._netcdftime.date2index", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1050, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "netcdftime/_netcdftime.pyx":1051
+ * nctime.units
+ * except AttributeError:
+ * raise AttributeError("netcdf time variable is missing a 'units' attribute") # <<<<<<<<<<<<<<
+ * # Setting the calendar.
+ * if calendar == None:
+ */
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1051, __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, 1051, __pyx_L5_except_error)
+ }
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+ /* "netcdftime/_netcdftime.pyx":1048
+ * correspond to the closest dates.
+ * """
+ * try: # <<<<<<<<<<<<<<
+ * nctime.units
+ * except AttributeError:
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L1_error;
+ __pyx_L10_try_end:;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1053
+ * raise AttributeError("netcdf time variable is missing a 'units' attribute")
+ * # Setting the calendar.
+ * if calendar == None: # <<<<<<<<<<<<<<
+ * calendar = getattr(nctime, 'calendar', 'standard')
+ * cdftime = utime(nctime.units,calendar=calendar)
+ */
+ __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, 1053, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1053, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":1054
+ * # Setting the calendar.
+ * if calendar == None:
+ * calendar = getattr(nctime, 'calendar', 'standard') # <<<<<<<<<<<<<<
+ * cdftime = utime(nctime.units,calendar=calendar)
+ * times = cdftime.date2num(dates)
+ */
+ __pyx_t_7 = __Pyx_GetAttr3(__pyx_v_nctime, __pyx_n_s_calendar, __pyx_n_s_standard); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1054, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF_SET(__pyx_v_calendar, __pyx_t_7);
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1053
+ * raise AttributeError("netcdf time variable is missing a 'units' attribute")
+ * # Setting the calendar.
+ * if calendar == None: # <<<<<<<<<<<<<<
+ * calendar = getattr(nctime, 'calendar', 'standard')
+ * cdftime = utime(nctime.units,calendar=calendar)
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1055
+ * if calendar == None:
+ * calendar = getattr(nctime, 'calendar', 'standard')
+ * cdftime = utime(nctime.units,calendar=calendar) # <<<<<<<<<<<<<<
+ * times = cdftime.date2num(dates)
+ * return time2index(times, nctime, calendar=calendar, select=select)
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_utime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1055, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1055, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1055, __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 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1055, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_calendar, __pyx_v_calendar) < 0) __PYX_ERR(0, 1055, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1055, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_cdftime = __pyx_t_8;
+ __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1056
+ * calendar = getattr(nctime, 'calendar', 'standard')
+ * cdftime = utime(nctime.units,calendar=calendar)
+ * times = cdftime.date2num(dates) # <<<<<<<<<<<<<<
+ * return time2index(times, nctime, calendar=calendar, select=select)
+ *
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_date2num); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1056, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_dates); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1056, __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_4, __pyx_v_dates};
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1056, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_dates};
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1056, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1056, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_INCREF(__pyx_v_dates);
+ __Pyx_GIVEREF(__pyx_v_dates);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_dates);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1056, __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;
+ __pyx_v_times = __pyx_t_8;
+ __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1057
+ * cdftime = utime(nctime.units,calendar=calendar)
+ * times = cdftime.date2num(dates)
+ * return time2index(times, nctime, calendar=calendar, select=select) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_time2index); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1057, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1057, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v_times);
+ __Pyx_GIVEREF(__pyx_v_times);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_times);
+ __Pyx_INCREF(__pyx_v_nctime);
+ __Pyx_GIVEREF(__pyx_v_nctime);
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_nctime);
+ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1057, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_calendar, __pyx_v_calendar) < 0) __PYX_ERR(0, 1057, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_select, __pyx_v_select) < 0) __PYX_ERR(0, 1057, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1057, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __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_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1021
+ *
+ *
+ * def date2index(dates, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<<
+ * """
+ * date2index(dates, nctime, calendar=None, select='exact')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("netcdftime._netcdftime.date2index", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_cdftime);
+ __Pyx_XDECREF(__pyx_v_times);
+ __Pyx_XDECREF(__pyx_v_calendar);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1060
+ *
+ *
+ * def time2index(times, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<<
+ * """
+ * time2index(times, nctime, calendar=None, select='exact')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_9time2index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_10netcdftime_11_netcdftime_8time2index[] = "\n time2index(times, nctime, calendar=None, select='exact')\n\n Return indices of a netCDF time variable corresponding to the given times.\n\n @param times: A numeric time or a sequence of numeric times.\n\n @param nctime: A netCDF time variable object. The nctime object must have a\n C{units} attribute. The entries are assumed to be stored in increasing\n order.\n\n @param calendar: Describes the cale [...]
+static PyMethodDef __pyx_mdef_10netcdftime_11_netcdftime_9time2index = {"time2index", (PyCFunction)__pyx_pw_10netcdftime_11_netcdftime_9time2index, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10netcdftime_11_netcdftime_8time2index};
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_9time2index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_times = 0;
+ PyObject *__pyx_v_nctime = 0;
+ PyObject *__pyx_v_calendar = 0;
+ PyObject *__pyx_v_select = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("time2index (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_times,&__pyx_n_s_nctime,&__pyx_n_s_calendar,&__pyx_n_s_select,0};
+ PyObject* values[4] = {0,0,0,0};
+ values[2] = ((PyObject *)Py_None);
+ values[3] = ((PyObject *)__pyx_n_s_exact);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_times)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nctime)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("time2index", 0, 2, 4, 1); __PYX_ERR(0, 1060, __pyx_L3_error)
+ }
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_calendar);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_select);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "time2index") < 0)) __PYX_ERR(0, 1060, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_times = values[0];
+ __pyx_v_nctime = values[1];
+ __pyx_v_calendar = values[2];
+ __pyx_v_select = values[3];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("time2index", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1060, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("netcdftime._netcdftime.time2index", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8time2index(__pyx_self, __pyx_v_times, __pyx_v_nctime, __pyx_v_calendar, __pyx_v_select);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8time2index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_times, PyObject *__pyx_v_nctime, PyObject *__pyx_v_calendar, PyObject *__pyx_v_select) {
+ PyObject *__pyx_v_num = NULL;
+ PyObject *__pyx_v_N = NULL;
+ PyObject *__pyx_v_t0 = NULL;
+ PyObject *__pyx_v_t1 = NULL;
+ PyObject *__pyx_v_dt = NULL;
+ PyObject *__pyx_v_index = NULL;
+ PyObject *__pyx_v_bisect = NULL;
+ PyObject *__pyx_v_before = NULL;
+ PyObject *__pyx_v_after = NULL;
+ PyObject *__pyx_v_ncnum = NULL;
+ PyObject *__pyx_v_mismatch = NULL;
+ PyObject *__pyx_v_nearest_to_left = NULL;
+ PyObject *__pyx_v_n = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ Py_ssize_t __pyx_t_10;
+ PyObject *(*__pyx_t_11)(PyObject *);
+ int __pyx_t_12;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *(*__pyx_t_16)(PyObject *);
+ PyObject *__pyx_t_17 = NULL;
+ int __pyx_t_18;
+ double __pyx_t_19;
+ double __pyx_t_20;
+ __Pyx_RefNannySetupContext("time2index", 0);
+ __Pyx_INCREF(__pyx_v_calendar);
+
+ /* "netcdftime/_netcdftime.pyx":1086
+ * correspond to the closest times.
+ * """
+ * try: # <<<<<<<<<<<<<<
+ * nctime.units
+ * except AttributeError:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "netcdftime/_netcdftime.pyx":1087
+ * """
+ * 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_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1087, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1086
+ * correspond to the closest times.
+ * """
+ * try: # <<<<<<<<<<<<<<
+ * nctime.units
+ * except AttributeError:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L10_try_end;
+ __pyx_L3_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1088
+ * try:
+ * nctime.units
+ * except AttributeError: # <<<<<<<<<<<<<<
+ * raise AttributeError("netcdf time variable is missing a 'units' attribute")
+ * # Setting the calendar.
+ */
+ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
+ if (__pyx_t_5) {
+ __Pyx_AddTraceback("netcdftime._netcdftime.time2index", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1088, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "netcdftime/_netcdftime.pyx":1089
+ * nctime.units
+ * except AttributeError:
+ * raise AttributeError("netcdf time variable is missing a 'units' attribute") # <<<<<<<<<<<<<<
+ * # Setting the calendar.
+ * if calendar == None:
+ */
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1089, __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, 1089, __pyx_L5_except_error)
+ }
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+ /* "netcdftime/_netcdftime.pyx":1086
+ * correspond to the closest times.
+ * """
+ * try: # <<<<<<<<<<<<<<
+ * nctime.units
+ * except AttributeError:
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L1_error;
+ __pyx_L10_try_end:;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1091
+ * raise AttributeError("netcdf time variable is missing a 'units' attribute")
+ * # Setting the calendar.
+ * if calendar == None: # <<<<<<<<<<<<<<
+ * calendar = getattr(nctime, 'calendar', 'standard')
+ *
+ */
+ __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, 1091, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1091, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":1092
+ * # Setting the calendar.
+ * if calendar == None:
+ * calendar = getattr(nctime, 'calendar', 'standard') # <<<<<<<<<<<<<<
+ *
+ * num = numpy.atleast_1d(times)
+ */
+ __pyx_t_7 = __Pyx_GetAttr3(__pyx_v_nctime, __pyx_n_s_calendar, __pyx_n_s_standard); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF_SET(__pyx_v_calendar, __pyx_t_7);
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1091
+ * raise AttributeError("netcdf time variable is missing a 'units' attribute")
+ * # Setting the calendar.
+ * if calendar == None: # <<<<<<<<<<<<<<
+ * calendar = getattr(nctime, 'calendar', 'standard')
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1094
+ * calendar = getattr(nctime, 'calendar', 'standard')
+ *
+ * num = numpy.atleast_1d(times) # <<<<<<<<<<<<<<
+ * N = len(nctime)
+ *
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1094, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_atleast_1d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1094, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_times); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1094, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_times};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1094, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_times};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1094, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1094, __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_times);
+ __Pyx_GIVEREF(__pyx_v_times);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_times);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1094, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_num = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1095
+ *
+ * num = numpy.atleast_1d(times)
+ * N = len(nctime) # <<<<<<<<<<<<<<
+ *
+ * # Trying to infer the correct index from the starting time and the stride.
+ */
+ __pyx_t_10 = PyObject_Length(__pyx_v_nctime); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1095, __pyx_L1_error)
+ __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_v_N = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1099
+ * # Trying to infer the correct index from the starting time and the stride.
+ * # This assumes that the times are increasing uniformly.
+ * if len(nctime) >= 2: # <<<<<<<<<<<<<<
+ * t0, t1 = nctime[:2]
+ * dt = t1 - t0
+ */
+ __pyx_t_10 = PyObject_Length(__pyx_v_nctime); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1099, __pyx_L1_error)
+ __pyx_t_9 = ((__pyx_t_10 >= 2) != 0);
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":1100
+ * # This assumes that the times are increasing uniformly.
+ * if len(nctime) >= 2:
+ * t0, t1 = nctime[:2] # <<<<<<<<<<<<<<
+ * dt = t1 - t0
+ * else:
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_nctime, 0, 2, NULL, NULL, &__pyx_slice__18, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1100, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
+ PyObject* sequence = __pyx_t_7;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 1100, __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_8 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_8);
+ #else
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1100, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1100, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1100, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext;
+ index = 0; __pyx_t_4 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L15_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_4);
+ index = 1; __pyx_t_8 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L15_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1100, __pyx_L1_error)
+ __pyx_t_11 = NULL;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L16_unpacking_done;
+ __pyx_L15_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_11 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 1100, __pyx_L1_error)
+ __pyx_L16_unpacking_done:;
+ }
+ __pyx_v_t0 = __pyx_t_4;
+ __pyx_t_4 = 0;
+ __pyx_v_t1 = __pyx_t_8;
+ __pyx_t_8 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1101
+ * if len(nctime) >= 2:
+ * t0, t1 = nctime[:2]
+ * dt = t1 - t0 # <<<<<<<<<<<<<<
+ * else:
+ * t0 = nctime[0]
+ */
+ __pyx_t_7 = PyNumber_Subtract(__pyx_v_t1, __pyx_v_t0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1101, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_v_dt = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1099
+ * # Trying to infer the correct index from the starting time and the stride.
+ * # This assumes that the times are increasing uniformly.
+ * if len(nctime) >= 2: # <<<<<<<<<<<<<<
+ * t0, t1 = nctime[:2]
+ * dt = t1 - t0
+ */
+ goto __pyx_L14;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1103
+ * dt = t1 - t0
+ * else:
+ * t0 = nctime[0] # <<<<<<<<<<<<<<
+ * dt = 1.
+ * if select in ['exact', 'before']:
+ */
+ /*else*/ {
+ __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_nctime, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1103, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_v_t0 = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1104
+ * else:
+ * t0 = nctime[0]
+ * dt = 1. # <<<<<<<<<<<<<<
+ * if select in ['exact', 'before']:
+ * index = numpy.array((num - t0) / dt, int)
+ */
+ __Pyx_INCREF(__pyx_float_1_);
+ __pyx_v_dt = __pyx_float_1_;
+ }
+ __pyx_L14:;
+
+ /* "netcdftime/_netcdftime.pyx":1105
+ * t0 = nctime[0]
+ * dt = 1.
+ * if select in ['exact', 'before']: # <<<<<<<<<<<<<<
+ * index = numpy.array((num - t0) / dt, int)
+ * elif select == 'after':
+ */
+ __Pyx_INCREF(__pyx_v_select);
+ __pyx_t_7 = __pyx_v_select;
+ __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_exact, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1105, __pyx_L1_error)
+ if (!__pyx_t_12) {
+ } else {
+ __pyx_t_9 = __pyx_t_12;
+ goto __pyx_L18_bool_binop_done;
+ }
+ __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_before, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1105, __pyx_L1_error)
+ __pyx_t_9 = __pyx_t_12;
+ __pyx_L18_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_12 = (__pyx_t_9 != 0);
+ if (__pyx_t_12) {
+
+ /* "netcdftime/_netcdftime.pyx":1106
+ * dt = 1.
+ * if select in ['exact', 'before']:
+ * index = numpy.array((num - t0) / dt, int) # <<<<<<<<<<<<<<
+ * elif select == 'after':
+ * index = numpy.array(numpy.ceil((num - t0) / dt), int)
+ */
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1106, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1106, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyNumber_Subtract(__pyx_v_num, __pyx_v_t0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1106, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_v_dt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1106, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, ((PyObject *)(&PyInt_Type))};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1106, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, ((PyObject *)(&PyInt_Type))};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1106, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_13 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1106, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_5, __pyx_t_6);
+ __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
+ __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
+ PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_5, ((PyObject *)(&PyInt_Type)));
+ __pyx_t_6 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1106, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_index = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1105
+ * t0 = nctime[0]
+ * dt = 1.
+ * if select in ['exact', 'before']: # <<<<<<<<<<<<<<
+ * index = numpy.array((num - t0) / dt, int)
+ * elif select == 'after':
+ */
+ goto __pyx_L17;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1107
+ * if select in ['exact', 'before']:
+ * index = numpy.array((num - t0) / dt, int)
+ * elif select == 'after': # <<<<<<<<<<<<<<
+ * index = numpy.array(numpy.ceil((num - t0) / dt), int)
+ * else:
+ */
+ __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_select, __pyx_n_s_after, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1107, __pyx_L1_error)
+ if (__pyx_t_12) {
+
+ /* "netcdftime/_netcdftime.pyx":1108
+ * index = numpy.array((num - t0) / dt, int)
+ * elif select == 'after':
+ * index = numpy.array(numpy.ceil((num - t0) / dt), int) # <<<<<<<<<<<<<<
+ * else:
+ * index = numpy.array(numpy.around((num - t0) / dt), int)
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ceil); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Subtract(__pyx_v_num, __pyx_v_t0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_14 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_v_dt); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_14};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_14};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __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, 1108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_14);
+ __pyx_t_14 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_13);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_13, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_13)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_4, ((PyObject *)(&PyInt_Type))};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1108, __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
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_4, ((PyObject *)(&PyInt_Type))};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1108, __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_15 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_5, __pyx_t_4);
+ __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
+ __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
+ PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_5, ((PyObject *)(&PyInt_Type)));
+ __pyx_t_4 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __pyx_v_index = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1107
+ * if select in ['exact', 'before']:
+ * index = numpy.array((num - t0) / dt, int)
+ * elif select == 'after': # <<<<<<<<<<<<<<
+ * index = numpy.array(numpy.ceil((num - t0) / dt), int)
+ * else:
+ */
+ goto __pyx_L17;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1110
+ * index = numpy.array(numpy.ceil((num - t0) / dt), int)
+ * else:
+ * index = numpy.array(numpy.around((num - t0) / dt), int) # <<<<<<<<<<<<<<
+ *
+ * # Checking that the index really corresponds to the given time.
+ */
+ /*else*/ {
+ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_array); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_around); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Subtract(__pyx_v_num, __pyx_v_t0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_14 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_v_dt); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_14};
+ __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_14};
+ __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_14);
+ __pyx_t_14 = 0;
+ __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_15);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_15, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_15)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_13, ((PyObject *)(&PyInt_Type))};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_13, ((PyObject *)(&PyInt_Type))};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_13);
+ __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
+ __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)(&PyInt_Type)));
+ __pyx_t_13 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_v_index = __pyx_t_7;
+ __pyx_t_7 = 0;
+ }
+ __pyx_L17:;
+
+ /* "netcdftime/_netcdftime.pyx":1115
+ * # If the times do not correspond, then it means that the times
+ * # are not increasing uniformly and we try the bisection method.
+ * if not _check_index(index, times, nctime, calendar, select): # <<<<<<<<<<<<<<
+ *
+ * # Use the bisection method. Assumes nctime is ordered.
+ */
+ __pyx_t_7 = __pyx_f_10netcdftime_11_netcdftime__check_index(__pyx_v_index, __pyx_v_times, __pyx_v_nctime, __pyx_v_calendar, __pyx_v_select); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1115, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_9 = ((!__pyx_t_12) != 0);
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":1118
+ *
+ * # Use the bisection method. Assumes nctime is ordered.
+ * import bisect # <<<<<<<<<<<<<<
+ * index = numpy.array([bisect.bisect_right(nctime, n) for n in num], int)
+ * before = index == 0
+ */
+ __pyx_t_7 = __Pyx_Import(__pyx_n_s_bisect, 0, -1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1118, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_v_bisect = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1119
+ * # Use the bisection method. Assumes nctime is ordered.
+ * import bisect
+ * index = numpy.array([bisect.bisect_right(nctime, n) for n in num], int) # <<<<<<<<<<<<<<
+ * before = index == 0
+ *
+ */
+ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = PyList_New(0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ if (likely(PyList_CheckExact(__pyx_v_num)) || PyTuple_CheckExact(__pyx_v_num)) {
+ __pyx_t_13 = __pyx_v_num; __Pyx_INCREF(__pyx_t_13); __pyx_t_10 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_10 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_v_num); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_13))) {
+ if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_13)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_8 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ #else
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_13, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ } else {
+ if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_13)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ #else
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_13, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ }
+ } else {
+ __pyx_t_8 = __pyx_t_16(__pyx_t_13);
+ if (unlikely(!__pyx_t_8)) {
+ 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, 1119, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_bisect, __pyx_n_s_bisect_right); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_14);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_14, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_nctime, __pyx_v_n};
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_nctime, __pyx_v_n};
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else
+ #endif
+ {
+ __pyx_t_17 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_nctime);
+ __Pyx_GIVEREF(__pyx_v_nctime);
+ PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_5, __pyx_v_nctime);
+ __Pyx_INCREF(__pyx_v_n);
+ __Pyx_GIVEREF(__pyx_v_n);
+ PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_5, __pyx_v_n);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_17, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_15, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __pyx_t_13 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_13);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_15, ((PyObject *)(&PyInt_Type))};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_15, ((PyObject *)(&PyInt_Type))};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_13) {
+ __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_13); __pyx_t_13 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_5, __pyx_t_15);
+ __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
+ __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_5, ((PyObject *)(&PyInt_Type)));
+ __pyx_t_15 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_7);
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1120
+ * import bisect
+ * index = numpy.array([bisect.bisect_right(nctime, n) for n in num], int)
+ * before = index == 0 # <<<<<<<<<<<<<<
+ *
+ * index = numpy.array([bisect.bisect_left(nctime, n) for n in num], int)
+ */
+ __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1120, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_v_before = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1122
+ * before = index == 0
+ *
+ * index = numpy.array([bisect.bisect_left(nctime, n) for n in num], int) # <<<<<<<<<<<<<<
+ * after = index == N
+ *
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (likely(PyList_CheckExact(__pyx_v_num)) || PyTuple_CheckExact(__pyx_v_num)) {
+ __pyx_t_15 = __pyx_v_num; __Pyx_INCREF(__pyx_t_15); __pyx_t_10 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_10 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_v_num); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_15))) {
+ if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_15)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_13 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_10); __Pyx_INCREF(__pyx_t_13); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ #else
+ __pyx_t_13 = PySequence_ITEM(__pyx_t_15, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ #endif
+ } else {
+ if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_15)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_10); __Pyx_INCREF(__pyx_t_13); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ #else
+ __pyx_t_13 = PySequence_ITEM(__pyx_t_15, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ #endif
+ }
+ } else {
+ __pyx_t_13 = __pyx_t_16(__pyx_t_15);
+ if (unlikely(!__pyx_t_13)) {
+ 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, 1122, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_13);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_13);
+ __pyx_t_13 = 0;
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_bisect, __pyx_n_s_bisect_left); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_17 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
+ __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_14);
+ if (likely(__pyx_t_17)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
+ __Pyx_INCREF(__pyx_t_17);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_14, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_v_nctime, __pyx_v_n};
+ __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_v_nctime, __pyx_v_n};
+ __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__pyx_t_17) {
+ __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_17); __pyx_t_17 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_nctime);
+ __Pyx_GIVEREF(__pyx_v_nctime);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_nctime);
+ __Pyx_INCREF(__pyx_v_n);
+ __Pyx_GIVEREF(__pyx_v_n);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_n);
+ __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_4, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_15)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_15);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_6, ((PyObject *)(&PyInt_Type))};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_6, ((PyObject *)(&PyInt_Type))};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_13 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ if (__pyx_t_15) {
+ __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_15); __pyx_t_15 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_5, __pyx_t_6);
+ __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
+ __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
+ PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_5, ((PyObject *)(&PyInt_Type)));
+ __pyx_t_6 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_7);
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1123
+ *
+ * index = numpy.array([bisect.bisect_left(nctime, n) for n in num], int)
+ * after = index == N # <<<<<<<<<<<<<<
+ *
+ * if select in ['before', 'exact'] and numpy.any(before):
+ */
+ __pyx_t_7 = PyObject_RichCompare(__pyx_v_index, __pyx_v_N, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1123, __pyx_L1_error)
+ __pyx_v_after = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1125
+ * after = index == N
+ *
+ * if select in ['before', 'exact'] and numpy.any(before): # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'Some of the times given are before the first time in `nctime`.')
+ */
+ __Pyx_INCREF(__pyx_v_select);
+ __pyx_t_7 = __pyx_v_select;
+ __pyx_t_18 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_before, Py_EQ)); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 1125, __pyx_L1_error)
+ if (!__pyx_t_18) {
+ } else {
+ __pyx_t_12 = __pyx_t_18;
+ goto __pyx_L28_bool_binop_done;
+ }
+ __pyx_t_18 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_exact, Py_EQ)); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 1125, __pyx_L1_error)
+ __pyx_t_12 = __pyx_t_18;
+ __pyx_L28_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_18 = (__pyx_t_12 != 0);
+ if (__pyx_t_18) {
+ } else {
+ __pyx_t_9 = __pyx_t_18;
+ goto __pyx_L26_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_any); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_13);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_13, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_v_before); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_13)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_before};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1125, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_before};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1125, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1125, __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_INCREF(__pyx_v_before);
+ __Pyx_GIVEREF(__pyx_v_before);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_before);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 1125, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_9 = __pyx_t_18;
+ __pyx_L26_bool_binop_done:;
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":1126
+ *
+ * if select in ['before', 'exact'] and numpy.any(before):
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'Some of the times given are before the first time in `nctime`.')
+ *
+ */
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1126, __pyx_L1_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, 1126, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1125
+ * after = index == N
+ *
+ * if select in ['before', 'exact'] and numpy.any(before): # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'Some of the times given are before the first time in `nctime`.')
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1129
+ * 'Some of the times given are before the first time in `nctime`.')
+ *
+ * if select in ['after', 'exact'] and numpy.any(after): # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'Some of the times given are after the last time in `nctime`.')
+ */
+ __Pyx_INCREF(__pyx_v_select);
+ __pyx_t_7 = __pyx_v_select;
+ __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_after, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1129, __pyx_L1_error)
+ if (!__pyx_t_12) {
+ } else {
+ __pyx_t_18 = __pyx_t_12;
+ goto __pyx_L33_bool_binop_done;
+ }
+ __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_exact, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __pyx_t_18 = __pyx_t_12;
+ __pyx_L33_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_12 = (__pyx_t_18 != 0);
+ if (__pyx_t_12) {
+ } else {
+ __pyx_t_9 = __pyx_t_12;
+ goto __pyx_L31_bool_binop_done;
+ }
+ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_any); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __pyx_t_13 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_13);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_13) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_after); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_after};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_v_after};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_13); __pyx_t_13 = NULL;
+ __Pyx_INCREF(__pyx_v_after);
+ __Pyx_GIVEREF(__pyx_v_after);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_after);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_9 = __pyx_t_12;
+ __pyx_L31_bool_binop_done:;
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":1130
+ *
+ * if select in ['after', 'exact'] and numpy.any(after):
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'Some of the times given are after the last time in `nctime`.')
+ *
+ */
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1130, __pyx_L1_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, 1130, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1129
+ * 'Some of the times given are before the first time in `nctime`.')
+ *
+ * if select in ['after', 'exact'] and numpy.any(after): # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'Some of the times given are after the last time in `nctime`.')
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1136
+ * # Use list comprehension instead of the simpler `nctime[index]` since
+ * # not all time objects support numpy integer indexing (eg dap).
+ * index[after] = N - 1 # <<<<<<<<<<<<<<
+ * ncnum = numpy.squeeze([nctime[i] for i in index])
+ * mismatch = numpy.nonzero(ncnum != num)[0]
+ */
+ __pyx_t_7 = __Pyx_PyInt_SubtractObjC(__pyx_v_N, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (unlikely(PyObject_SetItem(__pyx_v_index, __pyx_v_after, __pyx_t_7) < 0)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1137
+ * # not all time objects support numpy integer indexing (eg dap).
+ * index[after] = N - 1
+ * ncnum = numpy.squeeze([nctime[i] for i in index]) # <<<<<<<<<<<<<<
+ * mismatch = numpy.nonzero(ncnum != num)[0]
+ *
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
+ __pyx_t_13 = __pyx_v_index; __Pyx_INCREF(__pyx_t_13); __pyx_t_10 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_10 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_13))) {
+ if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_13)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_15 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_10); __Pyx_INCREF(__pyx_t_15); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ #else
+ __pyx_t_15 = PySequence_ITEM(__pyx_t_13, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ #endif
+ } else {
+ if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_13)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_10); __Pyx_INCREF(__pyx_t_15); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ #else
+ __pyx_t_15 = PySequence_ITEM(__pyx_t_13, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ #endif
+ }
+ } else {
+ __pyx_t_15 = __pyx_t_16(__pyx_t_13);
+ if (unlikely(!__pyx_t_15)) {
+ 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, 1137, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_15);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_15);
+ __pyx_t_15 = 0;
+ __pyx_t_15 = PyObject_GetItem(__pyx_v_nctime, __pyx_v_i); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_15))) __PYX_ERR(0, 1137, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __pyx_t_13 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_13);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_13) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_6};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_6};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_13); __pyx_t_13 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_v_ncnum = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1138
+ * index[after] = N - 1
+ * ncnum = numpy.squeeze([nctime[i] for i in index])
+ * mismatch = numpy.nonzero(ncnum != num)[0] # <<<<<<<<<<<<<<
+ *
+ * if select == 'exact':
+ */
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_nonzero); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyObject_RichCompare(__pyx_v_ncnum, __pyx_v_num, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_15);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_15, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_15)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1138, __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_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_v_mismatch = __pyx_t_15;
+ __pyx_t_15 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1140
+ * mismatch = numpy.nonzero(ncnum != num)[0]
+ *
+ * if select == 'exact': # <<<<<<<<<<<<<<
+ * if len(mismatch) > 0:
+ * raise ValueError(
+ */
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_select, __pyx_n_s_exact, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1140, __pyx_L1_error)
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":1141
+ *
+ * if select == 'exact':
+ * if len(mismatch) > 0: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'Some of the times specified were not found in the `nctime` variable.')
+ */
+ __pyx_t_10 = PyObject_Length(__pyx_v_mismatch); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1141, __pyx_L1_error)
+ __pyx_t_9 = ((__pyx_t_10 > 0) != 0);
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":1142
+ * if select == 'exact':
+ * if len(mismatch) > 0:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'Some of the times specified were not found in the `nctime` variable.')
+ *
+ */
+ __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1142, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_Raise(__pyx_t_15, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __PYX_ERR(0, 1142, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1141
+ *
+ * if select == 'exact':
+ * if len(mismatch) > 0: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * 'Some of the times specified were not found in the `nctime` variable.')
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1140
+ * mismatch = numpy.nonzero(ncnum != num)[0]
+ *
+ * if select == 'exact': # <<<<<<<<<<<<<<
+ * if len(mismatch) > 0:
+ * raise ValueError(
+ */
+ goto __pyx_L37;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1145
+ * 'Some of the times specified were not found in the `nctime` variable.')
+ *
+ * elif select == 'before': # <<<<<<<<<<<<<<
+ * index[after] = N
+ * index[mismatch] -= 1
+ */
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_select, __pyx_n_s_before, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1145, __pyx_L1_error)
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":1146
+ *
+ * elif select == 'before':
+ * index[after] = N # <<<<<<<<<<<<<<
+ * index[mismatch] -= 1
+ *
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_index, __pyx_v_after, __pyx_v_N) < 0)) __PYX_ERR(0, 1146, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1147
+ * elif select == 'before':
+ * index[after] = N
+ * index[mismatch] -= 1 # <<<<<<<<<<<<<<
+ *
+ * elif select == 'after':
+ */
+ __Pyx_INCREF(__pyx_v_mismatch);
+ __pyx_t_15 = __pyx_v_mismatch;
+ __pyx_t_7 = PyObject_GetItem(__pyx_v_index, __pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1147, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_13 = __Pyx_PyInt_SubtractObjC(__pyx_t_7, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1147, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_v_index, __pyx_t_15, __pyx_t_13) < 0)) __PYX_ERR(0, 1147, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1145
+ * 'Some of the times specified were not found in the `nctime` variable.')
+ *
+ * elif select == 'before': # <<<<<<<<<<<<<<
+ * index[after] = N
+ * index[mismatch] -= 1
+ */
+ goto __pyx_L37;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1149
+ * index[mismatch] -= 1
+ *
+ * elif select == 'after': # <<<<<<<<<<<<<<
+ * pass
+ *
+ */
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_select, __pyx_n_s_after, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1149, __pyx_L1_error)
+ if (__pyx_t_9) {
+ goto __pyx_L37;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1152
+ * pass
+ *
+ * elif select == 'nearest': # <<<<<<<<<<<<<<
+ * nearest_to_left = num[mismatch] < numpy.array(
+ * [float(nctime[i - 1]) + float(nctime[i]) for i in index[mismatch]]) / 2.
+ */
+ __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_select, __pyx_n_s_nearest, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1152, __pyx_L1_error)
+ if (__pyx_t_9) {
+
+ /* "netcdftime/_netcdftime.pyx":1153
+ *
+ * elif select == 'nearest':
+ * nearest_to_left = num[mismatch] < numpy.array( # <<<<<<<<<<<<<<
+ * [float(nctime[i - 1]) + float(nctime[i]) for i in index[mismatch]]) / 2.
+ * index[mismatch] = index[mismatch] - 1 * nearest_to_left
+ */
+ __pyx_t_15 = PyObject_GetItem(__pyx_v_num, __pyx_v_mismatch); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+
+ /* "netcdftime/_netcdftime.pyx":1154
+ * elif select == 'nearest':
+ * nearest_to_left = num[mismatch] < numpy.array(
+ * [float(nctime[i - 1]) + float(nctime[i]) for i in index[mismatch]]) / 2. # <<<<<<<<<<<<<<
+ * index[mismatch] = index[mismatch] - 1 * nearest_to_left
+ *
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "netcdftime/_netcdftime.pyx":1153
+ *
+ * elif select == 'nearest':
+ * nearest_to_left = num[mismatch] < numpy.array( # <<<<<<<<<<<<<<
+ * [float(nctime[i - 1]) + float(nctime[i]) for i in index[mismatch]]) / 2.
+ * index[mismatch] = index[mismatch] - 1 * nearest_to_left
+ */
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1154
+ * elif select == 'nearest':
+ * nearest_to_left = num[mismatch] < numpy.array(
+ * [float(nctime[i - 1]) + float(nctime[i]) for i in index[mismatch]]) / 2. # <<<<<<<<<<<<<<
+ * index[mismatch] = index[mismatch] - 1 * nearest_to_left
+ *
+ */
+ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_index, __pyx_v_mismatch); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
+ __pyx_t_14 = __pyx_t_6; __Pyx_INCREF(__pyx_t_14); __pyx_t_10 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_10 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_16 = Py_TYPE(__pyx_t_14)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_14))) {
+ if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_14)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_14, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ } else {
+ if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_14)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_14, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ }
+ } else {
+ __pyx_t_6 = __pyx_t_16(__pyx_t_14);
+ if (unlikely(!__pyx_t_6)) {
+ 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, 1154, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_nctime, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_19 = __Pyx_PyObject_AsDouble(__pyx_t_4); if (unlikely(__pyx_t_19 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_nctime, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_20 = __Pyx_PyObject_AsDouble(__pyx_t_4); if (unlikely(__pyx_t_20 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyFloat_FromDouble((__pyx_t_19 + __pyx_t_20)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __pyx_t_14 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_14)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_14);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_14) {
+ __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1153, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_7};
+ __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1153, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_7};
+ __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1153, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_14); __pyx_t_14 = NULL;
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyFloat_DivideObjC(__pyx_t_13, __pyx_float_2_, 2., 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __pyx_t_13 = PyObject_RichCompare(__pyx_t_15, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1153, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_v_nearest_to_left = __pyx_t_13;
+ __pyx_t_13 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1155
+ * nearest_to_left = num[mismatch] < numpy.array(
+ * [float(nctime[i - 1]) + float(nctime[i]) for i in index[mismatch]]) / 2.
+ * index[mismatch] = index[mismatch] - 1 * nearest_to_left # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_t_13 = PyObject_GetItem(__pyx_v_index, __pyx_v_mismatch); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __pyx_t_8 = PyNumber_Multiply(__pyx_int_1, __pyx_v_nearest_to_left); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_15 = PyNumber_Subtract(__pyx_t_13, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_v_index, __pyx_v_mismatch, __pyx_t_15) < 0)) __PYX_ERR(0, 1155, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1152
+ * pass
+ *
+ * elif select == 'nearest': # <<<<<<<<<<<<<<
+ * nearest_to_left = num[mismatch] < numpy.array(
+ * [float(nctime[i - 1]) + float(nctime[i]) for i in index[mismatch]]) / 2.
+ */
+ goto __pyx_L37;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1158
+ *
+ * else:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * "%s is not an option for the `select` argument." % select)
+ *
+ */
+ /*else*/ {
+
+ /* "netcdftime/_netcdftime.pyx":1159
+ * else:
+ * raise ValueError(
+ * "%s is not an option for the `select` argument." % select) # <<<<<<<<<<<<<<
+ *
+ * # Correct for indices equal to -1
+ */
+ __pyx_t_15 = __Pyx_PyString_Format(__pyx_kp_s_s_is_not_an_option_for_the_sele, __pyx_v_select); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1159, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+
+ /* "netcdftime/_netcdftime.pyx":1158
+ *
+ * else:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * "%s is not an option for the `select` argument." % select)
+ *
+ */
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1158, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_15);
+ __pyx_t_15 = 0;
+ __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1158, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_Raise(__pyx_t_15, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __PYX_ERR(0, 1158, __pyx_L1_error)
+ }
+ __pyx_L37:;
+
+ /* "netcdftime/_netcdftime.pyx":1162
+ *
+ * # Correct for indices equal to -1
+ * index[before] = 0 # <<<<<<<<<<<<<<
+ *
+ * # convert numpy scalars or single element arrays to python ints.
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_index, __pyx_v_before, __pyx_int_0) < 0)) __PYX_ERR(0, 1162, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1115
+ * # If the times do not correspond, then it means that the times
+ * # are not increasing uniformly and we try the bisection method.
+ * if not _check_index(index, times, nctime, calendar, select): # <<<<<<<<<<<<<<
+ *
+ * # Use the bisection method. Assumes nctime is ordered.
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1165
+ *
+ * # convert numpy scalars or single element arrays to python ints.
+ * return _toscalar(index) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_15 = __pyx_f_10netcdftime_11_netcdftime__toscalar(__pyx_v_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1165, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_r = __pyx_t_15;
+ __pyx_t_15 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1060
+ *
+ *
+ * def time2index(times, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<<
+ * """
+ * time2index(times, nctime, calendar=None, select='exact')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_AddTraceback("netcdftime._netcdftime.time2index", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_num);
+ __Pyx_XDECREF(__pyx_v_N);
+ __Pyx_XDECREF(__pyx_v_t0);
+ __Pyx_XDECREF(__pyx_v_t1);
+ __Pyx_XDECREF(__pyx_v_dt);
+ __Pyx_XDECREF(__pyx_v_index);
+ __Pyx_XDECREF(__pyx_v_bisect);
+ __Pyx_XDECREF(__pyx_v_before);
+ __Pyx_XDECREF(__pyx_v_after);
+ __Pyx_XDECREF(__pyx_v_ncnum);
+ __Pyx_XDECREF(__pyx_v_mismatch);
+ __Pyx_XDECREF(__pyx_v_nearest_to_left);
+ __Pyx_XDECREF(__pyx_v_n);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XDECREF(__pyx_v_calendar);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1168
+ *
+ *
+ * cdef _toscalar(a): # <<<<<<<<<<<<<<
+ * if a.shape in [(), (1,)]:
+ * return a.item()
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__toscalar(PyObject *__pyx_v_a) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("_toscalar", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1169
+ *
+ * cdef _toscalar(a):
+ * if a.shape in [(), (1,)]: # <<<<<<<<<<<<<<
+ * return a.item()
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1169, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1169, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_2 = __pyx_t_4;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_tuple__22, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1169, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1169, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_2 = __pyx_t_4;
+ __pyx_L4_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = (__pyx_t_2 != 0);
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":1170
+ * cdef _toscalar(a):
+ * if a.shape in [(), (1,)]:
+ * return a.item() # <<<<<<<<<<<<<<
+ * else:
+ * return a
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_item); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ 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_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __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, 1170, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1169
+ *
+ * cdef _toscalar(a):
+ * if a.shape in [(), (1,)]: # <<<<<<<<<<<<<<
+ * return a.item()
+ * else:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1172
+ * return a.item()
+ * else:
+ * return a # <<<<<<<<<<<<<<
+ *
+ * cdef to_tuple(dt):
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_a);
+ __pyx_r = __pyx_v_a;
+ goto __pyx_L0;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1168
+ *
+ *
+ * cdef _toscalar(a): # <<<<<<<<<<<<<<
+ * if a.shape in [(), (1,)]:
+ * return a.item()
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("netcdftime._netcdftime._toscalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1174
+ * return a
+ *
+ * cdef to_tuple(dt): # <<<<<<<<<<<<<<
+ * """Turn a datetime.datetime instance into a tuple of integers. Elements go
+ * in the order of decreasing significance, making it easy to compare
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_to_tuple(PyObject *__pyx_v_dt) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("to_tuple", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1179
+ * datetime instances. Parts of the state that don't affect ordering
+ * are omitted. Compare to datetime.timetuple()."""
+ * return (dt.year, dt.month, dt.day, dt.hour, dt.minute, # <<<<<<<<<<<<<<
+ * dt.second, dt.microsecond)
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_hour); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_minute); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+
+ /* "netcdftime/_netcdftime.pyx":1180
+ * are omitted. Compare to datetime.timetuple()."""
+ * return (dt.year, dt.month, dt.day, dt.hour, dt.minute,
+ * dt.second, dt.microsecond) # <<<<<<<<<<<<<<
+ *
+ * # a cache of converters (utime instances) for different calendars
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_second); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1180, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_microsecond); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1180, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "netcdftime/_netcdftime.pyx":1179
+ * datetime instances. Parts of the state that don't affect ordering
+ * are omitted. Compare to datetime.timetuple()."""
+ * return (dt.year, dt.month, dt.day, dt.hour, dt.minute, # <<<<<<<<<<<<<<
+ * dt.second, dt.microsecond)
+ *
+ */
+ __pyx_t_8 = PyTuple_New(7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_8, 6, __pyx_t_7);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_7 = 0;
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1174
+ * return a
+ *
+ * cdef to_tuple(dt): # <<<<<<<<<<<<<<
+ * """Turn a datetime.datetime instance into a tuple of integers. Elements go
+ * in the order of decreasing significance, making it easy to compare
+ */
+
+ /* 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_8);
+ __Pyx_AddTraceback("netcdftime._netcdftime.to_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1204
+ * cdef readonly bint datetime_compatible
+ *
+ * def __init__(self, int year, int month, int day, int hour=0, int minute=0, int second=0, # <<<<<<<<<<<<<<
+ * int microsecond=0, int dayofwk=-1, int dayofyr=1):
+ * """dayofyr set to 1 by default - otherwise time.strftime will complain"""
+ */
+
+/* Python wrapper */
+static int __pyx_pw_10netcdftime_11_netcdftime_8datetime_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_10netcdftime_11_netcdftime_8datetime___init__[] = "dayofyr set to 1 by default - otherwise time.strftime will complain";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_10netcdftime_11_netcdftime_8datetime___init__;
+#endif
+static int __pyx_pw_10netcdftime_11_netcdftime_8datetime_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ int __pyx_v_year;
+ int __pyx_v_month;
+ int __pyx_v_day;
+ int __pyx_v_hour;
+ int __pyx_v_minute;
+ int __pyx_v_second;
+ int __pyx_v_microsecond;
+ int __pyx_v_dayofwk;
+ int __pyx_v_dayofyr;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__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_microsecond,&__pyx_n_s_dayofwk,&__pyx_n_s_dayofyr,0};
+ PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ 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);
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_year)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_month)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 9, 1); __PYX_ERR(0, 1204, __pyx_L3_error)
+ }
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_day)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 9, 2); __PYX_ERR(0, 1204, __pyx_L3_error)
+ }
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hour);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ case 4:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minute);
+ if (value) { values[4] = value; kw_args--; }
+ }
+ case 5:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_second);
+ if (value) { values[5] = value; kw_args--; }
+ }
+ case 6:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_microsecond);
+ if (value) { values[6] = value; kw_args--; }
+ }
+ case 7:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dayofwk);
+ if (value) { values[7] = value; kw_args--; }
+ }
+ case 8:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dayofyr);
+ if (value) { values[8] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1204, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
+ 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);
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_year = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_year == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L3_error)
+ __pyx_v_month = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_month == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L3_error)
+ __pyx_v_day = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_day == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L3_error)
+ if (values[3]) {
+ __pyx_v_hour = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_hour == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L3_error)
+ } else {
+ __pyx_v_hour = ((int)0);
+ }
+ if (values[4]) {
+ __pyx_v_minute = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_minute == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L3_error)
+ } else {
+ __pyx_v_minute = ((int)0);
+ }
+ if (values[5]) {
+ __pyx_v_second = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_second == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L3_error)
+ } else {
+ __pyx_v_second = ((int)0);
+ }
+ if (values[6]) {
+ __pyx_v_microsecond = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_microsecond == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1205, __pyx_L3_error)
+ } else {
+ __pyx_v_microsecond = ((int)0);
+ }
+ if (values[7]) {
+ __pyx_v_dayofwk = __Pyx_PyInt_As_int(values[7]); if (unlikely((__pyx_v_dayofwk == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1205, __pyx_L3_error)
+ } else {
+ __pyx_v_dayofwk = ((int)-1);
+ }
+ if (values[8]) {
+ __pyx_v_dayofyr = __Pyx_PyInt_As_int(values[8]); if (unlikely((__pyx_v_dayofyr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1205, __pyx_L3_error)
+ } else {
+ __pyx_v_dayofyr = ((int)1);
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1204, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return -1;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime___init__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self), __pyx_v_year, __pyx_v_month, __pyx_v_day, __pyx_v_hour, __pyx_v_minute, __pyx_v_second, __pyx_v_microsecond, __pyx_v_dayofwk, __pyx_v_dayofyr);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_10netcdftime_11_netcdftime_8datetime___init__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self, int __pyx_v_year, int __pyx_v_month, int __pyx_v_day, int __pyx_v_hour, int __pyx_v_minute, int __pyx_v_second, int __pyx_v_microsecond, int __pyx_v_dayofwk, int __pyx_v_dayofyr) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1208
+ * """dayofyr set to 1 by default - otherwise time.strftime will complain"""
+ *
+ * self.year = year # <<<<<<<<<<<<<<
+ * self.month = month
+ * self.day = day
+ */
+ __pyx_v_self->year = __pyx_v_year;
+
+ /* "netcdftime/_netcdftime.pyx":1209
+ *
+ * self.year = year
+ * self.month = month # <<<<<<<<<<<<<<
+ * self.day = day
+ * self.hour = hour
+ */
+ __pyx_v_self->month = __pyx_v_month;
+
+ /* "netcdftime/_netcdftime.pyx":1210
+ * self.year = year
+ * self.month = month
+ * self.day = day # <<<<<<<<<<<<<<
+ * self.hour = hour
+ * self.minute = minute
+ */
+ __pyx_v_self->day = __pyx_v_day;
+
+ /* "netcdftime/_netcdftime.pyx":1211
+ * self.month = month
+ * self.day = day
+ * self.hour = hour # <<<<<<<<<<<<<<
+ * self.minute = minute
+ * self.dayofwk = dayofwk
+ */
+ __pyx_v_self->hour = __pyx_v_hour;
+
+ /* "netcdftime/_netcdftime.pyx":1212
+ * self.day = day
+ * self.hour = hour
+ * self.minute = minute # <<<<<<<<<<<<<<
+ * self.dayofwk = dayofwk
+ * self.dayofyr = dayofyr
+ */
+ __pyx_v_self->minute = __pyx_v_minute;
+
+ /* "netcdftime/_netcdftime.pyx":1213
+ * self.hour = hour
+ * self.minute = minute
+ * self.dayofwk = dayofwk # <<<<<<<<<<<<<<
+ * self.dayofyr = dayofyr
+ * self.second = second
+ */
+ __pyx_v_self->dayofwk = __pyx_v_dayofwk;
+
+ /* "netcdftime/_netcdftime.pyx":1214
+ * self.minute = minute
+ * self.dayofwk = dayofwk
+ * self.dayofyr = dayofyr # <<<<<<<<<<<<<<
+ * self.second = second
+ * self.microsecond = microsecond
+ */
+ __pyx_v_self->dayofyr = __pyx_v_dayofyr;
+
+ /* "netcdftime/_netcdftime.pyx":1215
+ * self.dayofwk = dayofwk
+ * self.dayofyr = dayofyr
+ * self.second = second # <<<<<<<<<<<<<<
+ * self.microsecond = microsecond
+ * self.calendar = ""
+ */
+ __pyx_v_self->second = __pyx_v_second;
+
+ /* "netcdftime/_netcdftime.pyx":1216
+ * self.dayofyr = dayofyr
+ * self.second = second
+ * self.microsecond = microsecond # <<<<<<<<<<<<<<
+ * self.calendar = ""
+ *
+ */
+ __pyx_v_self->microsecond = __pyx_v_microsecond;
+
+ /* "netcdftime/_netcdftime.pyx":1217
+ * self.second = second
+ * self.microsecond = microsecond
+ * self.calendar = "" # <<<<<<<<<<<<<<
+ *
+ * self.datetime_compatible = True
+ */
+ __Pyx_INCREF(__pyx_kp_s__23);
+ __Pyx_GIVEREF(__pyx_kp_s__23);
+ __Pyx_GOTREF(__pyx_v_self->calendar);
+ __Pyx_DECREF(__pyx_v_self->calendar);
+ __pyx_v_self->calendar = __pyx_kp_s__23;
+
+ /* "netcdftime/_netcdftime.pyx":1219
+ * self.calendar = ""
+ *
+ * self.datetime_compatible = True # <<<<<<<<<<<<<<
+ *
+ * @property
+ */
+ __pyx_v_self->datetime_compatible = 1;
+
+ /* "netcdftime/_netcdftime.pyx":1204
+ * cdef readonly bint datetime_compatible
+ *
+ * def __init__(self, int year, int month, int day, int hour=0, int minute=0, int second=0, # <<<<<<<<<<<<<<
+ * int microsecond=0, int dayofwk=-1, int dayofyr=1):
+ * """dayofyr set to 1 by default - otherwise time.strftime will complain"""
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1222
+ *
+ * @property
+ * def format(self): # <<<<<<<<<<<<<<
+ * return '%Y-%m-%d %H:%M:%S'
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_6format_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_6format_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_6format___get__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_6format___get__(CYTHON_UNUSED struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1223
+ * @property
+ * def format(self):
+ * return '%Y-%m-%d %H:%M:%S' # <<<<<<<<<<<<<<
+ *
+ * def strftime(self, format=None):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_kp_s_Y_m_d_H_M_S);
+ __pyx_r = __pyx_kp_s_Y_m_d_H_M_S;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1222
+ *
+ * @property
+ * def format(self): # <<<<<<<<<<<<<<
+ * return '%Y-%m-%d %H:%M:%S'
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1225
+ * return '%Y-%m-%d %H:%M:%S'
+ *
+ * def strftime(self, format=None): # <<<<<<<<<<<<<<
+ * if format is None:
+ * format = self.format
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_3strftime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_3strftime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_format = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("strftime (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_format,0};
+ PyObject* values[1] = {0};
+ values[0] = ((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 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format);
+ if (value) { values[0] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "strftime") < 0)) __PYX_ERR(0, 1225, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_format = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("strftime", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1225, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_2strftime(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self), __pyx_v_format);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_2strftime(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self, PyObject *__pyx_v_format) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("strftime", 0);
+ __Pyx_INCREF(__pyx_v_format);
+
+ /* "netcdftime/_netcdftime.pyx":1226
+ *
+ * def strftime(self, format=None):
+ * if format is None: # <<<<<<<<<<<<<<
+ * format = self.format
+ * return _strftime(self, format)
+ */
+ __pyx_t_1 = (__pyx_v_format == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":1227
+ * def strftime(self, format=None):
+ * if format is None:
+ * format = self.format # <<<<<<<<<<<<<<
+ * return _strftime(self, format)
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1227, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1226
+ *
+ * def strftime(self, format=None):
+ * if format is None: # <<<<<<<<<<<<<<
+ * format = self.format
+ * return _strftime(self, format)
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1228
+ * if format is None:
+ * format = self.format
+ * return _strftime(self, format) # <<<<<<<<<<<<<<
+ *
+ * def replace(self, **kwargs):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __pyx_f_10netcdftime_11_netcdftime__strftime(__pyx_v_self, __pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1225
+ * return '%Y-%m-%d %H:%M:%S'
+ *
+ * def strftime(self, format=None): # <<<<<<<<<<<<<<
+ * if format is None:
+ * format = self.format
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_format);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1230
+ * return _strftime(self, format)
+ *
+ * def replace(self, **kwargs): # <<<<<<<<<<<<<<
+ * "Return datetime with new specified fields."
+ * args = {"year": self.year,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_5replace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_10netcdftime_11_netcdftime_8datetime_4replace[] = "Return datetime with new specified fields.";
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_5replace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_kwargs = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("replace (wrapper)", 0);
+ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+ __Pyx_RaiseArgtupleInvalid("replace", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
+ if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "replace", 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_10netcdftime_11_netcdftime_8datetime_4replace(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self), __pyx_v_kwargs);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_kwargs);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_4replace(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self, PyObject *__pyx_v_kwargs) {
+ PyObject *__pyx_v_args = NULL;
+ PyObject *__pyx_v_name = NULL;
+ PyObject *__pyx_v_value = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ __Pyx_RefNannySetupContext("replace", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1232
+ * def replace(self, **kwargs):
+ * "Return datetime with new specified fields."
+ * args = {"year": self.year, # <<<<<<<<<<<<<<
+ * "month": self.month,
+ * "day": self.day,
+ */
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->year); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1232, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_year, __pyx_t_2) < 0) __PYX_ERR(0, 1232, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1233
+ * "Return datetime with new specified fields."
+ * args = {"year": self.year,
+ * "month": self.month, # <<<<<<<<<<<<<<
+ * "day": self.day,
+ * "hour": self.hour,
+ */
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1233, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_month, __pyx_t_2) < 0) __PYX_ERR(0, 1232, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1234
+ * args = {"year": self.year,
+ * "month": self.month,
+ * "day": self.day, # <<<<<<<<<<<<<<
+ * "hour": self.hour,
+ * "minute": self.minute,
+ */
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1234, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_day, __pyx_t_2) < 0) __PYX_ERR(0, 1232, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1235
+ * "month": self.month,
+ * "day": self.day,
+ * "hour": self.hour, # <<<<<<<<<<<<<<
+ * "minute": self.minute,
+ * "second": self.second,
+ */
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->hour); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_hour, __pyx_t_2) < 0) __PYX_ERR(0, 1232, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1236
+ * "day": self.day,
+ * "hour": self.hour,
+ * "minute": self.minute, # <<<<<<<<<<<<<<
+ * "second": self.second,
+ * "microsecond": self.microsecond,
+ */
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->minute); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1236, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_minute, __pyx_t_2) < 0) __PYX_ERR(0, 1232, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1237
+ * "hour": self.hour,
+ * "minute": self.minute,
+ * "second": self.second, # <<<<<<<<<<<<<<
+ * "microsecond": self.microsecond,
+ * "dayofwk": self.dayofwk,
+ */
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->second); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1237, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_second, __pyx_t_2) < 0) __PYX_ERR(0, 1232, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1238
+ * "minute": self.minute,
+ * "second": self.second,
+ * "microsecond": self.microsecond, # <<<<<<<<<<<<<<
+ * "dayofwk": self.dayofwk,
+ * "dayofyr": self.dayofyr}
+ */
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->microsecond); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_microsecond, __pyx_t_2) < 0) __PYX_ERR(0, 1232, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1239
+ * "second": self.second,
+ * "microsecond": self.microsecond,
+ * "dayofwk": self.dayofwk, # <<<<<<<<<<<<<<
+ * "dayofyr": self.dayofyr}
+ *
+ */
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->dayofwk); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dayofwk, __pyx_t_2) < 0) __PYX_ERR(0, 1232, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1240
+ * "microsecond": self.microsecond,
+ * "dayofwk": self.dayofwk,
+ * "dayofyr": self.dayofyr} # <<<<<<<<<<<<<<
+ *
+ * for name, value in kwargs.items():
+ */
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->dayofyr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dayofyr, __pyx_t_2) < 0) __PYX_ERR(0, 1232, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_args = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1242
+ * "dayofyr": self.dayofyr}
+ *
+ * for name, value in kwargs.items(): # <<<<<<<<<<<<<<
+ * args[name] = value
+ *
+ */
+ __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __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, 1242, __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, 1242, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_4)) {
+ 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, 1242, __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, 1242, __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, 1242, __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, 1242, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_4(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ 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, 1242, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 1242, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
+ }
+ __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, 1242, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1242, __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, 1242, __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;
+ index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ 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, 1242, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L6_unpacking_done;
+ __pyx_L5_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 1242, __pyx_L1_error)
+ __pyx_L6_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1243
+ *
+ * for name, value in kwargs.items():
+ * args[name] = value # <<<<<<<<<<<<<<
+ *
+ * return self.__class__(**args)
+ */
+ if (unlikely(PyDict_SetItem(__pyx_v_args, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 1243, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1242
+ * "dayofyr": self.dayofyr}
+ *
+ * for name, value in kwargs.items(): # <<<<<<<<<<<<<<
+ * args[name] = value
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1245
+ * args[name] = value
+ *
+ * return self.__class__(**args) # <<<<<<<<<<<<<<
+ *
+ * def timetuple(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1245, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1230
+ * return _strftime(self, format)
+ *
+ * def replace(self, **kwargs): # <<<<<<<<<<<<<<
+ * "Return datetime with new specified fields."
+ * args = {"year": self.year,
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_name);
+ __Pyx_XDECREF(__pyx_v_value);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1247
+ * return self.__class__(**args)
+ *
+ * def timetuple(self): # <<<<<<<<<<<<<<
+ * return (self.year, self.month, self.day, self.hour,
+ * self.minute, self.second, self.dayofwk, self.dayofyr, -1)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_7timetuple(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_7timetuple(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("timetuple (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_6timetuple(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_6timetuple(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ __Pyx_RefNannySetupContext("timetuple", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1248
+ *
+ * def timetuple(self):
+ * return (self.year, self.month, self.day, self.hour, # <<<<<<<<<<<<<<
+ * self.minute, self.second, self.dayofwk, self.dayofyr, -1)
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1248, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1248, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1248, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->hour); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1248, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "netcdftime/_netcdftime.pyx":1249
+ * def timetuple(self):
+ * return (self.year, self.month, self.day, self.hour,
+ * self.minute, self.second, self.dayofwk, self.dayofyr, -1) # <<<<<<<<<<<<<<
+ *
+ * cpdef _to_real_datetime(self):
+ */
+ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->minute); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1249, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->second); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1249, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->dayofwk); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1249, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_self->dayofyr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1249, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+
+ /* "netcdftime/_netcdftime.pyx":1248
+ *
+ * def timetuple(self):
+ * return (self.year, self.month, self.day, self.hour, # <<<<<<<<<<<<<<
+ * self.minute, self.second, self.dayofwk, self.dayofyr, -1)
+ *
+ */
+ __pyx_t_9 = PyTuple_New(9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1248, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_9, 6, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 7, __pyx_t_8);
+ __Pyx_INCREF(__pyx_int_neg_1);
+ __Pyx_GIVEREF(__pyx_int_neg_1);
+ PyTuple_SET_ITEM(__pyx_t_9, 8, __pyx_int_neg_1);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_7 = 0;
+ __pyx_t_8 = 0;
+ __pyx_r = __pyx_t_9;
+ __pyx_t_9 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1247
+ * return self.__class__(**args)
+ *
+ * def timetuple(self): # <<<<<<<<<<<<<<
+ * return (self.year, self.month, self.day, self.hour,
+ * self.minute, self.second, self.dayofwk, self.dayofyr, -1)
+ */
+
+ /* 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_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.timetuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1251
+ * self.minute, self.second, self.dayofwk, self.dayofyr, -1)
+ *
+ * cpdef _to_real_datetime(self): # <<<<<<<<<<<<<<
+ * return real_datetime(self.year, self.month, self.day,
+ * self.hour, self.minute, self.second,
+ */
+
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_9_to_real_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_8datetime__to_real_datetime(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self, int __pyx_skip_dispatch) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ int __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
+ __Pyx_RefNannySetupContext("_to_real_datetime", 0);
+ /* Check if called by wrapper */
+ if (unlikely(__pyx_skip_dispatch)) ;
+ /* Check if overridden in Python */
+ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_real_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_10netcdftime_11_netcdftime_8datetime_9_to_real_datetime)) {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_t_1);
+ __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1251, __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, 1251, __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;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1252
+ *
+ * cpdef _to_real_datetime(self):
+ * return real_datetime(self.year, self.month, self.day, # <<<<<<<<<<<<<<
+ * self.hour, self.minute, self.second,
+ * self.microsecond)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_real_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1252, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1252, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1252, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1252, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+
+ /* "netcdftime/_netcdftime.pyx":1253
+ * cpdef _to_real_datetime(self):
+ * return real_datetime(self.year, self.month, self.day,
+ * self.hour, self.minute, self.second, # <<<<<<<<<<<<<<
+ * self.microsecond)
+ *
+ */
+ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->hour); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1253, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->minute); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1253, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_self->second); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1253, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+
+ /* "netcdftime/_netcdftime.pyx":1254
+ * return real_datetime(self.year, self.month, self.day,
+ * self.hour, self.minute, self.second,
+ * self.microsecond) # <<<<<<<<<<<<<<
+ *
+ * def __repr__(self):
+ */
+ __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->microsecond); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1254, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[8] = {__pyx_t_10, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 7+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[8] = {__pyx_t_10, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 7+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(7+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1252, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_12, 3+__pyx_t_11, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_12, 4+__pyx_t_11, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_12, 5+__pyx_t_11, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_12, 6+__pyx_t_11, __pyx_t_9);
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_7 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_9 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1251
+ * self.minute, self.second, self.dayofwk, self.dayofyr, -1)
+ *
+ * cpdef _to_real_datetime(self): # <<<<<<<<<<<<<<
+ * return real_datetime(self.year, self.month, self.day,
+ * self.hour, self.minute, self.second,
+ */
+
+ /* 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_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime._to_real_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_9_to_real_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_9_to_real_datetime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_real_datetime (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_8_to_real_datetime(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_8_to_real_datetime(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("_to_real_datetime", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __pyx_f_10netcdftime_11_netcdftime_8datetime__to_real_datetime(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime._to_real_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1256
+ * self.microsecond)
+ *
+ * def __repr__(self): # <<<<<<<<<<<<<<
+ * return "{0}.{1}{2}".format(self.__class__.__module__,
+ * self.__class__.__name__,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_11__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_11__repr__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_10__repr__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_10__repr__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("__repr__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1257
+ *
+ * def __repr__(self):
+ * return "{0}.{1}{2}".format(self.__class__.__module__, # <<<<<<<<<<<<<<
+ * self.__class__.__name__,
+ * self._getstate())
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_2, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1257, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1257, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_module); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1257, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1258
+ * def __repr__(self):
+ * return "{0}.{1}{2}".format(self.__class__.__module__,
+ * self.__class__.__name__, # <<<<<<<<<<<<<<
+ * self._getstate())
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1258, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1258, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1259
+ * return "{0}.{1}{2}".format(self.__class__.__module__,
+ * self.__class__.__name__,
+ * self._getstate()) # <<<<<<<<<<<<<<
+ *
+ * def __str__(self):
+ */
+ __pyx_t_3 = ((struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime *)__pyx_v_self->__pyx_vtab)->_getstate(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1259, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_5, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __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;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_5, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __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;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1257, __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;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_3);
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1256
+ * self.microsecond)
+ *
+ * def __repr__(self): # <<<<<<<<<<<<<<
+ * return "{0}.{1}{2}".format(self.__class__.__module__,
+ * self.__class__.__name__,
+ */
+
+ /* 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_8);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1261
+ * self._getstate())
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return self.strftime(self.format)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_13__str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_13__str__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_12__str__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_12__str__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("__str__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1262
+ *
+ * def __str__(self):
+ * return self.strftime(self.format) # <<<<<<<<<<<<<<
+ *
+ * def __hash__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1262, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1262, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1262, __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_4, __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, 1262, __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
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __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, 1262, __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_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1262, __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_3);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1262, __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;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1261
+ * self._getstate())
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return self.strftime(self.format)
+ *
+ */
+
+ /* 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_AddTraceback("netcdftime._netcdftime.datetime.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1264
+ * return self.strftime(self.format)
+ *
+ * def __hash__(self): # <<<<<<<<<<<<<<
+ * try:
+ * d = self._to_real_datetime()
+ */
+
+/* Python wrapper */
+static Py_hash_t __pyx_pw_10netcdftime_11_netcdftime_8datetime_15__hash__(PyObject *__pyx_v_self); /*proto*/
+static Py_hash_t __pyx_pw_10netcdftime_11_netcdftime_8datetime_15__hash__(PyObject *__pyx_v_self) {
+ Py_hash_t __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_14__hash__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static Py_hash_t __pyx_pf_10netcdftime_11_netcdftime_8datetime_14__hash__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_v_d = NULL;
+ Py_hash_t __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ Py_hash_t __pyx_t_11;
+ __Pyx_RefNannySetupContext("__hash__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1265
+ *
+ * def __hash__(self):
+ * try: # <<<<<<<<<<<<<<
+ * d = self._to_real_datetime()
+ * except ValueError:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "netcdftime/_netcdftime.pyx":1266
+ * def __hash__(self):
+ * try:
+ * d = self._to_real_datetime() # <<<<<<<<<<<<<<
+ * except ValueError:
+ * return hash(self.timetuple())
+ */
+ __pyx_t_4 = ((struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime *)__pyx_v_self->__pyx_vtab)->_to_real_datetime(__pyx_v_self, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1266, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_d = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1265
+ *
+ * def __hash__(self):
+ * try: # <<<<<<<<<<<<<<
+ * d = self._to_real_datetime()
+ * except ValueError:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L10_try_end;
+ __pyx_L3_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1267
+ * try:
+ * d = self._to_real_datetime()
+ * except ValueError: # <<<<<<<<<<<<<<
+ * return hash(self.timetuple())
+ * return hash(d)
+ */
+ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
+ if (__pyx_t_5) {
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1267, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "netcdftime/_netcdftime.pyx":1268
+ * d = self._to_real_datetime()
+ * except ValueError:
+ * return hash(self.timetuple()) # <<<<<<<<<<<<<<
+ * return hash(d)
+ *
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_timetuple); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1268, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+ if (__pyx_t_10) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1268, __pyx_L5_except_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1268, __pyx_L5_except_error)
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_11 = PyObject_Hash(__pyx_t_8); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 1268, __pyx_L5_except_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_r = __pyx_t_11;
+ __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;
+ goto __pyx_L6_except_return;
+ }
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+ /* "netcdftime/_netcdftime.pyx":1265
+ *
+ * def __hash__(self):
+ * try: # <<<<<<<<<<<<<<
+ * d = self._to_real_datetime()
+ * except ValueError:
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L1_error;
+ __pyx_L6_except_return:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L0;
+ __pyx_L10_try_end:;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1269
+ * except ValueError:
+ * return hash(self.timetuple())
+ * return hash(d) # <<<<<<<<<<<<<<
+ *
+ * cdef to_tuple(self):
+ */
+ __pyx_t_11 = PyObject_Hash(__pyx_v_d); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 1269, __pyx_L1_error)
+ __pyx_r = __pyx_t_11;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1264
+ * return self.strftime(self.format)
+ *
+ * def __hash__(self): # <<<<<<<<<<<<<<
+ * try:
+ * d = self._to_real_datetime()
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_d);
+ if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1271
+ * return hash(d)
+ *
+ * cdef to_tuple(self): # <<<<<<<<<<<<<<
+ * return (self.year, self.month, self.day, self.hour, self.minute,
+ * self.second, self.microsecond)
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_8datetime_to_tuple(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("to_tuple", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1272
+ *
+ * cdef to_tuple(self):
+ * return (self.year, self.month, self.day, self.hour, self.minute, # <<<<<<<<<<<<<<
+ * self.second, self.microsecond)
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1272, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->hour); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->minute); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+
+ /* "netcdftime/_netcdftime.pyx":1273
+ * cdef to_tuple(self):
+ * return (self.year, self.month, self.day, self.hour, self.minute,
+ * self.second, self.microsecond) # <<<<<<<<<<<<<<
+ *
+ * def __richcmp__(self, other, int op):
+ */
+ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->second); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->microsecond); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "netcdftime/_netcdftime.pyx":1272
+ *
+ * cdef to_tuple(self):
+ * return (self.year, self.month, self.day, self.hour, self.minute, # <<<<<<<<<<<<<<
+ * self.second, self.microsecond)
+ *
+ */
+ __pyx_t_8 = PyTuple_New(7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1272, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_8, 6, __pyx_t_7);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_7 = 0;
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1271
+ * return hash(d)
+ *
+ * cdef to_tuple(self): # <<<<<<<<<<<<<<
+ * return (self.year, self.month, self.day, self.hour, self.minute,
+ * self.second, self.microsecond)
+ */
+
+ /* 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_8);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.to_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1275
+ * self.second, self.microsecond)
+ *
+ * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<<
+ * cdef datetime dt, dt_other
+ * dt = self
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_17__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_17__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_16__richcmp__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_16__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
+ struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_dt = 0;
+ struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_dt_other = 0;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("__richcmp__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1277
+ * def __richcmp__(self, other, int op):
+ * cdef datetime dt, dt_other
+ * dt = self # <<<<<<<<<<<<<<
+ * if isinstance(other, datetime):
+ * dt_other = other
+ */
+ if (!(likely(((__pyx_v_self) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self, __pyx_ptype_10netcdftime_11_netcdftime_datetime))))) __PYX_ERR(0, 1277, __pyx_L1_error)
+ __pyx_t_1 = __pyx_v_self;
+ __Pyx_INCREF(__pyx_t_1);
+ __pyx_v_dt = ((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1278
+ * cdef datetime dt, dt_other
+ * dt = self
+ * if isinstance(other, datetime): # <<<<<<<<<<<<<<
+ * dt_other = other
+ * # comparing two datetime instances
+ */
+ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_10netcdftime_11_netcdftime_datetime);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1279
+ * dt = self
+ * if isinstance(other, datetime):
+ * dt_other = other # <<<<<<<<<<<<<<
+ * # comparing two datetime instances
+ * if dt.calendar == dt_other.calendar:
+ */
+ if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_10netcdftime_11_netcdftime_datetime))))) __PYX_ERR(0, 1279, __pyx_L1_error)
+ __pyx_t_1 = __pyx_v_other;
+ __Pyx_INCREF(__pyx_t_1);
+ __pyx_v_dt_other = ((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1281
+ * dt_other = other
+ * # comparing two datetime instances
+ * if dt.calendar == dt_other.calendar: # <<<<<<<<<<<<<<
+ * return PyObject_RichCompare(dt.to_tuple(), dt_other.to_tuple(), op)
+ * else:
+ */
+ __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_dt->calendar, __pyx_v_dt_other->calendar, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1281, __pyx_L1_error)
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":1282
+ * # comparing two datetime instances
+ * if dt.calendar == dt_other.calendar:
+ * return PyObject_RichCompare(dt.to_tuple(), dt_other.to_tuple(), op) # <<<<<<<<<<<<<<
+ * else:
+ * # Note: it *is* possible to compare datetime
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = ((struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime *)__pyx_v_dt->__pyx_vtab)->to_tuple(__pyx_v_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = ((struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime *)__pyx_v_dt_other->__pyx_vtab)->to_tuple(__pyx_v_dt_other); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, __pyx_v_op); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1281
+ * dt_other = other
+ * # comparing two datetime instances
+ * if dt.calendar == dt_other.calendar: # <<<<<<<<<<<<<<
+ * return PyObject_RichCompare(dt.to_tuple(), dt_other.to_tuple(), op)
+ * else:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1288
+ * # utime.date2num(), but this implementation does
+ * # not attempt it.
+ * raise TypeError("cannot compare {0!r} and {1!r} (different calendars)".format(dt, dt_other)) # <<<<<<<<<<<<<<
+ * elif isinstance(other, real_datetime):
+ * # comparing datetime and real_datetime
+ */
+ /*else*/ {
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cannot_compare_0_r_and_1_r_diffe, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1288, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_dt), ((PyObject *)__pyx_v_dt_other)};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1288, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, ((PyObject *)__pyx_v_dt), ((PyObject *)__pyx_v_dt_other)};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1288, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1288, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_1) {
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ }
+ __Pyx_INCREF(((PyObject *)__pyx_v_dt));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_dt));
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_dt));
+ __Pyx_INCREF(((PyObject *)__pyx_v_dt_other));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_dt_other));
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_dt_other));
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1288, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1288, __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_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1288, __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, 1288, __pyx_L1_error)
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1278
+ * cdef datetime dt, dt_other
+ * dt = self
+ * if isinstance(other, datetime): # <<<<<<<<<<<<<<
+ * dt_other = other
+ * # comparing two datetime instances
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1289
+ * # not attempt it.
+ * raise TypeError("cannot compare {0!r} and {1!r} (different calendars)".format(dt, dt_other))
+ * elif isinstance(other, real_datetime): # <<<<<<<<<<<<<<
+ * # comparing datetime and real_datetime
+ * if not dt.datetime_compatible:
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_real_datetime); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1289, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_5); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 1289, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1291
+ * elif isinstance(other, real_datetime):
+ * # comparing datetime and real_datetime
+ * if not dt.datetime_compatible: # <<<<<<<<<<<<<<
+ * raise TypeError("cannot compare {0!r} and {1!r} (different calendars)".format(self, other))
+ * return PyObject_RichCompare(dt.to_tuple(), to_tuple(other), op)
+ */
+ __pyx_t_3 = ((!(__pyx_v_dt->datetime_compatible != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1292
+ * # comparing datetime and real_datetime
+ * if not dt.datetime_compatible:
+ * raise TypeError("cannot compare {0!r} and {1!r} (different calendars)".format(self, other)) # <<<<<<<<<<<<<<
+ * return PyObject_RichCompare(dt.to_tuple(), to_tuple(other), op)
+ * else:
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cannot_compare_0_r_and_1_r_diffe, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1292, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_self, __pyx_v_other};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1292, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_self, __pyx_v_other};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1292, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_v_other);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1292, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1292, __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_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1292, __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, 1292, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1291
+ * elif isinstance(other, real_datetime):
+ * # comparing datetime and real_datetime
+ * if not dt.datetime_compatible: # <<<<<<<<<<<<<<
+ * raise TypeError("cannot compare {0!r} and {1!r} (different calendars)".format(self, other))
+ * return PyObject_RichCompare(dt.to_tuple(), to_tuple(other), op)
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1293
+ * if not dt.datetime_compatible:
+ * raise TypeError("cannot compare {0!r} and {1!r} (different calendars)".format(self, other))
+ * return PyObject_RichCompare(dt.to_tuple(), to_tuple(other), op) # <<<<<<<<<<<<<<
+ * else:
+ * raise TypeError("cannot compare {0!r} and {1!r}".format(self, other))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = ((struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime *)__pyx_v_dt->__pyx_vtab)->to_tuple(__pyx_v_dt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __pyx_f_10netcdftime_11_netcdftime_to_tuple(__pyx_v_other); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __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;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1289
+ * # not attempt it.
+ * raise TypeError("cannot compare {0!r} and {1!r} (different calendars)".format(dt, dt_other))
+ * elif isinstance(other, real_datetime): # <<<<<<<<<<<<<<
+ * # comparing datetime and real_datetime
+ * if not dt.datetime_compatible:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1295
+ * return PyObject_RichCompare(dt.to_tuple(), to_tuple(other), op)
+ * else:
+ * raise TypeError("cannot compare {0!r} and {1!r}".format(self, other)) # <<<<<<<<<<<<<<
+ *
+ * cdef _getstate(self):
+ */
+ /*else*/ {
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_cannot_compare_0_r_and_1_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_self, __pyx_v_other};
+ __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, 1295, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_self, __pyx_v_other};
+ __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, 1295, __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, 1295, __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_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_other);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __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_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __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_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __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, 1295, __pyx_L1_error)
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1275
+ * self.second, self.microsecond)
+ *
+ * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<<
+ * cdef datetime dt, dt_other
+ * dt = self
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF((PyObject *)__pyx_v_dt);
+ __Pyx_XDECREF((PyObject *)__pyx_v_dt_other);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1297
+ * raise TypeError("cannot compare {0!r} and {1!r}".format(self, other))
+ *
+ * cdef _getstate(self): # <<<<<<<<<<<<<<
+ * return (self.year, self.month, self.day, self.hour,
+ * self.minute, self.second, self.microsecond,
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_8datetime__getstate(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ __Pyx_RefNannySetupContext("_getstate", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1298
+ *
+ * cdef _getstate(self):
+ * return (self.year, self.month, self.day, self.hour, # <<<<<<<<<<<<<<
+ * self.minute, self.second, self.microsecond,
+ * self.dayofwk, self.dayofyr)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1298, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1298, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->hour); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "netcdftime/_netcdftime.pyx":1299
+ * cdef _getstate(self):
+ * return (self.year, self.month, self.day, self.hour,
+ * self.minute, self.second, self.microsecond, # <<<<<<<<<<<<<<
+ * self.dayofwk, self.dayofyr)
+ *
+ */
+ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->minute); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1299, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->second); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1299, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->microsecond); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1299, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "netcdftime/_netcdftime.pyx":1300
+ * return (self.year, self.month, self.day, self.hour,
+ * self.minute, self.second, self.microsecond,
+ * self.dayofwk, self.dayofyr) # <<<<<<<<<<<<<<
+ *
+ * def __reduce__(self):
+ */
+ __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_self->dayofwk); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->dayofyr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+
+ /* "netcdftime/_netcdftime.pyx":1298
+ *
+ * cdef _getstate(self):
+ * return (self.year, self.month, self.day, self.hour, # <<<<<<<<<<<<<<
+ * self.minute, self.second, self.microsecond,
+ * self.dayofwk, self.dayofyr)
+ */
+ __pyx_t_10 = PyTuple_New(9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1298, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_10, 6, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_10, 7, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_10, 8, __pyx_t_9);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_7 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_9 = 0;
+ __pyx_r = __pyx_t_10;
+ __pyx_t_10 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1297
+ * raise TypeError("cannot compare {0!r} and {1!r}".format(self, other))
+ *
+ * cdef _getstate(self): # <<<<<<<<<<<<<<
+ * return (self.year, self.month, self.day, self.hour,
+ * self.minute, self.second, self.microsecond,
+ */
+
+ /* 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_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime._getstate", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1302
+ * self.dayofwk, self.dayofyr)
+ *
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * """special method that allows instance to be pickled"""
+ * return (self.__class__, self._getstate())
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_19__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_10netcdftime_11_netcdftime_8datetime_18__reduce__[] = "special method that allows instance to be pickled";
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_19__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_18__reduce__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_18__reduce__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("__reduce__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1304
+ * def __reduce__(self):
+ * """special method that allows instance to be pickled"""
+ * return (self.__class__, self._getstate()) # <<<<<<<<<<<<<<
+ *
+ * cdef _add_timedelta(self, other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = ((struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime *)__pyx_v_self->__pyx_vtab)->_getstate(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1302
+ * self.dayofwk, self.dayofyr)
+ *
+ * def __reduce__(self): # <<<<<<<<<<<<<<
+ * """special method that allows instance to be pickled"""
+ * return (self.__class__, self._getstate())
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1306
+ * return (self.__class__, self._getstate())
+ *
+ * cdef _add_timedelta(self, other): # <<<<<<<<<<<<<<
+ * return NotImplemented
+ *
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_8datetime__add_timedelta(CYTHON_UNUSED struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_add_timedelta", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1307
+ *
+ * cdef _add_timedelta(self, other):
+ * return NotImplemented # <<<<<<<<<<<<<<
+ *
+ * def __add__(self, other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_builtin_NotImplemented);
+ __pyx_r = __pyx_builtin_NotImplemented;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1306
+ * return (self.__class__, self._getstate())
+ *
+ * cdef _add_timedelta(self, other): # <<<<<<<<<<<<<<
+ * return NotImplemented
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1309
+ * return NotImplemented
+ *
+ * def __add__(self, other): # <<<<<<<<<<<<<<
+ * cdef datetime dt
+ * if isinstance(self, datetime) and isinstance(other, timedelta):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_21__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_21__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_20__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_20__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_dt = 0;
+ PyObject *__pyx_v_delta = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("__add__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1311
+ * def __add__(self, other):
+ * cdef datetime dt
+ * if isinstance(self, datetime) and isinstance(other, timedelta): # <<<<<<<<<<<<<<
+ * dt = self
+ * delta = other
+ */
+ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_self, __pyx_ptype_10netcdftime_11_netcdftime_datetime);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_1 = __pyx_t_3;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyObject_IsInstance(__pyx_v_other, __pyx_t_4); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 1311, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "netcdftime/_netcdftime.pyx":1312
+ * cdef datetime dt
+ * if isinstance(self, datetime) and isinstance(other, timedelta):
+ * dt = self # <<<<<<<<<<<<<<
+ * delta = other
+ * elif isinstance(self, timedelta) and isinstance(other, datetime):
+ */
+ if (!(likely(((__pyx_v_self) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self, __pyx_ptype_10netcdftime_11_netcdftime_datetime))))) __PYX_ERR(0, 1312, __pyx_L1_error)
+ __pyx_t_4 = __pyx_v_self;
+ __Pyx_INCREF(__pyx_t_4);
+ __pyx_v_dt = ((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1313
+ * if isinstance(self, datetime) and isinstance(other, timedelta):
+ * dt = self
+ * delta = other # <<<<<<<<<<<<<<
+ * elif isinstance(self, timedelta) and isinstance(other, datetime):
+ * dt = other
+ */
+ __Pyx_INCREF(__pyx_v_other);
+ __pyx_v_delta = __pyx_v_other;
+
+ /* "netcdftime/_netcdftime.pyx":1311
+ * def __add__(self, other):
+ * cdef datetime dt
+ * if isinstance(self, datetime) and isinstance(other, timedelta): # <<<<<<<<<<<<<<
+ * dt = self
+ * delta = other
+ */
+ goto __pyx_L3;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1314
+ * dt = self
+ * delta = other
+ * elif isinstance(self, timedelta) and isinstance(other, datetime): # <<<<<<<<<<<<<<
+ * dt = other
+ * delta = self
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = PyObject_IsInstance(__pyx_v_self, __pyx_t_4); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 1314, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_1 = __pyx_t_3;
+ goto __pyx_L6_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_10netcdftime_11_netcdftime_datetime);
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L6_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "netcdftime/_netcdftime.pyx":1315
+ * delta = other
+ * elif isinstance(self, timedelta) and isinstance(other, datetime):
+ * dt = other # <<<<<<<<<<<<<<
+ * delta = self
+ * else:
+ */
+ if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_10netcdftime_11_netcdftime_datetime))))) __PYX_ERR(0, 1315, __pyx_L1_error)
+ __pyx_t_4 = __pyx_v_other;
+ __Pyx_INCREF(__pyx_t_4);
+ __pyx_v_dt = ((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1316
+ * elif isinstance(self, timedelta) and isinstance(other, datetime):
+ * dt = other
+ * delta = self # <<<<<<<<<<<<<<
+ * else:
+ * return NotImplemented
+ */
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_v_delta = __pyx_v_self;
+
+ /* "netcdftime/_netcdftime.pyx":1314
+ * dt = self
+ * delta = other
+ * elif isinstance(self, timedelta) and isinstance(other, datetime): # <<<<<<<<<<<<<<
+ * dt = other
+ * delta = self
+ */
+ goto __pyx_L3;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1318
+ * delta = self
+ * else:
+ * return NotImplemented # <<<<<<<<<<<<<<
+ * return dt._add_timedelta(delta)
+ *
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_builtin_NotImplemented);
+ __pyx_r = __pyx_builtin_NotImplemented;
+ goto __pyx_L0;
+ }
+ __pyx_L3:;
+
+ /* "netcdftime/_netcdftime.pyx":1319
+ * else:
+ * return NotImplemented
+ * return dt._add_timedelta(delta) # <<<<<<<<<<<<<<
+ *
+ * def __sub__(self, other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = ((struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime *)__pyx_v_dt->__pyx_vtab)->_add_timedelta(__pyx_v_dt, __pyx_v_delta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1319, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1309
+ * return NotImplemented
+ *
+ * def __add__(self, other): # <<<<<<<<<<<<<<
+ * cdef datetime dt
+ * if isinstance(self, datetime) and isinstance(other, timedelta):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF((PyObject *)__pyx_v_dt);
+ __Pyx_XDECREF(__pyx_v_delta);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1321
+ * return dt._add_timedelta(delta)
+ *
+ * def __sub__(self, other): # <<<<<<<<<<<<<<
+ * cdef datetime dt
+ * if isinstance(self, datetime): # left arg is a datetime instance
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_23__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_23__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_22__sub__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_22__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_dt = 0;
+ PyObject *__pyx_v_converter = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ __Pyx_RefNannySetupContext("__sub__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1323
+ * def __sub__(self, other):
+ * cdef datetime dt
+ * if isinstance(self, datetime): # left arg is a datetime instance # <<<<<<<<<<<<<<
+ * dt = self
+ * if isinstance(other, datetime):
+ */
+ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_self, __pyx_ptype_10netcdftime_11_netcdftime_datetime);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":1324
+ * cdef datetime dt
+ * if isinstance(self, datetime): # left arg is a datetime instance
+ * dt = self # <<<<<<<<<<<<<<
+ * if isinstance(other, datetime):
+ * # datetime - datetime
+ */
+ if (!(likely(((__pyx_v_self) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self, __pyx_ptype_10netcdftime_11_netcdftime_datetime))))) __PYX_ERR(0, 1324, __pyx_L1_error)
+ __pyx_t_3 = __pyx_v_self;
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_v_dt = ((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1325
+ * if isinstance(self, datetime): # left arg is a datetime instance
+ * dt = self
+ * if isinstance(other, datetime): # <<<<<<<<<<<<<<
+ * # datetime - datetime
+ * if dt.calendar != other.calendar:
+ */
+ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_10netcdftime_11_netcdftime_datetime);
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "netcdftime/_netcdftime.pyx":1327
+ * if isinstance(other, datetime):
+ * # datetime - datetime
+ * if dt.calendar != other.calendar: # <<<<<<<<<<<<<<
+ * raise ValueError("cannot compute the time difference between dates with different calendars")
+ * if dt.calendar == "":
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_dt->calendar, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1327, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_1) {
+
+ /* "netcdftime/_netcdftime.pyx":1328
+ * # datetime - datetime
+ * if dt.calendar != other.calendar:
+ * raise ValueError("cannot compute the time difference between dates with different calendars") # <<<<<<<<<<<<<<
+ * if dt.calendar == "":
+ * raise ValueError("cannot compute the time difference between dates that are not calendar-aware")
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1328, __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, 1328, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1327
+ * if isinstance(other, datetime):
+ * # datetime - datetime
+ * if dt.calendar != other.calendar: # <<<<<<<<<<<<<<
+ * raise ValueError("cannot compute the time difference between dates with different calendars")
+ * if dt.calendar == "":
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1329
+ * if dt.calendar != other.calendar:
+ * raise ValueError("cannot compute the time difference between dates with different calendars")
+ * if dt.calendar == "": # <<<<<<<<<<<<<<
+ * raise ValueError("cannot compute the time difference between dates that are not calendar-aware")
+ * converter = _converters[dt.calendar]
+ */
+ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_dt->calendar, __pyx_kp_s__23, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1329, __pyx_L1_error)
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":1330
+ * raise ValueError("cannot compute the time difference between dates with different calendars")
+ * if dt.calendar == "":
+ * raise ValueError("cannot compute the time difference between dates that are not calendar-aware") # <<<<<<<<<<<<<<
+ * converter = _converters[dt.calendar]
+ * return timedelta(seconds=converter.date2num(dt) - converter.date2num(other))
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1330, __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, 1330, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1329
+ * if dt.calendar != other.calendar:
+ * raise ValueError("cannot compute the time difference between dates with different calendars")
+ * if dt.calendar == "": # <<<<<<<<<<<<<<
+ * raise ValueError("cannot compute the time difference between dates that are not calendar-aware")
+ * converter = _converters[dt.calendar]
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1331
+ * if dt.calendar == "":
+ * raise ValueError("cannot compute the time difference between dates that are not calendar-aware")
+ * converter = _converters[dt.calendar] # <<<<<<<<<<<<<<
+ * return timedelta(seconds=converter.date2num(dt) - converter.date2num(other))
+ * elif isinstance(other, real_datetime):
+ */
+ if (unlikely(__pyx_v_10netcdftime_11_netcdftime__converters == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(0, 1331, __pyx_L1_error)
+ }
+ __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_10netcdftime_11_netcdftime__converters, __pyx_v_dt->calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_v_converter = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1332
+ * raise ValueError("cannot compute the time difference between dates that are not calendar-aware")
+ * converter = _converters[dt.calendar]
+ * return timedelta(seconds=converter.date2num(dt) - converter.date2num(other)) # <<<<<<<<<<<<<<
+ * elif isinstance(other, real_datetime):
+ * # datetime - real_datetime
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_converter, __pyx_n_s_date2num); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(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_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_dt)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)__pyx_v_dt)};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)__pyx_v_dt)};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1332, __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(((PyObject *)__pyx_v_dt));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_dt));
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, ((PyObject *)__pyx_v_dt));
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_converter, __pyx_n_s_date2num); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_other); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_other};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_other};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_other);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyNumber_Subtract(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_seconds, __pyx_t_8) < 0) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1325
+ * if isinstance(self, datetime): # left arg is a datetime instance
+ * dt = self
+ * if isinstance(other, datetime): # <<<<<<<<<<<<<<
+ * # datetime - datetime
+ * if dt.calendar != other.calendar:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1333
+ * converter = _converters[dt.calendar]
+ * return timedelta(seconds=converter.date2num(dt) - converter.date2num(other))
+ * elif isinstance(other, real_datetime): # <<<<<<<<<<<<<<
+ * # datetime - real_datetime
+ * if not dt.datetime_compatible:
+ */
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_real_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1333, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_8); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 1333, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "netcdftime/_netcdftime.pyx":1335
+ * elif isinstance(other, real_datetime):
+ * # datetime - real_datetime
+ * if not dt.datetime_compatible: # <<<<<<<<<<<<<<
+ * raise ValueError("cannot compute the time difference between dates with different calendars")
+ * return dt._to_real_datetime() - other
+ */
+ __pyx_t_1 = ((!(__pyx_v_dt->datetime_compatible != 0)) != 0);
+ if (__pyx_t_1) {
+
+ /* "netcdftime/_netcdftime.pyx":1336
+ * # datetime - real_datetime
+ * if not dt.datetime_compatible:
+ * raise ValueError("cannot compute the time difference between dates with different calendars") # <<<<<<<<<<<<<<
+ * return dt._to_real_datetime() - other
+ * elif isinstance(other, timedelta):
+ */
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1336, __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, 1336, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1335
+ * elif isinstance(other, real_datetime):
+ * # datetime - real_datetime
+ * if not dt.datetime_compatible: # <<<<<<<<<<<<<<
+ * raise ValueError("cannot compute the time difference between dates with different calendars")
+ * return dt._to_real_datetime() - other
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1337
+ * if not dt.datetime_compatible:
+ * raise ValueError("cannot compute the time difference between dates with different calendars")
+ * return dt._to_real_datetime() - other # <<<<<<<<<<<<<<
+ * elif isinstance(other, timedelta):
+ * # datetime - timedelta
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_8 = ((struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime *)__pyx_v_dt->__pyx_vtab)->_to_real_datetime(__pyx_v_dt, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1337, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_4 = PyNumber_Subtract(__pyx_t_8, __pyx_v_other); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1337, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1333
+ * converter = _converters[dt.calendar]
+ * return timedelta(seconds=converter.date2num(dt) - converter.date2num(other))
+ * elif isinstance(other, real_datetime): # <<<<<<<<<<<<<<
+ * # datetime - real_datetime
+ * if not dt.datetime_compatible:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1338
+ * raise ValueError("cannot compute the time difference between dates with different calendars")
+ * return dt._to_real_datetime() - other
+ * elif isinstance(other, timedelta): # <<<<<<<<<<<<<<
+ * # datetime - timedelta
+ * return dt._add_timedelta(-other)
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = PyObject_IsInstance(__pyx_v_other, __pyx_t_4); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 1338, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":1340
+ * elif isinstance(other, timedelta):
+ * # datetime - timedelta
+ * return dt._add_timedelta(-other) # <<<<<<<<<<<<<<
+ * else:
+ * return NotImplemented
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = PyNumber_Negative(__pyx_v_other); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = ((struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime *)__pyx_v_dt->__pyx_vtab)->_add_timedelta(__pyx_v_dt, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1338
+ * raise ValueError("cannot compute the time difference between dates with different calendars")
+ * return dt._to_real_datetime() - other
+ * elif isinstance(other, timedelta): # <<<<<<<<<<<<<<
+ * # datetime - timedelta
+ * return dt._add_timedelta(-other)
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1342
+ * return dt._add_timedelta(-other)
+ * else:
+ * return NotImplemented # <<<<<<<<<<<<<<
+ * else:
+ * if isinstance(self, real_datetime):
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_builtin_NotImplemented);
+ __pyx_r = __pyx_builtin_NotImplemented;
+ goto __pyx_L0;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1323
+ * def __sub__(self, other):
+ * cdef datetime dt
+ * if isinstance(self, datetime): # left arg is a datetime instance # <<<<<<<<<<<<<<
+ * dt = self
+ * if isinstance(other, datetime):
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1344
+ * return NotImplemented
+ * else:
+ * if isinstance(self, real_datetime): # <<<<<<<<<<<<<<
+ * # real_datetime - datetime
+ * if not other.datetime_compatible:
+ */
+ /*else*/ {
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_real_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_2 = PyObject_IsInstance(__pyx_v_self, __pyx_t_8); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 1344, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "netcdftime/_netcdftime.pyx":1346
+ * if isinstance(self, real_datetime):
+ * # real_datetime - datetime
+ * if not other.datetime_compatible: # <<<<<<<<<<<<<<
+ * raise ValueError("cannot compute the time difference between dates with different calendars")
+ * return self - other._to_real_datetime()
+ */
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_datetime_compatible); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1346, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1346, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_2 = ((!__pyx_t_1) != 0);
+ if (__pyx_t_2) {
+
+ /* "netcdftime/_netcdftime.pyx":1347
+ * # real_datetime - datetime
+ * if not other.datetime_compatible:
+ * raise ValueError("cannot compute the time difference between dates with different calendars") # <<<<<<<<<<<<<<
+ * return self - other._to_real_datetime()
+ * else:
+ */
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1347, __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, 1347, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1346
+ * if isinstance(self, real_datetime):
+ * # real_datetime - datetime
+ * if not other.datetime_compatible: # <<<<<<<<<<<<<<
+ * raise ValueError("cannot compute the time difference between dates with different calendars")
+ * return self - other._to_real_datetime()
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1348
+ * if not other.datetime_compatible:
+ * raise ValueError("cannot compute the time difference between dates with different calendars")
+ * return self - other._to_real_datetime() # <<<<<<<<<<<<<<
+ * else:
+ * return NotImplemented
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_to_real_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1348, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1348, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Subtract(__pyx_v_self, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1344
+ * return NotImplemented
+ * else:
+ * if isinstance(self, real_datetime): # <<<<<<<<<<<<<<
+ * # real_datetime - datetime
+ * if not other.datetime_compatible:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1350
+ * return self - other._to_real_datetime()
+ * else:
+ * return NotImplemented # <<<<<<<<<<<<<<
+ *
+ * cdef class DatetimeNoLeap(datetime):
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_builtin_NotImplemented);
+ __pyx_r = __pyx_builtin_NotImplemented;
+ goto __pyx_L0;
+ }
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1321
+ * return dt._add_timedelta(delta)
+ *
+ * def __sub__(self, other): # <<<<<<<<<<<<<<
+ * cdef datetime dt
+ * if isinstance(self, datetime): # left arg is a datetime instance
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __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_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF((PyObject *)__pyx_v_dt);
+ __Pyx_XDECREF(__pyx_v_converter);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1194
+ * Gregorial calendar.
+ * """
+ * cdef readonly int year, month, day, hour, minute, dayofwk, dayofyr # <<<<<<<<<<<<<<
+ * cdef readonly int second, microsecond
+ * cdef readonly str calendar
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_4year_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_4year_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_4year___get__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_4year___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.year.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_5month_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_5month_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_5month___get__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_5month___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->month); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.month.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_3day_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_3day_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_3day___get__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_3day___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.day.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_4hour_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_4hour_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_4hour___get__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_4hour___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->hour); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.hour.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_6minute_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_6minute_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_6minute___get__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_6minute___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->minute); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.minute.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_7dayofwk_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_7dayofwk_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_7dayofwk___get__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_7dayofwk___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dayofwk); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.dayofwk.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_7dayofyr_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_7dayofyr_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_7dayofyr___get__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_7dayofyr___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dayofyr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.dayofyr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1195
+ * """
+ * cdef readonly int year, month, day, hour, minute, dayofwk, dayofyr
+ * cdef readonly int second, microsecond # <<<<<<<<<<<<<<
+ * cdef readonly str calendar
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_6second_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_6second_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_6second___get__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_6second___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1195, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.second.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_11microsecond_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_11microsecond_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_11microsecond___get__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_11microsecond___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->microsecond); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1195, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.microsecond.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1196
+ * cdef readonly int year, month, day, hour, minute, dayofwk, dayofyr
+ * cdef readonly int second, microsecond
+ * cdef readonly str calendar # <<<<<<<<<<<<<<
+ *
+ * # Python's datetime.datetime uses the proleptic Gregorian
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_8calendar_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_8calendar_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_8calendar___get__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_8calendar___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self->calendar);
+ __pyx_r = __pyx_v_self->calendar;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1202
+ * # netcdftime.datetime instance can be converted to
+ * # datetime.datetime.
+ * cdef readonly bint datetime_compatible # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, int year, int month, int day, int hour=0, int minute=0, int second=0,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_19datetime_compatible_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_10netcdftime_11_netcdftime_8datetime_19datetime_compatible_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_8datetime_19datetime_compatible___get__(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_10netcdftime_11_netcdftime_8datetime_19datetime_compatible___get__(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->datetime_compatible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("netcdftime._netcdftime.datetime.datetime_compatible.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1357
+ * but uses the "noleap" ("365_day") calendar.
+ * """
+ * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "noleap"
+ */
+
+/* Python wrapper */
+static int __pyx_pw_10netcdftime_11_netcdftime_14DatetimeNoLeap_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_10netcdftime_11_netcdftime_14DatetimeNoLeap_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_kwargs = 0;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
+ if (unlikely(__pyx_kwds)) {
+ __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return -1;
+ __Pyx_GOTREF(__pyx_v_kwargs);
+ } else {
+ __pyx_v_kwargs = NULL;
+ }
+ __Pyx_INCREF(__pyx_args);
+ __pyx_v_args = __pyx_args;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_14DatetimeNoLeap___init__(((struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeNoLeap *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwargs);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_10netcdftime_11_netcdftime_14DatetimeNoLeap___init__(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeNoLeap *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1358
+ * """
+ * def __init__(self, *args, **kwargs):
+ * datetime.__init__(self, *args, **kwargs) # <<<<<<<<<<<<<<
+ * self.calendar = "noleap"
+ * self.datetime_compatible = False
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_datetime), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1358, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+ __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1358, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1358, __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;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1359
+ * def __init__(self, *args, **kwargs):
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "noleap" # <<<<<<<<<<<<<<
+ * self.datetime_compatible = False
+ *
+ */
+ __Pyx_INCREF(__pyx_n_s_noleap);
+ __Pyx_GIVEREF(__pyx_n_s_noleap);
+ __Pyx_GOTREF(__pyx_v_self->__pyx_base.calendar);
+ __Pyx_DECREF(__pyx_v_self->__pyx_base.calendar);
+ __pyx_v_self->__pyx_base.calendar = __pyx_n_s_noleap;
+
+ /* "netcdftime/_netcdftime.pyx":1360
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "noleap"
+ * self.datetime_compatible = False # <<<<<<<<<<<<<<
+ *
+ * cdef _add_timedelta(self, delta):
+ */
+ __pyx_v_self->__pyx_base.datetime_compatible = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1357
+ * but uses the "noleap" ("365_day") calendar.
+ * """
+ * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "noleap"
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("netcdftime._netcdftime.DatetimeNoLeap.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1362
+ * self.datetime_compatible = False
+ *
+ * cdef _add_timedelta(self, delta): # <<<<<<<<<<<<<<
+ * return DatetimeNoLeap(*add_timedelta(self, delta, no_leap, False))
+ *
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_14DatetimeNoLeap__add_timedelta(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeNoLeap *__pyx_v_self, PyObject *__pyx_v_delta) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_add_timedelta", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1363
+ *
+ * cdef _add_timedelta(self, delta):
+ * return DatetimeNoLeap(*add_timedelta(self, delta, no_leap, False)) # <<<<<<<<<<<<<<
+ *
+ * cdef class DatetimeAllLeap(datetime):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __pyx_f_10netcdftime_11_netcdftime_add_timedelta(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self), __pyx_v_delta, __pyx_f_10netcdftime_11_netcdftime_no_leap, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1363, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(__pyx_t_1 == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 1363, __pyx_L1_error)
+ }
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_DatetimeNoLeap), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1363, __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;
+
+ /* "netcdftime/_netcdftime.pyx":1362
+ * self.datetime_compatible = False
+ *
+ * cdef _add_timedelta(self, delta): # <<<<<<<<<<<<<<
+ * return DatetimeNoLeap(*add_timedelta(self, delta, no_leap, False))
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("netcdftime._netcdftime.DatetimeNoLeap._add_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1370
+ * but uses the "all_leap" ("366_day") calendar.
+ * """
+ * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "all_leap"
+ */
+
+/* Python wrapper */
+static int __pyx_pw_10netcdftime_11_netcdftime_15DatetimeAllLeap_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_10netcdftime_11_netcdftime_15DatetimeAllLeap_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_kwargs = 0;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
+ if (unlikely(__pyx_kwds)) {
+ __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return -1;
+ __Pyx_GOTREF(__pyx_v_kwargs);
+ } else {
+ __pyx_v_kwargs = NULL;
+ }
+ __Pyx_INCREF(__pyx_args);
+ __pyx_v_args = __pyx_args;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_15DatetimeAllLeap___init__(((struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeAllLeap *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwargs);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_10netcdftime_11_netcdftime_15DatetimeAllLeap___init__(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeAllLeap *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1371
+ * """
+ * def __init__(self, *args, **kwargs):
+ * datetime.__init__(self, *args, **kwargs) # <<<<<<<<<<<<<<
+ * self.calendar = "all_leap"
+ * self.datetime_compatible = False
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_datetime), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1371, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+ __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1371, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1371, __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;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1372
+ * def __init__(self, *args, **kwargs):
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "all_leap" # <<<<<<<<<<<<<<
+ * self.datetime_compatible = False
+ *
+ */
+ __Pyx_INCREF(__pyx_n_s_all_leap);
+ __Pyx_GIVEREF(__pyx_n_s_all_leap);
+ __Pyx_GOTREF(__pyx_v_self->__pyx_base.calendar);
+ __Pyx_DECREF(__pyx_v_self->__pyx_base.calendar);
+ __pyx_v_self->__pyx_base.calendar = __pyx_n_s_all_leap;
+
+ /* "netcdftime/_netcdftime.pyx":1373
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "all_leap"
+ * self.datetime_compatible = False # <<<<<<<<<<<<<<
+ *
+ * cdef _add_timedelta(self, delta):
+ */
+ __pyx_v_self->__pyx_base.datetime_compatible = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1370
+ * but uses the "all_leap" ("366_day") calendar.
+ * """
+ * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "all_leap"
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("netcdftime._netcdftime.DatetimeAllLeap.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1375
+ * self.datetime_compatible = False
+ *
+ * cdef _add_timedelta(self, delta): # <<<<<<<<<<<<<<
+ * return DatetimeAllLeap(*add_timedelta(self, delta, all_leap, False))
+ *
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_15DatetimeAllLeap__add_timedelta(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeAllLeap *__pyx_v_self, PyObject *__pyx_v_delta) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_add_timedelta", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1376
+ *
+ * cdef _add_timedelta(self, delta):
+ * return DatetimeAllLeap(*add_timedelta(self, delta, all_leap, False)) # <<<<<<<<<<<<<<
+ *
+ * cdef class Datetime360Day(datetime):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __pyx_f_10netcdftime_11_netcdftime_add_timedelta(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self), __pyx_v_delta, __pyx_f_10netcdftime_11_netcdftime_all_leap, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1376, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(__pyx_t_1 == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 1376, __pyx_L1_error)
+ }
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_DatetimeAllLeap), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __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;
+
+ /* "netcdftime/_netcdftime.pyx":1375
+ * self.datetime_compatible = False
+ *
+ * cdef _add_timedelta(self, delta): # <<<<<<<<<<<<<<
+ * return DatetimeAllLeap(*add_timedelta(self, delta, all_leap, False))
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("netcdftime._netcdftime.DatetimeAllLeap._add_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1383
+ * but uses the "360_day" calendar.
+ * """
+ * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "360_day"
+ */
+
+/* Python wrapper */
+static int __pyx_pw_10netcdftime_11_netcdftime_14Datetime360Day_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_10netcdftime_11_netcdftime_14Datetime360Day_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_kwargs = 0;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
+ if (unlikely(__pyx_kwds)) {
+ __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return -1;
+ __Pyx_GOTREF(__pyx_v_kwargs);
+ } else {
+ __pyx_v_kwargs = NULL;
+ }
+ __Pyx_INCREF(__pyx_args);
+ __pyx_v_args = __pyx_args;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_14Datetime360Day___init__(((struct __pyx_obj_10netcdftime_11_netcdftime_Datetime360Day *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwargs);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_10netcdftime_11_netcdftime_14Datetime360Day___init__(struct __pyx_obj_10netcdftime_11_netcdftime_Datetime360Day *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1384
+ * """
+ * def __init__(self, *args, **kwargs):
+ * datetime.__init__(self, *args, **kwargs) # <<<<<<<<<<<<<<
+ * self.calendar = "360_day"
+ * self.datetime_compatible = False
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_datetime), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+ __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1384, __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;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1385
+ * def __init__(self, *args, **kwargs):
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "360_day" # <<<<<<<<<<<<<<
+ * self.datetime_compatible = False
+ *
+ */
+ __Pyx_INCREF(__pyx_kp_s_360_day);
+ __Pyx_GIVEREF(__pyx_kp_s_360_day);
+ __Pyx_GOTREF(__pyx_v_self->__pyx_base.calendar);
+ __Pyx_DECREF(__pyx_v_self->__pyx_base.calendar);
+ __pyx_v_self->__pyx_base.calendar = __pyx_kp_s_360_day;
+
+ /* "netcdftime/_netcdftime.pyx":1386
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "360_day"
+ * self.datetime_compatible = False # <<<<<<<<<<<<<<
+ *
+ * cdef _add_timedelta(self, delta):
+ */
+ __pyx_v_self->__pyx_base.datetime_compatible = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1383
+ * but uses the "360_day" calendar.
+ * """
+ * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "360_day"
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("netcdftime._netcdftime.Datetime360Day.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1388
+ * self.datetime_compatible = False
+ *
+ * cdef _add_timedelta(self, delta): # <<<<<<<<<<<<<<
+ * return Datetime360Day(*add_timedelta_360_day(self, delta))
+ *
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_14Datetime360Day__add_timedelta(struct __pyx_obj_10netcdftime_11_netcdftime_Datetime360Day *__pyx_v_self, PyObject *__pyx_v_delta) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_add_timedelta", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1389
+ *
+ * cdef _add_timedelta(self, delta):
+ * return Datetime360Day(*add_timedelta_360_day(self, delta)) # <<<<<<<<<<<<<<
+ *
+ * cdef class DatetimeJulian(datetime):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __pyx_f_10netcdftime_11_netcdftime_add_timedelta_360_day(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self), __pyx_v_delta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1389, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(__pyx_t_1 == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 1389, __pyx_L1_error)
+ }
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_Datetime360Day), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __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;
+
+ /* "netcdftime/_netcdftime.pyx":1388
+ * self.datetime_compatible = False
+ *
+ * cdef _add_timedelta(self, delta): # <<<<<<<<<<<<<<
+ * return Datetime360Day(*add_timedelta_360_day(self, delta))
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("netcdftime._netcdftime.Datetime360Day._add_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1396
+ * but uses the "julian" calendar.
+ * """
+ * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "julian"
+ */
+
+/* Python wrapper */
+static int __pyx_pw_10netcdftime_11_netcdftime_14DatetimeJulian_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_10netcdftime_11_netcdftime_14DatetimeJulian_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_kwargs = 0;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
+ if (unlikely(__pyx_kwds)) {
+ __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return -1;
+ __Pyx_GOTREF(__pyx_v_kwargs);
+ } else {
+ __pyx_v_kwargs = NULL;
+ }
+ __Pyx_INCREF(__pyx_args);
+ __pyx_v_args = __pyx_args;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_14DatetimeJulian___init__(((struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeJulian *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwargs);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_10netcdftime_11_netcdftime_14DatetimeJulian___init__(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeJulian *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1397
+ * """
+ * def __init__(self, *args, **kwargs):
+ * datetime.__init__(self, *args, **kwargs) # <<<<<<<<<<<<<<
+ * self.calendar = "julian"
+ * self.datetime_compatible = False
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_datetime), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1397, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+ __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1397, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1397, __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;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1398
+ * def __init__(self, *args, **kwargs):
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "julian" # <<<<<<<<<<<<<<
+ * self.datetime_compatible = False
+ *
+ */
+ __Pyx_INCREF(__pyx_n_s_julian);
+ __Pyx_GIVEREF(__pyx_n_s_julian);
+ __Pyx_GOTREF(__pyx_v_self->__pyx_base.calendar);
+ __Pyx_DECREF(__pyx_v_self->__pyx_base.calendar);
+ __pyx_v_self->__pyx_base.calendar = __pyx_n_s_julian;
+
+ /* "netcdftime/_netcdftime.pyx":1399
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "julian"
+ * self.datetime_compatible = False # <<<<<<<<<<<<<<
+ *
+ * cdef _add_timedelta(self, delta):
+ */
+ __pyx_v_self->__pyx_base.datetime_compatible = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1396
+ * but uses the "julian" calendar.
+ * """
+ * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "julian"
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("netcdftime._netcdftime.DatetimeJulian.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1401
+ * self.datetime_compatible = False
+ *
+ * cdef _add_timedelta(self, delta): # <<<<<<<<<<<<<<
+ * return DatetimeJulian(*add_timedelta(self, delta, is_leap_julian, False))
+ *
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_14DatetimeJulian__add_timedelta(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeJulian *__pyx_v_self, PyObject *__pyx_v_delta) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_add_timedelta", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1402
+ *
+ * cdef _add_timedelta(self, delta):
+ * return DatetimeJulian(*add_timedelta(self, delta, is_leap_julian, False)) # <<<<<<<<<<<<<<
+ *
+ * cdef class DatetimeGregorian(datetime):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __pyx_f_10netcdftime_11_netcdftime_add_timedelta(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self), __pyx_v_delta, __pyx_f_10netcdftime_11_netcdftime_is_leap_julian, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(__pyx_t_1 == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 1402, __pyx_L1_error)
+ }
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_DatetimeJulian), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1402, __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;
+
+ /* "netcdftime/_netcdftime.pyx":1401
+ * self.datetime_compatible = False
+ *
+ * cdef _add_timedelta(self, delta): # <<<<<<<<<<<<<<
+ * return DatetimeJulian(*add_timedelta(self, delta, is_leap_julian, False))
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("netcdftime._netcdftime.DatetimeJulian._add_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1417
+ * a datetime.datetime instance or vice versa.
+ * """
+ * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "gregorian"
+ */
+
+/* Python wrapper */
+static int __pyx_pw_10netcdftime_11_netcdftime_17DatetimeGregorian_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_10netcdftime_11_netcdftime_17DatetimeGregorian_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_kwargs = 0;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
+ if (unlikely(__pyx_kwds)) {
+ __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return -1;
+ __Pyx_GOTREF(__pyx_v_kwargs);
+ } else {
+ __pyx_v_kwargs = NULL;
+ }
+ __Pyx_INCREF(__pyx_args);
+ __pyx_v_args = __pyx_args;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_17DatetimeGregorian___init__(((struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeGregorian *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwargs);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_10netcdftime_11_netcdftime_17DatetimeGregorian___init__(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeGregorian *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1418
+ * """
+ * def __init__(self, *args, **kwargs):
+ * datetime.__init__(self, *args, **kwargs) # <<<<<<<<<<<<<<
+ * self.calendar = "gregorian"
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_datetime), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+ __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __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;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1419
+ * def __init__(self, *args, **kwargs):
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "gregorian" # <<<<<<<<<<<<<<
+ *
+ * # dates after 1582-10-15 can be converted to and compared to
+ */
+ __Pyx_INCREF(__pyx_n_s_gregorian);
+ __Pyx_GIVEREF(__pyx_n_s_gregorian);
+ __Pyx_GOTREF(__pyx_v_self->__pyx_base.calendar);
+ __Pyx_DECREF(__pyx_v_self->__pyx_base.calendar);
+ __pyx_v_self->__pyx_base.calendar = __pyx_n_s_gregorian;
+
+ /* "netcdftime/_netcdftime.pyx":1423
+ * # dates after 1582-10-15 can be converted to and compared to
+ * # proleptic Gregorian dates
+ * if self.to_tuple() >= (1582, 10, 15, 0, 0, 0, 0): # <<<<<<<<<<<<<<
+ * self.datetime_compatible = True
+ * else:
+ */
+ __pyx_t_2 = ((struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeGregorian *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.to_tuple(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1423, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_tuple__28, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1423, __pyx_L1_error)
+ __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, 1423, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_4) {
+
+ /* "netcdftime/_netcdftime.pyx":1424
+ * # proleptic Gregorian dates
+ * if self.to_tuple() >= (1582, 10, 15, 0, 0, 0, 0):
+ * self.datetime_compatible = True # <<<<<<<<<<<<<<
+ * else:
+ * self.datetime_compatible = False
+ */
+ __pyx_v_self->__pyx_base.datetime_compatible = 1;
+
+ /* "netcdftime/_netcdftime.pyx":1423
+ * # dates after 1582-10-15 can be converted to and compared to
+ * # proleptic Gregorian dates
+ * if self.to_tuple() >= (1582, 10, 15, 0, 0, 0, 0): # <<<<<<<<<<<<<<
+ * self.datetime_compatible = True
+ * else:
+ */
+ goto __pyx_L3;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1426
+ * self.datetime_compatible = True
+ * else:
+ * self.datetime_compatible = False # <<<<<<<<<<<<<<
+ *
+ * cdef _add_timedelta(self, delta):
+ */
+ /*else*/ {
+ __pyx_v_self->__pyx_base.datetime_compatible = 0;
+ }
+ __pyx_L3:;
+
+ /* "netcdftime/_netcdftime.pyx":1417
+ * a datetime.datetime instance or vice versa.
+ * """
+ * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "gregorian"
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("netcdftime._netcdftime.DatetimeGregorian.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1428
+ * self.datetime_compatible = False
+ *
+ * cdef _add_timedelta(self, delta): # <<<<<<<<<<<<<<
+ * return DatetimeGregorian(*add_timedelta(self, delta, is_leap_gregorian, True))
+ *
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_17DatetimeGregorian__add_timedelta(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeGregorian *__pyx_v_self, PyObject *__pyx_v_delta) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_add_timedelta", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1429
+ *
+ * cdef _add_timedelta(self, delta):
+ * return DatetimeGregorian(*add_timedelta(self, delta, is_leap_gregorian, True)) # <<<<<<<<<<<<<<
+ *
+ * cdef class DatetimeProlepticGregorian(datetime):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __pyx_f_10netcdftime_11_netcdftime_add_timedelta(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self), __pyx_v_delta, __pyx_f_10netcdftime_11_netcdftime_is_leap_gregorian, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(__pyx_t_1 == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 1429, __pyx_L1_error)
+ }
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_DatetimeGregorian), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1429, __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;
+
+ /* "netcdftime/_netcdftime.pyx":1428
+ * self.datetime_compatible = False
+ *
+ * cdef _add_timedelta(self, delta): # <<<<<<<<<<<<<<
+ * return DatetimeGregorian(*add_timedelta(self, delta, is_leap_gregorian, True))
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("netcdftime._netcdftime.DatetimeGregorian._add_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1448
+ * format, and calendar.
+ * """
+ * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "proleptic_gregorian"
+ */
+
+/* Python wrapper */
+static int __pyx_pw_10netcdftime_11_netcdftime_26DatetimeProlepticGregorian_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_10netcdftime_11_netcdftime_26DatetimeProlepticGregorian_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_kwargs = 0;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
+ if (unlikely(__pyx_kwds)) {
+ __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return -1;
+ __Pyx_GOTREF(__pyx_v_kwargs);
+ } else {
+ __pyx_v_kwargs = NULL;
+ }
+ __Pyx_INCREF(__pyx_args);
+ __pyx_v_args = __pyx_args;
+ __pyx_r = __pyx_pf_10netcdftime_11_netcdftime_26DatetimeProlepticGregorian___init__(((struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeProlepticGregorian *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwargs);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_10netcdftime_11_netcdftime_26DatetimeProlepticGregorian___init__(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeProlepticGregorian *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1449
+ * """
+ * def __init__(self, *args, **kwargs):
+ * datetime.__init__(self, *args, **kwargs) # <<<<<<<<<<<<<<
+ * self.calendar = "proleptic_gregorian"
+ * self.datetime_compatible = True
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_datetime), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
+ __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __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;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1450
+ * def __init__(self, *args, **kwargs):
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "proleptic_gregorian" # <<<<<<<<<<<<<<
+ * self.datetime_compatible = True
+ *
+ */
+ __Pyx_INCREF(__pyx_n_s_proleptic_gregorian);
+ __Pyx_GIVEREF(__pyx_n_s_proleptic_gregorian);
+ __Pyx_GOTREF(__pyx_v_self->__pyx_base.calendar);
+ __Pyx_DECREF(__pyx_v_self->__pyx_base.calendar);
+ __pyx_v_self->__pyx_base.calendar = __pyx_n_s_proleptic_gregorian;
+
+ /* "netcdftime/_netcdftime.pyx":1451
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "proleptic_gregorian"
+ * self.datetime_compatible = True # <<<<<<<<<<<<<<
+ *
+ * cdef _add_timedelta(self, delta):
+ */
+ __pyx_v_self->__pyx_base.datetime_compatible = 1;
+
+ /* "netcdftime/_netcdftime.pyx":1448
+ * format, and calendar.
+ * """
+ * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<<
+ * datetime.__init__(self, *args, **kwargs)
+ * self.calendar = "proleptic_gregorian"
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("netcdftime._netcdftime.DatetimeProlepticGregorian.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1453
+ * self.datetime_compatible = True
+ *
+ * cdef _add_timedelta(self, delta): # <<<<<<<<<<<<<<
+ * return DatetimeProlepticGregorian(*add_timedelta(self, delta,
+ * is_leap_proleptic_gregorian, False))
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_26DatetimeProlepticGregorian__add_timedelta(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeProlepticGregorian *__pyx_v_self, PyObject *__pyx_v_delta) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_add_timedelta", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1454
+ *
+ * cdef _add_timedelta(self, delta):
+ * return DatetimeProlepticGregorian(*add_timedelta(self, delta, # <<<<<<<<<<<<<<
+ * is_leap_proleptic_gregorian, False))
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+
+ /* "netcdftime/_netcdftime.pyx":1455
+ * cdef _add_timedelta(self, delta):
+ * return DatetimeProlepticGregorian(*add_timedelta(self, delta,
+ * is_leap_proleptic_gregorian, False)) # <<<<<<<<<<<<<<
+ *
+ * _illegal_s = re.compile(r"((^|[^%])(%%)*%s)")
+ */
+ __pyx_t_1 = __pyx_f_10netcdftime_11_netcdftime_add_timedelta(((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)__pyx_v_self), __pyx_v_delta, __pyx_f_10netcdftime_11_netcdftime_is_leap_proleptic_gregorian, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1454, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "netcdftime/_netcdftime.pyx":1454
+ *
+ * cdef _add_timedelta(self, delta):
+ * return DatetimeProlepticGregorian(*add_timedelta(self, delta, # <<<<<<<<<<<<<<
+ * is_leap_proleptic_gregorian, False))
+ *
+ */
+ if (unlikely(__pyx_t_1 == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 1454, __pyx_L1_error)
+ }
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10netcdftime_11_netcdftime_DatetimeProlepticGregorian), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1454, __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;
+
+ /* "netcdftime/_netcdftime.pyx":1453
+ * self.datetime_compatible = True
+ *
+ * cdef _add_timedelta(self, delta): # <<<<<<<<<<<<<<
+ * return DatetimeProlepticGregorian(*add_timedelta(self, delta,
+ * is_leap_proleptic_gregorian, False))
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("netcdftime._netcdftime.DatetimeProlepticGregorian._add_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1460
+ *
+ *
+ * cdef _findall(text, substr): # <<<<<<<<<<<<<<
+ * # Also finds overlaps
+ * sites = []
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__findall(PyObject *__pyx_v_text, PyObject *__pyx_v_substr) {
+ PyObject *__pyx_v_sites = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_v_j = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ int __pyx_t_7;
+ __Pyx_RefNannySetupContext("_findall", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1462
+ * cdef _findall(text, substr):
+ * # Also finds overlaps
+ * sites = [] # <<<<<<<<<<<<<<
+ * i = 0
+ * while 1:
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_sites = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1463
+ * # Also finds overlaps
+ * sites = []
+ * i = 0 # <<<<<<<<<<<<<<
+ * while 1:
+ * j = text.find(substr, i)
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_v_i = __pyx_int_0;
+
+ /* "netcdftime/_netcdftime.pyx":1464
+ * sites = []
+ * i = 0
+ * while 1: # <<<<<<<<<<<<<<
+ * j = text.find(substr, i)
+ * if j == -1:
+ */
+ while (1) {
+
+ /* "netcdftime/_netcdftime.pyx":1465
+ * i = 0
+ * while 1:
+ * j = text.find(substr, i) # <<<<<<<<<<<<<<
+ * if j == -1:
+ * break
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_text, __pyx_n_s_find); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1465, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ __pyx_t_4 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_4 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_substr, __pyx_v_i};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_substr, __pyx_v_i};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1465, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_3) {
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_substr);
+ __Pyx_GIVEREF(__pyx_v_substr);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_substr);
+ __Pyx_INCREF(__pyx_v_i);
+ __Pyx_GIVEREF(__pyx_v_i);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_i);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __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;
+ __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1466
+ * while 1:
+ * j = text.find(substr, i)
+ * if j == -1: # <<<<<<<<<<<<<<
+ * break
+ * sites.append(j)
+ */
+ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_j, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1466, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1466, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_6) {
+
+ /* "netcdftime/_netcdftime.pyx":1467
+ * j = text.find(substr, i)
+ * if j == -1:
+ * break # <<<<<<<<<<<<<<
+ * sites.append(j)
+ * i = j + 1
+ */
+ goto __pyx_L4_break;
+
+ /* "netcdftime/_netcdftime.pyx":1466
+ * while 1:
+ * j = text.find(substr, i)
+ * if j == -1: # <<<<<<<<<<<<<<
+ * break
+ * sites.append(j)
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1468
+ * if j == -1:
+ * break
+ * sites.append(j) # <<<<<<<<<<<<<<
+ * i = j + 1
+ * return sites
+ */
+ __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_sites, __pyx_v_j); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1468, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1469
+ * break
+ * sites.append(j)
+ * i = j + 1 # <<<<<<<<<<<<<<
+ * return sites
+ *
+ */
+ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_j, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1469, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_1);
+ __pyx_t_1 = 0;
+ }
+ __pyx_L4_break:;
+
+ /* "netcdftime/_netcdftime.pyx":1470
+ * sites.append(j)
+ * i = j + 1
+ * return sites # <<<<<<<<<<<<<<
+ *
+ * # Every 28 years the calendar repeats, except through century leap
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_sites);
+ __pyx_r = __pyx_v_sites;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1460
+ *
+ *
+ * cdef _findall(text, substr): # <<<<<<<<<<<<<<
+ * # Also finds overlaps
+ * sites = []
+ */
+
+ /* 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_5);
+ __Pyx_AddTraceback("netcdftime._netcdftime._findall", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sites);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XDECREF(__pyx_v_j);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1477
+ *
+ *
+ * cdef _strftime(datetime dt, fmt): # <<<<<<<<<<<<<<
+ * if _illegal_s.search(fmt):
+ * raise TypeError("This strftime implementation does not handle %s")
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime__strftime(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_dt, PyObject *__pyx_v_fmt) {
+ PyObject *__pyx_v_year = NULL;
+ PyObject *__pyx_v_delta = NULL;
+ PyObject *__pyx_v_off = NULL;
+ PyObject *__pyx_v_timetuple = NULL;
+ PyObject *__pyx_v_s1 = NULL;
+ PyObject *__pyx_v_sites1 = NULL;
+ PyObject *__pyx_v_s2 = NULL;
+ PyObject *__pyx_v_sites2 = NULL;
+ PyObject *__pyx_v_sites = NULL;
+ PyObject *__pyx_v_site = NULL;
+ PyObject *__pyx_v_s = NULL;
+ PyObject *__pyx_v_syear = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ Py_ssize_t __pyx_t_8;
+ PyObject *(*__pyx_t_9)(PyObject *);
+ int __pyx_t_10;
+ int __pyx_t_11;
+ __Pyx_RefNannySetupContext("_strftime", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1478
+ *
+ * cdef _strftime(datetime dt, fmt):
+ * if _illegal_s.search(fmt): # <<<<<<<<<<<<<<
+ * raise TypeError("This strftime implementation does not handle %s")
+ * # don't use strftime method at all.
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_illegal_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1478, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_search); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1478, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_fmt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1478, __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_fmt};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1478, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_fmt};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1478, __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, 1478, __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_fmt);
+ __Pyx_GIVEREF(__pyx_v_fmt);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_fmt);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1478, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1478, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_5) {
+
+ /* "netcdftime/_netcdftime.pyx":1479
+ * cdef _strftime(datetime dt, fmt):
+ * if _illegal_s.search(fmt):
+ * raise TypeError("This strftime implementation does not handle %s") # <<<<<<<<<<<<<<
+ * # don't use strftime method at all.
+ * # if dt.year > 1900:
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1479, __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, 1479, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1478
+ *
+ * cdef _strftime(datetime dt, fmt):
+ * if _illegal_s.search(fmt): # <<<<<<<<<<<<<<
+ * raise TypeError("This strftime implementation does not handle %s")
+ * # don't use strftime method at all.
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1484
+ * # return dt.strftime(fmt)
+ *
+ * year = dt.year # <<<<<<<<<<<<<<
+ * # For every non-leap year century, advance by
+ * # 6 years to get into the 28-year repeat cycle
+ */
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_dt->year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_year = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1487
+ * # For every non-leap year century, advance by
+ * # 6 years to get into the 28-year repeat cycle
+ * delta = 2000 - year # <<<<<<<<<<<<<<
+ * off = 6 * (delta // 100 + delta // 400)
+ * year = year + off
+ */
+ __pyx_t_1 = __Pyx_PyInt_SubtractCObj(__pyx_int_2000, __pyx_v_year, 0x7D0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1487, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_delta = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1488
+ * # 6 years to get into the 28-year repeat cycle
+ * delta = 2000 - year
+ * off = 6 * (delta // 100 + delta // 400) # <<<<<<<<<<<<<<
+ * year = year + off
+ *
+ */
+ __pyx_t_1 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_delta, __pyx_int_100, 0x64, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1488, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_delta, __pyx_int_400, 0x190, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1488, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1488, __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_3 = PyNumber_Multiply(__pyx_int_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1488, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_off = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1489
+ * delta = 2000 - year
+ * off = 6 * (delta // 100 + delta // 400)
+ * year = year + off # <<<<<<<<<<<<<<
+ *
+ * # Move to around the year 2000
+ */
+ __pyx_t_3 = PyNumber_Add(__pyx_v_year, __pyx_v_off); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1489, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF_SET(__pyx_v_year, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1492
+ *
+ * # Move to around the year 2000
+ * year = year + ((2000 - year) // 28) * 28 # <<<<<<<<<<<<<<
+ * timetuple = dt.timetuple()
+ * s1 = time.strftime(fmt, (year,) + timetuple[1:])
+ */
+ __pyx_t_3 = __Pyx_PyInt_SubtractCObj(__pyx_int_2000, __pyx_v_year, 0x7D0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_3, __pyx_int_28, 28, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_int_28); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Add(__pyx_v_year, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_year, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1493
+ * # Move to around the year 2000
+ * year = year + ((2000 - year) // 28) * 28
+ * timetuple = dt.timetuple() # <<<<<<<<<<<<<<
+ * s1 = time.strftime(fmt, (year,) + timetuple[1:])
+ * sites1 = _findall(s1, str(year))
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_timetuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1493, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1493, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1493, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_timetuple = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1494
+ * year = year + ((2000 - year) // 28) * 28
+ * timetuple = dt.timetuple()
+ * s1 = time.strftime(fmt, (year,) + timetuple[1:]) # <<<<<<<<<<<<<<
+ * sites1 = _findall(s1, str(year))
+ *
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strftime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1494, __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, 1494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_year);
+ __Pyx_GIVEREF(__pyx_v_year);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_year);
+ __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_timetuple, 1, 0, NULL, NULL, &__pyx_slice__30, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_fmt, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1494, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_fmt, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1494, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__pyx_t_2) {
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_fmt);
+ __Pyx_GIVEREF(__pyx_v_fmt);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_v_fmt);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1494, __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_v_s1 = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1495
+ * timetuple = dt.timetuple()
+ * s1 = time.strftime(fmt, (year,) + timetuple[1:])
+ * sites1 = _findall(s1, str(year)) # <<<<<<<<<<<<<<
+ *
+ * s2 = time.strftime(fmt, (year + 28,) + timetuple[1:])
+ */
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1495, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_year);
+ __Pyx_GIVEREF(__pyx_v_year);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_year);
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __pyx_f_10netcdftime_11_netcdftime__findall(__pyx_v_s1, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1495, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_sites1 = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1497
+ * sites1 = _findall(s1, str(year))
+ *
+ * s2 = time.strftime(fmt, (year + 28,) + timetuple[1:]) # <<<<<<<<<<<<<<
+ * sites2 = _findall(s2, str(year + 28))
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strftime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_year, __pyx_int_28, 28, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_timetuple, 1, 0, NULL, NULL, &__pyx_slice__31, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1497, __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;
+ __pyx_t_1 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_fmt, __pyx_t_2};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1497, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_fmt, __pyx_t_2};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1497, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_1) {
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_fmt);
+ __Pyx_GIVEREF(__pyx_v_fmt);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_fmt);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1497, __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;
+ __pyx_v_s2 = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1498
+ *
+ * s2 = time.strftime(fmt, (year + 28,) + timetuple[1:])
+ * sites2 = _findall(s2, str(year + 28)) # <<<<<<<<<<<<<<
+ *
+ * sites = []
+ */
+ __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_year, __pyx_int_28, 28, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1498, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1498, __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 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1498, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __pyx_f_10netcdftime_11_netcdftime__findall(__pyx_v_s2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1498, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_sites2 = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1500
+ * sites2 = _findall(s2, str(year + 28))
+ *
+ * sites = [] # <<<<<<<<<<<<<<
+ * for site in sites1:
+ * if site in sites2:
+ */
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1500, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_v_sites = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1501
+ *
+ * sites = []
+ * for site in sites1: # <<<<<<<<<<<<<<
+ * if site in sites2:
+ * sites.append(site)
+ */
+ if (likely(PyList_CheckExact(__pyx_v_sites1)) || PyTuple_CheckExact(__pyx_v_sites1)) {
+ __pyx_t_3 = __pyx_v_sites1; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0;
+ __pyx_t_9 = NULL;
+ } else {
+ __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_sites1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1501, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_9)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1501, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1501, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_9(__pyx_t_3);
+ if (unlikely(!__pyx_t_4)) {
+ 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, 1501, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_site, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1502
+ * sites = []
+ * for site in sites1:
+ * if site in sites2: # <<<<<<<<<<<<<<
+ * sites.append(site)
+ *
+ */
+ __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_site, __pyx_v_sites2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1502, __pyx_L1_error)
+ __pyx_t_10 = (__pyx_t_5 != 0);
+ if (__pyx_t_10) {
+
+ /* "netcdftime/_netcdftime.pyx":1503
+ * for site in sites1:
+ * if site in sites2:
+ * sites.append(site) # <<<<<<<<<<<<<<
+ *
+ * s = s1
+ */
+ __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sites, __pyx_v_site); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 1503, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1502
+ * sites = []
+ * for site in sites1:
+ * if site in sites2: # <<<<<<<<<<<<<<
+ * sites.append(site)
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1501
+ *
+ * sites = []
+ * for site in sites1: # <<<<<<<<<<<<<<
+ * if site in sites2:
+ * sites.append(site)
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1505
+ * sites.append(site)
+ *
+ * s = s1 # <<<<<<<<<<<<<<
+ * syear = "%4d" % (dt.year,)
+ * for site in sites:
+ */
+ __Pyx_INCREF(__pyx_v_s1);
+ __pyx_v_s = __pyx_v_s1;
+
+ /* "netcdftime/_netcdftime.pyx":1506
+ *
+ * s = s1
+ * syear = "%4d" % (dt.year,) # <<<<<<<<<<<<<<
+ * for site in sites:
+ * s = s[:site] + syear + s[site + 4:]
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dt->year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1506, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1506, __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_PyString_Format(__pyx_kp_s_4d, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1506, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_syear = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1507
+ * s = s1
+ * syear = "%4d" % (dt.year,)
+ * for site in sites: # <<<<<<<<<<<<<<
+ * s = s[:site] + syear + s[site + 4:]
+ * return s
+ */
+ __pyx_t_3 = __pyx_v_sites; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0;
+ for (;;) {
+ if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1507, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ __Pyx_XDECREF_SET(__pyx_v_site, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1508
+ * syear = "%4d" % (dt.year,)
+ * for site in sites:
+ * s = s[:site] + syear + s[site + 4:] # <<<<<<<<<<<<<<
+ * return s
+ *
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_s, 0, 0, NULL, &__pyx_v_site, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_v_syear); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_site, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_s, 0, 0, &__pyx_t_4, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1507
+ * s = s1
+ * syear = "%4d" % (dt.year,)
+ * for site in sites: # <<<<<<<<<<<<<<
+ * s = s[:site] + syear + s[site + 4:]
+ * return s
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1509
+ * for site in sites:
+ * s = s[:site] + syear + s[site + 4:]
+ * return s # <<<<<<<<<<<<<<
+ *
+ * cdef bint is_leap_julian(int year):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_s);
+ __pyx_r = __pyx_v_s;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1477
+ *
+ *
+ * cdef _strftime(datetime dt, fmt): # <<<<<<<<<<<<<<
+ * if _illegal_s.search(fmt):
+ * raise TypeError("This strftime implementation does not handle %s")
+ */
+
+ /* 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_6);
+ __Pyx_AddTraceback("netcdftime._netcdftime._strftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_year);
+ __Pyx_XDECREF(__pyx_v_delta);
+ __Pyx_XDECREF(__pyx_v_off);
+ __Pyx_XDECREF(__pyx_v_timetuple);
+ __Pyx_XDECREF(__pyx_v_s1);
+ __Pyx_XDECREF(__pyx_v_sites1);
+ __Pyx_XDECREF(__pyx_v_s2);
+ __Pyx_XDECREF(__pyx_v_sites2);
+ __Pyx_XDECREF(__pyx_v_sites);
+ __Pyx_XDECREF(__pyx_v_site);
+ __Pyx_XDECREF(__pyx_v_s);
+ __Pyx_XDECREF(__pyx_v_syear);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1511
+ * return s
+ *
+ * cdef bint is_leap_julian(int year): # <<<<<<<<<<<<<<
+ * "Return 1 if year is a leap year in the Julian calendar, 0 otherwise."
+ * cdef int y
+ */
+
+static int __pyx_f_10netcdftime_11_netcdftime_is_leap_julian(int __pyx_v_year) {
+ int __pyx_v_y;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ long __pyx_t_1;
+ __Pyx_RefNannySetupContext("is_leap_julian", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1514
+ * "Return 1 if year is a leap year in the Julian calendar, 0 otherwise."
+ * cdef int y
+ * y = year if year > 0 else year + 1 # <<<<<<<<<<<<<<
+ * return (y % 4) == 0
+ *
+ */
+ if (((__pyx_v_year > 0) != 0)) {
+ __pyx_t_1 = __pyx_v_year;
+ } else {
+ __pyx_t_1 = (__pyx_v_year + 1);
+ }
+ __pyx_v_y = __pyx_t_1;
+
+ /* "netcdftime/_netcdftime.pyx":1515
+ * cdef int y
+ * y = year if year > 0 else year + 1
+ * return (y % 4) == 0 # <<<<<<<<<<<<<<
+ *
+ * cdef bint is_leap_proleptic_gregorian(int year):
+ */
+ __pyx_r = (__Pyx_mod_long(__pyx_v_y, 4) == 0);
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1511
+ * return s
+ *
+ * cdef bint is_leap_julian(int year): # <<<<<<<<<<<<<<
+ * "Return 1 if year is a leap year in the Julian calendar, 0 otherwise."
+ * cdef int y
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1517
+ * return (y % 4) == 0
+ *
+ * cdef bint is_leap_proleptic_gregorian(int year): # <<<<<<<<<<<<<<
+ * "Return 1 if year is a leap year in the Gregorian calendar, 0 otherwise."
+ * cdef int y
+ */
+
+static int __pyx_f_10netcdftime_11_netcdftime_is_leap_proleptic_gregorian(int __pyx_v_year) {
+ int __pyx_v_y;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ long __pyx_t_1;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ __Pyx_RefNannySetupContext("is_leap_proleptic_gregorian", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1520
+ * "Return 1 if year is a leap year in the Gregorian calendar, 0 otherwise."
+ * cdef int y
+ * y = year if year > 0 else year + 1 # <<<<<<<<<<<<<<
+ * return (((y % 4) == 0) and ((y % 100) != 0)) or ((y % 400) == 0)
+ *
+ */
+ if (((__pyx_v_year > 0) != 0)) {
+ __pyx_t_1 = __pyx_v_year;
+ } else {
+ __pyx_t_1 = (__pyx_v_year + 1);
+ }
+ __pyx_v_y = __pyx_t_1;
+
+ /* "netcdftime/_netcdftime.pyx":1521
+ * cdef int y
+ * y = year if year > 0 else year + 1
+ * return (((y % 4) == 0) and ((y % 100) != 0)) or ((y % 400) == 0) # <<<<<<<<<<<<<<
+ *
+ * cdef bint is_leap_gregorian(int year):
+ */
+ __pyx_t_3 = ((__Pyx_mod_long(__pyx_v_y, 4) == 0) != 0);
+ if (!__pyx_t_3) {
+ goto __pyx_L4_next_or;
+ } else {
+ }
+ __pyx_t_3 = ((__Pyx_mod_long(__pyx_v_y, 0x64) != 0) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_L4_next_or:;
+ __pyx_t_3 = ((__Pyx_mod_long(__pyx_v_y, 0x190) == 0) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L3_bool_binop_done:;
+ __pyx_r = __pyx_t_2;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1517
+ * return (y % 4) == 0
+ *
+ * cdef bint is_leap_proleptic_gregorian(int year): # <<<<<<<<<<<<<<
+ * "Return 1 if year is a leap year in the Gregorian calendar, 0 otherwise."
+ * cdef int y
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1523
+ * return (((y % 4) == 0) and ((y % 100) != 0)) or ((y % 400) == 0)
+ *
+ * cdef bint is_leap_gregorian(int year): # <<<<<<<<<<<<<<
+ * return (year > 1582 and is_leap_proleptic_gregorian(year)) or (year < 1582 and is_leap_julian(year))
+ *
+ */
+
+static int __pyx_f_10netcdftime_11_netcdftime_is_leap_gregorian(int __pyx_v_year) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ __Pyx_RefNannySetupContext("is_leap_gregorian", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1524
+ *
+ * cdef bint is_leap_gregorian(int year):
+ * return (year > 1582 and is_leap_proleptic_gregorian(year)) or (year < 1582 and is_leap_julian(year)) # <<<<<<<<<<<<<<
+ *
+ * cdef bint all_leap(int year):
+ */
+ __pyx_t_2 = ((__pyx_v_year > 0x62E) != 0);
+ if (!__pyx_t_2) {
+ goto __pyx_L4_next_or;
+ } else {
+ }
+ __pyx_t_2 = (__pyx_f_10netcdftime_11_netcdftime_is_leap_proleptic_gregorian(__pyx_v_year) != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_1 = __pyx_t_2;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_L4_next_or:;
+ __pyx_t_2 = ((__pyx_v_year < 0x62E) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_1 = __pyx_t_2;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_t_2 = (__pyx_f_10netcdftime_11_netcdftime_is_leap_julian(__pyx_v_year) != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L3_bool_binop_done:;
+ __pyx_r = __pyx_t_1;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1523
+ * return (((y % 4) == 0) and ((y % 100) != 0)) or ((y % 400) == 0)
+ *
+ * cdef bint is_leap_gregorian(int year): # <<<<<<<<<<<<<<
+ * return (year > 1582 and is_leap_proleptic_gregorian(year)) or (year < 1582 and is_leap_julian(year))
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1526
+ * return (year > 1582 and is_leap_proleptic_gregorian(year)) or (year < 1582 and is_leap_julian(year))
+ *
+ * cdef bint all_leap(int year): # <<<<<<<<<<<<<<
+ * "Return True for all years."
+ * return True
+ */
+
+static int __pyx_f_10netcdftime_11_netcdftime_all_leap(CYTHON_UNUSED int __pyx_v_year) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("all_leap", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1528
+ * cdef bint all_leap(int year):
+ * "Return True for all years."
+ * return True # <<<<<<<<<<<<<<
+ *
+ * cdef bint no_leap(int year):
+ */
+ __pyx_r = 1;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1526
+ * return (year > 1582 and is_leap_proleptic_gregorian(year)) or (year < 1582 and is_leap_julian(year))
+ *
+ * cdef bint all_leap(int year): # <<<<<<<<<<<<<<
+ * "Return True for all years."
+ * return True
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1530
+ * return True
+ *
+ * cdef bint no_leap(int year): # <<<<<<<<<<<<<<
+ * "Return False for all years."
+ * return False
+ */
+
+static int __pyx_f_10netcdftime_11_netcdftime_no_leap(CYTHON_UNUSED int __pyx_v_year) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("no_leap", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1532
+ * cdef bint no_leap(int year):
+ * "Return False for all years."
+ * return False # <<<<<<<<<<<<<<
+ *
+ * # numbers of days per month for calendars supported by add_timedelta(...)
+ */
+ __pyx_r = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1530
+ * return True
+ *
+ * cdef bint no_leap(int year): # <<<<<<<<<<<<<<
+ * "Return False for all years."
+ * return False
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1544
+ * month_lengths_366_day[j] = N
+ *
+ * cdef int* month_lengths(bint (*is_leap)(int), int year): # <<<<<<<<<<<<<<
+ * if is_leap(year):
+ * return month_lengths_366_day
+ */
+
+static int *__pyx_f_10netcdftime_11_netcdftime_month_lengths(int (*__pyx_v_is_leap)(int), int __pyx_v_year) {
+ int *__pyx_r;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("month_lengths", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1545
+ *
+ * cdef int* month_lengths(bint (*is_leap)(int), int year):
+ * if is_leap(year): # <<<<<<<<<<<<<<
+ * return month_lengths_366_day
+ * else:
+ */
+ __pyx_t_1 = (__pyx_v_is_leap(__pyx_v_year) != 0);
+ if (__pyx_t_1) {
+
+ /* "netcdftime/_netcdftime.pyx":1546
+ * cdef int* month_lengths(bint (*is_leap)(int), int year):
+ * if is_leap(year):
+ * return month_lengths_366_day # <<<<<<<<<<<<<<
+ * else:
+ * return month_lengths_365_day
+ */
+ __pyx_r = __pyx_v_10netcdftime_11_netcdftime_month_lengths_366_day;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1545
+ *
+ * cdef int* month_lengths(bint (*is_leap)(int), int year):
+ * if is_leap(year): # <<<<<<<<<<<<<<
+ * return month_lengths_366_day
+ * else:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1548
+ * return month_lengths_366_day
+ * else:
+ * return month_lengths_365_day # <<<<<<<<<<<<<<
+ *
+ * # Add a datetime.timedelta to a netcdftime.datetime instance. Uses
+ */
+ /*else*/ {
+ __pyx_r = __pyx_v_10netcdftime_11_netcdftime_month_lengths_365_day;
+ goto __pyx_L0;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1544
+ * month_lengths_366_day[j] = N
+ *
+ * cdef int* month_lengths(bint (*is_leap)(int), int year): # <<<<<<<<<<<<<<
+ * if is_leap(year):
+ * return month_lengths_366_day
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1564
+ * # the number of invalid dates are hard-wired (1582-10-4 is the last day
+ * # of the Julian calendar, after which follows 1582-10-15).
+ * cdef tuple add_timedelta(datetime dt, delta, bint (*is_leap)(int), bint julian_gregorian_mixed): # <<<<<<<<<<<<<<
+ * cdef int microsecond, second, minute, hour, day, month, year
+ * cdef int delta_microseconds, delta_seconds, delta_days
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_add_timedelta(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_dt, PyObject *__pyx_v_delta, int (*__pyx_v_is_leap)(int), int __pyx_v_julian_gregorian_mixed) {
+ int __pyx_v_microsecond;
+ int __pyx_v_second;
+ int __pyx_v_minute;
+ int __pyx_v_hour;
+ int __pyx_v_day;
+ int __pyx_v_month;
+ int __pyx_v_year;
+ int __pyx_v_delta_microseconds;
+ int __pyx_v_delta_seconds;
+ int __pyx_v_delta_days;
+ int *__pyx_v_month_length;
+ int __pyx_v_extra_days;
+ int __pyx_v_n_invalid_dates;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ __Pyx_RefNannySetupContext("add_timedelta", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1571
+ *
+ * # extract these inputs here to avoid type conversion in the code below
+ * delta_microseconds = delta.microseconds # <<<<<<<<<<<<<<
+ * delta_seconds = delta.seconds
+ * delta_days = delta.days
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1571, __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, 1571, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_delta_microseconds = __pyx_t_2;
+
+ /* "netcdftime/_netcdftime.pyx":1572
+ * # extract these inputs here to avoid type conversion in the code below
+ * delta_microseconds = delta.microseconds
+ * delta_seconds = delta.seconds # <<<<<<<<<<<<<<
+ * delta_days = delta.days
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s_seconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1572, __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, 1572, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_delta_seconds = __pyx_t_2;
+
+ /* "netcdftime/_netcdftime.pyx":1573
+ * delta_microseconds = delta.microseconds
+ * delta_seconds = delta.seconds
+ * delta_days = delta.days # <<<<<<<<<<<<<<
+ *
+ * # shift microseconds, seconds, days
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s_days); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __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, 1573, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_delta_days = __pyx_t_2;
+
+ /* "netcdftime/_netcdftime.pyx":1576
+ *
+ * # shift microseconds, seconds, days
+ * microsecond = dt.microsecond + delta_microseconds # <<<<<<<<<<<<<<
+ * second = dt.second + delta_seconds
+ * minute = dt.minute
+ */
+ __pyx_v_microsecond = (__pyx_v_dt->microsecond + __pyx_v_delta_microseconds);
+
+ /* "netcdftime/_netcdftime.pyx":1577
+ * # shift microseconds, seconds, days
+ * microsecond = dt.microsecond + delta_microseconds
+ * second = dt.second + delta_seconds # <<<<<<<<<<<<<<
+ * minute = dt.minute
+ * hour = dt.hour
+ */
+ __pyx_v_second = (__pyx_v_dt->second + __pyx_v_delta_seconds);
+
+ /* "netcdftime/_netcdftime.pyx":1578
+ * microsecond = dt.microsecond + delta_microseconds
+ * second = dt.second + delta_seconds
+ * minute = dt.minute # <<<<<<<<<<<<<<
+ * hour = dt.hour
+ * day = dt.day
+ */
+ __pyx_t_2 = __pyx_v_dt->minute;
+ __pyx_v_minute = __pyx_t_2;
+
+ /* "netcdftime/_netcdftime.pyx":1579
+ * second = dt.second + delta_seconds
+ * minute = dt.minute
+ * hour = dt.hour # <<<<<<<<<<<<<<
+ * day = dt.day
+ * month = dt.month
+ */
+ __pyx_t_2 = __pyx_v_dt->hour;
+ __pyx_v_hour = __pyx_t_2;
+
+ /* "netcdftime/_netcdftime.pyx":1580
+ * minute = dt.minute
+ * hour = dt.hour
+ * day = dt.day # <<<<<<<<<<<<<<
+ * month = dt.month
+ * year = dt.year
+ */
+ __pyx_t_2 = __pyx_v_dt->day;
+ __pyx_v_day = __pyx_t_2;
+
+ /* "netcdftime/_netcdftime.pyx":1581
+ * hour = dt.hour
+ * day = dt.day
+ * month = dt.month # <<<<<<<<<<<<<<
+ * year = dt.year
+ *
+ */
+ __pyx_t_2 = __pyx_v_dt->month;
+ __pyx_v_month = __pyx_t_2;
+
+ /* "netcdftime/_netcdftime.pyx":1582
+ * day = dt.day
+ * month = dt.month
+ * year = dt.year # <<<<<<<<<<<<<<
+ *
+ * # validate inputs:
+ */
+ __pyx_t_2 = __pyx_v_dt->year;
+ __pyx_v_year = __pyx_t_2;
+
+ /* "netcdftime/_netcdftime.pyx":1585
+ *
+ * # validate inputs:
+ * if year == 0: # <<<<<<<<<<<<<<
+ * raise ValueError("invalid year in {0!r}".format(dt))
+ *
+ */
+ __pyx_t_3 = ((__pyx_v_year == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1586
+ * # validate inputs:
+ * if year == 0:
+ * raise ValueError("invalid year in {0!r}".format(dt)) # <<<<<<<<<<<<<<
+ *
+ * month_length = month_lengths(is_leap, year)
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_invalid_year_in_0_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_dt)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1586, __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, ((PyObject *)__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, 1586, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, ((PyObject *)__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, 1586, __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, 1586, __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(((PyObject *)__pyx_v_dt));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_dt));
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, ((PyObject *)__pyx_v_dt));
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1586, __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_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1586, __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, 1586, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1585
+ *
+ * # validate inputs:
+ * if year == 0: # <<<<<<<<<<<<<<
+ * raise ValueError("invalid year in {0!r}".format(dt))
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1588
+ * raise ValueError("invalid year in {0!r}".format(dt))
+ *
+ * month_length = month_lengths(is_leap, year) # <<<<<<<<<<<<<<
+ *
+ * if month < 1 or month > 12:
+ */
+ __pyx_v_month_length = __pyx_f_10netcdftime_11_netcdftime_month_lengths(__pyx_v_is_leap, __pyx_v_year);
+
+ /* "netcdftime/_netcdftime.pyx":1590
+ * month_length = month_lengths(is_leap, year)
+ *
+ * if month < 1 or month > 12: # <<<<<<<<<<<<<<
+ * raise ValueError("invalid month in {0!r}".format(dt))
+ *
+ */
+ __pyx_t_7 = ((__pyx_v_month < 1) != 0);
+ if (!__pyx_t_7) {
+ } else {
+ __pyx_t_3 = __pyx_t_7;
+ goto __pyx_L5_bool_binop_done;
+ }
+ __pyx_t_7 = ((__pyx_v_month > 12) != 0);
+ __pyx_t_3 = __pyx_t_7;
+ __pyx_L5_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1591
+ *
+ * if month < 1 or month > 12:
+ * raise ValueError("invalid month in {0!r}".format(dt)) # <<<<<<<<<<<<<<
+ *
+ * if day < 1 or day > month_length[month]:
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_invalid_month_in_0_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_dt)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1591, __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_6, ((PyObject *)__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, 1591, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, ((PyObject *)__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, 1591, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1591, __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(((PyObject *)__pyx_v_dt));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_dt));
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_dt));
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1591, __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;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1591, __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_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1591, __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, 1591, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1590
+ * month_length = month_lengths(is_leap, year)
+ *
+ * if month < 1 or month > 12: # <<<<<<<<<<<<<<
+ * raise ValueError("invalid month in {0!r}".format(dt))
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1593
+ * raise ValueError("invalid month in {0!r}".format(dt))
+ *
+ * if day < 1 or day > month_length[month]: # <<<<<<<<<<<<<<
+ * raise ValueError("invalid day number in {0!r}".format(dt))
+ *
+ */
+ __pyx_t_7 = ((__pyx_v_day < 1) != 0);
+ if (!__pyx_t_7) {
+ } else {
+ __pyx_t_3 = __pyx_t_7;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_7 = ((__pyx_v_day > (__pyx_v_month_length[__pyx_v_month])) != 0);
+ __pyx_t_3 = __pyx_t_7;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1594
+ *
+ * if day < 1 or day > month_length[month]:
+ * raise ValueError("invalid day number in {0!r}".format(dt)) # <<<<<<<<<<<<<<
+ *
+ * if julian_gregorian_mixed and year == 1582 and month == 10 and day > 4 and day < 15:
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_invalid_day_number_in_0_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1594, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_dt)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1594, __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, ((PyObject *)__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, 1594, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, ((PyObject *)__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, 1594, __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, 1594, __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(((PyObject *)__pyx_v_dt));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_dt));
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, ((PyObject *)__pyx_v_dt));
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1594, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1594, __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_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1594, __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, 1594, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1593
+ * raise ValueError("invalid month in {0!r}".format(dt))
+ *
+ * if day < 1 or day > month_length[month]: # <<<<<<<<<<<<<<
+ * raise ValueError("invalid day number in {0!r}".format(dt))
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1596
+ * raise ValueError("invalid day number in {0!r}".format(dt))
+ *
+ * if julian_gregorian_mixed and year == 1582 and month == 10 and day > 4 and day < 15: # <<<<<<<<<<<<<<
+ * raise ValueError("{0!r} is not present in the mixed Julian/Gregorian calendar".format(dt))
+ *
+ */
+ __pyx_t_7 = (__pyx_v_julian_gregorian_mixed != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_3 = __pyx_t_7;
+ goto __pyx_L11_bool_binop_done;
+ }
+ __pyx_t_7 = ((__pyx_v_year == 0x62E) != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_3 = __pyx_t_7;
+ goto __pyx_L11_bool_binop_done;
+ }
+ __pyx_t_7 = ((__pyx_v_month == 10) != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_3 = __pyx_t_7;
+ goto __pyx_L11_bool_binop_done;
+ }
+ __pyx_t_7 = ((__pyx_v_day > 4) != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_3 = __pyx_t_7;
+ goto __pyx_L11_bool_binop_done;
+ }
+ __pyx_t_7 = ((__pyx_v_day < 15) != 0);
+ __pyx_t_3 = __pyx_t_7;
+ __pyx_L11_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1597
+ *
+ * if julian_gregorian_mixed and year == 1582 and month == 10 and day > 4 and day < 15:
+ * raise ValueError("{0!r} is not present in the mixed Julian/Gregorian calendar".format(dt)) # <<<<<<<<<<<<<<
+ *
+ * n_invalid_dates = 10 if julian_gregorian_mixed else 0
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_r_is_not_present_in_the_mixed, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1597, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_dt)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1597, __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_6, ((PyObject *)__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, 1597, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, ((PyObject *)__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, 1597, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1597, __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(((PyObject *)__pyx_v_dt));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_dt));
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_dt));
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1597, __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;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1597, __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_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1597, __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, 1597, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1596
+ * raise ValueError("invalid day number in {0!r}".format(dt))
+ *
+ * if julian_gregorian_mixed and year == 1582 and month == 10 and day > 4 and day < 15: # <<<<<<<<<<<<<<
+ * raise ValueError("{0!r} is not present in the mixed Julian/Gregorian calendar".format(dt))
+ *
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1599
+ * raise ValueError("{0!r} is not present in the mixed Julian/Gregorian calendar".format(dt))
+ *
+ * n_invalid_dates = 10 if julian_gregorian_mixed else 0 # <<<<<<<<<<<<<<
+ *
+ * # Normalize microseconds, seconds, minutes, hours.
+ */
+ if ((__pyx_v_julian_gregorian_mixed != 0)) {
+ __pyx_t_2 = 10;
+ } else {
+ __pyx_t_2 = 0;
+ }
+ __pyx_v_n_invalid_dates = __pyx_t_2;
+
+ /* "netcdftime/_netcdftime.pyx":1602
+ *
+ * # Normalize microseconds, seconds, minutes, hours.
+ * second += microsecond // 1000000 # <<<<<<<<<<<<<<
+ * microsecond = microsecond % 1000000
+ * minute += second // 60
+ */
+ __pyx_v_second = (__pyx_v_second + __Pyx_div_long(__pyx_v_microsecond, 0xF4240));
+
+ /* "netcdftime/_netcdftime.pyx":1603
+ * # Normalize microseconds, seconds, minutes, hours.
+ * second += microsecond // 1000000
+ * microsecond = microsecond % 1000000 # <<<<<<<<<<<<<<
+ * minute += second // 60
+ * second = second % 60
+ */
+ __pyx_v_microsecond = __Pyx_mod_long(__pyx_v_microsecond, 0xF4240);
+
+ /* "netcdftime/_netcdftime.pyx":1604
+ * second += microsecond // 1000000
+ * microsecond = microsecond % 1000000
+ * minute += second // 60 # <<<<<<<<<<<<<<
+ * second = second % 60
+ * hour += minute // 60
+ */
+ __pyx_v_minute = (__pyx_v_minute + __Pyx_div_long(__pyx_v_second, 60));
+
+ /* "netcdftime/_netcdftime.pyx":1605
+ * microsecond = microsecond % 1000000
+ * minute += second // 60
+ * second = second % 60 # <<<<<<<<<<<<<<
+ * hour += minute // 60
+ * minute = minute % 60
+ */
+ __pyx_v_second = __Pyx_mod_long(__pyx_v_second, 60);
+
+ /* "netcdftime/_netcdftime.pyx":1606
+ * minute += second // 60
+ * second = second % 60
+ * hour += minute // 60 # <<<<<<<<<<<<<<
+ * minute = minute % 60
+ * extra_days = hour // 24
+ */
+ __pyx_v_hour = (__pyx_v_hour + __Pyx_div_long(__pyx_v_minute, 60));
+
+ /* "netcdftime/_netcdftime.pyx":1607
+ * second = second % 60
+ * hour += minute // 60
+ * minute = minute % 60 # <<<<<<<<<<<<<<
+ * extra_days = hour // 24
+ * hour = hour % 24
+ */
+ __pyx_v_minute = __Pyx_mod_long(__pyx_v_minute, 60);
+
+ /* "netcdftime/_netcdftime.pyx":1608
+ * hour += minute // 60
+ * minute = minute % 60
+ * extra_days = hour // 24 # <<<<<<<<<<<<<<
+ * hour = hour % 24
+ *
+ */
+ __pyx_v_extra_days = __Pyx_div_long(__pyx_v_hour, 24);
+
+ /* "netcdftime/_netcdftime.pyx":1609
+ * minute = minute % 60
+ * extra_days = hour // 24
+ * hour = hour % 24 # <<<<<<<<<<<<<<
+ *
+ * delta_days += extra_days
+ */
+ __pyx_v_hour = __Pyx_mod_long(__pyx_v_hour, 24);
+
+ /* "netcdftime/_netcdftime.pyx":1611
+ * hour = hour % 24
+ *
+ * delta_days += extra_days # <<<<<<<<<<<<<<
+ *
+ * while delta_days < 0:
+ */
+ __pyx_v_delta_days = (__pyx_v_delta_days + __pyx_v_extra_days);
+
+ /* "netcdftime/_netcdftime.pyx":1613
+ * delta_days += extra_days
+ *
+ * while delta_days < 0: # <<<<<<<<<<<<<<
+ * if year == 1582 and month == 10 and day > 14 and day + delta_days < 15:
+ * delta_days -= n_invalid_dates # skip over invalid dates
+ */
+ while (1) {
+ __pyx_t_3 = ((__pyx_v_delta_days < 0) != 0);
+ if (!__pyx_t_3) break;
+
+ /* "netcdftime/_netcdftime.pyx":1614
+ *
+ * while delta_days < 0:
+ * if year == 1582 and month == 10 and day > 14 and day + delta_days < 15: # <<<<<<<<<<<<<<
+ * delta_days -= n_invalid_dates # skip over invalid dates
+ * if day + delta_days < 1:
+ */
+ __pyx_t_7 = ((__pyx_v_year == 0x62E) != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_3 = __pyx_t_7;
+ goto __pyx_L19_bool_binop_done;
+ }
+ __pyx_t_7 = ((__pyx_v_month == 10) != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_3 = __pyx_t_7;
+ goto __pyx_L19_bool_binop_done;
+ }
+ __pyx_t_7 = ((__pyx_v_day > 14) != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_3 = __pyx_t_7;
+ goto __pyx_L19_bool_binop_done;
+ }
+ __pyx_t_7 = (((__pyx_v_day + __pyx_v_delta_days) < 15) != 0);
+ __pyx_t_3 = __pyx_t_7;
+ __pyx_L19_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1615
+ * while delta_days < 0:
+ * if year == 1582 and month == 10 and day > 14 and day + delta_days < 15:
+ * delta_days -= n_invalid_dates # skip over invalid dates # <<<<<<<<<<<<<<
+ * if day + delta_days < 1:
+ * delta_days += day
+ */
+ __pyx_v_delta_days = (__pyx_v_delta_days - __pyx_v_n_invalid_dates);
+
+ /* "netcdftime/_netcdftime.pyx":1614
+ *
+ * while delta_days < 0:
+ * if year == 1582 and month == 10 and day > 14 and day + delta_days < 15: # <<<<<<<<<<<<<<
+ * delta_days -= n_invalid_dates # skip over invalid dates
+ * if day + delta_days < 1:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1616
+ * if year == 1582 and month == 10 and day > 14 and day + delta_days < 15:
+ * delta_days -= n_invalid_dates # skip over invalid dates
+ * if day + delta_days < 1: # <<<<<<<<<<<<<<
+ * delta_days += day
+ * # decrement month
+ */
+ __pyx_t_3 = (((__pyx_v_day + __pyx_v_delta_days) < 1) != 0);
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1617
+ * delta_days -= n_invalid_dates # skip over invalid dates
+ * if day + delta_days < 1:
+ * delta_days += day # <<<<<<<<<<<<<<
+ * # decrement month
+ * month -= 1
+ */
+ __pyx_v_delta_days = (__pyx_v_delta_days + __pyx_v_day);
+
+ /* "netcdftime/_netcdftime.pyx":1619
+ * delta_days += day
+ * # decrement month
+ * month -= 1 # <<<<<<<<<<<<<<
+ * if month < 1:
+ * month = 12
+ */
+ __pyx_v_month = (__pyx_v_month - 1);
+
+ /* "netcdftime/_netcdftime.pyx":1620
+ * # decrement month
+ * month -= 1
+ * if month < 1: # <<<<<<<<<<<<<<
+ * month = 12
+ * year -= 1
+ */
+ __pyx_t_3 = ((__pyx_v_month < 1) != 0);
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1621
+ * month -= 1
+ * if month < 1:
+ * month = 12 # <<<<<<<<<<<<<<
+ * year -= 1
+ * if year == 0:
+ */
+ __pyx_v_month = 12;
+
+ /* "netcdftime/_netcdftime.pyx":1622
+ * if month < 1:
+ * month = 12
+ * year -= 1 # <<<<<<<<<<<<<<
+ * if year == 0:
+ * year = -1
+ */
+ __pyx_v_year = (__pyx_v_year - 1);
+
+ /* "netcdftime/_netcdftime.pyx":1623
+ * month = 12
+ * year -= 1
+ * if year == 0: # <<<<<<<<<<<<<<
+ * year = -1
+ * month_length = month_lengths(is_leap, year)
+ */
+ __pyx_t_3 = ((__pyx_v_year == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1624
+ * year -= 1
+ * if year == 0:
+ * year = -1 # <<<<<<<<<<<<<<
+ * month_length = month_lengths(is_leap, year)
+ * day = month_length[month]
+ */
+ __pyx_v_year = -1;
+
+ /* "netcdftime/_netcdftime.pyx":1623
+ * month = 12
+ * year -= 1
+ * if year == 0: # <<<<<<<<<<<<<<
+ * year = -1
+ * month_length = month_lengths(is_leap, year)
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1625
+ * if year == 0:
+ * year = -1
+ * month_length = month_lengths(is_leap, year) # <<<<<<<<<<<<<<
+ * day = month_length[month]
+ * else:
+ */
+ __pyx_v_month_length = __pyx_f_10netcdftime_11_netcdftime_month_lengths(__pyx_v_is_leap, __pyx_v_year);
+
+ /* "netcdftime/_netcdftime.pyx":1620
+ * # decrement month
+ * month -= 1
+ * if month < 1: # <<<<<<<<<<<<<<
+ * month = 12
+ * year -= 1
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1626
+ * year = -1
+ * month_length = month_lengths(is_leap, year)
+ * day = month_length[month] # <<<<<<<<<<<<<<
+ * else:
+ * day += delta_days
+ */
+ __pyx_v_day = (__pyx_v_month_length[__pyx_v_month]);
+
+ /* "netcdftime/_netcdftime.pyx":1616
+ * if year == 1582 and month == 10 and day > 14 and day + delta_days < 15:
+ * delta_days -= n_invalid_dates # skip over invalid dates
+ * if day + delta_days < 1: # <<<<<<<<<<<<<<
+ * delta_days += day
+ * # decrement month
+ */
+ goto __pyx_L23;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1628
+ * day = month_length[month]
+ * else:
+ * day += delta_days # <<<<<<<<<<<<<<
+ * delta_days = 0
+ *
+ */
+ /*else*/ {
+ __pyx_v_day = (__pyx_v_day + __pyx_v_delta_days);
+
+ /* "netcdftime/_netcdftime.pyx":1629
+ * else:
+ * day += delta_days
+ * delta_days = 0 # <<<<<<<<<<<<<<
+ *
+ * while delta_days > 0:
+ */
+ __pyx_v_delta_days = 0;
+ }
+ __pyx_L23:;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1631
+ * delta_days = 0
+ *
+ * while delta_days > 0: # <<<<<<<<<<<<<<
+ * if year == 1582 and month == 10 and day < 5 and day + delta_days > 4:
+ * delta_days += n_invalid_dates # skip over invalid dates
+ */
+ while (1) {
+ __pyx_t_3 = ((__pyx_v_delta_days > 0) != 0);
+ if (!__pyx_t_3) break;
+
+ /* "netcdftime/_netcdftime.pyx":1632
+ *
+ * while delta_days > 0:
+ * if year == 1582 and month == 10 and day < 5 and day + delta_days > 4: # <<<<<<<<<<<<<<
+ * delta_days += n_invalid_dates # skip over invalid dates
+ * if day + delta_days > month_length[month]:
+ */
+ __pyx_t_7 = ((__pyx_v_year == 0x62E) != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_3 = __pyx_t_7;
+ goto __pyx_L29_bool_binop_done;
+ }
+ __pyx_t_7 = ((__pyx_v_month == 10) != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_3 = __pyx_t_7;
+ goto __pyx_L29_bool_binop_done;
+ }
+ __pyx_t_7 = ((__pyx_v_day < 5) != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_3 = __pyx_t_7;
+ goto __pyx_L29_bool_binop_done;
+ }
+ __pyx_t_7 = (((__pyx_v_day + __pyx_v_delta_days) > 4) != 0);
+ __pyx_t_3 = __pyx_t_7;
+ __pyx_L29_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1633
+ * while delta_days > 0:
+ * if year == 1582 and month == 10 and day < 5 and day + delta_days > 4:
+ * delta_days += n_invalid_dates # skip over invalid dates # <<<<<<<<<<<<<<
+ * if day + delta_days > month_length[month]:
+ * delta_days -= month_length[month] - (day - 1)
+ */
+ __pyx_v_delta_days = (__pyx_v_delta_days + __pyx_v_n_invalid_dates);
+
+ /* "netcdftime/_netcdftime.pyx":1632
+ *
+ * while delta_days > 0:
+ * if year == 1582 and month == 10 and day < 5 and day + delta_days > 4: # <<<<<<<<<<<<<<
+ * delta_days += n_invalid_dates # skip over invalid dates
+ * if day + delta_days > month_length[month]:
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1634
+ * if year == 1582 and month == 10 and day < 5 and day + delta_days > 4:
+ * delta_days += n_invalid_dates # skip over invalid dates
+ * if day + delta_days > month_length[month]: # <<<<<<<<<<<<<<
+ * delta_days -= month_length[month] - (day - 1)
+ * # increment month
+ */
+ __pyx_t_3 = (((__pyx_v_day + __pyx_v_delta_days) > (__pyx_v_month_length[__pyx_v_month])) != 0);
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1635
+ * delta_days += n_invalid_dates # skip over invalid dates
+ * if day + delta_days > month_length[month]:
+ * delta_days -= month_length[month] - (day - 1) # <<<<<<<<<<<<<<
+ * # increment month
+ * month += 1
+ */
+ __pyx_v_delta_days = (__pyx_v_delta_days - ((__pyx_v_month_length[__pyx_v_month]) - (__pyx_v_day - 1)));
+
+ /* "netcdftime/_netcdftime.pyx":1637
+ * delta_days -= month_length[month] - (day - 1)
+ * # increment month
+ * month += 1 # <<<<<<<<<<<<<<
+ * if month > 12:
+ * month = 1
+ */
+ __pyx_v_month = (__pyx_v_month + 1);
+
+ /* "netcdftime/_netcdftime.pyx":1638
+ * # increment month
+ * month += 1
+ * if month > 12: # <<<<<<<<<<<<<<
+ * month = 1
+ * year += 1
+ */
+ __pyx_t_3 = ((__pyx_v_month > 12) != 0);
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1639
+ * month += 1
+ * if month > 12:
+ * month = 1 # <<<<<<<<<<<<<<
+ * year += 1
+ * if year == 0:
+ */
+ __pyx_v_month = 1;
+
+ /* "netcdftime/_netcdftime.pyx":1640
+ * if month > 12:
+ * month = 1
+ * year += 1 # <<<<<<<<<<<<<<
+ * if year == 0:
+ * year = 1
+ */
+ __pyx_v_year = (__pyx_v_year + 1);
+
+ /* "netcdftime/_netcdftime.pyx":1641
+ * month = 1
+ * year += 1
+ * if year == 0: # <<<<<<<<<<<<<<
+ * year = 1
+ * month_length = month_lengths(is_leap, year)
+ */
+ __pyx_t_3 = ((__pyx_v_year == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "netcdftime/_netcdftime.pyx":1642
+ * year += 1
+ * if year == 0:
+ * year = 1 # <<<<<<<<<<<<<<
+ * month_length = month_lengths(is_leap, year)
+ * day = 1
+ */
+ __pyx_v_year = 1;
+
+ /* "netcdftime/_netcdftime.pyx":1641
+ * month = 1
+ * year += 1
+ * if year == 0: # <<<<<<<<<<<<<<
+ * year = 1
+ * month_length = month_lengths(is_leap, year)
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1643
+ * if year == 0:
+ * year = 1
+ * month_length = month_lengths(is_leap, year) # <<<<<<<<<<<<<<
+ * day = 1
+ * else:
+ */
+ __pyx_v_month_length = __pyx_f_10netcdftime_11_netcdftime_month_lengths(__pyx_v_is_leap, __pyx_v_year);
+
+ /* "netcdftime/_netcdftime.pyx":1638
+ * # increment month
+ * month += 1
+ * if month > 12: # <<<<<<<<<<<<<<
+ * month = 1
+ * year += 1
+ */
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1644
+ * year = 1
+ * month_length = month_lengths(is_leap, year)
+ * day = 1 # <<<<<<<<<<<<<<
+ * else:
+ * day += delta_days
+ */
+ __pyx_v_day = 1;
+
+ /* "netcdftime/_netcdftime.pyx":1634
+ * if year == 1582 and month == 10 and day < 5 and day + delta_days > 4:
+ * delta_days += n_invalid_dates # skip over invalid dates
+ * if day + delta_days > month_length[month]: # <<<<<<<<<<<<<<
+ * delta_days -= month_length[month] - (day - 1)
+ * # increment month
+ */
+ goto __pyx_L33;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1646
+ * day = 1
+ * else:
+ * day += delta_days # <<<<<<<<<<<<<<
+ * delta_days = 0
+ *
+ */
+ /*else*/ {
+ __pyx_v_day = (__pyx_v_day + __pyx_v_delta_days);
+
+ /* "netcdftime/_netcdftime.pyx":1647
+ * else:
+ * day += delta_days
+ * delta_days = 0 # <<<<<<<<<<<<<<
+ *
+ * return (year, month, day, hour, minute, second, microsecond, -1, 1)
+ */
+ __pyx_v_delta_days = 0;
+ }
+ __pyx_L33:;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":1649
+ * delta_days = 0
+ *
+ * return (year, month, day, hour, minute, second, microsecond, -1, 1) # <<<<<<<<<<<<<<
+ *
+ * # Add a datetime.timedelta to a netcdftime.datetime instance with the 360_day calendar.
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1649, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_month); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1649, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1649, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1649, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1649, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_second); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1649, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1649, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = PyTuple_New(9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1649, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_t_10);
+ __Pyx_INCREF(__pyx_int_neg_1);
+ __Pyx_GIVEREF(__pyx_int_neg_1);
+ PyTuple_SET_ITEM(__pyx_t_11, 7, __pyx_int_neg_1);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_11, 8, __pyx_int_1);
+ __pyx_t_1 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_9 = 0;
+ __pyx_t_10 = 0;
+ __pyx_r = ((PyObject*)__pyx_t_11);
+ __pyx_t_11 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1564
+ * # the number of invalid dates are hard-wired (1582-10-4 is the last day
+ * # of the Julian calendar, after which follows 1582-10-15).
+ * cdef tuple add_timedelta(datetime dt, delta, bint (*is_leap)(int), bint julian_gregorian_mixed): # <<<<<<<<<<<<<<
+ * cdef int microsecond, second, minute, hour, day, month, year
+ * cdef int delta_microseconds, delta_seconds, delta_days
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("netcdftime._netcdftime.add_timedelta", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "netcdftime/_netcdftime.pyx":1657
+ * # months are 30 days long, so we can compute month and year by using
+ * # "//" and "%".
+ * cdef tuple add_timedelta_360_day(datetime dt, delta): # <<<<<<<<<<<<<<
+ * cdef int microsecond, second, minute, hour, day, month, year
+ * cdef int delta_microseconds, delta_seconds, delta_days
+ */
+
+static PyObject *__pyx_f_10netcdftime_11_netcdftime_add_timedelta_360_day(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *__pyx_v_dt, PyObject *__pyx_v_delta) {
+ int __pyx_v_microsecond;
+ int __pyx_v_second;
+ int __pyx_v_minute;
+ int __pyx_v_hour;
+ int __pyx_v_day;
+ int __pyx_v_month;
+ int __pyx_v_year;
+ int __pyx_v_delta_microseconds;
+ int __pyx_v_delta_seconds;
+ int __pyx_v_delta_days;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ __Pyx_RefNannySetupContext("add_timedelta_360_day", 0);
+
+ /* "netcdftime/_netcdftime.pyx":1661
+ * cdef int delta_microseconds, delta_seconds, delta_days
+ *
+ * assert dt.month >= 1 and dt.month <= 12 # <<<<<<<<<<<<<<
+ *
+ * # extract these inputs here to avoid type conversion in the code below
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ __pyx_t_2 = ((__pyx_v_dt->month >= 1) != 0);
+ if (__pyx_t_2) {
+ } else {
+ __pyx_t_1 = __pyx_t_2;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_t_2 = ((__pyx_v_dt->month <= 12) != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L3_bool_binop_done:;
+ if (unlikely(!__pyx_t_1)) {
+ PyErr_SetNone(PyExc_AssertionError);
+ __PYX_ERR(0, 1661, __pyx_L1_error)
+ }
+ }
+ #endif
+
+ /* "netcdftime/_netcdftime.pyx":1664
+ *
+ * # extract these inputs here to avoid type conversion in the code below
+ * delta_microseconds = delta.microseconds # <<<<<<<<<<<<<<
+ * delta_seconds = delta.seconds
+ * delta_days = delta.days
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1664, __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, 1664, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_delta_microseconds = __pyx_t_4;
+
+ /* "netcdftime/_netcdftime.pyx":1665
+ * # extract these inputs here to avoid type conversion in the code below
+ * delta_microseconds = delta.microseconds
+ * delta_seconds = delta.seconds # <<<<<<<<<<<<<<
+ * delta_days = delta.days
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s_seconds); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1665, __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, 1665, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_delta_seconds = __pyx_t_4;
+
+ /* "netcdftime/_netcdftime.pyx":1666
+ * delta_microseconds = delta.microseconds
+ * delta_seconds = delta.seconds
+ * delta_days = delta.days # <<<<<<<<<<<<<<
+ *
+ * # shift microseconds, seconds, days
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_delta, __pyx_n_s_days); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1666, __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, 1666, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_delta_days = __pyx_t_4;
+
+ /* "netcdftime/_netcdftime.pyx":1669
+ *
+ * # shift microseconds, seconds, days
+ * microsecond = dt.microsecond + delta_microseconds # <<<<<<<<<<<<<<
+ * second = dt.second + delta_seconds
+ * minute = dt.minute
+ */
+ __pyx_v_microsecond = (__pyx_v_dt->microsecond + __pyx_v_delta_microseconds);
+
+ /* "netcdftime/_netcdftime.pyx":1670
+ * # shift microseconds, seconds, days
+ * microsecond = dt.microsecond + delta_microseconds
+ * second = dt.second + delta_seconds # <<<<<<<<<<<<<<
+ * minute = dt.minute
+ * hour = dt.hour
+ */
+ __pyx_v_second = (__pyx_v_dt->second + __pyx_v_delta_seconds);
+
+ /* "netcdftime/_netcdftime.pyx":1671
+ * microsecond = dt.microsecond + delta_microseconds
+ * second = dt.second + delta_seconds
+ * minute = dt.minute # <<<<<<<<<<<<<<
+ * hour = dt.hour
+ * day = dt.day + delta_days
+ */
+ __pyx_t_4 = __pyx_v_dt->minute;
+ __pyx_v_minute = __pyx_t_4;
+
+ /* "netcdftime/_netcdftime.pyx":1672
+ * second = dt.second + delta_seconds
+ * minute = dt.minute
+ * hour = dt.hour # <<<<<<<<<<<<<<
+ * day = dt.day + delta_days
+ * month = dt.month
+ */
+ __pyx_t_4 = __pyx_v_dt->hour;
+ __pyx_v_hour = __pyx_t_4;
+
+ /* "netcdftime/_netcdftime.pyx":1673
+ * minute = dt.minute
+ * hour = dt.hour
+ * day = dt.day + delta_days # <<<<<<<<<<<<<<
+ * month = dt.month
+ * year = dt.year
+ */
+ __pyx_v_day = (__pyx_v_dt->day + __pyx_v_delta_days);
+
+ /* "netcdftime/_netcdftime.pyx":1674
+ * hour = dt.hour
+ * day = dt.day + delta_days
+ * month = dt.month # <<<<<<<<<<<<<<
+ * year = dt.year
+ *
+ */
+ __pyx_t_4 = __pyx_v_dt->month;
+ __pyx_v_month = __pyx_t_4;
+
+ /* "netcdftime/_netcdftime.pyx":1675
+ * day = dt.day + delta_days
+ * month = dt.month
+ * year = dt.year # <<<<<<<<<<<<<<
+ *
+ * # Normalize microseconds, seconds, minutes, hours, days, and months.
+ */
+ __pyx_t_4 = __pyx_v_dt->year;
+ __pyx_v_year = __pyx_t_4;
+
+ /* "netcdftime/_netcdftime.pyx":1678
+ *
+ * # Normalize microseconds, seconds, minutes, hours, days, and months.
+ * second += microsecond // 1000000 # <<<<<<<<<<<<<<
+ * microsecond = microsecond % 1000000
+ * minute += second // 60
+ */
+ __pyx_v_second = (__pyx_v_second + __Pyx_div_long(__pyx_v_microsecond, 0xF4240));
+
+ /* "netcdftime/_netcdftime.pyx":1679
+ * # Normalize microseconds, seconds, minutes, hours, days, and months.
+ * second += microsecond // 1000000
+ * microsecond = microsecond % 1000000 # <<<<<<<<<<<<<<
+ * minute += second // 60
+ * second = second % 60
+ */
+ __pyx_v_microsecond = __Pyx_mod_long(__pyx_v_microsecond, 0xF4240);
+
+ /* "netcdftime/_netcdftime.pyx":1680
+ * second += microsecond // 1000000
+ * microsecond = microsecond % 1000000
+ * minute += second // 60 # <<<<<<<<<<<<<<
+ * second = second % 60
+ * hour += minute // 60
+ */
+ __pyx_v_minute = (__pyx_v_minute + __Pyx_div_long(__pyx_v_second, 60));
+
+ /* "netcdftime/_netcdftime.pyx":1681
+ * microsecond = microsecond % 1000000
+ * minute += second // 60
+ * second = second % 60 # <<<<<<<<<<<<<<
+ * hour += minute // 60
+ * minute = minute % 60
+ */
+ __pyx_v_second = __Pyx_mod_long(__pyx_v_second, 60);
+
+ /* "netcdftime/_netcdftime.pyx":1682
+ * minute += second // 60
+ * second = second % 60
+ * hour += minute // 60 # <<<<<<<<<<<<<<
+ * minute = minute % 60
+ * day += hour // 24
+ */
+ __pyx_v_hour = (__pyx_v_hour + __Pyx_div_long(__pyx_v_minute, 60));
+
+ /* "netcdftime/_netcdftime.pyx":1683
+ * second = second % 60
+ * hour += minute // 60
+ * minute = minute % 60 # <<<<<<<<<<<<<<
+ * day += hour // 24
+ * hour = hour % 24
+ */
+ __pyx_v_minute = __Pyx_mod_long(__pyx_v_minute, 60);
+
+ /* "netcdftime/_netcdftime.pyx":1684
+ * hour += minute // 60
+ * minute = minute % 60
+ * day += hour // 24 # <<<<<<<<<<<<<<
+ * hour = hour % 24
+ * # day and month are counted from 1; all months have 30 days
+ */
+ __pyx_v_day = (__pyx_v_day + __Pyx_div_long(__pyx_v_hour, 24));
+
+ /* "netcdftime/_netcdftime.pyx":1685
+ * minute = minute % 60
+ * day += hour // 24
+ * hour = hour % 24 # <<<<<<<<<<<<<<
+ * # day and month are counted from 1; all months have 30 days
+ * month += (day - 1) // 30
+ */
+ __pyx_v_hour = __Pyx_mod_long(__pyx_v_hour, 24);
+
+ /* "netcdftime/_netcdftime.pyx":1687
+ * hour = hour % 24
+ * # day and month are counted from 1; all months have 30 days
+ * month += (day - 1) // 30 # <<<<<<<<<<<<<<
+ * day = (day - 1) % 30 + 1
+ * # all years have 12 months
+ */
+ __pyx_v_month = (__pyx_v_month + __Pyx_div_long((__pyx_v_day - 1), 30));
+
+ /* "netcdftime/_netcdftime.pyx":1688
+ * # day and month are counted from 1; all months have 30 days
+ * month += (day - 1) // 30
+ * day = (day - 1) % 30 + 1 # <<<<<<<<<<<<<<
+ * # all years have 12 months
+ * year += (month - 1) // 12
+ */
+ __pyx_v_day = (__Pyx_mod_long((__pyx_v_day - 1), 30) + 1);
+
+ /* "netcdftime/_netcdftime.pyx":1690
+ * day = (day - 1) % 30 + 1
+ * # all years have 12 months
+ * year += (month - 1) // 12 # <<<<<<<<<<<<<<
+ * month = (month - 1) % 12 + 1
+ *
+ */
+ __pyx_v_year = (__pyx_v_year + __Pyx_div_long((__pyx_v_month - 1), 12));
+
+ /* "netcdftime/_netcdftime.pyx":1691
+ * # all years have 12 months
+ * year += (month - 1) // 12
+ * month = (month - 1) % 12 + 1 # <<<<<<<<<<<<<<
+ *
+ * return (year, month, day, hour, minute, second, microsecond, -1, 1)
+ */
+ __pyx_v_month = (__Pyx_mod_long((__pyx_v_month - 1), 12) + 1);
+
+ /* "netcdftime/_netcdftime.pyx":1693
+ * month = (month - 1) % 12 + 1
+ *
+ * return (year, month, day, hour, minute, second, microsecond, -1, 1) # <<<<<<<<<<<<<<
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1693, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_month); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1693, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1693, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_hour); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1693, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_minute); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1693, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_second); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1693, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_microsecond); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1693, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = PyTuple_New(9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1693, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_11, 6, __pyx_t_10);
+ __Pyx_INCREF(__pyx_int_neg_1);
+ __Pyx_GIVEREF(__pyx_int_neg_1);
+ PyTuple_SET_ITEM(__pyx_t_11, 7, __pyx_int_neg_1);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_11, 8, __pyx_int_1);
+ __pyx_t_3 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_7 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_9 = 0;
+ __pyx_t_10 = 0;
+ __pyx_r = ((PyObject*)__pyx_t_11);
+ __pyx_t_11 = 0;
+ goto __pyx_L0;
+
+ /* "netcdftime/_netcdftime.pyx":1657
+ * # months are 30 days long, so we can compute month and year by using
+ * # "//" and "%".
+ * cdef tuple add_timedelta_360_day(datetime dt, delta): # <<<<<<<<<<<<<<
+ * cdef int microsecond, second, minute, hour, day, month, year
+ * cdef int delta_microseconds, delta_seconds, delta_days
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("netcdftime._netcdftime.add_timedelta_360_day", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime __pyx_vtable_10netcdftime_11_netcdftime_datetime;
+
+static PyObject *__pyx_tp_new_10netcdftime_11_netcdftime_datetime(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_10netcdftime_11_netcdftime_datetime *p;
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)o);
+ p->__pyx_vtab = __pyx_vtabptr_10netcdftime_11_netcdftime_datetime;
+ p->calendar = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ return o;
+}
+
+static void __pyx_tp_dealloc_10netcdftime_11_netcdftime_datetime(PyObject *o) {
+ struct __pyx_obj_10netcdftime_11_netcdftime_datetime *p = (struct __pyx_obj_10netcdftime_11_netcdftime_datetime *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ Py_CLEAR(p->calendar);
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_11_netcdftime_8datetime_format(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_10netcdftime_11_netcdftime_8datetime_6format_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_11_netcdftime_8datetime_year(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_10netcdftime_11_netcdftime_8datetime_4year_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_11_netcdftime_8datetime_month(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_10netcdftime_11_netcdftime_8datetime_5month_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_11_netcdftime_8datetime_day(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_10netcdftime_11_netcdftime_8datetime_3day_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_11_netcdftime_8datetime_hour(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_10netcdftime_11_netcdftime_8datetime_4hour_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_11_netcdftime_8datetime_minute(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_10netcdftime_11_netcdftime_8datetime_6minute_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_11_netcdftime_8datetime_dayofwk(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_10netcdftime_11_netcdftime_8datetime_7dayofwk_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_11_netcdftime_8datetime_dayofyr(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_10netcdftime_11_netcdftime_8datetime_7dayofyr_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_11_netcdftime_8datetime_second(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_10netcdftime_11_netcdftime_8datetime_6second_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_11_netcdftime_8datetime_microsecond(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_10netcdftime_11_netcdftime_8datetime_11microsecond_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_11_netcdftime_8datetime_calendar(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_10netcdftime_11_netcdftime_8datetime_8calendar_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_10netcdftime_11_netcdftime_8datetime_datetime_compatible(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_10netcdftime_11_netcdftime_8datetime_19datetime_compatible_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_10netcdftime_11_netcdftime_datetime[] = {
+ {"strftime", (PyCFunction)__pyx_pw_10netcdftime_11_netcdftime_8datetime_3strftime, METH_VARARGS|METH_KEYWORDS, 0},
+ {"replace", (PyCFunction)__pyx_pw_10netcdftime_11_netcdftime_8datetime_5replace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10netcdftime_11_netcdftime_8datetime_4replace},
+ {"timetuple", (PyCFunction)__pyx_pw_10netcdftime_11_netcdftime_8datetime_7timetuple, METH_NOARGS, 0},
+ {"_to_real_datetime", (PyCFunction)__pyx_pw_10netcdftime_11_netcdftime_8datetime_9_to_real_datetime, METH_NOARGS, 0},
+ {"__reduce__", (PyCFunction)__pyx_pw_10netcdftime_11_netcdftime_8datetime_19__reduce__, METH_NOARGS, __pyx_doc_10netcdftime_11_netcdftime_8datetime_18__reduce__},
+ {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_10netcdftime_11_netcdftime_datetime[] = {
+ {(char *)"format", __pyx_getprop_10netcdftime_11_netcdftime_8datetime_format, 0, (char *)0, 0},
+ {(char *)"year", __pyx_getprop_10netcdftime_11_netcdftime_8datetime_year, 0, (char *)0, 0},
+ {(char *)"month", __pyx_getprop_10netcdftime_11_netcdftime_8datetime_month, 0, (char *)0, 0},
+ {(char *)"day", __pyx_getprop_10netcdftime_11_netcdftime_8datetime_day, 0, (char *)0, 0},
+ {(char *)"hour", __pyx_getprop_10netcdftime_11_netcdftime_8datetime_hour, 0, (char *)0, 0},
+ {(char *)"minute", __pyx_getprop_10netcdftime_11_netcdftime_8datetime_minute, 0, (char *)0, 0},
+ {(char *)"dayofwk", __pyx_getprop_10netcdftime_11_netcdftime_8datetime_dayofwk, 0, (char *)0, 0},
+ {(char *)"dayofyr", __pyx_getprop_10netcdftime_11_netcdftime_8datetime_dayofyr, 0, (char *)0, 0},
+ {(char *)"second", __pyx_getprop_10netcdftime_11_netcdftime_8datetime_second, 0, (char *)0, 0},
+ {(char *)"microsecond", __pyx_getprop_10netcdftime_11_netcdftime_8datetime_microsecond, 0, (char *)0, 0},
+ {(char *)"calendar", __pyx_getprop_10netcdftime_11_netcdftime_8datetime_calendar, 0, (char *)0, 0},
+ {(char *)"datetime_compatible", __pyx_getprop_10netcdftime_11_netcdftime_8datetime_datetime_compatible, 0, (char *)0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_datetime = {
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_21__add__, /*nb_add*/
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_23__sub__, /*nb_subtract*/
+ 0, /*nb_multiply*/
+ #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
+ 0, /*nb_divide*/
+ #endif
+ 0, /*nb_remainder*/
+ 0, /*nb_divmod*/
+ 0, /*nb_power*/
+ 0, /*nb_negative*/
+ 0, /*nb_positive*/
+ 0, /*nb_absolute*/
+ 0, /*nb_nonzero*/
+ 0, /*nb_invert*/
+ 0, /*nb_lshift*/
+ 0, /*nb_rshift*/
+ 0, /*nb_and*/
+ 0, /*nb_xor*/
+ 0, /*nb_or*/
+ #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
+ 0, /*nb_coerce*/
+ #endif
+ 0, /*nb_int*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_long*/
+ #else
+ 0, /*reserved*/
+ #endif
+ 0, /*nb_float*/
+ #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
+ 0, /*nb_oct*/
+ #endif
+ #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
+ 0, /*nb_hex*/
+ #endif
+ 0, /*nb_inplace_add*/
+ 0, /*nb_inplace_subtract*/
+ 0, /*nb_inplace_multiply*/
+ #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
+ 0, /*nb_inplace_divide*/
+ #endif
+ 0, /*nb_inplace_remainder*/
+ 0, /*nb_inplace_power*/
+ 0, /*nb_inplace_lshift*/
+ 0, /*nb_inplace_rshift*/
+ 0, /*nb_inplace_and*/
+ 0, /*nb_inplace_xor*/
+ 0, /*nb_inplace_or*/
+ 0, /*nb_floor_divide*/
+ 0, /*nb_true_divide*/
+ 0, /*nb_inplace_floor_divide*/
+ 0, /*nb_inplace_true_divide*/
+ 0, /*nb_index*/
+ #if PY_VERSION_HEX >= 0x03050000
+ 0, /*nb_matrix_multiply*/
+ #endif
+ #if PY_VERSION_HEX >= 0x03050000
+ 0, /*nb_inplace_matrix_multiply*/
+ #endif
+};
+
+static PyTypeObject __pyx_type_10netcdftime_11_netcdftime_datetime = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "netcdftime._netcdftime.datetime", /*tp_name*/
+ sizeof(struct __pyx_obj_10netcdftime_11_netcdftime_datetime), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_10netcdftime_11_netcdftime_datetime, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_11__repr__, /*tp_repr*/
+ &__pyx_tp_as_number_datetime, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_15__hash__, /*tp_hash*/
+ 0, /*tp_call*/
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_13__str__, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ "\nThe base class implementing most methods of datetime classes that\nmimic datetime.datetime but support calendars other than the proleptic\nGregorial calendar.\n ", /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_17__richcmp__, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_10netcdftime_11_netcdftime_datetime, /*tp_methods*/
+ 0, /*tp_members*/
+ __pyx_getsets_10netcdftime_11_netcdftime_datetime, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_1__init__, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_10netcdftime_11_netcdftime_datetime, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+static struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeNoLeap __pyx_vtable_10netcdftime_11_netcdftime_DatetimeNoLeap;
+
+static PyObject *__pyx_tp_new_10netcdftime_11_netcdftime_DatetimeNoLeap(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeNoLeap *p;
+ PyObject *o = __pyx_tp_new_10netcdftime_11_netcdftime_datetime(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeNoLeap *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime*)__pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeNoLeap;
+ return o;
+}
+
+static PyMethodDef __pyx_methods_10netcdftime_11_netcdftime_DatetimeNoLeap[] = {
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_10netcdftime_11_netcdftime_DatetimeNoLeap = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "netcdftime._netcdftime.DatetimeNoLeap", /*tp_name*/
+ sizeof(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeNoLeap), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_10netcdftime_11_netcdftime_datetime, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_11__repr__, /*tp_repr*/
+ #else
+ 0, /*tp_repr*/
+ #endif
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_13__str__, /*tp_str*/
+ #else
+ 0, /*tp_str*/
+ #endif
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ "\nPhony datetime object which mimics the python datetime object,\nbut uses the \"noleap\" (\"365_day\") calendar.\n ", /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_10netcdftime_11_netcdftime_DatetimeNoLeap, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ __pyx_pw_10netcdftime_11_netcdftime_14DatetimeNoLeap_1__init__, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_10netcdftime_11_netcdftime_DatetimeNoLeap, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+static struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeAllLeap __pyx_vtable_10netcdftime_11_netcdftime_DatetimeAllLeap;
+
+static PyObject *__pyx_tp_new_10netcdftime_11_netcdftime_DatetimeAllLeap(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeAllLeap *p;
+ PyObject *o = __pyx_tp_new_10netcdftime_11_netcdftime_datetime(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeAllLeap *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime*)__pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeAllLeap;
+ return o;
+}
+
+static PyMethodDef __pyx_methods_10netcdftime_11_netcdftime_DatetimeAllLeap[] = {
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_10netcdftime_11_netcdftime_DatetimeAllLeap = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "netcdftime._netcdftime.DatetimeAllLeap", /*tp_name*/
+ sizeof(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeAllLeap), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_10netcdftime_11_netcdftime_datetime, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_11__repr__, /*tp_repr*/
+ #else
+ 0, /*tp_repr*/
+ #endif
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_13__str__, /*tp_str*/
+ #else
+ 0, /*tp_str*/
+ #endif
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ "\nPhony datetime object which mimics the python datetime object,\nbut uses the \"all_leap\" (\"366_day\") calendar.\n ", /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_10netcdftime_11_netcdftime_DatetimeAllLeap, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ __pyx_pw_10netcdftime_11_netcdftime_15DatetimeAllLeap_1__init__, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_10netcdftime_11_netcdftime_DatetimeAllLeap, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+static struct __pyx_vtabstruct_10netcdftime_11_netcdftime_Datetime360Day __pyx_vtable_10netcdftime_11_netcdftime_Datetime360Day;
+
+static PyObject *__pyx_tp_new_10netcdftime_11_netcdftime_Datetime360Day(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_10netcdftime_11_netcdftime_Datetime360Day *p;
+ PyObject *o = __pyx_tp_new_10netcdftime_11_netcdftime_datetime(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_10netcdftime_11_netcdftime_Datetime360Day *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime*)__pyx_vtabptr_10netcdftime_11_netcdftime_Datetime360Day;
+ return o;
+}
+
+static PyMethodDef __pyx_methods_10netcdftime_11_netcdftime_Datetime360Day[] = {
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_10netcdftime_11_netcdftime_Datetime360Day = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "netcdftime._netcdftime.Datetime360Day", /*tp_name*/
+ sizeof(struct __pyx_obj_10netcdftime_11_netcdftime_Datetime360Day), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_10netcdftime_11_netcdftime_datetime, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_11__repr__, /*tp_repr*/
+ #else
+ 0, /*tp_repr*/
+ #endif
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_13__str__, /*tp_str*/
+ #else
+ 0, /*tp_str*/
+ #endif
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ "\nPhony datetime object which mimics the python datetime object,\nbut uses the \"360_day\" calendar.\n ", /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_10netcdftime_11_netcdftime_Datetime360Day, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ __pyx_pw_10netcdftime_11_netcdftime_14Datetime360Day_1__init__, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_10netcdftime_11_netcdftime_Datetime360Day, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+static struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeJulian __pyx_vtable_10netcdftime_11_netcdftime_DatetimeJulian;
+
+static PyObject *__pyx_tp_new_10netcdftime_11_netcdftime_DatetimeJulian(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeJulian *p;
+ PyObject *o = __pyx_tp_new_10netcdftime_11_netcdftime_datetime(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeJulian *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime*)__pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeJulian;
+ return o;
+}
+
+static PyMethodDef __pyx_methods_10netcdftime_11_netcdftime_DatetimeJulian[] = {
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_10netcdftime_11_netcdftime_DatetimeJulian = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "netcdftime._netcdftime.DatetimeJulian", /*tp_name*/
+ sizeof(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeJulian), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_10netcdftime_11_netcdftime_datetime, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_11__repr__, /*tp_repr*/
+ #else
+ 0, /*tp_repr*/
+ #endif
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_13__str__, /*tp_str*/
+ #else
+ 0, /*tp_str*/
+ #endif
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ "\nPhony datetime object which mimics the python datetime object,\nbut uses the \"julian\" calendar.\n ", /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_10netcdftime_11_netcdftime_DatetimeJulian, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ __pyx_pw_10netcdftime_11_netcdftime_14DatetimeJulian_1__init__, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_10netcdftime_11_netcdftime_DatetimeJulian, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+static struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeGregorian __pyx_vtable_10netcdftime_11_netcdftime_DatetimeGregorian;
+
+static PyObject *__pyx_tp_new_10netcdftime_11_netcdftime_DatetimeGregorian(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeGregorian *p;
+ PyObject *o = __pyx_tp_new_10netcdftime_11_netcdftime_datetime(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeGregorian *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime*)__pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeGregorian;
+ return o;
+}
+
+static PyMethodDef __pyx_methods_10netcdftime_11_netcdftime_DatetimeGregorian[] = {
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_10netcdftime_11_netcdftime_DatetimeGregorian = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "netcdftime._netcdftime.DatetimeGregorian", /*tp_name*/
+ sizeof(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeGregorian), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_10netcdftime_11_netcdftime_datetime, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_11__repr__, /*tp_repr*/
+ #else
+ 0, /*tp_repr*/
+ #endif
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_13__str__, /*tp_str*/
+ #else
+ 0, /*tp_str*/
+ #endif
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ "\nPhony datetime object which mimics the python datetime object,\nbut uses the mixed Julian-Gregorian (\"standard\", \"gregorian\") calendar.\n\nThe last date of the Julian calendar is 1582-10-4, which is followed\nby 1582-10-15, using the Gregorian calendar.\n\nInstances using the date after 1582-10-15 can be compared to\ndatetime.datetime instances and used to compute time differences\n(datetime.timedelta) by subtracting a DatetimeGregorian instance from\na datetime.datetime instanc [...]
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_10netcdftime_11_netcdftime_DatetimeGregorian, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ __pyx_pw_10netcdftime_11_netcdftime_17DatetimeGregorian_1__init__, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_10netcdftime_11_netcdftime_DatetimeGregorian, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+static struct __pyx_vtabstruct_10netcdftime_11_netcdftime_DatetimeProlepticGregorian __pyx_vtable_10netcdftime_11_netcdftime_DatetimeProlepticGregorian;
+
+static PyObject *__pyx_tp_new_10netcdftime_11_netcdftime_DatetimeProlepticGregorian(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeProlepticGregorian *p;
+ PyObject *o = __pyx_tp_new_10netcdftime_11_netcdftime_datetime(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeProlepticGregorian *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10netcdftime_11_netcdftime_datetime*)__pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeProlepticGregorian;
+ return o;
+}
+
+static PyMethodDef __pyx_methods_10netcdftime_11_netcdftime_DatetimeProlepticGregorian[] = {
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_10netcdftime_11_netcdftime_DatetimeProlepticGregorian = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "netcdftime._netcdftime.DatetimeProlepticGregorian", /*tp_name*/
+ sizeof(struct __pyx_obj_10netcdftime_11_netcdftime_DatetimeProlepticGregorian), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_10netcdftime_11_netcdftime_datetime, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_11__repr__, /*tp_repr*/
+ #else
+ 0, /*tp_repr*/
+ #endif
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_10netcdftime_11_netcdftime_8datetime_13__str__, /*tp_str*/
+ #else
+ 0, /*tp_str*/
+ #endif
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ "\nPhony datetime object which mimics the python datetime object,\nbut allows for dates that don't exist in the proleptic gregorian calendar.\n\nSupports timedelta operations by overloading + and -.\n\nHas strftime, timetuple, replace, __repr__, and __str__ methods. The\nformat of the string produced by __str__ is controlled by self.format\n(default %Y-%m-%d %H:%M:%S). Supports comparisons with other phony\ndatetime instances using the same calendar; comparison with\ndatetime.datetime [...]
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_10netcdftime_11_netcdftime_DatetimeProlepticGregorian, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ __pyx_pw_10netcdftime_11_netcdftime_26DatetimeProlepticGregorian_1__init__, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_10netcdftime_11_netcdftime_DatetimeProlepticGregorian, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static PyMethodDef __pyx_methods[] = {
+ {"_parse_date", (PyCFunction)__pyx_pw_10netcdftime_11_netcdftime_5_parse_date, METH_O, __pyx_doc_10netcdftime_11_netcdftime_4_parse_date},
+ {0, 0, 0, 0}
+};
+
+#if PY_MAJOR_VERSION >= 3
+static struct PyModuleDef __pyx_moduledef = {
+ #if PY_VERSION_HEX < 0x03020000
+ { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
+ #else
+ PyModuleDef_HEAD_INIT,
+ #endif
+ "_netcdftime",
+ __pyx_k_Performs_conversions_of_netCDF, /* m_doc */
+ -1, /* m_size */
+ __pyx_methods /* m_methods */,
+ NULL, /* m_reload */
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL /* m_free */
+};
+#endif
+
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+ {&__pyx_kp_s_0_1_2, __pyx_k_0_1_2, sizeof(__pyx_k_0_1_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_0_r_is_not_present_in_the_mixed, __pyx_k_0_r_is_not_present_in_the_mixed, sizeof(__pyx_k_0_r_is_not_present_in_the_mixed), 0, 0, 1, 0},
+ {&__pyx_kp_s_1_4_1, __pyx_k_1_4_1, sizeof(__pyx_k_1_4_1), 0, 0, 1, 0},
+ {&__pyx_kp_s_360_day, __pyx_k_360_day, sizeof(__pyx_k_360_day), 0, 0, 1, 0},
+ {&__pyx_kp_s_365_day, __pyx_k_365_day, sizeof(__pyx_k_365_day), 0, 0, 1, 0},
+ {&__pyx_kp_s_366_day, __pyx_k_366_day, sizeof(__pyx_k_366_day), 0, 0, 1, 0},
+ {&__pyx_kp_s_4d, __pyx_k_4d, sizeof(__pyx_k_4d), 0, 0, 1, 0},
+ {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1},
+ {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
+ {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1},
+ {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1},
+ {&__pyx_n_s_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 0, 1, 1},
+ {&__pyx_n_s_DateFromJulianDay, __pyx_k_DateFromJulianDay, sizeof(__pyx_k_DateFromJulianDay), 0, 0, 1, 1},
+ {&__pyx_n_s_E, __pyx_k_E, sizeof(__pyx_k_E), 0, 0, 1, 1},
+ {&__pyx_kp_s_Expecting_a_string_r, __pyx_k_Expecting_a_string_r, sizeof(__pyx_k_Expecting_a_string_r), 0, 0, 1, 0},
+ {&__pyx_n_s_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 1, 1},
+ {&__pyx_n_s_ISO8601_REGEX, __pyx_k_ISO8601_REGEX, sizeof(__pyx_k_ISO8601_REGEX), 0, 0, 1, 1},
+ {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
+ {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
+ {&__pyx_n_s_JD, __pyx_k_JD, sizeof(__pyx_k_JD), 0, 0, 1, 1},
+ {&__pyx_n_s_JulianDayFromDate, __pyx_k_JulianDayFromDate, sizeof(__pyx_k_JulianDayFromDate), 0, 0, 1, 1},
+ {&__pyx_kp_s_Julian_Day_must_be_positive, __pyx_k_Julian_Day_must_be_positive, sizeof(__pyx_k_Julian_Day_must_be_positive), 0, 0, 1, 0},
+ {&__pyx_n_s_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 0, 1, 1},
+ {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
+ {&__pyx_kp_s_P_prefix_P_hours_0_9_1_2_P_minu, __pyx_k_P_prefix_P_hours_0_9_1_2_P_minu, sizeof(__pyx_k_P_prefix_P_hours_0_9_1_2_P_minu), 0, 0, 1, 0},
+ {&__pyx_kp_s_P_year_0_9_1_4_P_month_0_9_1_2, __pyx_k_P_year_0_9_1_4_P_month_0_9_1_2, sizeof(__pyx_k_P_year_0_9_1_4_P_month_0_9_1_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_Performs_conversions_of_netCDF_2, __pyx_k_Performs_conversions_of_netCDF_2, sizeof(__pyx_k_Performs_conversions_of_netCDF_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_Some_of_the_times_given_are_afte, __pyx_k_Some_of_the_times_given_are_afte, sizeof(__pyx_k_Some_of_the_times_given_are_afte), 0, 0, 1, 0},
+ {&__pyx_kp_s_Some_of_the_times_given_are_befo, __pyx_k_Some_of_the_times_given_are_befo, sizeof(__pyx_k_Some_of_the_times_given_are_befo), 0, 0, 1, 0},
+ {&__pyx_kp_s_Some_of_the_times_specified_were, __pyx_k_Some_of_the_times_specified_were, sizeof(__pyx_k_Some_of_the_times_specified_were), 0, 0, 1, 0},
+ {&__pyx_n_s_TIMEZONE_REGEX, __pyx_k_TIMEZONE_REGEX, sizeof(__pyx_k_TIMEZONE_REGEX), 0, 0, 1, 1},
+ {&__pyx_kp_s_This_strftime_implementation_doe, __pyx_k_This_strftime_implementation_doe, sizeof(__pyx_k_This_strftime_implementation_doe), 0, 0, 1, 0},
+ {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
+ {&__pyx_kp_s_Unable_to_parse_date_string_r, __pyx_k_Unable_to_parse_date_string_r, sizeof(__pyx_k_Unable_to_parse_date_string_r), 0, 0, 1, 0},
+ {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+ {&__pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_k_Volumes_Drobo_python_netcdf4_py, sizeof(__pyx_k_Volumes_Drobo_python_netcdf4_py), 0, 0, 1, 0},
+ {&__pyx_kp_s_Y_m_d_H_M_S, __pyx_k_Y_m_d_H_M_S, sizeof(__pyx_k_Y_m_d_H_M_S), 0, 0, 1, 0},
+ {&__pyx_n_s_Z, __pyx_k_Z, sizeof(__pyx_k_Z), 0, 0, 1, 1},
+ {&__pyx_kp_s__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 1, 0},
+ {&__pyx_kp_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 0},
+ {&__pyx_n_s_abs, __pyx_k_abs, sizeof(__pyx_k_abs), 0, 0, 1, 1},
+ {&__pyx_n_s_after, __pyx_k_after, sizeof(__pyx_k_after), 0, 0, 1, 1},
+ {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
+ {&__pyx_n_s_all_leap, __pyx_k_all_leap, sizeof(__pyx_k_all_leap), 0, 0, 1, 1},
+ {&__pyx_n_s_alpha, __pyx_k_alpha, sizeof(__pyx_k_alpha), 0, 0, 1, 1},
+ {&__pyx_n_s_any, __pyx_k_any, sizeof(__pyx_k_any), 0, 0, 1, 1},
+ {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
+ {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
+ {&__pyx_n_s_around, __pyx_k_around, sizeof(__pyx_k_around), 0, 0, 1, 1},
+ {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
+ {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1},
+ {&__pyx_n_s_atleast_1d, __pyx_k_atleast_1d, sizeof(__pyx_k_atleast_1d), 0, 0, 1, 1},
+ {&__pyx_n_s_before, __pyx_k_before, sizeof(__pyx_k_before), 0, 0, 1, 1},
+ {&__pyx_n_s_bisect, __pyx_k_bisect, sizeof(__pyx_k_bisect), 0, 0, 1, 1},
+ {&__pyx_n_s_bisect_left, __pyx_k_bisect_left, sizeof(__pyx_k_bisect_left), 0, 0, 1, 1},
+ {&__pyx_n_s_bisect_right, __pyx_k_bisect_right, sizeof(__pyx_k_bisect_right), 0, 0, 1, 1},
+ {&__pyx_n_s_calendar, __pyx_k_calendar, sizeof(__pyx_k_calendar), 0, 0, 1, 1},
+ {&__pyx_kp_s_calendar_must_be_one_of_s_got_s, __pyx_k_calendar_must_be_one_of_s_got_s, sizeof(__pyx_k_calendar_must_be_one_of_s_got_s), 0, 0, 1, 0},
+ {&__pyx_n_s_calendars, __pyx_k_calendars, sizeof(__pyx_k_calendars), 0, 0, 1, 1},
+ {&__pyx_kp_s_cannot_compare_0_r_and_1_r, __pyx_k_cannot_compare_0_r_and_1_r, sizeof(__pyx_k_cannot_compare_0_r_and_1_r), 0, 0, 1, 0},
+ {&__pyx_kp_s_cannot_compare_0_r_and_1_r_diffe, __pyx_k_cannot_compare_0_r_and_1_r_diffe, sizeof(__pyx_k_cannot_compare_0_r_and_1_r_diffe), 0, 0, 1, 0},
+ {&__pyx_kp_s_cannot_compute_the_time_differen, __pyx_k_cannot_compute_the_time_differen, sizeof(__pyx_k_cannot_compute_the_time_differen), 0, 0, 1, 0},
+ {&__pyx_kp_s_cannot_compute_the_time_differen_2, __pyx_k_cannot_compute_the_time_differen_2, sizeof(__pyx_k_cannot_compute_the_time_differen_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_cannot_specify_a_leap_day_as_the, __pyx_k_cannot_specify_a_leap_day_as_the, sizeof(__pyx_k_cannot_specify_a_leap_day_as_the), 0, 0, 1, 0},
+ {&__pyx_n_s_cdftime, __pyx_k_cdftime, sizeof(__pyx_k_cdftime), 0, 0, 1, 1},
+ {&__pyx_n_s_ceil, __pyx_k_ceil, sizeof(__pyx_k_ceil), 0, 0, 1, 1},
+ {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
+ {&__pyx_n_s_clip, __pyx_k_clip, sizeof(__pyx_k_clip), 0, 0, 1, 1},
+ {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1},
+ {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
+ {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
+ {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1},
+ {&__pyx_n_s_date2index, __pyx_k_date2index, sizeof(__pyx_k_date2index), 0, 0, 1, 1},
+ {&__pyx_n_s_date2num, __pyx_k_date2num, sizeof(__pyx_k_date2num), 0, 0, 1, 1},
+ {&__pyx_n_s_dates, __pyx_k_dates, sizeof(__pyx_k_dates), 0, 0, 1, 1},
+ {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
+ {&__pyx_n_s_datetime_compatible, __pyx_k_datetime_compatible, sizeof(__pyx_k_datetime_compatible), 0, 0, 1, 1},
+ {&__pyx_n_s_datetime_type, __pyx_k_datetime_type, sizeof(__pyx_k_datetime_type), 0, 0, 1, 1},
+ {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1},
+ {&__pyx_n_s_day_units, __pyx_k_day_units, sizeof(__pyx_k_day_units), 0, 0, 1, 1},
+ {&__pyx_n_s_dayofwk, __pyx_k_dayofwk, sizeof(__pyx_k_dayofwk), 0, 0, 1, 1},
+ {&__pyx_n_s_dayofyr, __pyx_k_dayofyr, sizeof(__pyx_k_dayofyr), 0, 0, 1, 1},
+ {&__pyx_n_s_days, __pyx_k_days, sizeof(__pyx_k_days), 0, 0, 1, 1},
+ {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
+ {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1},
+ {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
+ {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
+ {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
+ {&__pyx_n_s_eps, __pyx_k_eps, sizeof(__pyx_k_eps), 0, 0, 1, 1},
+ {&__pyx_n_s_exact, __pyx_k_exact, sizeof(__pyx_k_exact), 0, 0, 1, 1},
+ {&__pyx_n_s_find, __pyx_k_find, sizeof(__pyx_k_find), 0, 0, 1, 1},
+ {&__pyx_n_s_finfo, __pyx_k_finfo, sizeof(__pyx_k_finfo), 0, 0, 1, 1},
+ {&__pyx_n_s_flat, __pyx_k_flat, sizeof(__pyx_k_flat), 0, 0, 1, 1},
+ {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1},
+ {&__pyx_n_s_fmod, __pyx_k_fmod, sizeof(__pyx_k_fmod), 0, 0, 1, 1},
+ {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
+ {&__pyx_n_s_gregorian, __pyx_k_gregorian, sizeof(__pyx_k_gregorian), 0, 0, 1, 1},
+ {&__pyx_n_s_groupdict, __pyx_k_groupdict, sizeof(__pyx_k_groupdict), 0, 0, 1, 1},
+ {&__pyx_n_s_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 0, 0, 1, 1},
+ {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
+ {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1},
+ {&__pyx_n_s_hours, __pyx_k_hours, sizeof(__pyx_k_hours), 0, 0, 1, 1},
+ {&__pyx_n_s_hr, __pyx_k_hr, sizeof(__pyx_k_hr), 0, 0, 1, 1},
+ {&__pyx_n_s_hr_units, __pyx_k_hr_units, sizeof(__pyx_k_hr_units), 0, 0, 1, 1},
+ {&__pyx_n_s_hrs, __pyx_k_hrs, sizeof(__pyx_k_hrs), 0, 0, 1, 1},
+ {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
+ {&__pyx_n_s_ii, __pyx_k_ii, sizeof(__pyx_k_ii), 0, 0, 1, 1},
+ {&__pyx_n_s_illegal_s, __pyx_k_illegal_s, sizeof(__pyx_k_illegal_s), 0, 0, 1, 1},
+ {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+ {&__pyx_kp_s_impossible_date_falls_in_gap_bet, __pyx_k_impossible_date_falls_in_gap_bet, sizeof(__pyx_k_impossible_date_falls_in_gap_bet), 0, 0, 1, 0},
+ {&__pyx_n_s_inc_idx, __pyx_k_inc_idx, sizeof(__pyx_k_inc_idx), 0, 0, 1, 1},
+ {&__pyx_n_s_ind_before, __pyx_k_ind_before, sizeof(__pyx_k_ind_before), 0, 0, 1, 1},
+ {&__pyx_n_s_ind_nday_before, __pyx_k_ind_nday_before, sizeof(__pyx_k_ind_nday_before), 0, 0, 1, 1},
+ {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
+ {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
+ {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1},
+ {&__pyx_n_s_int64, __pyx_k_int64, sizeof(__pyx_k_int64), 0, 0, 1, 1},
+ {&__pyx_kp_s_invalid_day_number_in_0_r, __pyx_k_invalid_day_number_in_0_r, sizeof(__pyx_k_invalid_day_number_in_0_r), 0, 0, 1, 0},
+ {&__pyx_kp_s_invalid_month_in_0_r, __pyx_k_invalid_month_in_0_r, sizeof(__pyx_k_invalid_month_in_0_r), 0, 0, 1, 0},
+ {&__pyx_kp_s_invalid_year_in_0_r, __pyx_k_invalid_year_in_0_r, sizeof(__pyx_k_invalid_year_in_0_r), 0, 0, 1, 0},
+ {&__pyx_n_s_ismasked, __pyx_k_ismasked, sizeof(__pyx_k_ismasked), 0, 0, 1, 1},
+ {&__pyx_n_s_isscalar, __pyx_k_isscalar, sizeof(__pyx_k_isscalar), 0, 0, 1, 1},
+ {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
+ {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
+ {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
+ {&__pyx_n_s_izip, __pyx_k_izip, sizeof(__pyx_k_izip), 0, 0, 1, 1},
+ {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
+ {&__pyx_n_s_jd, __pyx_k_jd, sizeof(__pyx_k_jd), 0, 0, 1, 1},
+ {&__pyx_n_s_jd0, __pyx_k_jd0, sizeof(__pyx_k_jd0), 0, 0, 1, 1},
+ {&__pyx_n_s_jdelta, __pyx_k_jdelta, sizeof(__pyx_k_jdelta), 0, 0, 1, 1},
+ {&__pyx_n_s_julian, __pyx_k_julian, sizeof(__pyx_k_julian), 0, 0, 1, 1},
+ {&__pyx_n_s_leap, __pyx_k_leap, sizeof(__pyx_k_leap), 0, 0, 1, 1},
+ {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
+ {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
+ {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+ {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1},
+ {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1},
+ {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
+ {&__pyx_n_s_maximum, __pyx_k_maximum, sizeof(__pyx_k_maximum), 0, 0, 1, 1},
+ {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
+ {&__pyx_n_s_microsec, __pyx_k_microsec, sizeof(__pyx_k_microsec), 0, 0, 1, 1},
+ {&__pyx_n_s_microsec_units, __pyx_k_microsec_units, sizeof(__pyx_k_microsec_units), 0, 0, 1, 1},
+ {&__pyx_n_s_microsecond, __pyx_k_microsecond, sizeof(__pyx_k_microsecond), 0, 0, 1, 1},
+ {&__pyx_n_s_microseconds, __pyx_k_microseconds, sizeof(__pyx_k_microseconds), 0, 0, 1, 1},
+ {&__pyx_n_s_microsecs, __pyx_k_microsecs, sizeof(__pyx_k_microsecs), 0, 0, 1, 1},
+ {&__pyx_n_s_millisec, __pyx_k_millisec, sizeof(__pyx_k_millisec), 0, 0, 1, 1},
+ {&__pyx_n_s_millisec_units, __pyx_k_millisec_units, sizeof(__pyx_k_millisec_units), 0, 0, 1, 1},
+ {&__pyx_n_s_millisecond, __pyx_k_millisecond, sizeof(__pyx_k_millisecond), 0, 0, 1, 1},
+ {&__pyx_n_s_milliseconds, __pyx_k_milliseconds, sizeof(__pyx_k_milliseconds), 0, 0, 1, 1},
+ {&__pyx_n_s_millisecs, __pyx_k_millisecs, sizeof(__pyx_k_millisecs), 0, 0, 1, 1},
+ {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
+ {&__pyx_n_s_min_units, __pyx_k_min_units, sizeof(__pyx_k_min_units), 0, 0, 1, 1},
+ {&__pyx_n_s_mins, __pyx_k_mins, sizeof(__pyx_k_mins), 0, 0, 1, 1},
+ {&__pyx_n_s_minute, __pyx_k_minute, sizeof(__pyx_k_minute), 0, 0, 1, 1},
+ {&__pyx_n_s_minutes, __pyx_k_minutes, sizeof(__pyx_k_minutes), 0, 0, 1, 1},
+ {&__pyx_n_s_mismatch, __pyx_k_mismatch, sizeof(__pyx_k_mismatch), 0, 0, 1, 1},
+ {&__pyx_n_s_modf, __pyx_k_modf, sizeof(__pyx_k_modf), 0, 0, 1, 1},
+ {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
+ {&__pyx_n_s_month, __pyx_k_month, sizeof(__pyx_k_month), 0, 0, 1, 1},
+ {&__pyx_n_s_month_lt_3, __pyx_k_month_lt_3, sizeof(__pyx_k_month_lt_3), 0, 0, 1, 1},
+ {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 0, 0, 1, 1},
+ {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
+ {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
+ {&__pyx_n_s_ncnum, __pyx_k_ncnum, sizeof(__pyx_k_ncnum), 0, 0, 1, 1},
+ {&__pyx_n_s_nctime, __pyx_k_nctime, sizeof(__pyx_k_nctime), 0, 0, 1, 1},
+ {&__pyx_n_s_nday, __pyx_k_nday, sizeof(__pyx_k_nday), 0, 0, 1, 1},
+ {&__pyx_n_s_nearest, __pyx_k_nearest, sizeof(__pyx_k_nearest), 0, 0, 1, 1},
+ {&__pyx_n_s_nearest_to_left, __pyx_k_nearest_to_left, sizeof(__pyx_k_nearest_to_left), 0, 0, 1, 1},
+ {&__pyx_kp_s_negative_reference_year_in_time, __pyx_k_negative_reference_year_in_time, sizeof(__pyx_k_negative_reference_year_in_time), 0, 0, 1, 0},
+ {&__pyx_kp_s_netcdf_time_variable_is_missing, __pyx_k_netcdf_time_variable_is_missing, sizeof(__pyx_k_netcdf_time_variable_is_missing), 0, 0, 1, 0},
+ {&__pyx_n_s_netcdftime__netcdftime, __pyx_k_netcdftime__netcdftime, sizeof(__pyx_k_netcdftime__netcdftime), 0, 0, 1, 1},
+ {&__pyx_kp_s_no_since_in_unit_string, __pyx_k_no_since_in_unit_string, sizeof(__pyx_k_no_since_in_unit_string), 0, 0, 1, 0},
+ {&__pyx_n_s_noleap, __pyx_k_noleap, sizeof(__pyx_k_noleap), 0, 0, 1, 1},
+ {&__pyx_n_s_nonzero, __pyx_k_nonzero, sizeof(__pyx_k_nonzero), 0, 0, 1, 1},
+ {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
+ {&__pyx_n_s_num, __pyx_k_num, sizeof(__pyx_k_num), 0, 0, 1, 1},
+ {&__pyx_n_s_num2date, __pyx_k_num2date, sizeof(__pyx_k_num2date), 0, 0, 1, 1},
+ {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
+ {&__pyx_n_s_origin, __pyx_k_origin, sizeof(__pyx_k_origin), 0, 0, 1, 1},
+ {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
+ {&__pyx_n_s_proleptic_gregorian, __pyx_k_proleptic_gregorian, sizeof(__pyx_k_proleptic_gregorian), 0, 0, 1, 1},
+ {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
+ {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
+ {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
+ {&__pyx_n_s_real_datetime, __pyx_k_real_datetime, sizeof(__pyx_k_real_datetime), 0, 0, 1, 1},
+ {&__pyx_n_s_reshape, __pyx_k_reshape, sizeof(__pyx_k_reshape), 0, 0, 1, 1},
+ {&__pyx_n_s_round, __pyx_k_round, sizeof(__pyx_k_round), 0, 0, 1, 1},
+ {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
+ {&__pyx_kp_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_s_is_not_an_option_for_the_sele, __pyx_k_s_is_not_an_option_for_the_sele, sizeof(__pyx_k_s_is_not_an_option_for_the_sele), 0, 0, 1, 0},
+ {&__pyx_n_s_search, __pyx_k_search, sizeof(__pyx_k_search), 0, 0, 1, 1},
+ {&__pyx_n_s_sec, __pyx_k_sec, sizeof(__pyx_k_sec), 0, 0, 1, 1},
+ {&__pyx_n_s_sec_units, __pyx_k_sec_units, sizeof(__pyx_k_sec_units), 0, 0, 1, 1},
+ {&__pyx_n_s_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 0, 1, 1},
+ {&__pyx_n_s_seconds, __pyx_k_seconds, sizeof(__pyx_k_seconds), 0, 0, 1, 1},
+ {&__pyx_kp_s_seconds_since_1_1_1, __pyx_k_seconds_since_1_1_1, sizeof(__pyx_k_seconds_since_1_1_1), 0, 0, 1, 0},
+ {&__pyx_n_s_secs, __pyx_k_secs, sizeof(__pyx_k_secs), 0, 0, 1, 1},
+ {&__pyx_n_s_select, __pyx_k_select, sizeof(__pyx_k_select), 0, 0, 1, 1},
+ {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
+ {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
+ {&__pyx_n_s_since, __pyx_k_since, sizeof(__pyx_k_since), 0, 0, 1, 1},
+ {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
+ {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
+ {&__pyx_n_s_squeeze, __pyx_k_squeeze, sizeof(__pyx_k_squeeze), 0, 0, 1, 1},
+ {&__pyx_n_s_standard, __pyx_k_standard, sizeof(__pyx_k_standard), 0, 0, 1, 1},
+ {&__pyx_n_s_strftime, __pyx_k_strftime, sizeof(__pyx_k_strftime), 0, 0, 1, 1},
+ {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
+ {&__pyx_n_s_t0, __pyx_k_t0, sizeof(__pyx_k_t0), 0, 0, 1, 1},
+ {&__pyx_n_s_t1, __pyx_k_t1, sizeof(__pyx_k_t1), 0, 0, 1, 1},
+ {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+ {&__pyx_kp_s_there_are_only_30_days_in_every, __pyx_k_there_are_only_30_days_in_every, sizeof(__pyx_k_there_are_only_30_days_in_every), 0, 0, 1, 0},
+ {&__pyx_kp_s_there_is_no_leap_day_in_the_nole, __pyx_k_there_is_no_leap_day_in_the_nole, sizeof(__pyx_k_there_is_no_leap_day_in_the_nole), 0, 0, 1, 0},
+ {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
+ {&__pyx_n_s_time2index, __pyx_k_time2index, sizeof(__pyx_k_time2index), 0, 0, 1, 1},
+ {&__pyx_n_s_time_value, __pyx_k_time_value, sizeof(__pyx_k_time_value), 0, 0, 1, 1},
+ {&__pyx_n_s_timedelta, __pyx_k_timedelta, sizeof(__pyx_k_timedelta), 0, 0, 1, 1},
+ {&__pyx_n_s_times, __pyx_k_times, sizeof(__pyx_k_times), 0, 0, 1, 1},
+ {&__pyx_n_s_timetuple, __pyx_k_timetuple, sizeof(__pyx_k_timetuple), 0, 0, 1, 1},
+ {&__pyx_n_s_timezone, __pyx_k_timezone, sizeof(__pyx_k_timezone), 0, 0, 1, 1},
+ {&__pyx_n_s_to_real_datetime, __pyx_k_to_real_datetime, sizeof(__pyx_k_to_real_datetime), 0, 0, 1, 1},
+ {&__pyx_n_s_tzoffset, __pyx_k_tzoffset, sizeof(__pyx_k_tzoffset), 0, 0, 1, 1},
+ {&__pyx_n_s_unit_string, __pyx_k_unit_string, sizeof(__pyx_k_unit_string), 0, 0, 1, 1},
+ {&__pyx_n_s_units, __pyx_k_units, sizeof(__pyx_k_units), 0, 0, 1, 1},
+ {&__pyx_n_s_units_2, __pyx_k_units_2, sizeof(__pyx_k_units_2), 0, 0, 1, 1},
+ {&__pyx_kp_s_units_must_be_one_of_seconds_min, __pyx_k_units_must_be_one_of_seconds_min, sizeof(__pyx_k_units_must_be_one_of_seconds_min), 0, 0, 1, 0},
+ {&__pyx_kp_s_unknown_calendar_must_be_one_of, __pyx_k_unknown_calendar_must_be_one_of, sizeof(__pyx_k_unknown_calendar_must_be_one_of), 0, 0, 1, 0},
+ {&__pyx_kp_s_unsupported_calendar_0, __pyx_k_unsupported_calendar_0, sizeof(__pyx_k_unsupported_calendar_0), 0, 0, 1, 0},
+ {&__pyx_kp_s_unsupported_time_units, __pyx_k_unsupported_time_units, sizeof(__pyx_k_unsupported_time_units), 0, 0, 1, 0},
+ {&__pyx_n_s_utime, __pyx_k_utime, sizeof(__pyx_k_utime), 0, 0, 1, 1},
+ {&__pyx_n_s_utime___init, __pyx_k_utime___init, sizeof(__pyx_k_utime___init), 0, 0, 1, 1},
+ {&__pyx_n_s_utime_date2num, __pyx_k_utime_date2num, sizeof(__pyx_k_utime_date2num), 0, 0, 1, 1},
+ {&__pyx_n_s_utime_num2date, __pyx_k_utime_num2date, sizeof(__pyx_k_utime_num2date), 0, 0, 1, 1},
+ {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
+ {&__pyx_n_s_where, __pyx_k_where, sizeof(__pyx_k_where), 0, 0, 1, 1},
+ {&__pyx_n_s_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 0, 1, 1},
+ {&__pyx_kp_s_zero_not_allowed_as_a_reference, __pyx_k_zero_not_allowed_as_a_reference, sizeof(__pyx_k_zero_not_allowed_as_a_reference), 0, 0, 1, 0},
+ {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
+ {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
+ {0, 0, 0, 0, 0, 0, 0}
+};
+static int __Pyx_InitCachedBuiltins(void) {
+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 18, __pyx_L1_error)
+ __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1537, __pyx_L1_error)
+ __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 123, __pyx_L1_error)
+ __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 993, __pyx_L1_error)
+ __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 1050, __pyx_L1_error)
+ __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 1288, __pyx_L1_error)
+ __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 1307, __pyx_L1_error)
+ return 0;
+ __pyx_L1_error:;
+ return -1;
+}
+
+static int __Pyx_InitCachedConstants(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+
+ /* "netcdftime/_netcdftime.pyx":123
+ * # 'impossible date (falls in gap between end of Julian calendar and beginning of Gregorian calendar')
+ * if np.any((jd >= 2299160.5) & (jd < 2299170.5)): # missing days in Gregorian calendar
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'impossible date (falls in gap between end of Julian calendar and beginning of Gregorian calendar')
+ * B = np.zeros(len(jd)) # 1582 October 5 (Julian Calendar)
+ */
+ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_impossible_date_falls_in_gap_bet); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 123, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple_);
+ __Pyx_GIVEREF(__pyx_tuple_);
+
+ /* "netcdftime/_netcdftime.pyx":267
+ *
+ * if np.min(julian) < 0:
+ * raise ValueError('Julian Day must be positive') # <<<<<<<<<<<<<<
+ *
+ * dayofwk = np.atleast_1d(np.int32(np.fmod(np.int32(julian + 1.5), 7)))
+ */
+ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_Julian_Day_must_be_positive); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 267, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__2);
+ __Pyx_GIVEREF(__pyx_tuple__2);
+
+ /* "netcdftime/_netcdftime.pyx":474
+ *
+ * if JD < 0:
+ * raise ValueError('Julian Day must be positive') # <<<<<<<<<<<<<<
+ *
+ * dayofwk = int(math.fmod(int(JD + 1.5), 7))
+ */
+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_Julian_Day_must_be_positive); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 474, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__3);
+ __Pyx_GIVEREF(__pyx_tuple__3);
+
+ /* "netcdftime/_netcdftime.pyx":557
+ * "units must be one of 'seconds', 'minutes', 'hours' or 'days' (or singular version of these), got '%s'" % units)
+ * if timestr_split[1].lower() != 'since':
+ * raise ValueError("no 'since' in unit_string") # <<<<<<<<<<<<<<
+ * # parse the date string.
+ * n = timestr.find('since') + 6
+ */
+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_since_in_unit_string); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 557, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__4);
+ __Pyx_GIVEREF(__pyx_tuple__4);
+
+ /* "netcdftime/_netcdftime.pyx":559
+ * raise ValueError("no 'since' in unit_string")
+ * # parse the date string.
+ * n = timestr.find('since') + 6 # <<<<<<<<<<<<<<
+ * year, month, day, hour, minute, second, utc_offset = _parse_date(
+ * timestr[n:].strip())
+ */
+ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_n_s_since); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 559, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__5);
+ __Pyx_GIVEREF(__pyx_tuple__5);
+
+ /* "netcdftime/_netcdftime.pyx":720
+ * self.unit_string = unit_string
+ * if self.calendar in ['noleap', '365_day'] and self.origin.month == 2 and self.origin.day == 29:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'cannot specify a leap day as the reference time with the noleap calendar')
+ * if self.calendar == '360_day' and self.origin.day > 30:
+ */
+ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_cannot_specify_a_leap_day_as_the); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 720, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__6);
+ __Pyx_GIVEREF(__pyx_tuple__6);
+
+ /* "netcdftime/_netcdftime.pyx":723
+ * 'cannot specify a leap day as the reference time with the noleap calendar')
+ * if self.calendar == '360_day' and self.origin.day > 30:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'there are only 30 days in every month with the 360_day calendar')
+ * if self.calendar in ['noleap', '365_day']:
+ */
+ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_there_are_only_30_days_in_every); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 723, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__7);
+ __Pyx_GIVEREF(__pyx_tuple__7);
+
+ /* "netcdftime/_netcdftime.pyx":770
+ * if isscalar:
+ * if date.month == 2 and date.day == 29:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'there is no leap day in the noleap calendar')
+ * jdelta = _NoLeapDayFromDate(date) - self._jd0
+ */
+ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_there_is_no_leap_day_in_the_nole); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 770, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__8);
+ __Pyx_GIVEREF(__pyx_tuple__8);
+
+ /* "netcdftime/_netcdftime.pyx":777
+ * for d in date.flat:
+ * if d.month == 2 and d.day == 29:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'there is no leap day in the noleap calendar')
+ * jdelta.append(_NoLeapDayFromDate(d) - self._jd0)
+ */
+ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_there_is_no_leap_day_in_the_nole); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__9);
+ __Pyx_GIVEREF(__pyx_tuple__9);
+
+ /* "netcdftime/_netcdftime.pyx":788
+ * if isscalar:
+ * if date.day > 30:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'there are only 30 days in every month with the 360_day calendar')
+ * jdelta = _360DayFromDate(date) - self._jd0
+ */
+ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_there_are_only_30_days_in_every); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 788, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__10);
+ __Pyx_GIVEREF(__pyx_tuple__10);
+
+ /* "netcdftime/_netcdftime.pyx":795
+ * for d in date.flat:
+ * if d.day > 30:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'there are only 30 days in every month with the 360_day calendar')
+ * jdelta.append(_360DayFromDate(d) - self._jd0)
+ */
+ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_there_are_only_30_days_in_every); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 795, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__11);
+ __Pyx_GIVEREF(__pyx_tuple__11);
+
+ /* "netcdftime/_netcdftime.pyx":814
+ * jdelta = jdelta - self.tzoffset / 1440.
+ * else:
+ * raise ValueError('unsupported time units') # <<<<<<<<<<<<<<
+ * if isscalar:
+ * return jdelta
+ */
+ __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_unsupported_time_units); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 814, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__12);
+ __Pyx_GIVEREF(__pyx_tuple__12);
+
+ /* "netcdftime/_netcdftime.pyx":868
+ * jdelta = time_value + self.tzoffset / 1440.
+ * else:
+ * raise ValueError('unsupported time units') # <<<<<<<<<<<<<<
+ * jd = self._jd0 + jdelta
+ * if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
+ */
+ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_unsupported_time_units); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 868, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__13);
+ __Pyx_GIVEREF(__pyx_tuple__13);
+
+ /* "netcdftime/_netcdftime.pyx":994
+ * # array so numpy slicing rules can be used.
+ * except IndexError:
+ * nctime = nctime[:] # <<<<<<<<<<<<<<
+ * t = nctime[indices]
+ * # if fancy indexing not available, fall back on this.
+ */
+ __pyx_slice__15 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__15)) __PYX_ERR(0, 994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__15);
+ __Pyx_GIVEREF(__pyx_slice__15);
+
+ /* "netcdftime/_netcdftime.pyx":1051
+ * nctime.units
+ * except AttributeError:
+ * raise AttributeError("netcdf time variable is missing a 'units' attribute") # <<<<<<<<<<<<<<
+ * # Setting the calendar.
+ * if calendar == None:
+ */
+ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_netcdf_time_variable_is_missing); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1051, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__16);
+ __Pyx_GIVEREF(__pyx_tuple__16);
+
+ /* "netcdftime/_netcdftime.pyx":1089
+ * nctime.units
+ * except AttributeError:
+ * raise AttributeError("netcdf time variable is missing a 'units' attribute") # <<<<<<<<<<<<<<
+ * # Setting the calendar.
+ * if calendar == None:
+ */
+ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_netcdf_time_variable_is_missing); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1089, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__17);
+ __Pyx_GIVEREF(__pyx_tuple__17);
+
+ /* "netcdftime/_netcdftime.pyx":1100
+ * # This assumes that the times are increasing uniformly.
+ * if len(nctime) >= 2:
+ * t0, t1 = nctime[:2] # <<<<<<<<<<<<<<
+ * dt = t1 - t0
+ * else:
+ */
+ __pyx_slice__18 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__18)) __PYX_ERR(0, 1100, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__18);
+ __Pyx_GIVEREF(__pyx_slice__18);
+
+ /* "netcdftime/_netcdftime.pyx":1126
+ *
+ * if select in ['before', 'exact'] and numpy.any(before):
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'Some of the times given are before the first time in `nctime`.')
+ *
+ */
+ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_Some_of_the_times_given_are_befo); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 1126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__19);
+ __Pyx_GIVEREF(__pyx_tuple__19);
+
+ /* "netcdftime/_netcdftime.pyx":1130
+ *
+ * if select in ['after', 'exact'] and numpy.any(after):
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'Some of the times given are after the last time in `nctime`.')
+ *
+ */
+ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_Some_of_the_times_given_are_afte); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__20);
+ __Pyx_GIVEREF(__pyx_tuple__20);
+
+ /* "netcdftime/_netcdftime.pyx":1142
+ * if select == 'exact':
+ * if len(mismatch) > 0:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * 'Some of the times specified were not found in the `nctime` variable.')
+ *
+ */
+ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_Some_of_the_times_specified_were); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1142, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__21);
+ __Pyx_GIVEREF(__pyx_tuple__21);
+
+ /* "netcdftime/_netcdftime.pyx":1169
+ *
+ * cdef _toscalar(a):
+ * if a.shape in [(), (1,)]: # <<<<<<<<<<<<<<
+ * return a.item()
+ * else:
+ */
+ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__22);
+ __Pyx_GIVEREF(__pyx_tuple__22);
+
+ /* "netcdftime/_netcdftime.pyx":1328
+ * # datetime - datetime
+ * if dt.calendar != other.calendar:
+ * raise ValueError("cannot compute the time difference between dates with different calendars") # <<<<<<<<<<<<<<
+ * if dt.calendar == "":
+ * raise ValueError("cannot compute the time difference between dates that are not calendar-aware")
+ */
+ __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_cannot_compute_the_time_differen); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__24);
+ __Pyx_GIVEREF(__pyx_tuple__24);
+
+ /* "netcdftime/_netcdftime.pyx":1330
+ * raise ValueError("cannot compute the time difference between dates with different calendars")
+ * if dt.calendar == "":
+ * raise ValueError("cannot compute the time difference between dates that are not calendar-aware") # <<<<<<<<<<<<<<
+ * converter = _converters[dt.calendar]
+ * return timedelta(seconds=converter.date2num(dt) - converter.date2num(other))
+ */
+ __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_cannot_compute_the_time_differen_2); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 1330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__25);
+ __Pyx_GIVEREF(__pyx_tuple__25);
+
+ /* "netcdftime/_netcdftime.pyx":1336
+ * # datetime - real_datetime
+ * if not dt.datetime_compatible:
+ * raise ValueError("cannot compute the time difference between dates with different calendars") # <<<<<<<<<<<<<<
+ * return dt._to_real_datetime() - other
+ * elif isinstance(other, timedelta):
+ */
+ __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_cannot_compute_the_time_differen); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1336, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__26);
+ __Pyx_GIVEREF(__pyx_tuple__26);
+
+ /* "netcdftime/_netcdftime.pyx":1347
+ * # real_datetime - datetime
+ * if not other.datetime_compatible:
+ * raise ValueError("cannot compute the time difference between dates with different calendars") # <<<<<<<<<<<<<<
+ * return self - other._to_real_datetime()
+ * else:
+ */
+ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_cannot_compute_the_time_differen); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 1347, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__27);
+ __Pyx_GIVEREF(__pyx_tuple__27);
+
+ /* "netcdftime/_netcdftime.pyx":1423
+ * # dates after 1582-10-15 can be converted to and compared to
+ * # proleptic Gregorian dates
+ * if self.to_tuple() >= (1582, 10, 15, 0, 0, 0, 0): # <<<<<<<<<<<<<<
+ * self.datetime_compatible = True
+ * else:
+ */
+ __pyx_tuple__28 = PyTuple_Pack(7, __pyx_int_1582, __pyx_int_10, __pyx_int_15, __pyx_int_0, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 1423, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__28);
+ __Pyx_GIVEREF(__pyx_tuple__28);
+
+ /* "netcdftime/_netcdftime.pyx":1479
+ * cdef _strftime(datetime dt, fmt):
+ * if _illegal_s.search(fmt):
+ * raise TypeError("This strftime implementation does not handle %s") # <<<<<<<<<<<<<<
+ * # don't use strftime method at all.
+ * # if dt.year > 1900:
+ */
+ __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_This_strftime_implementation_doe); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 1479, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__29);
+ __Pyx_GIVEREF(__pyx_tuple__29);
+
+ /* "netcdftime/_netcdftime.pyx":1494
+ * year = year + ((2000 - year) // 28) * 28
+ * timetuple = dt.timetuple()
+ * s1 = time.strftime(fmt, (year,) + timetuple[1:]) # <<<<<<<<<<<<<<
+ * sites1 = _findall(s1, str(year))
+ *
+ */
+ __pyx_slice__30 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__30)) __PYX_ERR(0, 1494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__30);
+ __Pyx_GIVEREF(__pyx_slice__30);
+
+ /* "netcdftime/_netcdftime.pyx":1497
+ * sites1 = _findall(s1, str(year))
+ *
+ * s2 = time.strftime(fmt, (year + 28,) + timetuple[1:]) # <<<<<<<<<<<<<<
+ * sites2 = _findall(s2, str(year + 28))
+ *
+ */
+ __pyx_slice__31 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__31)) __PYX_ERR(0, 1497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__31);
+ __Pyx_GIVEREF(__pyx_slice__31);
+
+ /* "netcdftime/_netcdftime.pyx":34
+ *
+ * # Adapted from http://delete.me.uk/2005/03/iso8601.html
+ * ISO8601_REGEX = re.compile(r"(?P<year>[+-]?[0-9]{1,4})(-(?P<month>[0-9]{1,2})(-(?P<day>[0-9]{1,2})" # <<<<<<<<<<<<<<
+ * r"(((?P<separator1>.)(?P<hour>[0-9]{1,2}):(?P<minute>[0-9]{1,2})(:(?P<second>[0-9]{1,2})(\.(?P<fraction>[0-9]+))?)?)?"
+ * r"((?P<separator2>.?)(?P<timezone>Z|(([-+])([0-9]{1,2}):([0-9]{1,2}))))?)?)?)?"
+ */
+ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_P_year_0_9_1_4_P_month_0_9_1_2); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 34, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__32);
+ __Pyx_GIVEREF(__pyx_tuple__32);
+
+ /* "netcdftime/_netcdftime.pyx":38
+ * r"((?P<separator2>.?)(?P<timezone>Z|(([-+])([0-9]{1,2}):([0-9]{1,2}))))?)?)?)?"
+ * )
+ * TIMEZONE_REGEX = re.compile( # <<<<<<<<<<<<<<
+ * "(?P<prefix>[+-])(?P<hours>[0-9]{1,2}):(?P<minutes>[0-9]{1,2})")
+ *
+ */
+ __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_P_prefix_P_hours_0_9_1_2_P_minu); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 38, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__33);
+ __Pyx_GIVEREF(__pyx_tuple__33);
+
+ /* "netcdftime/_netcdftime.pyx":41
+ * "(?P<prefix>[+-])(?P<hours>[0-9]{1,2}):(?P<minutes>[0-9]{1,2})")
+ *
+ * def JulianDayFromDate(date, calendar='standard'): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+ __pyx_tuple__34 = PyTuple_Pack(18, __pyx_n_s_date, __pyx_n_s_calendar, __pyx_n_s_isscalar, __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_microsecond, __pyx_n_s_i, __pyx_n_s_d, __pyx_n_s_month_lt_3, __pyx_n_s_A, __pyx_n_s_jd, __pyx_n_s_B, __pyx_n_s_ii, __pyx_n_s_eps); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 41, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__34);
+ __Pyx_GIVEREF(__pyx_tuple__34);
+ __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_JulianDayFromDate, 41, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 41, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":236
+ *
+ *
+ * def DateFromJulianDay(JD, calendar='standard'): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+ __pyx_tuple__36 = PyTuple_Pack(29, __pyx_n_s_JD, __pyx_n_s_calendar, __pyx_n_s_julian, __pyx_n_s_dayofwk, __pyx_n_s_Z, __pyx_n_s_F, __pyx_n_s_alpha, __pyx_n_s_A, __pyx_n_s_ind_before, __pyx_n_s_B, __pyx_n_s_C, __pyx_n_s_D, __pyx_n_s_E, __pyx_n_s_day, __pyx_n_s_nday, __pyx_n_s_dayofyr, __pyx_n_s_ind_nday_before, __pyx_n_s_month, __pyx_n_s_year, __pyx_n_s_leap, __pyx_n_s_inc_idx, __pyx_n_s_eps, __pyx_n_s_hour, __pyx_n_s_minute, __pyx_n_s_second, __pyx_n_s_microsecond, __pyx_n_s_isscalar, [...]
+ __Pyx_GOTREF(__pyx_tuple__36);
+ __Pyx_GIVEREF(__pyx_tuple__36);
+ __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 29, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_DateFromJulianDay, 236, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 236, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":666
+ * """
+ *
+ * def __init__(self, unit_string, calendar='standard'): # <<<<<<<<<<<<<<
+ * """
+ * @param unit_string: a string of the form
+ */
+ __pyx_tuple__38 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_unit_string, __pyx_n_s_calendar, __pyx_n_s_units_2, __pyx_n_s_tzoffset, __pyx_n_s_msg); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__38);
+ __Pyx_GIVEREF(__pyx_tuple__38);
+ __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_init, 666, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __pyx_tuple__40 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_standard)); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__40);
+ __Pyx_GIVEREF(__pyx_tuple__40);
+
+ /* "netcdftime/_netcdftime.pyx":734
+ * self._jd0 = JulianDayFromDate(self.origin, calendar=self.calendar)
+ *
+ * def date2num(self, date): # <<<<<<<<<<<<<<
+ * """
+ * Returns C{time_value} in units described by L{unit_string}, using
+ */
+ __pyx_tuple__41 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_date, __pyx_n_s_isscalar, __pyx_n_s_shape, __pyx_n_s_jdelta, __pyx_n_s_d); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 734, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__41);
+ __Pyx_GIVEREF(__pyx_tuple__41);
+ __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_date2num, 734, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 734, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":820
+ * return numpy.reshape(jdelta, shape)
+ *
+ * def num2date(self, time_value): # <<<<<<<<<<<<<<
+ * """
+ * Return a 'datetime-like' object given a C{time_value} in units
+ */
+ __pyx_tuple__43 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_time_value, __pyx_n_s_isscalar, __pyx_n_s_ismasked, __pyx_n_s_mask, __pyx_n_s_shape, __pyx_n_s_jdelta, __pyx_n_s_jd, __pyx_n_s_date, __pyx_n_s_j, __pyx_n_s_m); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 820, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__43);
+ __Pyx_GIVEREF(__pyx_tuple__43);
+ __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_num2date, 820, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 820, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1021
+ *
+ *
+ * def date2index(dates, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<<
+ * """
+ * date2index(dates, nctime, calendar=None, select='exact')
+ */
+ __pyx_tuple__45 = PyTuple_Pack(6, __pyx_n_s_dates, __pyx_n_s_nctime, __pyx_n_s_calendar, __pyx_n_s_select, __pyx_n_s_cdftime, __pyx_n_s_times); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 1021, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__45);
+ __Pyx_GIVEREF(__pyx_tuple__45);
+ __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_date2index, 1021, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 1021, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1060
+ *
+ *
+ * def time2index(times, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<<
+ * """
+ * time2index(times, nctime, calendar=None, select='exact')
+ */
+ __pyx_tuple__47 = PyTuple_Pack(18, __pyx_n_s_times, __pyx_n_s_nctime, __pyx_n_s_calendar, __pyx_n_s_select, __pyx_n_s_num, __pyx_n_s_N, __pyx_n_s_t0, __pyx_n_s_t1, __pyx_n_s_dt, __pyx_n_s_index, __pyx_n_s_bisect, __pyx_n_s_before, __pyx_n_s_after, __pyx_n_s_ncnum, __pyx_n_s_mismatch, __pyx_n_s_nearest_to_left, __pyx_n_s_n, __pyx_n_s_i); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 1060, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__47);
+ __Pyx_GIVEREF(__pyx_tuple__47);
+ __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(4, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_Drobo_python_netcdf4_py, __pyx_n_s_time2index, 1060, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 1060, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":1457
+ * is_leap_proleptic_gregorian, False))
+ *
+ * _illegal_s = re.compile(r"((^|[^%])(%%)*%s)") # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_s_2); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 1457, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__49);
+ __Pyx_GIVEREF(__pyx_tuple__49);
+ __Pyx_RefNannyFinishContext();
+ return 0;
+ __pyx_L1_error:;
+ __Pyx_RefNannyFinishContext();
+ return -1;
+}
+
+static int __Pyx_InitGlobals(void) {
+ __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
+ if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+ __pyx_float_1_ = PyFloat_FromDouble(1.); if (unlikely(!__pyx_float_1_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_2_ = PyFloat_FromDouble(2.); if (unlikely(!__pyx_float_2_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_0_5 = PyFloat_FromDouble(0.5); if (unlikely(!__pyx_float_0_5)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_1_5 = PyFloat_FromDouble(1.5); if (unlikely(!__pyx_float_1_5)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_1e6 = PyFloat_FromDouble(1e6); if (unlikely(!__pyx_float_1e6)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_24_ = PyFloat_FromDouble(24.); if (unlikely(!__pyx_float_24_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_30_ = PyFloat_FromDouble(30.); if (unlikely(!__pyx_float_30_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_60_ = PyFloat_FromDouble(60.); if (unlikely(!__pyx_float_60_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_0_25 = PyFloat_FromDouble(0.25); if (unlikely(!__pyx_float_0_25)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_1_e3 = PyFloat_FromDouble(1.e3); if (unlikely(!__pyx_float_1_e3)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_1_e6 = PyFloat_FromDouble(1.e6); if (unlikely(!__pyx_float_1_e6)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_24_0 = PyFloat_FromDouble(24.0); if (unlikely(!__pyx_float_24_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_360_ = PyFloat_FromDouble(360.); if (unlikely(!__pyx_float_360_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_365_ = PyFloat_FromDouble(365.); if (unlikely(!__pyx_float_365_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_366_ = PyFloat_FromDouble(366.); if (unlikely(!__pyx_float_366_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_60_0 = PyFloat_FromDouble(60.0); if (unlikely(!__pyx_float_60_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_122_1 = PyFloat_FromDouble(122.1); if (unlikely(!__pyx_float_122_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_1440_ = PyFloat_FromDouble(1440.); if (unlikely(!__pyx_float_1440_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_2000_ = PyFloat_FromDouble(2000.); if (unlikely(!__pyx_float_2000_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_6680_ = PyFloat_FromDouble(6680.); if (unlikely(!__pyx_float_6680_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_1440_0 = PyFloat_FromDouble(1440.0); if (unlikely(!__pyx_float_1440_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_1524_5 = PyFloat_FromDouble(1524.5); if (unlikely(!__pyx_float_1524_5)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_365_25 = PyFloat_FromDouble(365.25); if (unlikely(!__pyx_float_365_25)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_86400_ = PyFloat_FromDouble(86400.); if (unlikely(!__pyx_float_86400_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_30_6001 = PyFloat_FromDouble(30.6001); if (unlikely(!__pyx_float_30_6001)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_86400_0 = PyFloat_FromDouble(86400.0); if (unlikely(!__pyx_float_86400_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_1867216_ = PyFloat_FromDouble(1867216.); if (unlikely(!__pyx_float_1867216_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_2439870_ = PyFloat_FromDouble(2439870.); if (unlikely(!__pyx_float_2439870_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_36524_25 = PyFloat_FromDouble(36524.25); if (unlikely(!__pyx_float_36524_25)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_1718994_5 = PyFloat_FromDouble(1718994.5); if (unlikely(!__pyx_float_1718994_5)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_2299160_5 = PyFloat_FromDouble(2299160.5); if (unlikely(!__pyx_float_2299160_5)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_2299170_5 = PyFloat_FromDouble(2299170.5); if (unlikely(!__pyx_float_2299170_5)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_86400000_ = PyFloat_FromDouble(86400000.); if (unlikely(!__pyx_float_86400000_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_86400000000_ = PyFloat_FromDouble(86400000000.); if (unlikely(!__pyx_float_86400000000_)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_23 = PyInt_FromLong(23); if (unlikely(!__pyx_int_23)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_28 = PyInt_FromLong(28); if (unlikely(!__pyx_int_28)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_29 = PyInt_FromLong(29); if (unlikely(!__pyx_int_29)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_30 = PyInt_FromLong(30); if (unlikely(!__pyx_int_30)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_31 = PyInt_FromLong(31); if (unlikely(!__pyx_int_31)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_59 = PyInt_FromLong(59); if (unlikely(!__pyx_int_59)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_123 = PyInt_FromLong(123); if (unlikely(!__pyx_int_123)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_305 = PyInt_FromLong(305); if (unlikely(!__pyx_int_305)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_360 = PyInt_FromLong(360); if (unlikely(!__pyx_int_360)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_365 = PyInt_FromLong(365); if (unlikely(!__pyx_int_365)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_400 = PyInt_FromLong(400); if (unlikely(!__pyx_int_400)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_1524 = PyInt_FromLong(1524); if (unlikely(!__pyx_int_1524)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_1582 = PyInt_FromLong(1582); if (unlikely(!__pyx_int_1582)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_2000 = PyInt_FromLong(2000); if (unlikely(!__pyx_int_2000)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_4715 = PyInt_FromLong(4715); if (unlikely(!__pyx_int_4715)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_4716 = PyInt_FromLong(4716); if (unlikely(!__pyx_int_4716)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_999999 = PyInt_FromLong(999999L); if (unlikely(!__pyx_int_999999)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+ return 0;
+ __pyx_L1_error:;
+ return -1;
+}
+
+#if PY_MAJOR_VERSION < 3
+PyMODINIT_FUNC init_netcdftime(void); /*proto*/
+PyMODINIT_FUNC init_netcdftime(void)
+#else
+PyMODINIT_FUNC PyInit__netcdftime(void); /*proto*/
+PyMODINIT_FUNC PyInit__netcdftime(void)
+#endif
+{
+ 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;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ Py_ssize_t __pyx_t_8;
+ PyObject *(*__pyx_t_9)(PyObject *);
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ Py_ssize_t __pyx_t_13;
+ __Pyx_RefNannyDeclarations
+ #if CYTHON_REFNANNY
+ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+ if (!__Pyx_RefNanny) {
+ PyErr_Clear();
+ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+ if (!__Pyx_RefNanny)
+ Py_FatalError("failed to import 'refnanny' module");
+ }
+ #endif
+ __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__netcdftime(void)", 0);
+ if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #ifdef __Pyx_CyFunction_USED
+ if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_FusedFunction_USED
+ if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_Generator_USED
+ if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_StopAsyncIteration_USED
+ if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ /*--- Library function declarations ---*/
+ /*--- Threads initialization code ---*/
+ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+ #ifdef WITH_THREAD /* Python build with threading support? */
+ PyEval_InitThreads();
+ #endif
+ #endif
+ /*--- Module creation code ---*/
+ #if PY_MAJOR_VERSION < 3
+ __pyx_m = Py_InitModule4("_netcdftime", __pyx_methods, __pyx_k_Performs_conversions_of_netCDF, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+ #else
+ __pyx_m = PyModule_Create(&__pyx_moduledef);
+ #endif
+ if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
+ Py_INCREF(__pyx_d);
+ __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #if CYTHON_COMPILING_IN_PYPY
+ Py_INCREF(__pyx_b);
+ #endif
+ if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+ /*--- Initialize various global constants etc. ---*/
+ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+ if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ if (__pyx_module_is_main_netcdftime___netcdftime) {
+ if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ }
+ #if PY_MAJOR_VERSION >= 3
+ {
+ PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
+ if (!PyDict_GetItemString(modules, "netcdftime._netcdftime")) {
+ if (unlikely(PyDict_SetItemString(modules, "netcdftime._netcdftime", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ }
+ }
+ #endif
+ /*--- Builtin init code ---*/
+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ /*--- Constants init code ---*/
+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ /*--- Global init code ---*/
+ __pyx_v_10netcdftime_11_netcdftime__converters = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ /*--- Variable export code ---*/
+ /*--- Function export code ---*/
+ /*--- Type init code ---*/
+ __pyx_vtabptr_10netcdftime_11_netcdftime_datetime = &__pyx_vtable_10netcdftime_11_netcdftime_datetime;
+ __pyx_vtable_10netcdftime_11_netcdftime_datetime._to_real_datetime = (PyObject *(*)(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *, int __pyx_skip_dispatch))__pyx_f_10netcdftime_11_netcdftime_8datetime__to_real_datetime;
+ __pyx_vtable_10netcdftime_11_netcdftime_datetime.to_tuple = (PyObject *(*)(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *))__pyx_f_10netcdftime_11_netcdftime_8datetime_to_tuple;
+ __pyx_vtable_10netcdftime_11_netcdftime_datetime._getstate = (PyObject *(*)(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *))__pyx_f_10netcdftime_11_netcdftime_8datetime__getstate;
+ __pyx_vtable_10netcdftime_11_netcdftime_datetime._add_timedelta = (PyObject *(*)(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *, PyObject *))__pyx_f_10netcdftime_11_netcdftime_8datetime__add_timedelta;
+ if (PyType_Ready(&__pyx_type_10netcdftime_11_netcdftime_datetime) < 0) __PYX_ERR(0, 1188, __pyx_L1_error)
+ __pyx_type_10netcdftime_11_netcdftime_datetime.tp_print = 0;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ {
+ PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_10netcdftime_11_netcdftime_datetime, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1188, __pyx_L1_error)
+ if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+ __pyx_wrapperbase_10netcdftime_11_netcdftime_8datetime___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+ __pyx_wrapperbase_10netcdftime_11_netcdftime_8datetime___init__.doc = __pyx_doc_10netcdftime_11_netcdftime_8datetime___init__;
+ ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10netcdftime_11_netcdftime_8datetime___init__;
+ }
+ }
+ #endif
+ if (__Pyx_SetVtable(__pyx_type_10netcdftime_11_netcdftime_datetime.tp_dict, __pyx_vtabptr_10netcdftime_11_netcdftime_datetime) < 0) __PYX_ERR(0, 1188, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "datetime", (PyObject *)&__pyx_type_10netcdftime_11_netcdftime_datetime) < 0) __PYX_ERR(0, 1188, __pyx_L1_error)
+ __pyx_ptype_10netcdftime_11_netcdftime_datetime = &__pyx_type_10netcdftime_11_netcdftime_datetime;
+ __pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeNoLeap = &__pyx_vtable_10netcdftime_11_netcdftime_DatetimeNoLeap;
+ __pyx_vtable_10netcdftime_11_netcdftime_DatetimeNoLeap.__pyx_base = *__pyx_vtabptr_10netcdftime_11_netcdftime_datetime;
+ __pyx_vtable_10netcdftime_11_netcdftime_DatetimeNoLeap.__pyx_base._add_timedelta = (PyObject *(*)(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *, PyObject *))__pyx_f_10netcdftime_11_netcdftime_14DatetimeNoLeap__add_timedelta;
+ __pyx_type_10netcdftime_11_netcdftime_DatetimeNoLeap.tp_base = __pyx_ptype_10netcdftime_11_netcdftime_datetime;
+ if (PyType_Ready(&__pyx_type_10netcdftime_11_netcdftime_DatetimeNoLeap) < 0) __PYX_ERR(0, 1352, __pyx_L1_error)
+ __pyx_type_10netcdftime_11_netcdftime_DatetimeNoLeap.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_10netcdftime_11_netcdftime_DatetimeNoLeap.tp_dict, __pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeNoLeap) < 0) __PYX_ERR(0, 1352, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "DatetimeNoLeap", (PyObject *)&__pyx_type_10netcdftime_11_netcdftime_DatetimeNoLeap) < 0) __PYX_ERR(0, 1352, __pyx_L1_error)
+ __pyx_ptype_10netcdftime_11_netcdftime_DatetimeNoLeap = &__pyx_type_10netcdftime_11_netcdftime_DatetimeNoLeap;
+ __pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeAllLeap = &__pyx_vtable_10netcdftime_11_netcdftime_DatetimeAllLeap;
+ __pyx_vtable_10netcdftime_11_netcdftime_DatetimeAllLeap.__pyx_base = *__pyx_vtabptr_10netcdftime_11_netcdftime_datetime;
+ __pyx_vtable_10netcdftime_11_netcdftime_DatetimeAllLeap.__pyx_base._add_timedelta = (PyObject *(*)(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *, PyObject *))__pyx_f_10netcdftime_11_netcdftime_15DatetimeAllLeap__add_timedelta;
+ __pyx_type_10netcdftime_11_netcdftime_DatetimeAllLeap.tp_base = __pyx_ptype_10netcdftime_11_netcdftime_datetime;
+ if (PyType_Ready(&__pyx_type_10netcdftime_11_netcdftime_DatetimeAllLeap) < 0) __PYX_ERR(0, 1365, __pyx_L1_error)
+ __pyx_type_10netcdftime_11_netcdftime_DatetimeAllLeap.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_10netcdftime_11_netcdftime_DatetimeAllLeap.tp_dict, __pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeAllLeap) < 0) __PYX_ERR(0, 1365, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "DatetimeAllLeap", (PyObject *)&__pyx_type_10netcdftime_11_netcdftime_DatetimeAllLeap) < 0) __PYX_ERR(0, 1365, __pyx_L1_error)
+ __pyx_ptype_10netcdftime_11_netcdftime_DatetimeAllLeap = &__pyx_type_10netcdftime_11_netcdftime_DatetimeAllLeap;
+ __pyx_vtabptr_10netcdftime_11_netcdftime_Datetime360Day = &__pyx_vtable_10netcdftime_11_netcdftime_Datetime360Day;
+ __pyx_vtable_10netcdftime_11_netcdftime_Datetime360Day.__pyx_base = *__pyx_vtabptr_10netcdftime_11_netcdftime_datetime;
+ __pyx_vtable_10netcdftime_11_netcdftime_Datetime360Day.__pyx_base._add_timedelta = (PyObject *(*)(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *, PyObject *))__pyx_f_10netcdftime_11_netcdftime_14Datetime360Day__add_timedelta;
+ __pyx_type_10netcdftime_11_netcdftime_Datetime360Day.tp_base = __pyx_ptype_10netcdftime_11_netcdftime_datetime;
+ if (PyType_Ready(&__pyx_type_10netcdftime_11_netcdftime_Datetime360Day) < 0) __PYX_ERR(0, 1378, __pyx_L1_error)
+ __pyx_type_10netcdftime_11_netcdftime_Datetime360Day.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_10netcdftime_11_netcdftime_Datetime360Day.tp_dict, __pyx_vtabptr_10netcdftime_11_netcdftime_Datetime360Day) < 0) __PYX_ERR(0, 1378, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "Datetime360Day", (PyObject *)&__pyx_type_10netcdftime_11_netcdftime_Datetime360Day) < 0) __PYX_ERR(0, 1378, __pyx_L1_error)
+ __pyx_ptype_10netcdftime_11_netcdftime_Datetime360Day = &__pyx_type_10netcdftime_11_netcdftime_Datetime360Day;
+ __pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeJulian = &__pyx_vtable_10netcdftime_11_netcdftime_DatetimeJulian;
+ __pyx_vtable_10netcdftime_11_netcdftime_DatetimeJulian.__pyx_base = *__pyx_vtabptr_10netcdftime_11_netcdftime_datetime;
+ __pyx_vtable_10netcdftime_11_netcdftime_DatetimeJulian.__pyx_base._add_timedelta = (PyObject *(*)(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *, PyObject *))__pyx_f_10netcdftime_11_netcdftime_14DatetimeJulian__add_timedelta;
+ __pyx_type_10netcdftime_11_netcdftime_DatetimeJulian.tp_base = __pyx_ptype_10netcdftime_11_netcdftime_datetime;
+ if (PyType_Ready(&__pyx_type_10netcdftime_11_netcdftime_DatetimeJulian) < 0) __PYX_ERR(0, 1391, __pyx_L1_error)
+ __pyx_type_10netcdftime_11_netcdftime_DatetimeJulian.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_10netcdftime_11_netcdftime_DatetimeJulian.tp_dict, __pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeJulian) < 0) __PYX_ERR(0, 1391, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "DatetimeJulian", (PyObject *)&__pyx_type_10netcdftime_11_netcdftime_DatetimeJulian) < 0) __PYX_ERR(0, 1391, __pyx_L1_error)
+ __pyx_ptype_10netcdftime_11_netcdftime_DatetimeJulian = &__pyx_type_10netcdftime_11_netcdftime_DatetimeJulian;
+ __pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeGregorian = &__pyx_vtable_10netcdftime_11_netcdftime_DatetimeGregorian;
+ __pyx_vtable_10netcdftime_11_netcdftime_DatetimeGregorian.__pyx_base = *__pyx_vtabptr_10netcdftime_11_netcdftime_datetime;
+ __pyx_vtable_10netcdftime_11_netcdftime_DatetimeGregorian.__pyx_base._add_timedelta = (PyObject *(*)(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *, PyObject *))__pyx_f_10netcdftime_11_netcdftime_17DatetimeGregorian__add_timedelta;
+ __pyx_type_10netcdftime_11_netcdftime_DatetimeGregorian.tp_base = __pyx_ptype_10netcdftime_11_netcdftime_datetime;
+ if (PyType_Ready(&__pyx_type_10netcdftime_11_netcdftime_DatetimeGregorian) < 0) __PYX_ERR(0, 1404, __pyx_L1_error)
+ __pyx_type_10netcdftime_11_netcdftime_DatetimeGregorian.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_10netcdftime_11_netcdftime_DatetimeGregorian.tp_dict, __pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeGregorian) < 0) __PYX_ERR(0, 1404, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "DatetimeGregorian", (PyObject *)&__pyx_type_10netcdftime_11_netcdftime_DatetimeGregorian) < 0) __PYX_ERR(0, 1404, __pyx_L1_error)
+ __pyx_ptype_10netcdftime_11_netcdftime_DatetimeGregorian = &__pyx_type_10netcdftime_11_netcdftime_DatetimeGregorian;
+ __pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeProlepticGregorian = &__pyx_vtable_10netcdftime_11_netcdftime_DatetimeProlepticGregorian;
+ __pyx_vtable_10netcdftime_11_netcdftime_DatetimeProlepticGregorian.__pyx_base = *__pyx_vtabptr_10netcdftime_11_netcdftime_datetime;
+ __pyx_vtable_10netcdftime_11_netcdftime_DatetimeProlepticGregorian.__pyx_base._add_timedelta = (PyObject *(*)(struct __pyx_obj_10netcdftime_11_netcdftime_datetime *, PyObject *))__pyx_f_10netcdftime_11_netcdftime_26DatetimeProlepticGregorian__add_timedelta;
+ __pyx_type_10netcdftime_11_netcdftime_DatetimeProlepticGregorian.tp_base = __pyx_ptype_10netcdftime_11_netcdftime_datetime;
+ if (PyType_Ready(&__pyx_type_10netcdftime_11_netcdftime_DatetimeProlepticGregorian) < 0) __PYX_ERR(0, 1431, __pyx_L1_error)
+ __pyx_type_10netcdftime_11_netcdftime_DatetimeProlepticGregorian.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_10netcdftime_11_netcdftime_DatetimeProlepticGregorian.tp_dict, __pyx_vtabptr_10netcdftime_11_netcdftime_DatetimeProlepticGregorian) < 0) __PYX_ERR(0, 1431, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "DatetimeProlepticGregorian", (PyObject *)&__pyx_type_10netcdftime_11_netcdftime_DatetimeProlepticGregorian) < 0) __PYX_ERR(0, 1431, __pyx_L1_error)
+ __pyx_ptype_10netcdftime_11_netcdftime_DatetimeProlepticGregorian = &__pyx_type_10netcdftime_11_netcdftime_DatetimeProlepticGregorian;
+ /*--- Type import code ---*/
+ __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type",
+ #if CYTHON_COMPILING_IN_PYPY
+ sizeof(PyTypeObject),
+ #else
+ sizeof(PyHeapTypeObject),
+ #endif
+ 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(1, 9, __pyx_L1_error)
+ /*--- Variable import code ---*/
+ /*--- Function import code ---*/
+ /*--- Execution code ---*/
+ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+ if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+
+ /* "netcdftime/_netcdftime.pyx":7
+ * from cpython.object cimport PyObject_RichCompare
+ *
+ * import numpy as np # <<<<<<<<<<<<<<
+ * import math
+ * import numpy
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 7, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":8
+ *
+ * import numpy as np
+ * import math # <<<<<<<<<<<<<<
+ * import numpy
+ * import re
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":9
+ * import numpy as np
+ * import math
+ * import numpy # <<<<<<<<<<<<<<
+ * import re
+ *
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":10
+ * import math
+ * import numpy
+ * import re # <<<<<<<<<<<<<<
+ *
+ * from datetime import datetime as real_datetime
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_1) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":12
+ * import re
+ *
+ * from datetime import datetime as real_datetime # <<<<<<<<<<<<<<
+ * from datetime import timedelta
+ * import time # strftime
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_datetime);
+ __Pyx_GIVEREF(__pyx_n_s_datetime);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_datetime);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_real_datetime, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":13
+ *
+ * from datetime import datetime as real_datetime
+ * from datetime import timedelta # <<<<<<<<<<<<<<
+ * import time # strftime
+ *
+ */
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_timedelta);
+ __Pyx_GIVEREF(__pyx_n_s_timedelta);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_timedelta);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_timedelta, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":14
+ * from datetime import datetime as real_datetime
+ * from datetime import timedelta
+ * import time # strftime # <<<<<<<<<<<<<<
+ *
+ * try:
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_time, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":16
+ * import time # strftime
+ *
+ * try: # <<<<<<<<<<<<<<
+ * from itertools import izip as zip
+ * except ImportError: # python 3.x
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_4);
+ __Pyx_XGOTREF(__pyx_t_5);
+ /*try:*/ {
+
+ /* "netcdftime/_netcdftime.pyx":17
+ *
+ * try:
+ * from itertools import izip as zip # <<<<<<<<<<<<<<
+ * except ImportError: # python 3.x
+ * pass
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_izip);
+ __Pyx_GIVEREF(__pyx_n_s_izip);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_izip);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_izip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_zip, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L2_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":16
+ * import time # strftime
+ *
+ * try: # <<<<<<<<<<<<<<
+ * from itertools import izip as zip
+ * except ImportError: # python 3.x
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L9_try_end;
+ __pyx_L2_error:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":18
+ * try:
+ * from itertools import izip as zip
+ * except ImportError: # python 3.x # <<<<<<<<<<<<<<
+ * pass
+ *
+ */
+ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
+ if (__pyx_t_6) {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L3_exception_handled;
+ }
+ goto __pyx_L4_except_error;
+ __pyx_L4_except_error:;
+
+ /* "netcdftime/_netcdftime.pyx":16
+ * import time # strftime
+ *
+ * try: # <<<<<<<<<<<<<<
+ * from itertools import izip as zip
+ * except ImportError: # python 3.x
+ */
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_XGIVEREF(__pyx_t_4);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
+ goto __pyx_L1_error;
+ __pyx_L3_exception_handled:;
+ __Pyx_PyThreadState_assign
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_XGIVEREF(__pyx_t_4);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
+ __pyx_L9_try_end:;
+ }
+
+ /* "netcdftime/_netcdftime.pyx":21
+ * pass
+ *
+ * microsec_units = ['microseconds','microsecond', 'microsec', 'microsecs'] # <<<<<<<<<<<<<<
+ * millisec_units = ['milliseconds', 'millisecond', 'millisec', 'millisecs']
+ * sec_units = ['second', 'seconds', 'sec', 'secs', 's']
+ */
+ __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_microseconds);
+ __Pyx_GIVEREF(__pyx_n_s_microseconds);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_microseconds);
+ __Pyx_INCREF(__pyx_n_s_microsecond);
+ __Pyx_GIVEREF(__pyx_n_s_microsecond);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_microsecond);
+ __Pyx_INCREF(__pyx_n_s_microsec);
+ __Pyx_GIVEREF(__pyx_n_s_microsec);
+ PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_microsec);
+ __Pyx_INCREF(__pyx_n_s_microsecs);
+ __Pyx_GIVEREF(__pyx_n_s_microsecs);
+ PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_microsecs);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_microsec_units, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":22
+ *
+ * microsec_units = ['microseconds','microsecond', 'microsec', 'microsecs']
+ * millisec_units = ['milliseconds', 'millisecond', 'millisec', 'millisecs'] # <<<<<<<<<<<<<<
+ * sec_units = ['second', 'seconds', 'sec', 'secs', 's']
+ * min_units = ['minute', 'minutes', 'min', 'mins']
+ */
+ __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_milliseconds);
+ __Pyx_GIVEREF(__pyx_n_s_milliseconds);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_milliseconds);
+ __Pyx_INCREF(__pyx_n_s_millisecond);
+ __Pyx_GIVEREF(__pyx_n_s_millisecond);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_millisecond);
+ __Pyx_INCREF(__pyx_n_s_millisec);
+ __Pyx_GIVEREF(__pyx_n_s_millisec);
+ PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_millisec);
+ __Pyx_INCREF(__pyx_n_s_millisecs);
+ __Pyx_GIVEREF(__pyx_n_s_millisecs);
+ PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_millisecs);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_millisec_units, __pyx_t_2) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":23
+ * microsec_units = ['microseconds','microsecond', 'microsec', 'microsecs']
+ * millisec_units = ['milliseconds', 'millisecond', 'millisec', 'millisecs']
+ * sec_units = ['second', 'seconds', 'sec', 'secs', 's'] # <<<<<<<<<<<<<<
+ * min_units = ['minute', 'minutes', 'min', 'mins']
+ * hr_units = ['hour', 'hours', 'hr', 'hrs', 'h']
+ */
+ __pyx_t_2 = PyList_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_second);
+ __Pyx_GIVEREF(__pyx_n_s_second);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_second);
+ __Pyx_INCREF(__pyx_n_s_seconds);
+ __Pyx_GIVEREF(__pyx_n_s_seconds);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_seconds);
+ __Pyx_INCREF(__pyx_n_s_sec);
+ __Pyx_GIVEREF(__pyx_n_s_sec);
+ PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_sec);
+ __Pyx_INCREF(__pyx_n_s_secs);
+ __Pyx_GIVEREF(__pyx_n_s_secs);
+ PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_secs);
+ __Pyx_INCREF(__pyx_n_s_s);
+ __Pyx_GIVEREF(__pyx_n_s_s);
+ PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_s);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sec_units, __pyx_t_2) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":24
+ * millisec_units = ['milliseconds', 'millisecond', 'millisec', 'millisecs']
+ * sec_units = ['second', 'seconds', 'sec', 'secs', 's']
+ * min_units = ['minute', 'minutes', 'min', 'mins'] # <<<<<<<<<<<<<<
+ * hr_units = ['hour', 'hours', 'hr', 'hrs', 'h']
+ * day_units = ['day', 'days', 'd']
+ */
+ __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_minute);
+ __Pyx_GIVEREF(__pyx_n_s_minute);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_minute);
+ __Pyx_INCREF(__pyx_n_s_minutes);
+ __Pyx_GIVEREF(__pyx_n_s_minutes);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_minutes);
+ __Pyx_INCREF(__pyx_n_s_min);
+ __Pyx_GIVEREF(__pyx_n_s_min);
+ PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_min);
+ __Pyx_INCREF(__pyx_n_s_mins);
+ __Pyx_GIVEREF(__pyx_n_s_mins);
+ PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_mins);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_min_units, __pyx_t_2) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":25
+ * sec_units = ['second', 'seconds', 'sec', 'secs', 's']
+ * min_units = ['minute', 'minutes', 'min', 'mins']
+ * hr_units = ['hour', 'hours', 'hr', 'hrs', 'h'] # <<<<<<<<<<<<<<
+ * day_units = ['day', 'days', 'd']
+ * _units = microsec_units+millisec_units+sec_units+min_units+hr_units+day_units
+ */
+ __pyx_t_2 = PyList_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_hour);
+ __Pyx_GIVEREF(__pyx_n_s_hour);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_hour);
+ __Pyx_INCREF(__pyx_n_s_hours);
+ __Pyx_GIVEREF(__pyx_n_s_hours);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_hours);
+ __Pyx_INCREF(__pyx_n_s_hr);
+ __Pyx_GIVEREF(__pyx_n_s_hr);
+ PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_hr);
+ __Pyx_INCREF(__pyx_n_s_hrs);
+ __Pyx_GIVEREF(__pyx_n_s_hrs);
+ PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_hrs);
+ __Pyx_INCREF(__pyx_n_s_h);
+ __Pyx_GIVEREF(__pyx_n_s_h);
+ PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_h);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_hr_units, __pyx_t_2) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":26
+ * min_units = ['minute', 'minutes', 'min', 'mins']
+ * hr_units = ['hour', 'hours', 'hr', 'hrs', 'h']
+ * day_units = ['day', 'days', 'd'] # <<<<<<<<<<<<<<
+ * _units = microsec_units+millisec_units+sec_units+min_units+hr_units+day_units
+ * _calendars = ['standard', 'gregorian', 'proleptic_gregorian',
+ */
+ __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_day);
+ __Pyx_GIVEREF(__pyx_n_s_day);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_day);
+ __Pyx_INCREF(__pyx_n_s_days);
+ __Pyx_GIVEREF(__pyx_n_s_days);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_days);
+ __Pyx_INCREF(__pyx_n_s_d);
+ __Pyx_GIVEREF(__pyx_n_s_d);
+ PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_d);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_day_units, __pyx_t_2) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":27
+ * hr_units = ['hour', 'hours', 'hr', 'hrs', 'h']
+ * day_units = ['day', 'days', 'd']
+ * _units = microsec_units+millisec_units+sec_units+min_units+hr_units+day_units # <<<<<<<<<<<<<<
+ * _calendars = ['standard', 'gregorian', 'proleptic_gregorian',
+ * 'noleap', 'julian', 'all_leap', '365_day', '366_day', '360_day']
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_microsec_units); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_millisec_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sec_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Add(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_min_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_hr_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Add(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_day_units); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_units, __pyx_t_7) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":28
+ * day_units = ['day', 'days', 'd']
+ * _units = microsec_units+millisec_units+sec_units+min_units+hr_units+day_units
+ * _calendars = ['standard', 'gregorian', 'proleptic_gregorian', # <<<<<<<<<<<<<<
+ * 'noleap', 'julian', 'all_leap', '365_day', '366_day', '360_day']
+ *
+ */
+ __pyx_t_7 = PyList_New(9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_INCREF(__pyx_n_s_standard);
+ __Pyx_GIVEREF(__pyx_n_s_standard);
+ PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_standard);
+ __Pyx_INCREF(__pyx_n_s_gregorian);
+ __Pyx_GIVEREF(__pyx_n_s_gregorian);
+ PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_gregorian);
+ __Pyx_INCREF(__pyx_n_s_proleptic_gregorian);
+ __Pyx_GIVEREF(__pyx_n_s_proleptic_gregorian);
+ PyList_SET_ITEM(__pyx_t_7, 2, __pyx_n_s_proleptic_gregorian);
+ __Pyx_INCREF(__pyx_n_s_noleap);
+ __Pyx_GIVEREF(__pyx_n_s_noleap);
+ PyList_SET_ITEM(__pyx_t_7, 3, __pyx_n_s_noleap);
+ __Pyx_INCREF(__pyx_n_s_julian);
+ __Pyx_GIVEREF(__pyx_n_s_julian);
+ PyList_SET_ITEM(__pyx_t_7, 4, __pyx_n_s_julian);
+ __Pyx_INCREF(__pyx_n_s_all_leap);
+ __Pyx_GIVEREF(__pyx_n_s_all_leap);
+ PyList_SET_ITEM(__pyx_t_7, 5, __pyx_n_s_all_leap);
+ __Pyx_INCREF(__pyx_kp_s_365_day);
+ __Pyx_GIVEREF(__pyx_kp_s_365_day);
+ PyList_SET_ITEM(__pyx_t_7, 6, __pyx_kp_s_365_day);
+ __Pyx_INCREF(__pyx_kp_s_366_day);
+ __Pyx_GIVEREF(__pyx_kp_s_366_day);
+ PyList_SET_ITEM(__pyx_t_7, 7, __pyx_kp_s_366_day);
+ __Pyx_INCREF(__pyx_kp_s_360_day);
+ __Pyx_GIVEREF(__pyx_kp_s_360_day);
+ PyList_SET_ITEM(__pyx_t_7, 8, __pyx_kp_s_360_day);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_calendars, __pyx_t_7) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":31
+ * 'noleap', 'julian', 'all_leap', '365_day', '366_day', '360_day']
+ *
+ * __version__ = '1.4.1' # <<<<<<<<<<<<<<
+ *
+ * # Adapted from http://delete.me.uk/2005/03/iso8601.html
+ */
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_1_4_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
+
+ /* "netcdftime/_netcdftime.pyx":34
+ *
+ * # Adapted from http://delete.me.uk/2005/03/iso8601.html
+ * ISO8601_REGEX = re.compile(r"(?P<year>[+-]?[0-9]{1,4})(-(?P<month>[0-9]{1,2})(-(?P<day>[0-9]{1,2})" # <<<<<<<<<<<<<<
+ * r"(((?P<separator1>.)(?P<hour>[0-9]{1,2}):(?P<minute>[0-9]{1,2})(:(?P<second>[0-9]{1,2})(\.(?P<fraction>[0-9]+))?)?)?"
+ * r"((?P<separator2>.?)(?P<timezone>Z|(([-+])([0-9]{1,2}):([0-9]{1,2}))))?)?)?)?"
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 34, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 34, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ISO8601_REGEX, __pyx_t_7) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":38
+ * r"((?P<separator2>.?)(?P<timezone>Z|(([-+])([0-9]{1,2}):([0-9]{1,2}))))?)?)?)?"
+ * )
+ * TIMEZONE_REGEX = re.compile( # <<<<<<<<<<<<<<
+ * "(?P<prefix>[+-])(?P<hours>[0-9]{1,2}):(?P<minutes>[0-9]{1,2})")
+ *
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 38, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 38, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_TIMEZONE_REGEX, __pyx_t_7) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":41
+ * "(?P<prefix>[+-])(?P<hours>[0-9]{1,2}):(?P<minutes>[0-9]{1,2})")
+ *
+ * def JulianDayFromDate(date, calendar='standard'): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_10netcdftime_11_netcdftime_1JulianDayFromDate, NULL, __pyx_n_s_netcdftime__netcdftime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 41, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_JulianDayFromDate, __pyx_t_7) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":236
+ *
+ *
+ * def DateFromJulianDay(JD, calendar='standard'): # <<<<<<<<<<<<<<
+ * """
+ *
+ */
+ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_10netcdftime_11_netcdftime_3DateFromJulianDay, NULL, __pyx_n_s_netcdftime__netcdftime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 236, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_DateFromJulianDay, __pyx_t_7) < 0) __PYX_ERR(0, 236, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":565
+ *
+ *
+ * class utime: # <<<<<<<<<<<<<<
+ *
+ * """
+ */
+ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_utime, __pyx_n_s_utime, (PyObject *) NULL, __pyx_n_s_netcdftime__netcdftime, __pyx_kp_s_Performs_conversions_of_netCDF_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "netcdftime/_netcdftime.pyx":666
+ * """
+ *
+ * def __init__(self, unit_string, calendar='standard'): # <<<<<<<<<<<<<<
+ * """
+ * @param unit_string: a string of the form
+ */
+ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10netcdftime_11_netcdftime_5utime_1__init__, 0, __pyx_n_s_utime___init, NULL, __pyx_n_s_netcdftime__netcdftime, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__40);
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":734
+ * self._jd0 = JulianDayFromDate(self.origin, calendar=self.calendar)
+ *
+ * def date2num(self, date): # <<<<<<<<<<<<<<
+ * """
+ * Returns C{time_value} in units described by L{unit_string}, using
+ */
+ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10netcdftime_11_netcdftime_5utime_3date2num, 0, __pyx_n_s_utime_date2num, NULL, __pyx_n_s_netcdftime__netcdftime, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_date2num, __pyx_t_1) < 0) __PYX_ERR(0, 734, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":820
+ * return numpy.reshape(jdelta, shape)
+ *
+ * def num2date(self, time_value): # <<<<<<<<<<<<<<
+ * """
+ * Return a 'datetime-like' object given a C{time_value} in units
+ */
+ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_10netcdftime_11_netcdftime_5utime_5num2date, 0, __pyx_n_s_utime_num2date, NULL, __pyx_n_s_netcdftime__netcdftime, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_num2date, __pyx_t_1) < 0) __PYX_ERR(0, 820, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":565
+ *
+ *
+ * class utime: # <<<<<<<<<<<<<<
+ *
+ * """
+ */
+ __pyx_t_1 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_utime, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_utime, __pyx_t_1) < 0) __PYX_ERR(0, 565, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1021
+ *
+ *
+ * def date2index(dates, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<<
+ * """
+ * date2index(dates, nctime, calendar=None, select='exact')
+ */
+ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_10netcdftime_11_netcdftime_7date2index, NULL, __pyx_n_s_netcdftime__netcdftime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1021, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2index, __pyx_t_7) < 0) __PYX_ERR(0, 1021, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1060
+ *
+ *
+ * def time2index(times, nctime, calendar=None, select='exact'): # <<<<<<<<<<<<<<
+ * """
+ * time2index(times, nctime, calendar=None, select='exact')
+ */
+ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_10netcdftime_11_netcdftime_9time2index, NULL, __pyx_n_s_netcdftime__netcdftime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1060, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_time2index, __pyx_t_7) < 0) __PYX_ERR(0, 1060, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1184
+ * # a cache of converters (utime instances) for different calendars
+ * cdef dict _converters
+ * _converters = {} # <<<<<<<<<<<<<<
+ * for calendar in _calendars:
+ * _converters[calendar] = utime("seconds since 1-1-1", calendar)
+ */
+ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1184, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_v_10netcdftime_11_netcdftime__converters);
+ __Pyx_DECREF_SET(__pyx_v_10netcdftime_11_netcdftime__converters, ((PyObject*)__pyx_t_7));
+ __Pyx_GIVEREF(__pyx_t_7);
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1185
+ * cdef dict _converters
+ * _converters = {}
+ * for calendar in _calendars: # <<<<<<<<<<<<<<
+ * _converters[calendar] = utime("seconds since 1-1-1", calendar)
+ *
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_calendars); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1185, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ 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_8 = 0;
+ __pyx_t_9 = NULL;
+ } else {
+ __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1185, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_9)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1185, __pyx_L1_error)
+ #else
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1185, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ #endif
+ } else {
+ if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1185, __pyx_L1_error)
+ #else
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1185, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ #endif
+ }
+ } else {
+ __pyx_t_7 = __pyx_t_9(__pyx_t_1);
+ if (unlikely(!__pyx_t_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, 1185, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_7);
+ }
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_calendar, __pyx_t_7) < 0) __PYX_ERR(0, 1185, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1186
+ * _converters = {}
+ * for calendar in _calendars:
+ * _converters[calendar] = utime("seconds since 1-1-1", calendar) # <<<<<<<<<<<<<<
+ *
+ * cdef class datetime(object):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_utime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_calendar); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_kp_s_seconds_since_1_1_1, __pyx_t_10};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1186, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_kp_s_seconds_since_1_1_1, __pyx_t_10};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1186, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (__pyx_t_11) {
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ }
+ __Pyx_INCREF(__pyx_kp_s_seconds_since_1_1_1);
+ __Pyx_GIVEREF(__pyx_kp_s_seconds_since_1_1_1);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_6, __pyx_kp_s_seconds_since_1_1_1);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_6, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(__pyx_v_10netcdftime_11_netcdftime__converters == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(0, 1186, __pyx_L1_error)
+ }
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_calendar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (unlikely(PyDict_SetItem(__pyx_v_10netcdftime_11_netcdftime__converters, __pyx_t_2, __pyx_t_7) < 0)) __PYX_ERR(0, 1186, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1185
+ * cdef dict _converters
+ * _converters = {}
+ * for calendar in _calendars: # <<<<<<<<<<<<<<
+ * _converters[calendar] = utime("seconds since 1-1-1", calendar)
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1457
+ * is_leap_proleptic_gregorian, False))
+ *
+ * _illegal_s = re.compile(r"((^|[^%])(%%)*%s)") # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1457, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1457, __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__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1457, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_illegal_s, __pyx_t_1) < 0) __PYX_ERR(0, 1457, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1537
+ * cdef int[13] month_lengths_365_day, month_lengths_366_day
+ * # Dummy Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
+ * for j,N in enumerate([-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]): # <<<<<<<<<<<<<<
+ * month_lengths_365_day[j] = N
+ *
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_1 = __pyx_int_0;
+ __pyx_t_7 = PyList_New(13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1537, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_INCREF(__pyx_int_neg_1);
+ __Pyx_GIVEREF(__pyx_int_neg_1);
+ PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_neg_1);
+ __Pyx_INCREF(__pyx_int_31);
+ __Pyx_GIVEREF(__pyx_int_31);
+ PyList_SET_ITEM(__pyx_t_7, 1, __pyx_int_31);
+ __Pyx_INCREF(__pyx_int_28);
+ __Pyx_GIVEREF(__pyx_int_28);
+ PyList_SET_ITEM(__pyx_t_7, 2, __pyx_int_28);
+ __Pyx_INCREF(__pyx_int_31);
+ __Pyx_GIVEREF(__pyx_int_31);
+ PyList_SET_ITEM(__pyx_t_7, 3, __pyx_int_31);
+ __Pyx_INCREF(__pyx_int_30);
+ __Pyx_GIVEREF(__pyx_int_30);
+ PyList_SET_ITEM(__pyx_t_7, 4, __pyx_int_30);
+ __Pyx_INCREF(__pyx_int_31);
+ __Pyx_GIVEREF(__pyx_int_31);
+ PyList_SET_ITEM(__pyx_t_7, 5, __pyx_int_31);
+ __Pyx_INCREF(__pyx_int_30);
+ __Pyx_GIVEREF(__pyx_int_30);
+ PyList_SET_ITEM(__pyx_t_7, 6, __pyx_int_30);
+ __Pyx_INCREF(__pyx_int_31);
+ __Pyx_GIVEREF(__pyx_int_31);
+ PyList_SET_ITEM(__pyx_t_7, 7, __pyx_int_31);
+ __Pyx_INCREF(__pyx_int_31);
+ __Pyx_GIVEREF(__pyx_int_31);
+ PyList_SET_ITEM(__pyx_t_7, 8, __pyx_int_31);
+ __Pyx_INCREF(__pyx_int_30);
+ __Pyx_GIVEREF(__pyx_int_30);
+ PyList_SET_ITEM(__pyx_t_7, 9, __pyx_int_30);
+ __Pyx_INCREF(__pyx_int_31);
+ __Pyx_GIVEREF(__pyx_int_31);
+ PyList_SET_ITEM(__pyx_t_7, 10, __pyx_int_31);
+ __Pyx_INCREF(__pyx_int_30);
+ __Pyx_GIVEREF(__pyx_int_30);
+ PyList_SET_ITEM(__pyx_t_7, 11, __pyx_int_30);
+ __Pyx_INCREF(__pyx_int_31);
+ __Pyx_GIVEREF(__pyx_int_31);
+ PyList_SET_ITEM(__pyx_t_7, 12, __pyx_int_31);
+ __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ for (;;) {
+ if (__pyx_t_8 >= 13) 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, 1537, __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, 1537, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ #endif
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_N, __pyx_t_7) < 0) __PYX_ERR(0, 1537, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_j, __pyx_t_1) < 0) __PYX_ERR(0, 1537, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1537, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1);
+ __pyx_t_1 = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1538
+ * # Dummy Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
+ * for j,N in enumerate([-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]):
+ * month_lengths_365_day[j] = N # <<<<<<<<<<<<<<
+ *
+ * # Dummy Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_N); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1538, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1538, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_j); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1538, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1538, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ (__pyx_v_10netcdftime_11_netcdftime_month_lengths_365_day[__pyx_t_13]) = __pyx_t_6;
+
+ /* "netcdftime/_netcdftime.pyx":1537
+ * cdef int[13] month_lengths_365_day, month_lengths_366_day
+ * # Dummy Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
+ * for j,N in enumerate([-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]): # <<<<<<<<<<<<<<
+ * month_lengths_365_day[j] = N
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1541
+ *
+ * # Dummy Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
+ * for j,N in enumerate([-1, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]): # <<<<<<<<<<<<<<
+ * month_lengths_366_day[j] = N
+ *
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_1 = __pyx_int_0;
+ __pyx_t_2 = PyList_New(13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1541, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_int_neg_1);
+ __Pyx_GIVEREF(__pyx_int_neg_1);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_neg_1);
+ __Pyx_INCREF(__pyx_int_31);
+ __Pyx_GIVEREF(__pyx_int_31);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_31);
+ __Pyx_INCREF(__pyx_int_29);
+ __Pyx_GIVEREF(__pyx_int_29);
+ PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_29);
+ __Pyx_INCREF(__pyx_int_31);
+ __Pyx_GIVEREF(__pyx_int_31);
+ PyList_SET_ITEM(__pyx_t_2, 3, __pyx_int_31);
+ __Pyx_INCREF(__pyx_int_30);
+ __Pyx_GIVEREF(__pyx_int_30);
+ PyList_SET_ITEM(__pyx_t_2, 4, __pyx_int_30);
+ __Pyx_INCREF(__pyx_int_31);
+ __Pyx_GIVEREF(__pyx_int_31);
+ PyList_SET_ITEM(__pyx_t_2, 5, __pyx_int_31);
+ __Pyx_INCREF(__pyx_int_30);
+ __Pyx_GIVEREF(__pyx_int_30);
+ PyList_SET_ITEM(__pyx_t_2, 6, __pyx_int_30);
+ __Pyx_INCREF(__pyx_int_31);
+ __Pyx_GIVEREF(__pyx_int_31);
+ PyList_SET_ITEM(__pyx_t_2, 7, __pyx_int_31);
+ __Pyx_INCREF(__pyx_int_31);
+ __Pyx_GIVEREF(__pyx_int_31);
+ PyList_SET_ITEM(__pyx_t_2, 8, __pyx_int_31);
+ __Pyx_INCREF(__pyx_int_30);
+ __Pyx_GIVEREF(__pyx_int_30);
+ PyList_SET_ITEM(__pyx_t_2, 9, __pyx_int_30);
+ __Pyx_INCREF(__pyx_int_31);
+ __Pyx_GIVEREF(__pyx_int_31);
+ PyList_SET_ITEM(__pyx_t_2, 10, __pyx_int_31);
+ __Pyx_INCREF(__pyx_int_30);
+ __Pyx_GIVEREF(__pyx_int_30);
+ PyList_SET_ITEM(__pyx_t_2, 11, __pyx_int_30);
+ __Pyx_INCREF(__pyx_int_31);
+ __Pyx_GIVEREF(__pyx_int_31);
+ PyList_SET_ITEM(__pyx_t_2, 12, __pyx_int_31);
+ __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (__pyx_t_8 >= 13) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1541, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1541, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_N, __pyx_t_2) < 0) __PYX_ERR(0, 1541, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_j, __pyx_t_1) < 0) __PYX_ERR(0, 1541, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1541, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1542
+ * # Dummy Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
+ * for j,N in enumerate([-1, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]):
+ * month_lengths_366_day[j] = N # <<<<<<<<<<<<<<
+ *
+ * cdef int* month_lengths(bint (*is_leap)(int), int year):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_N); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1542, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1542, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_j); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1542, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1542, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ (__pyx_v_10netcdftime_11_netcdftime_month_lengths_366_day[__pyx_t_13]) = __pyx_t_6;
+
+ /* "netcdftime/_netcdftime.pyx":1541
+ *
+ * # Dummy Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
+ * for j,N in enumerate([-1, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]): # <<<<<<<<<<<<<<
+ * month_lengths_366_day[j] = N
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "netcdftime/_netcdftime.pyx":1
+ * """ # <<<<<<<<<<<<<<
+ * Performs conversions of netCDF time coordinate data to/from datetime objects.
+ * """
+ */
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /*--- Wrapped vars code ---*/
+
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ if (__pyx_m) {
+ if (__pyx_d) {
+ __Pyx_AddTraceback("init netcdftime._netcdftime", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ }
+ Py_DECREF(__pyx_m); __pyx_m = 0;
+ } else if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_ImportError, "init netcdftime._netcdftime");
+ }
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ #if PY_MAJOR_VERSION < 3
+ return;
+ #else
+ return __pyx_m;
+ #endif
+}
+
+/* --- Runtime support code --- */
+/* Refnanny */
+#if CYTHON_REFNANNY
+static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
+ PyObject *m = NULL, *p = NULL;
+ void *r = NULL;
+ m = PyImport_ImportModule((char *)modname);
+ if (!m) goto end;
+ p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
+ if (!p) goto end;
+ r = PyLong_AsVoidPtr(p);
+end:
+ Py_XDECREF(p);
+ Py_XDECREF(m);
+ return (__Pyx_RefNannyAPIStruct *)r;
+}
+#endif
+
+/* GetBuiltinName */
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+ PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+ if (unlikely(!result)) {
+ PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+ "name '%U' is not defined", name);
+#else
+ "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
+ }
+ return result;
+}
+
+/* RaiseDoubleKeywords */
+static void __Pyx_RaiseDoubleKeywordsError(
+ const char* func_name,
+ PyObject* kw_name)
+{
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION >= 3
+ "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
+ #else
+ "%s() got multiple values for keyword argument '%s'", func_name,
+ PyString_AsString(kw_name));
+ #endif
+}
+
+/* ParseKeywords */
+static int __Pyx_ParseOptionalKeywords(
+ PyObject *kwds,
+ PyObject **argnames[],
+ PyObject *kwds2,
+ PyObject *values[],
+ Py_ssize_t num_pos_args,
+ const char* function_name)
+{
+ PyObject *key = 0, *value = 0;
+ Py_ssize_t pos = 0;
+ PyObject*** name;
+ PyObject*** first_kw_arg = argnames + num_pos_args;
+ while (PyDict_Next(kwds, &pos, &key, &value)) {
+ name = first_kw_arg;
+ while (*name && (**name != key)) name++;
+ if (*name) {
+ values[name-argnames] = value;
+ continue;
+ }
+ name = first_kw_arg;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
+ while (*name) {
+ if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
+ && _PyString_Eq(**name, key)) {
+ values[name-argnames] = value;
+ break;
+ }
+ name++;
+ }
+ if (*name) continue;
+ else {
+ PyObject*** argname = argnames;
+ while (argname != first_kw_arg) {
+ if ((**argname == key) || (
+ (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
+ && _PyString_Eq(**argname, key))) {
+ goto arg_passed_twice;
+ }
+ argname++;
+ }
+ }
+ } else
+ #endif
+ if (likely(PyUnicode_Check(key))) {
+ while (*name) {
+ int cmp = (**name == key) ? 0 :
+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+ (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
+ #endif
+ PyUnicode_Compare(**name, key);
+ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+ if (cmp == 0) {
+ values[name-argnames] = value;
+ break;
+ }
+ name++;
+ }
+ if (*name) continue;
+ else {
+ PyObject*** argname = argnames;
+ while (argname != first_kw_arg) {
+ int cmp = (**argname == key) ? 0 :
+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+ (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
+ #endif
+ PyUnicode_Compare(**argname, key);
+ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+ if (cmp == 0) goto arg_passed_twice;
+ argname++;
+ }
+ }
+ } else
+ goto invalid_keyword_type;
+ if (kwds2) {
+ if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+ } else {
+ goto invalid_keyword;
+ }
+ }
+ return 0;
+arg_passed_twice:
+ __Pyx_RaiseDoubleKeywordsError(function_name, key);
+ goto bad;
+invalid_keyword_type:
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() keywords must be strings", function_name);
+ goto bad;
+invalid_keyword:
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION < 3
+ "%.200s() got an unexpected keyword argument '%.200s'",
+ function_name, PyString_AsString(key));
+ #else
+ "%s() got an unexpected keyword argument '%U'",
+ function_name, key);
+ #endif
+bad:
+ return -1;
+}
+
+/* RaiseArgTupleInvalid */
+static void __Pyx_RaiseArgtupleInvalid(
+ const char* func_name,
+ int exact,
+ Py_ssize_t num_min,
+ Py_ssize_t num_max,
+ Py_ssize_t num_found)
+{
+ Py_ssize_t num_expected;
+ const char *more_or_less;
+ if (num_found < num_min) {
+ num_expected = num_min;
+ more_or_less = "at least";
+ } else {
+ num_expected = num_max;
+ more_or_less = "at most";
+ }
+ if (exact) {
+ more_or_less = "exactly";
+ }
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+ func_name, more_or_less, num_expected,
+ (num_expected == 1) ? "" : "s", num_found);
+}
+
+/* GetItemInt */
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+ PyObject *r;
+ if (!j) return NULL;
+ r = PyObject_GetItem(o, j);
+ Py_DECREF(j);
+ return r;
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
+ if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
+ PyObject *r = PyList_GET_ITEM(o, i);
+ Py_INCREF(r);
+ return r;
+ }
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+ return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
+ if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
+ PyObject *r = PyTuple_GET_ITEM(o, i);
+ Py_INCREF(r);
+ return r;
+ }
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+ return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
+ if (is_list || PyList_CheckExact(o)) {
+ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+ if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
+ PyObject *r = PyList_GET_ITEM(o, n);
+ Py_INCREF(r);
+ return r;
+ }
+ }
+ else if (PyTuple_CheckExact(o)) {
+ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+ if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
+ PyObject *r = PyTuple_GET_ITEM(o, n);
+ Py_INCREF(r);
+ return r;
+ }
+ } else {
+ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+ if (likely(m && m->sq_item)) {
+ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+ Py_ssize_t l = m->sq_length(o);
+ if (likely(l >= 0)) {
+ i += l;
+ } else {
+ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+ return NULL;
+ PyErr_Clear();
+ }
+ }
+ return m->sq_item(o, i);
+ }
+ }
+#else
+ if (is_list || PySequence_Check(o)) {
+ return PySequence_GetItem(o, i);
+ }
+#endif
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+}
+
+/* SaveResetException */
+#if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ *type = tstate->exc_type;
+ *value = tstate->exc_value;
+ *tb = tstate->exc_traceback;
+ Py_XINCREF(*type);
+ Py_XINCREF(*value);
+ Py_XINCREF(*tb);
+}
+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = type;
+ tstate->exc_value = value;
+ tstate->exc_traceback = tb;
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+}
+#endif
+
+/* GetException */
+#if CYTHON_FAST_THREAD_STATE
+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+#else
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
+#endif
+ PyObject *local_type, *local_value, *local_tb;
+#if CYTHON_FAST_THREAD_STATE
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ local_type = tstate->curexc_type;
+ local_value = tstate->curexc_value;
+ local_tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+#else
+ PyErr_Fetch(&local_type, &local_value, &local_tb);
+#endif
+ PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+#if CYTHON_FAST_THREAD_STATE
+ if (unlikely(tstate->curexc_type))
+#else
+ if (unlikely(PyErr_Occurred()))
+#endif
+ goto bad;
+ #if PY_MAJOR_VERSION >= 3
+ if (local_tb) {
+ if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+ goto bad;
+ }
+ #endif
+ Py_XINCREF(local_tb);
+ Py_XINCREF(local_type);
+ Py_XINCREF(local_value);
+ *type = local_type;
+ *value = local_value;
+ *tb = local_tb;
+#if CYTHON_FAST_THREAD_STATE
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = local_type;
+ tstate->exc_value = local_value;
+ tstate->exc_traceback = local_tb;
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+#else
+ PyErr_SetExcInfo(local_type, local_value, local_tb);
+#endif
+ return 0;
+bad:
+ *type = 0;
+ *value = 0;
+ *tb = 0;
+ Py_XDECREF(local_type);
+ Py_XDECREF(local_value);
+ Py_XDECREF(local_tb);
+ return -1;
+}
+
+/* GetModuleGlobalName */
+ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+ PyObject *result;
+#if !CYTHON_AVOID_BORROWED_REFS
+ result = PyDict_GetItem(__pyx_d, name);
+ if (likely(result)) {
+ Py_INCREF(result);
+ } else {
+#else
+ result = PyObject_GetItem(__pyx_d, name);
+ if (!result) {
+ PyErr_Clear();
+#endif
+ result = __Pyx_GetBuiltinName(name);
+ }
+ return result;
+}
+
+/* PyCFunctionFastCall */
+ #if CYTHON_FAST_PYCCALL
+static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
+ 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(nargs >= 0);
+ assert(nargs == 0 || args != NULL);
+ /* _PyCFunction_FastCallDict() must not be called with an exception set,
+ because it may clear it (directly or indirectly) and so the
+ caller loses its exception */
+ assert(!PyErr_Occurred());
+ return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
+}
+#endif // CYTHON_FAST_PYCCALL
+
+/* PyFunctionFastCall */
+ #if CYTHON_FAST_PYCALL
+#include "frameobject.h"
+static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
+ PyObject *globals) {
+ PyFrameObject *f;
+ PyThreadState *tstate = PyThreadState_GET();
+ PyObject **fastlocals;
+ Py_ssize_t i;
+ PyObject *result;
+ assert(globals != NULL);
+ /* XXX Perhaps we should create a specialized
+ PyFrame_New() that doesn't take locals, but does
+ take builtins without sanity checking them.
+ */
+ assert(tstate != NULL);
+ f = PyFrame_New(tstate, co, globals, NULL);
+ if (f == NULL) {
+ return NULL;
+ }
+ fastlocals = f->f_localsplus;
+ for (i = 0; i < na; i++) {
+ Py_INCREF(*args);
+ fastlocals[i] = *args++;
+ }
+ result = PyEval_EvalFrameEx(f,0);
+ ++tstate->recursion_depth;
+ Py_DECREF(f);
+ --tstate->recursion_depth;
+ return result;
+}
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
+ PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
+ PyObject *globals = PyFunction_GET_GLOBALS(func);
+ PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
+ PyObject *closure;
+#if PY_MAJOR_VERSION >= 3
+ PyObject *kwdefs;
+#endif
+ PyObject *kwtuple, **k;
+ PyObject **d;
+ Py_ssize_t nd;
+ Py_ssize_t nk;
+ PyObject *result;
+ assert(kwargs == NULL || PyDict_Check(kwargs));
+ nk = kwargs ? PyDict_Size(kwargs) : 0;
+ if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
+ return NULL;
+ }
+ if (
+#if PY_MAJOR_VERSION >= 3
+ co->co_kwonlyargcount == 0 &&
+#endif
+ likely(kwargs == NULL || nk == 0) &&
+ co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
+ if (argdefs == NULL && co->co_argcount == nargs) {
+ result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
+ goto done;
+ }
+ else if (nargs == 0 && argdefs != NULL
+ && co->co_argcount == Py_SIZE(argdefs)) {
+ /* function called with no arguments, but all parameters have
+ a default value: use default values as arguments .*/
+ args = &PyTuple_GET_ITEM(argdefs, 0);
+ result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
+ goto done;
+ }
+ }
+ if (kwargs != NULL) {
+ Py_ssize_t pos, i;
+ kwtuple = PyTuple_New(2 * nk);
+ if (kwtuple == NULL) {
+ result = NULL;
+ goto done;
+ }
+ k = &PyTuple_GET_ITEM(kwtuple, 0);
+ pos = i = 0;
+ while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
+ Py_INCREF(k[i]);
+ Py_INCREF(k[i+1]);
+ i += 2;
+ }
+ nk = i / 2;
+ }
+ else {
+ kwtuple = NULL;
+ k = NULL;
+ }
+ closure = PyFunction_GET_CLOSURE(func);
+#if PY_MAJOR_VERSION >= 3
+ kwdefs = PyFunction_GET_KW_DEFAULTS(func);
+#endif
+ if (argdefs != NULL) {
+ d = &PyTuple_GET_ITEM(argdefs, 0);
+ nd = Py_SIZE(argdefs);
+ }
+ else {
+ d = NULL;
+ nd = 0;
+ }
+#if PY_MAJOR_VERSION >= 3
+ result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
+ args, nargs,
+ k, (int)nk,
+ d, (int)nd, kwdefs, closure);
+#else
+ result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
+ args, nargs,
+ k, (int)nk,
+ d, (int)nd, closure);
+#endif
+ Py_XDECREF(kwtuple);
+done:
+ Py_LeaveRecursiveCall();
+ return result;
+}
+#endif // CPython < 3.6
+#endif // CYTHON_FAST_PYCALL
+
+/* PyObjectCall */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+ PyObject *result;
+ ternaryfunc call = func->ob_type->tp_call;
+ if (unlikely(!call))
+ return PyObject_Call(func, arg, kw);
+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+ return NULL;
+ result = (*call)(func, arg, kw);
+ Py_LeaveRecursiveCall();
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+ PyErr_SetString(
+ PyExc_SystemError,
+ "NULL result without error in PyObject_Call");
+ }
+ return result;
+}
+#endif
+
+/* PyObjectCallMethO */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
+ PyObject *self, *result;
+ PyCFunction cfunc;
+ cfunc = PyCFunction_GET_FUNCTION(func);
+ self = PyCFunction_GET_SELF(func);
+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+ return NULL;
+ result = cfunc(self, arg);
+ Py_LeaveRecursiveCall();
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+ PyErr_SetString(
+ PyExc_SystemError,
+ "NULL result without error in PyObject_Call");
+ }
+ return result;
+}
+#endif
+
+/* PyObjectCallOneArg */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+ PyObject *result;
+ PyObject *args = PyTuple_New(1);
+ if (unlikely(!args)) return NULL;
+ Py_INCREF(arg);
+ PyTuple_SET_ITEM(args, 0, arg);
+ result = __Pyx_PyObject_Call(func, args, NULL);
+ Py_DECREF(args);
+ return result;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+#if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(func)) {
+ return __Pyx_PyFunction_FastCall(func, &arg, 1);
+ }
+#endif
+#ifdef __Pyx_CyFunction_USED
+ if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
+#else
+ if (likely(PyCFunction_Check(func))) {
+#endif
+ if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
+ return __Pyx_PyObject_CallMethO(func, arg);
+#if CYTHON_FAST_PYCCALL
+ } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
+ return __Pyx_PyCFunction_FastCall(func, &arg, 1);
+#endif
+ }
+ }
+ return __Pyx__PyObject_CallOneArg(func, arg);
+}
+#else
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+ PyObject *result;
+ PyObject *args = PyTuple_Pack(1, arg);
+ if (unlikely(!args)) return NULL;
+ result = __Pyx_PyObject_Call(func, args, NULL);
+ Py_DECREF(args);
+ return result;
+}
+#endif
+
+/* PyObjectCallNoArg */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
+#if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(func)) {
+ return __Pyx_PyFunction_FastCall(func, NULL, 0);
+ }
+#endif
+#ifdef __Pyx_CyFunction_USED
+ if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
+#else
+ if (likely(PyCFunction_Check(func))) {
+#endif
+ if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
+ return __Pyx_PyObject_CallMethO(func, NULL);
+ }
+ }
+ return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
+}
+#endif
+
+/* PyIntBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ const long b = intval;
+ long x;
+ long a = PyInt_AS_LONG(op1);
+ x = (long)((unsigned long)a + b);
+ if (likely((x^a) >= 0 || (x^b) >= 0))
+ return PyInt_FromLong(x);
+ return PyLong_Type.tp_as_number->nb_add(op1, op2);
+ }
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+ if (likely(PyLong_CheckExact(op1))) {
+ const long b = intval;
+ long a, x;
+#ifdef HAVE_LONG_LONG
+ const PY_LONG_LONG llb = intval;
+ PY_LONG_LONG lla, llx;
+#endif
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ a = likely(size) ? digits[0] : 0;
+ if (size == -1) a = -a;
+ } else {
+ switch (size) {
+ case -2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
+ }
+ }
+ x = a + b;
+ return PyLong_FromLong(x);
+#ifdef HAVE_LONG_LONG
+ long_long:
+ llx = lla + llb;
+ return PyLong_FromLongLong(llx);
+#endif
+
+
+ }
+ #endif
+ if (PyFloat_CheckExact(op1)) {
+ const long b = intval;
+ double a = PyFloat_AS_DOUBLE(op1);
+ double result;
+ PyFPE_START_PROTECT("add", return NULL)
+ result = ((double)a) + (double)b;
+ PyFPE_END_PROTECT(result)
+ return PyFloat_FromDouble(result);
+ }
+ return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
+}
+#endif
+
+/* PyFloatBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, CYTHON_UNUSED int inplace) {
+ const double b = floatval;
+ double a, result;
+ if (likely(PyFloat_CheckExact(op1))) {
+ a = PyFloat_AS_DOUBLE(op1);
+ } else
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ a = (double) PyInt_AS_LONG(op1);
+ } else
+ #endif
+ if (likely(PyLong_CheckExact(op1))) {
+ #if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ switch (size) {
+ case 0: a = 0.0; break;
+ case -1: a = -(double) digits[0]; break;
+ case 1: a = (double) digits[0]; break;
+ case -2:
+ case 2:
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
+ a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
+ if (size == -2)
+ a = -a;
+ break;
+ }
+ }
+ case -3:
+ case 3:
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
+ a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
+ if (size == -3)
+ a = -a;
+ break;
+ }
+ }
+ case -4:
+ case 4:
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
+ a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
+ if (size == -4)
+ a = -a;
+ break;
+ }
+ }
+ default:
+ #else
+ {
+ #endif
+ a = PyLong_AsDouble(op1);
+ if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
+ }
+ } else {
+ return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
+ }
+ PyFPE_START_PROTECT("divide", return NULL)
+ result = a / b;
+ PyFPE_END_PROTECT(result)
+ return PyFloat_FromDouble(result);
+}
+#endif
+
+/* PyIntBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ const long b = intval;
+ long x;
+ long a = PyInt_AS_LONG(op1);
+ x = (long)((unsigned long)a - b);
+ if (likely((x^a) >= 0 || (x^~b) >= 0))
+ return PyInt_FromLong(x);
+ return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
+ }
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+ if (likely(PyLong_CheckExact(op1))) {
+ const long b = intval;
+ long a, x;
+#ifdef HAVE_LONG_LONG
+ const PY_LONG_LONG llb = intval;
+ PY_LONG_LONG lla, llx;
+#endif
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ a = likely(size) ? digits[0] : 0;
+ if (size == -1) a = -a;
+ } else {
+ switch (size) {
+ case -2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
+ }
+ }
+ x = a - b;
+ return PyLong_FromLong(x);
+#ifdef HAVE_LONG_LONG
+ long_long:
+ llx = lla - llb;
+ return PyLong_FromLongLong(llx);
+#endif
+
+
+ }
+ #endif
+ if (PyFloat_CheckExact(op1)) {
+ const long b = intval;
+ double a = PyFloat_AS_DOUBLE(op1);
+ double result;
+ PyFPE_START_PROTECT("subtract", return NULL)
+ result = ((double)a) - (double)b;
+ PyFPE_END_PROTECT(result)
+ return PyFloat_FromDouble(result);
+ }
+ return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
+}
+#endif
+
+/* PyFloatBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyFloat_AddObjC(PyObject *op1, PyObject *op2, double floatval, CYTHON_UNUSED int inplace) {
+ const double b = floatval;
+ double a, result;
+ if (likely(PyFloat_CheckExact(op1))) {
+ a = PyFloat_AS_DOUBLE(op1);
+ } else
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ a = (double) PyInt_AS_LONG(op1);
+ } else
+ #endif
+ if (likely(PyLong_CheckExact(op1))) {
+ #if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ switch (size) {
+ case 0: a = 0.0; break;
+ case -1: a = -(double) digits[0]; break;
+ case 1: a = (double) digits[0]; break;
+ case -2:
+ case 2:
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
+ a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
+ if (size == -2)
+ a = -a;
+ break;
+ }
+ }
+ case -3:
+ case 3:
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
+ a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
+ if (size == -3)
+ a = -a;
+ break;
+ }
+ }
+ case -4:
+ case 4:
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
+ a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
+ if (size == -4)
+ a = -a;
+ break;
+ }
+ }
+ default:
+ #else
+ {
+ #endif
+ a = PyLong_AsDouble(op1);
+ if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
+ }
+ } else {
+ return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
+ }
+ PyFPE_START_PROTECT("add", return NULL)
+ result = a + b;
+ PyFPE_END_PROTECT(result)
+ return PyFloat_FromDouble(result);
+}
+#endif
+
+/* BytesEquals */
+ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+ return PyObject_RichCompareBool(s1, s2, equals);
+#else
+ if (s1 == s2) {
+ return (equals == Py_EQ);
+ } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
+ const char *ps1, *ps2;
+ Py_ssize_t length = PyBytes_GET_SIZE(s1);
+ if (length != PyBytes_GET_SIZE(s2))
+ return (equals == Py_NE);
+ ps1 = PyBytes_AS_STRING(s1);
+ ps2 = PyBytes_AS_STRING(s2);
+ if (ps1[0] != ps2[0]) {
+ return (equals == Py_NE);
+ } else if (length == 1) {
+ return (equals == Py_EQ);
+ } else {
+ int result = memcmp(ps1, ps2, (size_t)length);
+ return (equals == Py_EQ) ? (result == 0) : (result != 0);
+ }
+ } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
+ return (equals == Py_NE);
+ } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
+ return (equals == Py_NE);
+ } else {
+ int result;
+ PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+ if (!py_result)
+ return -1;
+ result = __Pyx_PyObject_IsTrue(py_result);
+ Py_DECREF(py_result);
+ return result;
+ }
+#endif
+}
+
+/* UnicodeEquals */
+ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+ return PyObject_RichCompareBool(s1, s2, equals);
+#else
+#if PY_MAJOR_VERSION < 3
+ PyObject* owned_ref = NULL;
+#endif
+ int s1_is_unicode, s2_is_unicode;
+ if (s1 == s2) {
+ goto return_eq;
+ }
+ s1_is_unicode = PyUnicode_CheckExact(s1);
+ s2_is_unicode = PyUnicode_CheckExact(s2);
+#if PY_MAJOR_VERSION < 3
+ if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
+ owned_ref = PyUnicode_FromObject(s2);
+ if (unlikely(!owned_ref))
+ return -1;
+ s2 = owned_ref;
+ s2_is_unicode = 1;
+ } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
+ owned_ref = PyUnicode_FromObject(s1);
+ if (unlikely(!owned_ref))
+ return -1;
+ s1 = owned_ref;
+ s1_is_unicode = 1;
+ } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
+ return __Pyx_PyBytes_Equals(s1, s2, equals);
+ }
+#endif
+ if (s1_is_unicode & s2_is_unicode) {
+ Py_ssize_t length;
+ int kind;
+ void *data1, *data2;
+ if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
+ return -1;
+ length = __Pyx_PyUnicode_GET_LENGTH(s1);
+ if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
+ goto return_ne;
+ }
+ kind = __Pyx_PyUnicode_KIND(s1);
+ if (kind != __Pyx_PyUnicode_KIND(s2)) {
+ goto return_ne;
+ }
+ data1 = __Pyx_PyUnicode_DATA(s1);
+ data2 = __Pyx_PyUnicode_DATA(s2);
+ if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
+ goto return_ne;
+ } else if (length == 1) {
+ goto return_eq;
+ } else {
+ int result = memcmp(data1, data2, (size_t)(length * kind));
+ #if PY_MAJOR_VERSION < 3
+ Py_XDECREF(owned_ref);
+ #endif
+ return (equals == Py_EQ) ? (result == 0) : (result != 0);
+ }
+ } else if ((s1 == Py_None) & s2_is_unicode) {
+ goto return_ne;
+ } else if ((s2 == Py_None) & s1_is_unicode) {
+ goto return_ne;
+ } else {
+ int result;
+ PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+ if (!py_result)
+ return -1;
+ result = __Pyx_PyObject_IsTrue(py_result);
+ Py_DECREF(py_result);
+ return result;
+ }
+return_eq:
+ #if PY_MAJOR_VERSION < 3
+ Py_XDECREF(owned_ref);
+ #endif
+ return (equals == Py_EQ);
+return_ne:
+ #if PY_MAJOR_VERSION < 3
+ Py_XDECREF(owned_ref);
+ #endif
+ return (equals == Py_NE);
+#endif
+}
+
+/* PyErrFetchRestore */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ tmp_type = tstate->curexc_type;
+ tmp_value = tstate->curexc_value;
+ tmp_tb = tstate->curexc_traceback;
+ tstate->curexc_type = type;
+ tstate->curexc_value = value;
+ tstate->curexc_traceback = tb;
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+}
+static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ *type = tstate->curexc_type;
+ *value = tstate->curexc_value;
+ *tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+}
+#endif
+
+/* RaiseException */
+ #if PY_MAJOR_VERSION < 3
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
+ CYTHON_UNUSED PyObject *cause) {
+ __Pyx_PyThreadState_declare
+ Py_XINCREF(type);
+ if (!value || value == Py_None)
+ value = NULL;
+ else
+ Py_INCREF(value);
+ if (!tb || tb == Py_None)
+ tb = NULL;
+ else {
+ Py_INCREF(tb);
+ if (!PyTraceBack_Check(tb)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: arg 3 must be a traceback or None");
+ goto raise_error;
+ }
+ }
+ if (PyType_Check(type)) {
+#if CYTHON_COMPILING_IN_PYPY
+ if (!value) {
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+#endif
+ PyErr_NormalizeException(&type, &value, &tb);
+ } else {
+ if (value) {
+ PyErr_SetString(PyExc_TypeError,
+ "instance exception may not have a separate value");
+ goto raise_error;
+ }
+ value = type;
+ type = (PyObject*) Py_TYPE(type);
+ Py_INCREF(type);
+ if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: exception class must be a subclass of BaseException");
+ goto raise_error;
+ }
+ }
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrRestore(type, value, tb);
+ return;
+raise_error:
+ Py_XDECREF(value);
+ Py_XDECREF(type);
+ Py_XDECREF(tb);
+ return;
+}
+#else
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
+ PyObject* owned_instance = NULL;
+ if (tb == Py_None) {
+ tb = 0;
+ } else if (tb && !PyTraceBack_Check(tb)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: arg 3 must be a traceback or None");
+ goto bad;
+ }
+ if (value == Py_None)
+ value = 0;
+ if (PyExceptionInstance_Check(type)) {
+ if (value) {
+ PyErr_SetString(PyExc_TypeError,
+ "instance exception may not have a separate value");
+ goto bad;
+ }
+ value = type;
+ type = (PyObject*) Py_TYPE(value);
+ } else if (PyExceptionClass_Check(type)) {
+ PyObject *instance_class = NULL;
+ if (value && PyExceptionInstance_Check(value)) {
+ instance_class = (PyObject*) Py_TYPE(value);
+ if (instance_class != type) {
+ int is_subclass = PyObject_IsSubclass(instance_class, type);
+ if (!is_subclass) {
+ instance_class = NULL;
+ } else if (unlikely(is_subclass == -1)) {
+ goto bad;
+ } else {
+ type = instance_class;
+ }
+ }
+ }
+ if (!instance_class) {
+ PyObject *args;
+ if (!value)
+ args = PyTuple_New(0);
+ else if (PyTuple_Check(value)) {
+ Py_INCREF(value);
+ args = value;
+ } else
+ args = PyTuple_Pack(1, value);
+ if (!args)
+ goto bad;
+ owned_instance = PyObject_Call(type, args, NULL);
+ Py_DECREF(args);
+ if (!owned_instance)
+ goto bad;
+ value = owned_instance;
+ if (!PyExceptionInstance_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "calling %R should have returned an instance of "
+ "BaseException, not %R",
+ type, Py_TYPE(value));
+ goto bad;
+ }
+ }
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: exception class must be a subclass of BaseException");
+ goto bad;
+ }
+#if PY_VERSION_HEX >= 0x03030000
+ if (cause) {
+#else
+ if (cause && cause != Py_None) {
+#endif
+ PyObject *fixed_cause;
+ if (cause == Py_None) {
+ fixed_cause = NULL;
+ } else if (PyExceptionClass_Check(cause)) {
+ fixed_cause = PyObject_CallObject(cause, NULL);
+ if (fixed_cause == NULL)
+ goto bad;
+ } else if (PyExceptionInstance_Check(cause)) {
+ fixed_cause = cause;
+ Py_INCREF(fixed_cause);
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "exception causes must derive from "
+ "BaseException");
+ goto bad;
+ }
+ PyException_SetCause(value, fixed_cause);
+ }
+ PyErr_SetObject(type, value);
+ if (tb) {
+#if CYTHON_COMPILING_IN_PYPY
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
+ Py_INCREF(tb);
+ PyErr_Restore(tmp_type, tmp_value, tb);
+ Py_XDECREF(tmp_tb);
+#else
+ PyThreadState *tstate = PyThreadState_GET();
+ PyObject* tmp_tb = tstate->curexc_traceback;
+ if (tb != tmp_tb) {
+ Py_INCREF(tb);
+ tstate->curexc_traceback = tb;
+ Py_XDECREF(tmp_tb);
+ }
+#endif
+ }
+bad:
+ Py_XDECREF(owned_instance);
+ return;
+}
+#endif
+
+/* PyIntBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op2))) {
+ const long a = intval;
+ long x;
+ long b = PyInt_AS_LONG(op2);
+ x = (long)((unsigned long)a - b);
+ if (likely((x^a) >= 0 || (x^~b) >= 0))
+ return PyInt_FromLong(x);
+ return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
+ }
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+ if (likely(PyLong_CheckExact(op2))) {
+ const long a = intval;
+ long b, x;
+#ifdef HAVE_LONG_LONG
+ const PY_LONG_LONG lla = intval;
+ PY_LONG_LONG llb, llx;
+#endif
+ const digit* digits = ((PyLongObject*)op2)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op2);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ b = likely(size) ? digits[0] : 0;
+ if (size == -1) b = -b;
+ } else {
+ switch (size) {
+ case -2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
+ }
+ }
+ x = a - b;
+ return PyLong_FromLong(x);
+#ifdef HAVE_LONG_LONG
+ long_long:
+ llx = lla - llb;
+ return PyLong_FromLongLong(llx);
+#endif
+
+
+ }
+ #endif
+ if (PyFloat_CheckExact(op2)) {
+ const long a = intval;
+ double b = PyFloat_AS_DOUBLE(op2);
+ double result;
+ PyFPE_START_PROTECT("subtract", return NULL)
+ result = ((double)a) - (double)b;
+ PyFPE_END_PROTECT(result)
+ return PyFloat_FromDouble(result);
+ }
+ return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
+}
+#endif
+
+/* PyFloatBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyFloat_SubtractObjC(PyObject *op1, PyObject *op2, double floatval, CYTHON_UNUSED int inplace) {
+ const double b = floatval;
+ double a, result;
+ if (likely(PyFloat_CheckExact(op1))) {
+ a = PyFloat_AS_DOUBLE(op1);
+ } else
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ a = (double) PyInt_AS_LONG(op1);
+ } else
+ #endif
+ if (likely(PyLong_CheckExact(op1))) {
+ #if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ switch (size) {
+ case 0: a = 0.0; break;
+ case -1: a = -(double) digits[0]; break;
+ case 1: a = (double) digits[0]; break;
+ case -2:
+ case 2:
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
+ a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
+ if (size == -2)
+ a = -a;
+ break;
+ }
+ }
+ case -3:
+ case 3:
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
+ a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
+ if (size == -3)
+ a = -a;
+ break;
+ }
+ }
+ case -4:
+ case 4:
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
+ a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) (1L<<53))) {
+ if (size == -4)
+ a = -a;
+ break;
+ }
+ }
+ default:
+ #else
+ {
+ #endif
+ a = PyLong_AsDouble(op1);
+ if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
+ }
+ } else {
+ return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
+ }
+ PyFPE_START_PROTECT("subtract", return NULL)
+ result = a - b;
+ PyFPE_END_PROTECT(result)
+ return PyFloat_FromDouble(result);
+}
+#endif
+
+/* PyFloatBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyFloat_AddCObj(PyObject *op1, PyObject *op2, double floatval, CYTHON_UNUSED int inplace) {
+ const double a = floatval;
+ double b, result;
+ if (likely(PyFloat_CheckExact(op2))) {
+ b = PyFloat_AS_DOUBLE(op2);
+ } else
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op2))) {
+ b = (double) PyInt_AS_LONG(op2);
+ } else
+ #endif
+ if (likely(PyLong_CheckExact(op2))) {
+ #if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)op2)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op2);
+ switch (size) {
+ case 0: b = 0.0; break;
+ case -1: b = -(double) digits[0]; break;
+ case 1: b = (double) digits[0]; break;
+ case -2:
+ case 2:
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
+ b = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (b < (double) (1L<<53))) {
+ if (size == -2)
+ b = -b;
+ break;
+ }
+ }
+ case -3:
+ case 3:
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
+ b = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (b < (double) (1L<<53))) {
+ if (size == -3)
+ b = -b;
+ break;
+ }
+ }
+ case -4:
+ case 4:
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
+ b = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (b < (double) (1L<<53))) {
+ if (size == -4)
+ b = -b;
+ break;
+ }
+ }
+ default:
+ #else
+ {
+ #endif
+ b = PyLong_AsDouble(op2);
+ if (unlikely(b == -1.0 && PyErr_Occurred())) return NULL;
+ }
+ } else {
+ return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
+ }
+ PyFPE_START_PROTECT("add", return NULL)
+ result = a + b;
+ PyFPE_END_PROTECT(result)
+ return PyFloat_FromDouble(result);
+}
+#endif
+
+/* PyIntBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
+ if (op1 == op2) {
+ Py_RETURN_TRUE;
+ }
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ const long b = intval;
+ long a = PyInt_AS_LONG(op1);
+ if (a == b) {
+ Py_RETURN_TRUE;
+ } else {
+ Py_RETURN_FALSE;
+ }
+ }
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+ if (likely(PyLong_CheckExact(op1))) {
+ const long b = intval;
+ long a;
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ a = likely(size) ? digits[0] : 0;
+ if (size == -1) a = -a;
+ } else {
+ switch (size) {
+ case -2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case 2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case -3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case 3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case -4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case 4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
+ default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
+ #else
+ default: Py_RETURN_FALSE;
+ #endif
+ }
+ }
+ if (a == b) {
+ Py_RETURN_TRUE;
+ } else {
+ Py_RETURN_FALSE;
+ }
+ }
+ #endif
+ if (PyFloat_CheckExact(op1)) {
+ const long b = intval;
+ double a = PyFloat_AS_DOUBLE(op1);
+ if ((double)a == (double)b) {
+ Py_RETURN_TRUE;
+ } else {
+ Py_RETURN_FALSE;
+ }
+ }
+ return PyObject_RichCompare(op1, op2, Py_EQ);
+}
+#endif
+
+/* PyIntBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ const long b = intval;
+ long x;
+ long a = PyInt_AS_LONG(op1);
+ x = a % b;
+ x += ((x != 0) & ((x ^ b) < 0)) * b;
+ return PyInt_FromLong(x);
+ }
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+ if (likely(PyLong_CheckExact(op1))) {
+ const long b = intval;
+ long a, x;
+#ifdef HAVE_LONG_LONG
+ const PY_LONG_LONG llb = intval;
+ PY_LONG_LONG lla, llx;
+#endif
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ a = likely(size) ? digits[0] : 0;
+ if (size == -1) a = -a;
+ } else {
+ switch (size) {
+ case -2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ default: return PyLong_Type.tp_as_number->nb_remainder(op1, op2);
+ }
+ }
+ x = a % b;
+ x += ((x != 0) & ((x ^ b) < 0)) * b;
+ return PyLong_FromLong(x);
+#ifdef HAVE_LONG_LONG
+ long_long:
+ llx = lla % llb;
+ llx += ((llx != 0) & ((llx ^ llb) < 0)) * llb;
+ return PyLong_FromLongLong(llx);
+#endif
+
+
+ }
+ #endif
+ return (inplace ? PyNumber_InPlaceRemainder : PyNumber_Remainder)(op1, op2);
+}
+#endif
+
+/* None */
+ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
+ PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
+}
+
+/* PyIntBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ const long b = intval;
+ long x;
+ long a = PyInt_AS_LONG(op1);
+ if (unlikely(b == -1 && ((unsigned long)a) == 0-(unsigned long)a))
+ return PyInt_Type.tp_as_number->nb_floor_divide(op1, op2);
+ else {
+ long q, r;
+ q = a / b;
+ r = a - q*b;
+ q -= ((r != 0) & ((r ^ b) < 0));
+ x = q;
+ }
+ return PyInt_FromLong(x);
+ }
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+ if (likely(PyLong_CheckExact(op1))) {
+ const long b = intval;
+ long a, x;
+#ifdef HAVE_LONG_LONG
+ const PY_LONG_LONG llb = intval;
+ PY_LONG_LONG lla, llx;
+#endif
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ a = likely(size) ? digits[0] : 0;
+ if (size == -1) a = -a;
+ } else {
+ switch (size) {
+ case -2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ default: return PyLong_Type.tp_as_number->nb_floor_divide(op1, op2);
+ }
+ }
+ {
+ long q, r;
+ q = a / b;
+ r = a - q*b;
+ q -= ((r != 0) & ((r ^ b) < 0));
+ x = q;
+ }
+ return PyLong_FromLong(x);
+#ifdef HAVE_LONG_LONG
+ long_long:
+ {
+ PY_LONG_LONG q, r;
+ q = lla / llb;
+ r = lla - q*llb;
+ q -= ((r != 0) & ((r ^ llb) < 0));
+ llx = q;
+ }
+ return PyLong_FromLongLong(llx);
+#endif
+
+
+ }
+ #endif
+ return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2);
+}
+#endif
+
+/* RaiseTooManyValuesToUnpack */
+ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+ PyErr_Format(PyExc_ValueError,
+ "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
+}
+
+/* RaiseNeedMoreValuesToUnpack */
+ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+ PyErr_Format(PyExc_ValueError,
+ "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
+ index, (index == 1) ? "" : "s");
+}
+
+/* IterFinish */
+ static CYTHON_INLINE int __Pyx_IterFinish(void) {
+#if CYTHON_FAST_THREAD_STATE
+ PyThreadState *tstate = PyThreadState_GET();
+ PyObject* exc_type = tstate->curexc_type;
+ if (unlikely(exc_type)) {
+ if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
+ PyObject *exc_value, *exc_tb;
+ exc_value = tstate->curexc_value;
+ exc_tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+ Py_DECREF(exc_type);
+ Py_XDECREF(exc_value);
+ Py_XDECREF(exc_tb);
+ return 0;
+ } else {
+ return -1;
+ }
+ }
+ return 0;
+#else
+ if (unlikely(PyErr_Occurred())) {
+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
+ PyErr_Clear();
+ return 0;
+ } else {
+ return -1;
+ }
+ }
+ return 0;
+#endif
+}
+
+/* UnpackItemEndCheck */
+ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
+ if (unlikely(retval)) {
+ Py_DECREF(retval);
+ __Pyx_RaiseTooManyValuesError(expected);
+ return -1;
+ } else {
+ return __Pyx_IterFinish();
+ }
+ return 0;
+}
+
+/* SliceObject */
+ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
+ Py_ssize_t cstart, Py_ssize_t cstop,
+ PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
+ int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
+#if CYTHON_USE_TYPE_SLOTS
+ PyMappingMethods* mp;
+#if PY_MAJOR_VERSION < 3
+ PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
+ if (likely(ms && ms->sq_slice)) {
+ if (!has_cstart) {
+ if (_py_start && (*_py_start != Py_None)) {
+ cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
+ if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+ } else
+ cstart = 0;
+ }
+ if (!has_cstop) {
+ if (_py_stop && (*_py_stop != Py_None)) {
+ cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
+ if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+ } else
+ cstop = PY_SSIZE_T_MAX;
+ }
+ if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
+ Py_ssize_t l = ms->sq_length(obj);
+ if (likely(l >= 0)) {
+ if (cstop < 0) {
+ cstop += l;
+ if (cstop < 0) cstop = 0;
+ }
+ if (cstart < 0) {
+ cstart += l;
+ if (cstart < 0) cstart = 0;
+ }
+ } else {
+ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+ goto bad;
+ PyErr_Clear();
+ }
+ }
+ return ms->sq_slice(obj, cstart, cstop);
+ }
+#endif
+ mp = Py_TYPE(obj)->tp_as_mapping;
+ if (likely(mp && mp->mp_subscript))
+#endif
+ {
+ PyObject* result;
+ PyObject *py_slice, *py_start, *py_stop;
+ if (_py_slice) {
+ py_slice = *_py_slice;
+ } else {
+ PyObject* owned_start = NULL;
+ PyObject* owned_stop = NULL;
+ if (_py_start) {
+ py_start = *_py_start;
+ } else {
+ if (has_cstart) {
+ owned_start = py_start = PyInt_FromSsize_t(cstart);
+ if (unlikely(!py_start)) goto bad;
+ } else
+ py_start = Py_None;
+ }
+ if (_py_stop) {
+ py_stop = *_py_stop;
+ } else {
+ if (has_cstop) {
+ owned_stop = py_stop = PyInt_FromSsize_t(cstop);
+ if (unlikely(!py_stop)) {
+ Py_XDECREF(owned_start);
+ goto bad;
+ }
+ } else
+ py_stop = Py_None;
+ }
+ py_slice = PySlice_New(py_start, py_stop, Py_None);
+ Py_XDECREF(owned_start);
+ Py_XDECREF(owned_stop);
+ if (unlikely(!py_slice)) goto bad;
+ }
+#if CYTHON_USE_TYPE_SLOTS
+ result = mp->mp_subscript(obj, py_slice);
+#else
+ result = PyObject_GetItem(obj, py_slice);
+#endif
+ if (!_py_slice) {
+ Py_DECREF(py_slice);
+ }
+ return result;
+ }
+ PyErr_Format(PyExc_TypeError,
+ "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
+bad:
+ return NULL;
+}
+
+/* PyObjectCallMethod1 */
+ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
+ PyObject *method, *result = NULL;
+ method = __Pyx_PyObject_GetAttrStr(obj, method_name);
+ if (unlikely(!method)) goto done;
+#if CYTHON_UNPACK_METHODS
+ if (likely(PyMethod_Check(method))) {
+ PyObject *self = PyMethod_GET_SELF(method);
+ if (likely(self)) {
+ PyObject *args;
+ PyObject *function = PyMethod_GET_FUNCTION(method);
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(function)) {
+ PyObject *args[2] = {self, arg};
+ result = __Pyx_PyFunction_FastCall(function, args, 2);
+ goto done;
+ }
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(function)) {
+ PyObject *args[2] = {self, arg};
+ result = __Pyx_PyCFunction_FastCall(function, args, 2);
+ goto done;
+ }
+ #endif
+ args = PyTuple_New(2);
+ if (unlikely(!args)) goto done;
+ Py_INCREF(self);
+ PyTuple_SET_ITEM(args, 0, self);
+ Py_INCREF(arg);
+ PyTuple_SET_ITEM(args, 1, arg);
+ Py_INCREF(function);
+ Py_DECREF(method); method = NULL;
+ result = __Pyx_PyObject_Call(function, args, NULL);
+ Py_DECREF(args);
+ Py_DECREF(function);
+ return result;
+ }
+ }
+#endif
+ result = __Pyx_PyObject_CallOneArg(method, arg);
+done:
+ Py_XDECREF(method);
+ return result;
+}
+
+/* append */
+ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+ if (likely(PyList_CheckExact(L))) {
+ if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
+ } else {
+ PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
+ if (unlikely(!retval))
+ return -1;
+ Py_DECREF(retval);
+ }
+ return 0;
+}
+
+/* PyErrExceptionMatches */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
+ PyObject *exc_type = tstate->curexc_type;
+ if (exc_type == err) return 1;
+ if (unlikely(!exc_type)) return 0;
+ return PyErr_GivenExceptionMatches(exc_type, err);
+}
+#endif
+
+/* GetAttr */
+ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
+#if CYTHON_COMPILING_IN_CPYTHON
+#if PY_MAJOR_VERSION >= 3
+ if (likely(PyUnicode_Check(n)))
+#else
+ if (likely(PyString_Check(n)))
+#endif
+ return __Pyx_PyObject_GetAttrStr(o, n);
+#endif
+ return PyObject_GetAttr(o, n);
+}
+
+/* GetAttr3 */
+ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
+ PyObject *r = __Pyx_GetAttr(o, n);
+ if (unlikely(!r)) {
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+ goto bad;
+ PyErr_Clear();
+ r = d;
+ Py_INCREF(d);
+ }
+ return r;
+bad:
+ return NULL;
+}
+
+/* Import */
+ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+ PyObject *empty_list = 0;
+ PyObject *module = 0;
+ PyObject *global_dict = 0;
+ PyObject *empty_dict = 0;
+ PyObject *list;
+ #if PY_VERSION_HEX < 0x03030000
+ PyObject *py_import;
+ py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+ if (!py_import)
+ goto bad;
+ #endif
+ if (from_list)
+ list = from_list;
+ else {
+ empty_list = PyList_New(0);
+ if (!empty_list)
+ goto bad;
+ list = empty_list;
+ }
+ global_dict = PyModule_GetDict(__pyx_m);
+ if (!global_dict)
+ goto bad;
+ empty_dict = PyDict_New();
+ if (!empty_dict)
+ goto bad;
+ {
+ #if PY_MAJOR_VERSION >= 3
+ if (level == -1) {
+ if (strchr(__Pyx_MODULE_NAME, '.')) {
+ #if PY_VERSION_HEX < 0x03030000
+ PyObject *py_level = PyInt_FromLong(1);
+ if (!py_level)
+ goto bad;
+ module = PyObject_CallFunctionObjArgs(py_import,
+ name, global_dict, empty_dict, list, py_level, NULL);
+ Py_DECREF(py_level);
+ #else
+ module = PyImport_ImportModuleLevelObject(
+ name, global_dict, empty_dict, list, 1);
+ #endif
+ if (!module) {
+ if (!PyErr_ExceptionMatches(PyExc_ImportError))
+ goto bad;
+ PyErr_Clear();
+ }
+ }
+ level = 0;
+ }
+ #endif
+ if (!module) {
+ #if PY_VERSION_HEX < 0x03030000
+ PyObject *py_level = PyInt_FromLong(level);
+ if (!py_level)
+ goto bad;
+ module = PyObject_CallFunctionObjArgs(py_import,
+ name, global_dict, empty_dict, list, py_level, NULL);
+ Py_DECREF(py_level);
+ #else
+ module = PyImport_ImportModuleLevelObject(
+ name, global_dict, empty_dict, list, level);
+ #endif
+ }
+ }
+bad:
+ #if PY_VERSION_HEX < 0x03030000
+ Py_XDECREF(py_import);
+ #endif
+ Py_XDECREF(empty_list);
+ Py_XDECREF(empty_dict);
+ return module;
+}
+
+/* pyobject_as_double */
+ static double __Pyx__PyObject_AsDouble(PyObject* obj) {
+ PyObject* float_value;
+#if !CYTHON_USE_TYPE_SLOTS
+ float_value = PyNumber_Float(obj); if (0) goto bad;
+#else
+ PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
+ if (likely(nb) && likely(nb->nb_float)) {
+ float_value = nb->nb_float(obj);
+ if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
+ PyErr_Format(PyExc_TypeError,
+ "__float__ returned non-float (type %.200s)",
+ Py_TYPE(float_value)->tp_name);
+ Py_DECREF(float_value);
+ goto bad;
+ }
+ } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
+#if PY_MAJOR_VERSION >= 3
+ float_value = PyFloat_FromString(obj);
+#else
+ float_value = PyFloat_FromString(obj, 0);
+#endif
+ } else {
+ PyObject* args = PyTuple_New(1);
+ if (unlikely(!args)) goto bad;
+ PyTuple_SET_ITEM(args, 0, obj);
+ float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
+ PyTuple_SET_ITEM(args, 0, 0);
+ Py_DECREF(args);
+ }
+#endif
+ if (likely(float_value)) {
+ double value = PyFloat_AS_DOUBLE(float_value);
+ Py_DECREF(float_value);
+ return value;
+ }
+bad:
+ return (double)-1;
+}
+
+/* KeywordStringCheck */
+ static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
+ PyObject *kwdict,
+ const char* function_name,
+ int kw_allowed)
+{
+ PyObject* key = 0;
+ Py_ssize_t pos = 0;
+#if CYTHON_COMPILING_IN_PYPY
+ if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
+ goto invalid_keyword;
+ return 1;
+#else
+ while (PyDict_Next(kwdict, &pos, &key, 0)) {
+ #if PY_MAJOR_VERSION < 3
+ if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
+ #endif
+ if (unlikely(!PyUnicode_Check(key)))
+ goto invalid_keyword_type;
+ }
+ if ((!kw_allowed) && unlikely(key))
+ goto invalid_keyword;
+ return 1;
+invalid_keyword_type:
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() keywords must be strings", function_name);
+ return 0;
+#endif
+invalid_keyword:
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION < 3
+ "%.200s() got an unexpected keyword argument '%.200s'",
+ function_name, PyString_AsString(key));
+ #else
+ "%s() got an unexpected keyword argument '%U'",
+ function_name, key);
+ #endif
+ return 0;
+}
+
+/* UnpackUnboundCMethod */
+ static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
+ PyObject *method;
+ method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
+ if (unlikely(!method))
+ return -1;
+ target->method = method;
+#if CYTHON_COMPILING_IN_CPYTHON
+ #if PY_MAJOR_VERSION >= 3
+ if (likely(PyObject_TypeCheck(method, &PyMethodDescr_Type)))
+ #endif
+ {
+ PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
+ target->func = descr->d_method->ml_meth;
+ target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
+ }
+#endif
+ return 0;
+}
+
+/* CallUnboundCMethod0 */
+ static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
+ PyObject *args, *result = NULL;
+ if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
+#if CYTHON_ASSUME_SAFE_MACROS
+ args = PyTuple_New(1);
+ if (unlikely(!args)) goto bad;
+ Py_INCREF(self);
+ PyTuple_SET_ITEM(args, 0, self);
+#else
+ args = PyTuple_Pack(1, self);
+ if (unlikely(!args)) goto bad;
+#endif
+ result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
+ Py_DECREF(args);
+bad:
+ return result;
+}
+
+/* py_dict_items */
+ static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
+ if (PY_MAJOR_VERSION >= 3)
+ return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
+ else
+ return PyDict_Items(d);
+}
+
+/* ExtTypeTest */
+ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
+ if (unlikely(!type)) {
+ PyErr_SetString(PyExc_SystemError, "Missing type object");
+ return 0;
+ }
+ if (likely(PyObject_TypeCheck(obj, type)))
+ return 1;
+ PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
+ Py_TYPE(obj)->tp_name, type->tp_name);
+ return 0;
+}
+
+/* None */
+ static CYTHON_INLINE long __Pyx_mod_long(long a, long b) {
+ long r = a % b;
+ r += ((r != 0) & ((r ^ b) < 0)) * b;
+ return r;
+}
+
+/* None */
+ static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
+ long q = a / b;
+ long r = a - q*b;
+ q -= ((r != 0) & ((r ^ b) < 0));
+ return q;
+}
+
+/* SetVTable */
+ static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
+#if PY_VERSION_HEX >= 0x02070000
+ PyObject *ob = PyCapsule_New(vtable, 0, 0);
+#else
+ PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
+#endif
+ if (!ob)
+ goto bad;
+ if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
+ goto bad;
+ Py_DECREF(ob);
+ return 0;
+bad:
+ Py_XDECREF(ob);
+ return -1;
+}
+
+/* ImportFrom */
+ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
+ PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
+ if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_Format(PyExc_ImportError,
+ #if PY_MAJOR_VERSION < 3
+ "cannot import name %.230s", PyString_AS_STRING(name));
+ #else
+ "cannot import name %S", name);
+ #endif
+ }
+ return value;
+}
+
+/* FetchCommonType */
+ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
+ PyObject* fake_module;
+ PyTypeObject* cached_type = NULL;
+ fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
+ if (!fake_module) return NULL;
+ Py_INCREF(fake_module);
+ cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
+ if (cached_type) {
+ if (!PyType_Check((PyObject*)cached_type)) {
+ PyErr_Format(PyExc_TypeError,
+ "Shared Cython type %.200s is not a type object",
+ type->tp_name);
+ goto bad;
+ }
+ if (cached_type->tp_basicsize != type->tp_basicsize) {
+ PyErr_Format(PyExc_TypeError,
+ "Shared Cython type %.200s has the wrong size, try recompiling",
+ type->tp_name);
+ goto bad;
+ }
+ } else {
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
+ PyErr_Clear();
+ if (PyType_Ready(type) < 0) goto bad;
+ if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
+ goto bad;
+ Py_INCREF(type);
+ cached_type = type;
+ }
+done:
+ Py_DECREF(fake_module);
+ return cached_type;
+bad:
+ Py_XDECREF(cached_type);
+ cached_type = NULL;
+ goto done;
+}
+
+/* CythonFunction */
+ static PyObject *
+__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
+{
+ if (unlikely(op->func_doc == NULL)) {
+ if (op->func.m_ml->ml_doc) {
+#if PY_MAJOR_VERSION >= 3
+ op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
+#else
+ op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
+#endif
+ if (unlikely(op->func_doc == NULL))
+ return NULL;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ }
+ Py_INCREF(op->func_doc);
+ return op->func_doc;
+}
+static int
+__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp = op->func_doc;
+ if (value == NULL) {
+ value = Py_None;
+ }
+ Py_INCREF(value);
+ op->func_doc = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
+{
+ if (unlikely(op->func_name == NULL)) {
+#if PY_MAJOR_VERSION >= 3
+ op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
+#else
+ op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
+#endif
+ if (unlikely(op->func_name == NULL))
+ return NULL;
+ }
+ Py_INCREF(op->func_name);
+ return op->func_name;
+}
+static int
+__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+ if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+ if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+ PyErr_SetString(PyExc_TypeError,
+ "__name__ must be set to a string object");
+ return -1;
+ }
+ tmp = op->func_name;
+ Py_INCREF(value);
+ op->func_name = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
+{
+ Py_INCREF(op->func_qualname);
+ return op->func_qualname;
+}
+static int
+__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+ if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+ if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+ PyErr_SetString(PyExc_TypeError,
+ "__qualname__ must be set to a string object");
+ return -1;
+ }
+ tmp = op->func_qualname;
+ Py_INCREF(value);
+ op->func_qualname = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
+{
+ PyObject *self;
+ self = m->func_closure;
+ if (self == NULL)
+ self = Py_None;
+ Py_INCREF(self);
+ return self;
+}
+static PyObject *
+__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
+{
+ if (unlikely(op->func_dict == NULL)) {
+ op->func_dict = PyDict_New();
+ if (unlikely(op->func_dict == NULL))
+ return NULL;
+ }
+ Py_INCREF(op->func_dict);
+ return op->func_dict;
+}
+static int
+__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp;
+ if (unlikely(value == NULL)) {
+ PyErr_SetString(PyExc_TypeError,
+ "function's dictionary may not be deleted");
+ return -1;
+ }
+ if (unlikely(!PyDict_Check(value))) {
+ PyErr_SetString(PyExc_TypeError,
+ "setting function's dictionary to a non-dict");
+ return -1;
+ }
+ tmp = op->func_dict;
+ Py_INCREF(value);
+ op->func_dict = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
+{
+ Py_INCREF(op->func_globals);
+ return op->func_globals;
+}
+static PyObject *
+__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
+{
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+static PyObject *
+__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
+{
+ PyObject* result = (op->func_code) ? op->func_code : Py_None;
+ Py_INCREF(result);
+ return result;
+}
+static int
+__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
+ int result = 0;
+ PyObject *res = op->defaults_getter((PyObject *) op);
+ if (unlikely(!res))
+ return -1;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
+ Py_INCREF(op->defaults_tuple);
+ op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
+ Py_INCREF(op->defaults_kwdict);
+ #else
+ op->defaults_tuple = PySequence_ITEM(res, 0);
+ if (unlikely(!op->defaults_tuple)) result = -1;
+ else {
+ op->defaults_kwdict = PySequence_ITEM(res, 1);
+ if (unlikely(!op->defaults_kwdict)) result = -1;
+ }
+ #endif
+ Py_DECREF(res);
+ return result;
+}
+static int
+__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
+ PyObject* tmp;
+ if (!value) {
+ value = Py_None;
+ } else if (value != Py_None && !PyTuple_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__defaults__ must be set to a tuple object");
+ return -1;
+ }
+ Py_INCREF(value);
+ tmp = op->defaults_tuple;
+ op->defaults_tuple = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
+ PyObject* result = op->defaults_tuple;
+ if (unlikely(!result)) {
+ if (op->defaults_getter) {
+ if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+ result = op->defaults_tuple;
+ } else {
+ result = Py_None;
+ }
+ }
+ Py_INCREF(result);
+ return result;
+}
+static int
+__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
+ PyObject* tmp;
+ if (!value) {
+ value = Py_None;
+ } else if (value != Py_None && !PyDict_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__kwdefaults__ must be set to a dict object");
+ return -1;
+ }
+ Py_INCREF(value);
+ tmp = op->defaults_kwdict;
+ op->defaults_kwdict = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
+ PyObject* result = op->defaults_kwdict;
+ if (unlikely(!result)) {
+ if (op->defaults_getter) {
+ if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+ result = op->defaults_kwdict;
+ } else {
+ result = Py_None;
+ }
+ }
+ Py_INCREF(result);
+ return result;
+}
+static int
+__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
+ PyObject* tmp;
+ if (!value || value == Py_None) {
+ value = NULL;
+ } else if (!PyDict_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__annotations__ must be set to a dict object");
+ return -1;
+ }
+ Py_XINCREF(value);
+ tmp = op->func_annotations;
+ op->func_annotations = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
+ PyObject* result = op->func_annotations;
+ if (unlikely(!result)) {
+ result = PyDict_New();
+ if (unlikely(!result)) return NULL;
+ op->func_annotations = result;
+ }
+ Py_INCREF(result);
+ return result;
+}
+static PyGetSetDef __pyx_CyFunction_getsets[] = {
+ {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+ {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+ {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+ {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+ {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
+ {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
+ {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+ {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+ {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+ {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+ {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+ {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+ {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+ {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+ {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+ {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+ {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
+ {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+static PyMemberDef __pyx_CyFunction_members[] = {
+ {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
+ {0, 0, 0, 0, 0}
+};
+static PyObject *
+__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
+{
+#if PY_MAJOR_VERSION >= 3
+ return PyUnicode_FromString(m->func.m_ml->ml_name);
+#else
+ return PyString_FromString(m->func.m_ml->ml_name);
+#endif
+}
+static PyMethodDef __pyx_CyFunction_methods[] = {
+ {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
+ {0, 0, 0, 0}
+};
+#if PY_VERSION_HEX < 0x030500A0
+#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
+#else
+#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
+#endif
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
+ PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
+ __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
+ if (op == NULL)
+ return NULL;
+ op->flags = flags;
+ __Pyx_CyFunction_weakreflist(op) = NULL;
+ op->func.m_ml = ml;
+ op->func.m_self = (PyObject *) op;
+ Py_XINCREF(closure);
+ op->func_closure = closure;
+ Py_XINCREF(module);
+ op->func.m_module = module;
+ op->func_dict = NULL;
+ op->func_name = NULL;
+ Py_INCREF(qualname);
+ op->func_qualname = qualname;
+ op->func_doc = NULL;
+ op->func_classobj = NULL;
+ op->func_globals = globals;
+ Py_INCREF(op->func_globals);
+ Py_XINCREF(code);
+ op->func_code = code;
+ op->defaults_pyobjects = 0;
+ op->defaults = NULL;
+ op->defaults_tuple = NULL;
+ op->defaults_kwdict = NULL;
+ op->defaults_getter = NULL;
+ op->func_annotations = NULL;
+ PyObject_GC_Track(op);
+ return (PyObject *) op;
+}
+static int
+__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
+{
+ Py_CLEAR(m->func_closure);
+ Py_CLEAR(m->func.m_module);
+ Py_CLEAR(m->func_dict);
+ Py_CLEAR(m->func_name);
+ Py_CLEAR(m->func_qualname);
+ Py_CLEAR(m->func_doc);
+ Py_CLEAR(m->func_globals);
+ Py_CLEAR(m->func_code);
+ Py_CLEAR(m->func_classobj);
+ Py_CLEAR(m->defaults_tuple);
+ Py_CLEAR(m->defaults_kwdict);
+ Py_CLEAR(m->func_annotations);
+ if (m->defaults) {
+ PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+ int i;
+ for (i = 0; i < m->defaults_pyobjects; i++)
+ Py_XDECREF(pydefaults[i]);
+ PyObject_Free(m->defaults);
+ m->defaults = NULL;
+ }
+ return 0;
+}
+static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
+{
+ PyObject_GC_UnTrack(m);
+ if (__Pyx_CyFunction_weakreflist(m) != NULL)
+ PyObject_ClearWeakRefs((PyObject *) m);
+ __Pyx_CyFunction_clear(m);
+ PyObject_GC_Del(m);
+}
+static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
+{
+ Py_VISIT(m->func_closure);
+ Py_VISIT(m->func.m_module);
+ Py_VISIT(m->func_dict);
+ Py_VISIT(m->func_name);
+ Py_VISIT(m->func_qualname);
+ Py_VISIT(m->func_doc);
+ Py_VISIT(m->func_globals);
+ Py_VISIT(m->func_code);
+ Py_VISIT(m->func_classobj);
+ Py_VISIT(m->defaults_tuple);
+ Py_VISIT(m->defaults_kwdict);
+ if (m->defaults) {
+ PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+ int i;
+ for (i = 0; i < m->defaults_pyobjects; i++)
+ Py_VISIT(pydefaults[i]);
+ }
+ return 0;
+}
+static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
+{
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
+ Py_INCREF(func);
+ return func;
+ }
+ if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
+ if (type == NULL)
+ type = (PyObject *)(Py_TYPE(obj));
+ return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
+ }
+ if (obj == Py_None)
+ obj = NULL;
+ return __Pyx_PyMethod_New(func, obj, type);
+}
+static PyObject*
+__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
+{
+#if PY_MAJOR_VERSION >= 3
+ return PyUnicode_FromFormat("<cyfunction %U at %p>",
+ op->func_qualname, (void *)op);
+#else
+ return PyString_FromFormat("<cyfunction %s at %p>",
+ PyString_AsString(op->func_qualname), (void *)op);
+#endif
+}
+static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
+ PyCFunctionObject* f = (PyCFunctionObject*)func;
+ PyCFunction meth = f->m_ml->ml_meth;
+ Py_ssize_t size;
+ switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
+ case METH_VARARGS:
+ if (likely(kw == NULL || PyDict_Size(kw) == 0))
+ return (*meth)(self, arg);
+ break;
+ case METH_VARARGS | METH_KEYWORDS:
+ return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
+ case METH_NOARGS:
+ if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
+ size = PyTuple_GET_SIZE(arg);
+ if (likely(size == 0))
+ return (*meth)(self, NULL);
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
+ f->m_ml->ml_name, size);
+ return NULL;
+ }
+ break;
+ case METH_O:
+ if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
+ size = PyTuple_GET_SIZE(arg);
+ if (likely(size == 1)) {
+ PyObject *result, *arg0 = PySequence_ITEM(arg, 0);
+ if (unlikely(!arg0)) return NULL;
+ result = (*meth)(self, arg0);
+ Py_DECREF(arg0);
+ return result;
+ }
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
+ f->m_ml->ml_name, size);
+ return NULL;
+ }
+ break;
+ default:
+ PyErr_SetString(PyExc_SystemError, "Bad call flags in "
+ "__Pyx_CyFunction_Call. METH_OLDARGS is no "
+ "longer supported!");
+ return NULL;
+ }
+ PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
+ f->m_ml->ml_name);
+ return NULL;
+}
+static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+ return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
+}
+static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
+ PyObject *result;
+ __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
+ if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
+ Py_ssize_t argc;
+ PyObject *new_args;
+ PyObject *self;
+ argc = PyTuple_GET_SIZE(args);
+ new_args = PyTuple_GetSlice(args, 1, argc);
+ if (unlikely(!new_args))
+ return NULL;
+ self = PyTuple_GetItem(args, 0);
+ if (unlikely(!self)) {
+ Py_DECREF(new_args);
+ return NULL;
+ }
+ result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
+ Py_DECREF(new_args);
+ } else {
+ result = __Pyx_CyFunction_Call(func, args, kw);
+ }
+ return result;
+}
+static PyTypeObject __pyx_CyFunctionType_type = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "cython_function_or_method",
+ sizeof(__pyx_CyFunctionObject),
+ 0,
+ (destructor) __Pyx_CyFunction_dealloc,
+ 0,
+ 0,
+ 0,
+#if PY_MAJOR_VERSION < 3
+ 0,
+#else
+ 0,
+#endif
+ (reprfunc) __Pyx_CyFunction_repr,
+ 0,
+ 0,
+ 0,
+ 0,
+ __Pyx_CyFunction_CallAsMethod,
+ 0,
+ 0,
+ 0,
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
+ 0,
+ (traverseproc) __Pyx_CyFunction_traverse,
+ (inquiry) __Pyx_CyFunction_clear,
+ 0,
+#if PY_VERSION_HEX < 0x030500A0
+ offsetof(__pyx_CyFunctionObject, func_weakreflist),
+#else
+ offsetof(PyCFunctionObject, m_weakreflist),
+#endif
+ 0,
+ 0,
+ __pyx_CyFunction_methods,
+ __pyx_CyFunction_members,
+ __pyx_CyFunction_getsets,
+ 0,
+ 0,
+ __Pyx_CyFunction_descr_get,
+ 0,
+ offsetof(__pyx_CyFunctionObject, func_dict),
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+#if PY_VERSION_HEX >= 0x030400a1
+ 0,
+#endif
+};
+static int __pyx_CyFunction_init(void) {
+ __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
+ if (__pyx_CyFunctionType == NULL) {
+ return -1;
+ }
+ return 0;
+}
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->defaults = PyObject_Malloc(size);
+ if (!m->defaults)
+ return PyErr_NoMemory();
+ memset(m->defaults, 0, size);
+ m->defaults_pyobjects = pyobjects;
+ return m->defaults;
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->defaults_tuple = tuple;
+ Py_INCREF(tuple);
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->defaults_kwdict = dict;
+ Py_INCREF(dict);
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->func_annotations = dict;
+ Py_INCREF(dict);
+}
+
+/* CalculateMetaclass */
+ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
+ Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
+ for (i=0; i < nbases; i++) {
+ PyTypeObject *tmptype;
+ PyObject *tmp = PyTuple_GET_ITEM(bases, i);
+ tmptype = Py_TYPE(tmp);
+#if PY_MAJOR_VERSION < 3
+ if (tmptype == &PyClass_Type)
+ continue;
+#endif
+ if (!metaclass) {
+ metaclass = tmptype;
+ continue;
+ }
+ if (PyType_IsSubtype(metaclass, tmptype))
+ continue;
+ if (PyType_IsSubtype(tmptype, metaclass)) {
+ metaclass = tmptype;
+ continue;
+ }
+ PyErr_SetString(PyExc_TypeError,
+ "metaclass conflict: "
+ "the metaclass of a derived class "
+ "must be a (non-strict) subclass "
+ "of the metaclasses of all its bases");
+ return NULL;
+ }
+ if (!metaclass) {
+#if PY_MAJOR_VERSION < 3
+ metaclass = &PyClass_Type;
+#else
+ metaclass = &PyType_Type;
+#endif
+ }
+ Py_INCREF((PyObject*) metaclass);
+ return (PyObject*) metaclass;
+}
+
+/* Py3ClassCreate */
+ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
+ PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
+ PyObject *ns;
+ if (metaclass) {
+ PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
+ if (prep) {
+ PyObject *pargs = PyTuple_Pack(2, name, bases);
+ if (unlikely(!pargs)) {
+ Py_DECREF(prep);
+ return NULL;
+ }
+ ns = PyObject_Call(prep, pargs, mkw);
+ Py_DECREF(prep);
+ Py_DECREF(pargs);
+ } else {
+ if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
+ return NULL;
+ PyErr_Clear();
+ ns = PyDict_New();
+ }
+ } else {
+ ns = PyDict_New();
+ }
+ if (unlikely(!ns))
+ return NULL;
+ if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
+ if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
+ if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
+ return ns;
+bad:
+ Py_DECREF(ns);
+ return NULL;
+}
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
+ PyObject *dict, PyObject *mkw,
+ int calculate_metaclass, int allow_py2_metaclass) {
+ PyObject *result, *margs;
+ PyObject *owned_metaclass = NULL;
+ if (allow_py2_metaclass) {
+ owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
+ if (owned_metaclass) {
+ metaclass = owned_metaclass;
+ } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
+ PyErr_Clear();
+ } else {
+ return NULL;
+ }
+ }
+ if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
+ metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
+ Py_XDECREF(owned_metaclass);
+ if (unlikely(!metaclass))
+ return NULL;
+ owned_metaclass = metaclass;
+ }
+ margs = PyTuple_Pack(3, name, bases, dict);
+ if (unlikely(!margs)) {
+ result = NULL;
+ } else {
+ result = PyObject_Call(metaclass, margs, mkw);
+ Py_DECREF(margs);
+ }
+ Py_XDECREF(owned_metaclass);
+ return result;
+}
+
+/* CodeObjectCache */
+ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+ int start = 0, mid = 0, end = count - 1;
+ if (end >= 0 && code_line > entries[end].code_line) {
+ return count;
+ }
+ while (start < end) {
+ mid = start + (end - start) / 2;
+ if (code_line < entries[mid].code_line) {
+ end = mid;
+ } else if (code_line > entries[mid].code_line) {
+ start = mid + 1;
+ } else {
+ return mid;
+ }
+ }
+ if (code_line <= entries[mid].code_line) {
+ return mid;
+ } else {
+ return mid + 1;
+ }
+}
+static PyCodeObject *__pyx_find_code_object(int code_line) {
+ PyCodeObject* code_object;
+ int pos;
+ if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
+ return NULL;
+ }
+ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+ if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
+ return NULL;
+ }
+ code_object = __pyx_code_cache.entries[pos].code_object;
+ Py_INCREF(code_object);
+ return code_object;
+}
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
+ int pos, i;
+ __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
+ if (unlikely(!code_line)) {
+ return;
+ }
+ if (unlikely(!entries)) {
+ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
+ if (likely(entries)) {
+ __pyx_code_cache.entries = entries;
+ __pyx_code_cache.max_count = 64;
+ __pyx_code_cache.count = 1;
+ entries[0].code_line = code_line;
+ entries[0].code_object = code_object;
+ Py_INCREF(code_object);
+ }
+ return;
+ }
+ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+ if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
+ PyCodeObject* tmp = entries[pos].code_object;
+ entries[pos].code_object = code_object;
+ Py_DECREF(tmp);
+ return;
+ }
+ if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
+ int new_max = __pyx_code_cache.max_count + 64;
+ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
+ __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
+ if (unlikely(!entries)) {
+ return;
+ }
+ __pyx_code_cache.entries = entries;
+ __pyx_code_cache.max_count = new_max;
+ }
+ for (i=__pyx_code_cache.count; i>pos; i--) {
+ entries[i] = entries[i-1];
+ }
+ entries[pos].code_line = code_line;
+ entries[pos].code_object = code_object;
+ __pyx_code_cache.count++;
+ Py_INCREF(code_object);
+}
+
+/* AddTraceback */
+ #include "compile.h"
+#include "frameobject.h"
+#include "traceback.h"
+static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
+ const char *funcname, int c_line,
+ int py_line, const char *filename) {
+ PyCodeObject *py_code = 0;
+ PyObject *py_srcfile = 0;
+ PyObject *py_funcname = 0;
+ #if PY_MAJOR_VERSION < 3
+ py_srcfile = PyString_FromString(filename);
+ #else
+ py_srcfile = PyUnicode_FromString(filename);
+ #endif
+ if (!py_srcfile) goto bad;
+ if (c_line) {
+ #if PY_MAJOR_VERSION < 3
+ py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+ #else
+ py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+ #endif
+ }
+ else {
+ #if PY_MAJOR_VERSION < 3
+ py_funcname = PyString_FromString(funcname);
+ #else
+ py_funcname = PyUnicode_FromString(funcname);
+ #endif
+ }
+ if (!py_funcname) goto bad;
+ py_code = __Pyx_PyCode_New(
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ __pyx_empty_bytes, /*PyObject *code,*/
+ __pyx_empty_tuple, /*PyObject *consts,*/
+ __pyx_empty_tuple, /*PyObject *names,*/
+ __pyx_empty_tuple, /*PyObject *varnames,*/
+ __pyx_empty_tuple, /*PyObject *freevars,*/
+ __pyx_empty_tuple, /*PyObject *cellvars,*/
+ py_srcfile, /*PyObject *filename,*/
+ py_funcname, /*PyObject *name,*/
+ py_line,
+ __pyx_empty_bytes /*PyObject *lnotab*/
+ );
+ Py_DECREF(py_srcfile);
+ Py_DECREF(py_funcname);
+ return py_code;
+bad:
+ Py_XDECREF(py_srcfile);
+ Py_XDECREF(py_funcname);
+ return NULL;
+}
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename) {
+ PyCodeObject *py_code = 0;
+ PyFrameObject *py_frame = 0;
+ py_code = __pyx_find_code_object(c_line ? c_line : py_line);
+ if (!py_code) {
+ py_code = __Pyx_CreateCodeObjectForTraceback(
+ funcname, c_line, py_line, filename);
+ if (!py_code) goto bad;
+ __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
+ }
+ py_frame = PyFrame_New(
+ PyThreadState_GET(), /*PyThreadState *tstate,*/
+ py_code, /*PyCodeObject *code,*/
+ __pyx_d, /*PyObject *globals,*/
+ 0 /*PyObject *locals*/
+ );
+ if (!py_frame) goto bad;
+ __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
+ PyTraceBack_Here(py_frame);
+bad:
+ Py_XDECREF(py_code);
+ Py_XDECREF(py_frame);
+}
+
+/* CIntFromPyVerify */
+ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
+#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
+#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
+ {\
+ func_type value = func_value;\
+ if (sizeof(target_type) < sizeof(func_type)) {\
+ if (unlikely(value != (func_type) (target_type) value)) {\
+ func_type zero = 0;\
+ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
+ return (target_type) -1;\
+ if (is_unsigned && unlikely(value < zero))\
+ goto raise_neg_overflow;\
+ else\
+ goto raise_overflow;\
+ }\
+ }\
+ return (target_type) value;\
+ }
+
+/* CIntToPy */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+ const long neg_one = (long) -1, const_zero = (long) 0;
+ const int is_unsigned = neg_one > const_zero;
+ if (is_unsigned) {
+ if (sizeof(long) < sizeof(long)) {
+ return PyInt_FromLong((long) value);
+ } else if (sizeof(long) <= sizeof(unsigned long)) {
+ return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
+ }
+ } else {
+ if (sizeof(long) <= sizeof(long)) {
+ return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
+ return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
+ }
+ }
+ {
+ int one = 1; int little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&value;
+ return _PyLong_FromByteArray(bytes, sizeof(long),
+ little, !is_unsigned);
+ }
+}
+
+/* CIntToPy */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
+ const int neg_one = (int) -1, const_zero = (int) 0;
+ const int is_unsigned = neg_one > const_zero;
+ if (is_unsigned) {
+ if (sizeof(int) < sizeof(long)) {
+ return PyInt_FromLong((long) value);
+ } else if (sizeof(int) <= sizeof(unsigned long)) {
+ return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
+ }
+ } else {
+ if (sizeof(int) <= sizeof(long)) {
+ return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
+ return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
+ }
+ }
+ {
+ int one = 1; int little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&value;
+ return _PyLong_FromByteArray(bytes, sizeof(int),
+ little, !is_unsigned);
+ }
+}
+
+/* CIntFromPy */
+ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+ const int neg_one = (int) -1, const_zero = (int) 0;
+ const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+ if (sizeof(int) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
+ } else {
+ long val = PyInt_AS_LONG(x);
+ if (is_unsigned && unlikely(val < 0)) {
+ goto raise_neg_overflow;
+ }
+ return (int) val;
+ }
+ } else
+#endif
+ if (likely(PyLong_Check(x))) {
+ if (is_unsigned) {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (int) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
+ case 2:
+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
+ return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
+ return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
+ return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ }
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ if (unlikely(Py_SIZE(x) < 0)) {
+ goto raise_neg_overflow;
+ }
+#else
+ {
+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
+ if (unlikely(result < 0))
+ return (int) -1;
+ if (unlikely(result == 1))
+ goto raise_neg_overflow;
+ }
+#endif
+ if (sizeof(int) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
+ }
+ } else {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (int) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
+ case -2:
+ if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 2:
+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case -3:
+ if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case -4:
+ if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
+ return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ }
+#endif
+ if (sizeof(int) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
+ }
+ }
+ {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+ PyErr_SetString(PyExc_RuntimeError,
+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+ int val;
+ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+#endif
+ return (int) -1;
+ }
+ } else {
+ int val;
+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+ if (!tmp) return (int) -1;
+ val = __Pyx_PyInt_As_int(tmp);
+ Py_DECREF(tmp);
+ return val;
+ }
+raise_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "value too large to convert to int");
+ return (int) -1;
+raise_neg_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "can't convert negative value to int");
+ return (int) -1;
+}
+
+/* CIntFromPy */
+ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+ const long neg_one = (long) -1, const_zero = (long) 0;
+ const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+ if (sizeof(long) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
+ } else {
+ long val = PyInt_AS_LONG(x);
+ if (is_unsigned && unlikely(val < 0)) {
+ goto raise_neg_overflow;
+ }
+ return (long) val;
+ }
+ } else
+#endif
+ if (likely(PyLong_Check(x))) {
+ if (is_unsigned) {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (long) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
+ case 2:
+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
+ return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
+ return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
+ return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ }
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ if (unlikely(Py_SIZE(x) < 0)) {
+ goto raise_neg_overflow;
+ }
+#else
+ {
+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
+ if (unlikely(result < 0))
+ return (long) -1;
+ if (unlikely(result == 1))
+ goto raise_neg_overflow;
+ }
+#endif
+ if (sizeof(long) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
+ }
+ } else {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (long) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
+ case -2:
+ if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 2:
+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case -3:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case -4:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ }
+#endif
+ if (sizeof(long) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
+ }
+ }
+ {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+ PyErr_SetString(PyExc_RuntimeError,
+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+ long val;
+ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+#endif
+ return (long) -1;
+ }
+ } else {
+ long val;
+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+ if (!tmp) return (long) -1;
+ val = __Pyx_PyInt_As_long(tmp);
+ Py_DECREF(tmp);
+ return val;
+ }
+raise_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "value too large to convert to long");
+ return (long) -1;
+raise_neg_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "can't convert negative value to long");
+ return (long) -1;
+}
+
+/* CheckBinaryVersion */
+ static int __Pyx_check_binary_version(void) {
+ char ctversion[4], rtversion[4];
+ PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
+ PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
+ if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
+ char message[200];
+ PyOS_snprintf(message, sizeof(message),
+ "compiletime version %s of module '%.100s' "
+ "does not match runtime version %s",
+ ctversion, __Pyx_MODULE_NAME, rtversion);
+ return PyErr_WarnEx(NULL, message, 1);
+ }
+ return 0;
+}
+
+/* ModuleImport */
+ #ifndef __PYX_HAVE_RT_ImportModule
+#define __PYX_HAVE_RT_ImportModule
+static PyObject *__Pyx_ImportModule(const char *name) {
+ PyObject *py_name = 0;
+ PyObject *py_module = 0;
+ py_name = __Pyx_PyIdentifier_FromString(name);
+ if (!py_name)
+ goto bad;
+ py_module = PyImport_Import(py_name);
+ Py_DECREF(py_name);
+ return py_module;
+bad:
+ Py_XDECREF(py_name);
+ return 0;
+}
+#endif
+
+/* TypeImport */
+ #ifndef __PYX_HAVE_RT_ImportType
+#define __PYX_HAVE_RT_ImportType
+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
+ size_t size, int strict)
+{
+ PyObject *py_module = 0;
+ PyObject *result = 0;
+ PyObject *py_name = 0;
+ char warning[200];
+ Py_ssize_t basicsize;
+#ifdef Py_LIMITED_API
+ PyObject *py_basicsize;
+#endif
+ py_module = __Pyx_ImportModule(module_name);
+ if (!py_module)
+ goto bad;
+ py_name = __Pyx_PyIdentifier_FromString(class_name);
+ if (!py_name)
+ goto bad;
+ result = PyObject_GetAttr(py_module, py_name);
+ Py_DECREF(py_name);
+ py_name = 0;
+ Py_DECREF(py_module);
+ py_module = 0;
+ if (!result)
+ goto bad;
+ if (!PyType_Check(result)) {
+ PyErr_Format(PyExc_TypeError,
+ "%.200s.%.200s is not a type object",
+ module_name, class_name);
+ goto bad;
+ }
+#ifndef Py_LIMITED_API
+ basicsize = ((PyTypeObject *)result)->tp_basicsize;
+#else
+ py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
+ if (!py_basicsize)
+ goto bad;
+ basicsize = PyLong_AsSsize_t(py_basicsize);
+ Py_DECREF(py_basicsize);
+ py_basicsize = 0;
+ if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
+ goto bad;
+#endif
+ if (!strict && (size_t)basicsize > size) {
+ PyOS_snprintf(warning, sizeof(warning),
+ "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd",
+ module_name, class_name, basicsize, size);
+ if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
+ }
+ else if ((size_t)basicsize != size) {
+ PyErr_Format(PyExc_ValueError,
+ "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd",
+ module_name, class_name, basicsize, size);
+ goto bad;
+ }
+ return (PyTypeObject *)result;
+bad:
+ Py_XDECREF(py_module);
+ Py_XDECREF(result);
+ return NULL;
+}
+#endif
+
+/* InitStrings */
+ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
+ while (t->p) {
+ #if PY_MAJOR_VERSION < 3
+ if (t->is_unicode) {
+ *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
+ } else if (t->intern) {
+ *t->p = PyString_InternFromString(t->s);
+ } else {
+ *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
+ }
+ #else
+ if (t->is_unicode | t->is_str) {
+ if (t->intern) {
+ *t->p = PyUnicode_InternFromString(t->s);
+ } else if (t->encoding) {
+ *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
+ } else {
+ *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+ }
+ } else {
+ *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
+ }
+ #endif
+ if (!*t->p)
+ return -1;
+ ++t;
+ }
+ return 0;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
+ return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
+ Py_ssize_t ignore;
+ return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+ if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+ PyUnicode_Check(o)) {
+#if PY_VERSION_HEX < 0x03030000
+ char* defenc_c;
+ PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+ if (!defenc) return NULL;
+ defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ {
+ char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+ char* c;
+ for (c = defenc_c; c < end; c++) {
+ if ((unsigned char) (*c) >= 128) {
+ PyUnicode_AsASCIIString(o);
+ return NULL;
+ }
+ }
+ }
+#endif
+ *length = PyBytes_GET_SIZE(defenc);
+ return defenc_c;
+#else
+ if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ if (PyUnicode_IS_ASCII(o)) {
+ *length = PyUnicode_GET_LENGTH(o);
+ return PyUnicode_AsUTF8(o);
+ } else {
+ PyUnicode_AsASCIIString(o);
+ return NULL;
+ }
+#else
+ return PyUnicode_AsUTF8AndSize(o, length);
+#endif
+#endif
+ } else
+#endif
+#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
+ if (PyByteArray_Check(o)) {
+ *length = PyByteArray_GET_SIZE(o);
+ return PyByteArray_AS_STRING(o);
+ } else
+#endif
+ {
+ char* result;
+ int r = PyBytes_AsStringAndSize(o, &result, length);
+ if (unlikely(r < 0)) {
+ return NULL;
+ } else {
+ return result;
+ }
+ }
+}
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+ int is_true = x == Py_True;
+ if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
+ else return PyObject_IsTrue(x);
+}
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
+#if CYTHON_USE_TYPE_SLOTS
+ PyNumberMethods *m;
+#endif
+ const char *name = NULL;
+ PyObject *res = NULL;
+#if PY_MAJOR_VERSION < 3
+ if (PyInt_Check(x) || PyLong_Check(x))
+#else
+ if (PyLong_Check(x))
+#endif
+ return __Pyx_NewRef(x);
+#if CYTHON_USE_TYPE_SLOTS
+ m = Py_TYPE(x)->tp_as_number;
+ #if PY_MAJOR_VERSION < 3
+ if (m && m->nb_int) {
+ name = "int";
+ res = PyNumber_Int(x);
+ }
+ else if (m && m->nb_long) {
+ name = "long";
+ res = PyNumber_Long(x);
+ }
+ #else
+ if (m && m->nb_int) {
+ name = "int";
+ res = PyNumber_Long(x);
+ }
+ #endif
+#else
+ res = PyNumber_Int(x);
+#endif
+ if (res) {
+#if PY_MAJOR_VERSION < 3
+ if (!PyInt_Check(res) && !PyLong_Check(res)) {
+#else
+ if (!PyLong_Check(res)) {
+#endif
+ PyErr_Format(PyExc_TypeError,
+ "__%.4s__ returned non-%.4s (type %.200s)",
+ name, name, Py_TYPE(res)->tp_name);
+ Py_DECREF(res);
+ return NULL;
+ }
+ }
+ else if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_TypeError,
+ "an integer is required");
+ }
+ return res;
+}
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+ Py_ssize_t ival;
+ PyObject *x;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(b))) {
+ if (sizeof(Py_ssize_t) >= sizeof(long))
+ return PyInt_AS_LONG(b);
+ else
+ return PyInt_AsSsize_t(x);
+ }
+#endif
+ if (likely(PyLong_CheckExact(b))) {
+ #if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)b)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(b);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ ival = likely(size) ? digits[0] : 0;
+ if (size == -1) ival = -ival;
+ return ival;
+ } else {
+ switch (size) {
+ case 2:
+ if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -2:
+ if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case 3:
+ if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -3:
+ if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case 4:
+ if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -4:
+ if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ }
+ }
+ #endif
+ return PyLong_AsSsize_t(b);
+ }
+ x = PyNumber_Index(b);
+ if (!x) return -1;
+ ival = PyInt_AsSsize_t(x);
+ Py_DECREF(x);
+ return ival;
+}
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+ return PyInt_FromSize_t(ival);
+}
+
+
+#endif /* Py_PYTHON_H */
diff --git a/netcdftime/netcdftime.py b/netcdftime/_netcdftime.pyx
similarity index 63%
rename from netcdftime/netcdftime.py
rename to netcdftime/_netcdftime.pyx
index 686be4e..2bc1dcf 100644
--- a/netcdftime/netcdftime.py
+++ b/netcdftime/_netcdftime.pyx
@@ -1,18 +1,23 @@
"""
Performs conversions of netCDF time coordinate data to/from datetime objects.
"""
+
+from cpython.object cimport PyObject_RichCompare
+
import numpy as np
import math
import numpy
import re
+
from datetime import datetime as real_datetime
+from datetime import timedelta
+import time # strftime
+
try:
from itertools import izip as zip
except ImportError: # python 3.x
pass
-from ._datetime import datetime
-
microsec_units = ['microseconds','microsecond', 'microsec', 'microsecs']
millisec_units = ['milliseconds', 'millisecond', 'millisec', 'millisecs']
sec_units = ['second', 'seconds', 'sec', 'secs', 's']
@@ -37,7 +42,7 @@ def JulianDayFromDate(date, calendar='standard'):
"""
creates a Julian Day from a 'datetime-like' object. Returns the fractional
- Julian Day (resolution approx 0.1 second).
+ Julian Day (approximately millisecond accuracy).
if calendar='standard' or 'gregorian' (default), Julian day follows Julian
Calendar on and before 1582-10-5, Gregorian calendar after 1582-10-15.
@@ -78,6 +83,9 @@ def JulianDayFromDate(date, calendar='standard'):
minute[i] = d.minute
second[i] = d.second
microsecond[i] = d.microsecond
+ # convert years in BC era to astronomical years (so that 1 BC is year zero)
+ # (fixes issue #596)
+ year[year < 0] = year[year < 0] + 1
# Convert time to fractions of a day
day = day + hour / 24.0 + minute / 1440.0 + (second + microsecond/1.e6) / 86400.0
@@ -142,11 +150,11 @@ def JulianDayFromDate(date, calendar='standard'):
return jd
-def _NoLeapDayFromDate(date):
+cdef _NoLeapDayFromDate(date):
"""
creates a Julian Day for a calendar with no leap years from a datetime
-instance. Returns the fractional Julian Day (resolution approx 0.1 second).
+instance. Returns the fractional Julian Day (approximately millisecond accuracy).
"""
@@ -171,12 +179,12 @@ instance. Returns the fractional Julian Day (resolution approx 0.1 second).
return jd
-def _AllLeapFromDate(date):
+cdef _AllLeapFromDate(date):
"""
creates a Julian Day for a calendar where all years have 366 days from
a 'datetime-like' object.
-Returns the fractional Julian Day (resolution approx 0.1 second).
+Returns the fractional Julian Day (approximately millisecond accuracy).
"""
@@ -201,12 +209,12 @@ Returns the fractional Julian Day (resolution approx 0.1 second).
return jd
-def _360DayFromDate(date):
+cdef _360DayFromDate(date):
"""
-creates a Julian Day for a calendar where all months have 30 daysfrom
+creates a Julian Day for a calendar where all months have 30 days from
a 'datetime-like' object.
-Returns the fractional Julian Day (resolution approx 0.1 second).
+Returns the fractional Julian Day (approximately millisecond accuracy).
"""
@@ -229,7 +237,7 @@ def DateFromJulianDay(JD, calendar='standard'):
"""
returns a 'datetime-like' object given Julian Day. Julian Day is a
- fractional day with a resolution of approximately 0.1 seconds.
+ fractional day with approximately millisecond accuracy.
if calendar='standard' or 'gregorian' (default), Julian day follows Julian
Calendar on and before 1582-10-5, Gregorian calendar after 1582-10-15.
@@ -357,43 +365,52 @@ def DateFromJulianDay(JD, calendar='standard'):
JD[0]
except:
isscalar = True
- # return a 'real' datetime instance if calendar is gregorian.
- if calendar in 'proleptic_gregorian' or \
- (calendar in ['standard', 'gregorian'] and len(ind_before) == 0):
- if not isscalar:
- return np.array([real_datetime(*args)
- for args in
- zip(year, month, day, hour, minute, second,
- microsecond)])
+ if calendar in 'proleptic_gregorian':
+ # FIXME: datetime.datetime does not support years < 1
+ if (year < 0).any():
+ datetime_type = DatetimeProlepticGregorian
else:
- return real_datetime(year[0], month[0], day[0], hour[0],
- minute[0], second[0], microsecond[0])
- else:
- # or else, return a 'datetime-like' instance.
- if not isscalar:
- return np.array([datetime(*args)
- for args in
- zip(year, month, day, hour, minute,
- second, microsecond, dayofwk, dayofyr)])
+ datetime_type = real_datetime
+ elif calendar in ('standard', 'gregorian'):
+ # return a 'real' datetime instance if calendar is proleptic
+ # Gregorian or Gregorian and all dates are after the
+ # Julian/Gregorian transition
+ if len(ind_before) == 0:
+ datetime_type = real_datetime
else:
- return datetime(year[0], month[0], day[0], hour[0],
- minute[0], second[0], microsecond[0], dayofwk[0],
- dayofyr[0])
+ datetime_type = DatetimeGregorian
+ elif calendar == "julian":
+ datetime_type = DatetimeJulian
+ else:
+ raise ValueError("unsupported calendar: {0}".format(calendar))
+
+ if not isscalar:
+ return np.array([datetime_type(*args)
+ for args in
+ zip(year, month, day, hour, minute, second,
+ microsecond)])
+
+ else:
+ return datetime_type(year[0], month[0], day[0], hour[0],
+ minute[0], second[0], microsecond[0])
-def _DateFromNoLeapDay(JD):
+cdef _DateFromNoLeapDay(JD):
"""
returns a 'datetime-like' object given Julian Day for a calendar with no leap
-days. Julian Day is a fractional day with a resolution of approximately 0.1 seconds.
+days. Julian Day is a fractional day with approximately millisecond accuracy.
"""
# based on redate.py by David Finlayson.
if JD < 0:
- raise ValueError('Julian Day must be positive')
+ year_offset = int(-JD) // 365 + 1
+ JD += year_offset * 365
+ else:
+ year_offset = 0
dayofwk = int(math.fmod(int(JD + 1.5), 7))
(F, Z) = math.modf(JD + 0.5)
@@ -428,16 +445,26 @@ days. Julian Day is a fractional day with a resolution of approximately 0.1 seco
(sfrac, seconds) = math.modf(mfrac * 60.0)
microseconds = sfrac*1.e6
- return datetime(year, month, int(days), int(hours), int(minutes),
- int(seconds), int(microseconds),dayofwk, dayofyr)
+ if year_offset > 0:
+ # correct dayofwk
+
+ # 365 mod 7 = 1, so the day of the week changes by one day for
+ # every year in year_offset
+ dayofwk -= int(math.fmod(year_offset, 7))
+
+ if dayofwk < 0:
+ dayofwk += 7
+ return DatetimeNoLeap(year - year_offset, month, int(days), int(hours), int(minutes),
+ int(seconds), int(microseconds),dayofwk, dayofyr)
-def _DateFromAllLeap(JD):
+
+cdef _DateFromAllLeap(JD):
"""
returns a 'datetime-like' object given Julian Day for a calendar where all
years have 366 days.
-Julian Day is a fractional day with a resolution of approximately 0.1 seconds.
+Julian Day is a fractional day with approximately millisecond accuracy.
"""
@@ -481,21 +508,24 @@ Julian Day is a fractional day with a resolution of approximately 0.1 seconds.
(sfrac, seconds) = math.modf(mfrac * 60.0)
microseconds = sfrac*1.e6
- return datetime(year, month, int(days), int(hours), int(minutes),
- int(seconds), int(microseconds),dayofwk, dayofyr)
+ return DatetimeAllLeap(year, month, int(days), int(hours), int(minutes),
+ int(seconds), int(microseconds),dayofwk, dayofyr)
-def _DateFrom360Day(JD):
+cdef _DateFrom360Day(JD):
"""
returns a 'datetime-like' object given Julian Day for a calendar where all
months have 30 days.
-Julian Day is a fractional day with a resolution of approximately 0.1 seconds.
+Julian Day is a fractional day with approximately millisecond accuracy.
"""
if JD < 0:
- raise ValueError('Julian Day must be positive')
+ year_offset = int(-JD) // 360 + 1
+ JD += year_offset * 360
+ else:
+ year_offset = 0
#jd = int(360. * (year + 4716)) + int(30. * (month - 1)) + day
(F, Z) = math.modf(JD)
@@ -511,11 +541,11 @@ Julian Day is a fractional day with a resolution of approximately 0.1 seconds.
(sfrac, seconds) = math.modf(mfrac * 60.0)
microseconds = sfrac*1.e6
- return datetime(year, month, int(days), int(hours), int(minutes),
- int(seconds), int(microseconds), -1, dayofyr)
+ return Datetime360Day(year - year_offset, month, int(days), int(hours), int(minutes),
+ int(seconds), int(microseconds), -1, dayofyr)
-def _dateparse(timestr):
+cdef _dateparse(timestr):
"""parse a string of the form time-units since yyyy-mm-dd hh:mm:ss
return a tuple (units,utc_offset, datetimeinstance)"""
timestr_split = timestr.split()
@@ -601,18 +631,18 @@ Example usage:
>>> cdftime = utime('hours since 0001-01-01 00:00:00')
>>> date = datetime.now()
>>> print date
-2006-03-17 16:04:02.561678
+2016-10-05 08:46:27.245015
>>>
>>> t = cdftime.date2num(date)
>>> print t
-17577328.0672
+17669840.7742
>>>
>>> date = cdftime.num2date(t)
>>> print date
-2006-03-17 16:04:02
+2016-10-05 08:46:27.244996
>>>
-The resolution of the transformation operation is approximately 0.1 seconds.
+The resolution of the transformation operation is approximately a millisecond.
Warning: Dates between 1582-10-5 and 1582-10-15 do not exist in the
C{'standard'} or C{'gregorian'} calendars. An exception will be raised if you pass
@@ -710,7 +740,7 @@ units to datetime objects.
If there is a time-zone offset implied by L{unit_string}, it will
be applied to the returned numeric values.
- Resolution is approximately 0.1 seconds.
+ Resolution is approximately a millisecond.
If C{calendar = 'standard'} or C{'gregorian'} (indicating
that the mixed Julian/Gregorian calendar is to be used), an
@@ -795,7 +825,7 @@ units to datetime objects.
dates are in UTC with no offset, even if L{unit_string} contains
a time zone offset from UTC.
- Resolution is approximately 0.1 seconds.
+ Resolution is approximately a millisecond.
Works for scalars, sequences and numpy arrays.
Returns a scalar if input is a scalar, else returns a numpy array.
@@ -874,7 +904,7 @@ units to datetime objects.
return numpy.reshape(numpy.array(date), shape)
-def _parse_timezone(tzstring):
+cdef _parse_timezone(tzstring):
"""Parses ISO 8601 time zone specs into tzinfo offsets
Adapted from pyiso8601 (http://code.google.com/p/pyiso8601/)
@@ -882,7 +912,7 @@ def _parse_timezone(tzstring):
if tzstring == "Z":
return 0
# This isn't strictly correct, but it's common to encounter dates without
- # timezones so I'll assume the default (which defaults to UTC).
+ # time zones so I'll assume the default (which defaults to UTC).
if tzstring is None:
return 0
m = TIMEZONE_REGEX.match(tzstring)
@@ -894,7 +924,7 @@ def _parse_timezone(tzstring):
return minutes + hours * 60.
-def _parse_date(datestring):
+cpdef _parse_date(datestring):
"""Parses ISO 8601 dates into datetime objects
The timezone is parsed from the date string, assuming UTC
@@ -924,7 +954,7 @@ def _parse_date(datestring):
int(groups["hour"]), int(groups["minute"]), int(groups["second"]),\
tzoffset_mins
-def _check_index(indices, times, nctime, calendar, select):
+cdef _check_index(indices, times, nctime, calendar, select):
"""Return True if the time indices given correspond to the given times,
False otherwise.
@@ -1013,7 +1043,7 @@ def date2index(dates, nctime, calendar=None, select='exact'):
matching the dates given. C{before} and C{after} will return the indices
corresponding to the dates just before or just after the given dates if
an exact match cannot be found. C{nearest} will return the indices that
- correpond to the closest dates.
+ correspond to the closest dates.
"""
try:
nctime.units
@@ -1051,7 +1081,7 @@ def time2index(times, nctime, calendar=None, select='exact'):
matching the times given. C{before} and C{after} will return the indices
corresponding to the times just before or just after the given times if
an exact match cannot be found. C{nearest} will return the indices that
- correpond to the closest times.
+ correspond to the closest times.
"""
try:
nctime.units
@@ -1135,8 +1165,529 @@ def time2index(times, nctime, calendar=None, select='exact'):
return _toscalar(index)
-def _toscalar(a):
+cdef _toscalar(a):
if a.shape in [(), (1,)]:
return a.item()
else:
return a
+
+cdef to_tuple(dt):
+ """Turn a datetime.datetime instance into a tuple of integers. Elements go
+ in the order of decreasing significance, making it easy to compare
+ datetime instances. Parts of the state that don't affect ordering
+ are omitted. Compare to datetime.timetuple()."""
+ return (dt.year, dt.month, dt.day, dt.hour, dt.minute,
+ dt.second, dt.microsecond)
+
+# a cache of converters (utime instances) for different calendars
+cdef dict _converters
+_converters = {}
+for calendar in _calendars:
+ _converters[calendar] = utime("seconds since 1-1-1", calendar)
+
+cdef class datetime(object):
+ """
+The base class implementing most methods of datetime classes that
+mimic datetime.datetime but support calendars other than the proleptic
+Gregorial calendar.
+ """
+ cdef readonly int year, month, day, hour, minute, dayofwk, dayofyr
+ cdef readonly int second, microsecond
+ cdef readonly str calendar
+
+ # Python's datetime.datetime uses the proleptic Gregorian
+ # calendar. This boolean is used to decide whether a
+ # netcdftime.datetime instance can be converted to
+ # datetime.datetime.
+ cdef readonly bint datetime_compatible
+
+ def __init__(self, int year, int month, int day, int hour=0, int minute=0, int second=0,
+ int microsecond=0, int dayofwk=-1, int dayofyr=1):
+ """dayofyr set to 1 by default - otherwise time.strftime will complain"""
+
+ self.year = year
+ self.month = month
+ self.day = day
+ self.hour = hour
+ self.minute = minute
+ self.dayofwk = dayofwk
+ self.dayofyr = dayofyr
+ self.second = second
+ self.microsecond = microsecond
+ self.calendar = ""
+
+ self.datetime_compatible = True
+
+ @property
+ def format(self):
+ return '%Y-%m-%d %H:%M:%S'
+
+ def strftime(self, format=None):
+ if format is None:
+ format = self.format
+ return _strftime(self, format)
+
+ def replace(self, **kwargs):
+ "Return datetime with new specified fields."
+ args = {"year": self.year,
+ "month": self.month,
+ "day": self.day,
+ "hour": self.hour,
+ "minute": self.minute,
+ "second": self.second,
+ "microsecond": self.microsecond,
+ "dayofwk": self.dayofwk,
+ "dayofyr": self.dayofyr}
+
+ for name, value in kwargs.items():
+ args[name] = value
+
+ return self.__class__(**args)
+
+ def timetuple(self):
+ return (self.year, self.month, self.day, self.hour,
+ self.minute, self.second, self.dayofwk, self.dayofyr, -1)
+
+ cpdef _to_real_datetime(self):
+ return real_datetime(self.year, self.month, self.day,
+ self.hour, self.minute, self.second,
+ self.microsecond)
+
+ def __repr__(self):
+ return "{0}.{1}{2}".format(self.__class__.__module__,
+ self.__class__.__name__,
+ self._getstate())
+
+ def __str__(self):
+ return self.strftime(self.format)
+
+ def __hash__(self):
+ try:
+ d = self._to_real_datetime()
+ except ValueError:
+ return hash(self.timetuple())
+ return hash(d)
+
+ cdef to_tuple(self):
+ return (self.year, self.month, self.day, self.hour, self.minute,
+ self.second, self.microsecond)
+
+ def __richcmp__(self, other, int op):
+ cdef datetime dt, dt_other
+ dt = self
+ if isinstance(other, datetime):
+ dt_other = other
+ # comparing two datetime instances
+ if dt.calendar == dt_other.calendar:
+ return PyObject_RichCompare(dt.to_tuple(), dt_other.to_tuple(), op)
+ else:
+ # Note: it *is* possible to compare datetime
+ # instances that use difference calendars by using
+ # utime.date2num(), but this implementation does
+ # not attempt it.
+ raise TypeError("cannot compare {0!r} and {1!r} (different calendars)".format(dt, dt_other))
+ elif isinstance(other, real_datetime):
+ # comparing datetime and real_datetime
+ if not dt.datetime_compatible:
+ raise TypeError("cannot compare {0!r} and {1!r} (different calendars)".format(self, other))
+ return PyObject_RichCompare(dt.to_tuple(), to_tuple(other), op)
+ else:
+ raise TypeError("cannot compare {0!r} and {1!r}".format(self, other))
+
+ cdef _getstate(self):
+ return (self.year, self.month, self.day, self.hour,
+ self.minute, self.second, self.microsecond,
+ self.dayofwk, self.dayofyr)
+
+ def __reduce__(self):
+ """special method that allows instance to be pickled"""
+ return (self.__class__, self._getstate())
+
+ cdef _add_timedelta(self, other):
+ return NotImplemented
+
+ def __add__(self, other):
+ cdef datetime dt
+ if isinstance(self, datetime) and isinstance(other, timedelta):
+ dt = self
+ delta = other
+ elif isinstance(self, timedelta) and isinstance(other, datetime):
+ dt = other
+ delta = self
+ else:
+ return NotImplemented
+ return dt._add_timedelta(delta)
+
+ def __sub__(self, other):
+ cdef datetime dt
+ if isinstance(self, datetime): # left arg is a datetime instance
+ dt = self
+ if isinstance(other, datetime):
+ # datetime - datetime
+ if dt.calendar != other.calendar:
+ raise ValueError("cannot compute the time difference between dates with different calendars")
+ if dt.calendar == "":
+ raise ValueError("cannot compute the time difference between dates that are not calendar-aware")
+ converter = _converters[dt.calendar]
+ return timedelta(seconds=converter.date2num(dt) - converter.date2num(other))
+ elif isinstance(other, real_datetime):
+ # datetime - real_datetime
+ if not dt.datetime_compatible:
+ raise ValueError("cannot compute the time difference between dates with different calendars")
+ return dt._to_real_datetime() - other
+ elif isinstance(other, timedelta):
+ # datetime - timedelta
+ return dt._add_timedelta(-other)
+ else:
+ return NotImplemented
+ else:
+ if isinstance(self, real_datetime):
+ # real_datetime - datetime
+ if not other.datetime_compatible:
+ raise ValueError("cannot compute the time difference between dates with different calendars")
+ return self - other._to_real_datetime()
+ else:
+ return NotImplemented
+
+cdef class DatetimeNoLeap(datetime):
+ """
+Phony datetime object which mimics the python datetime object,
+but uses the "noleap" ("365_day") calendar.
+ """
+ def __init__(self, *args, **kwargs):
+ datetime.__init__(self, *args, **kwargs)
+ self.calendar = "noleap"
+ self.datetime_compatible = False
+
+ cdef _add_timedelta(self, delta):
+ return DatetimeNoLeap(*add_timedelta(self, delta, no_leap, False))
+
+cdef class DatetimeAllLeap(datetime):
+ """
+Phony datetime object which mimics the python datetime object,
+but uses the "all_leap" ("366_day") calendar.
+ """
+ def __init__(self, *args, **kwargs):
+ datetime.__init__(self, *args, **kwargs)
+ self.calendar = "all_leap"
+ self.datetime_compatible = False
+
+ cdef _add_timedelta(self, delta):
+ return DatetimeAllLeap(*add_timedelta(self, delta, all_leap, False))
+
+cdef class Datetime360Day(datetime):
+ """
+Phony datetime object which mimics the python datetime object,
+but uses the "360_day" calendar.
+ """
+ def __init__(self, *args, **kwargs):
+ datetime.__init__(self, *args, **kwargs)
+ self.calendar = "360_day"
+ self.datetime_compatible = False
+
+ cdef _add_timedelta(self, delta):
+ return Datetime360Day(*add_timedelta_360_day(self, delta))
+
+cdef class DatetimeJulian(datetime):
+ """
+Phony datetime object which mimics the python datetime object,
+but uses the "julian" calendar.
+ """
+ def __init__(self, *args, **kwargs):
+ datetime.__init__(self, *args, **kwargs)
+ self.calendar = "julian"
+ self.datetime_compatible = False
+
+ cdef _add_timedelta(self, delta):
+ return DatetimeJulian(*add_timedelta(self, delta, is_leap_julian, False))
+
+cdef class DatetimeGregorian(datetime):
+ """
+Phony datetime object which mimics the python datetime object,
+but uses the mixed Julian-Gregorian ("standard", "gregorian") calendar.
+
+The last date of the Julian calendar is 1582-10-4, which is followed
+by 1582-10-15, using the Gregorian calendar.
+
+Instances using the date after 1582-10-15 can be compared to
+datetime.datetime instances and used to compute time differences
+(datetime.timedelta) by subtracting a DatetimeGregorian instance from
+a datetime.datetime instance or vice versa.
+ """
+ def __init__(self, *args, **kwargs):
+ datetime.__init__(self, *args, **kwargs)
+ self.calendar = "gregorian"
+
+ # dates after 1582-10-15 can be converted to and compared to
+ # proleptic Gregorian dates
+ if self.to_tuple() >= (1582, 10, 15, 0, 0, 0, 0):
+ self.datetime_compatible = True
+ else:
+ self.datetime_compatible = False
+
+ cdef _add_timedelta(self, delta):
+ return DatetimeGregorian(*add_timedelta(self, delta, is_leap_gregorian, True))
+
+cdef class DatetimeProlepticGregorian(datetime):
+ """
+Phony datetime object which mimics the python datetime object,
+but allows for dates that don't exist in the proleptic gregorian calendar.
+
+Supports timedelta operations by overloading + and -.
+
+Has strftime, timetuple, replace, __repr__, and __str__ methods. The
+format of the string produced by __str__ is controlled by self.format
+(default %Y-%m-%d %H:%M:%S). Supports comparisons with other phony
+datetime instances using the same calendar; comparison with
+datetime.datetime instances is possible for netcdftime.datetime
+instances using 'gregorian' and 'proleptic_gregorian' calendars.
+
+Instance variables are year,month,day,hour,minute,second,microsecond,dayofwk,dayofyr,
+format, and calendar.
+ """
+ def __init__(self, *args, **kwargs):
+ datetime.__init__(self, *args, **kwargs)
+ self.calendar = "proleptic_gregorian"
+ self.datetime_compatible = True
+
+ cdef _add_timedelta(self, delta):
+ return DatetimeProlepticGregorian(*add_timedelta(self, delta,
+ is_leap_proleptic_gregorian, False))
+
+_illegal_s = re.compile(r"((^|[^%])(%%)*%s)")
+
+
+cdef _findall(text, substr):
+ # Also finds overlaps
+ sites = []
+ i = 0
+ while 1:
+ j = text.find(substr, i)
+ if j == -1:
+ break
+ sites.append(j)
+ i = j + 1
+ return sites
+
+# Every 28 years the calendar repeats, except through century leap
+# years where it's 6 years. But only if you're using the Gregorian
+# calendar. ;)
+
+
+cdef _strftime(datetime dt, fmt):
+ if _illegal_s.search(fmt):
+ raise TypeError("This strftime implementation does not handle %s")
+ # don't use strftime method at all.
+ # if dt.year > 1900:
+ # return dt.strftime(fmt)
+
+ year = dt.year
+ # For every non-leap year century, advance by
+ # 6 years to get into the 28-year repeat cycle
+ delta = 2000 - year
+ off = 6 * (delta // 100 + delta // 400)
+ year = year + off
+
+ # Move to around the year 2000
+ year = year + ((2000 - year) // 28) * 28
+ timetuple = dt.timetuple()
+ s1 = time.strftime(fmt, (year,) + timetuple[1:])
+ sites1 = _findall(s1, str(year))
+
+ s2 = time.strftime(fmt, (year + 28,) + timetuple[1:])
+ sites2 = _findall(s2, str(year + 28))
+
+ sites = []
+ for site in sites1:
+ if site in sites2:
+ sites.append(site)
+
+ s = s1
+ syear = "%4d" % (dt.year,)
+ for site in sites:
+ s = s[:site] + syear + s[site + 4:]
+ return s
+
+cdef bint is_leap_julian(int year):
+ "Return 1 if year is a leap year in the Julian calendar, 0 otherwise."
+ cdef int y
+ y = year if year > 0 else year + 1
+ return (y % 4) == 0
+
+cdef bint is_leap_proleptic_gregorian(int year):
+ "Return 1 if year is a leap year in the Gregorian calendar, 0 otherwise."
+ cdef int y
+ y = year if year > 0 else year + 1
+ return (((y % 4) == 0) and ((y % 100) != 0)) or ((y % 400) == 0)
+
+cdef bint is_leap_gregorian(int year):
+ return (year > 1582 and is_leap_proleptic_gregorian(year)) or (year < 1582 and is_leap_julian(year))
+
+cdef bint all_leap(int year):
+ "Return True for all years."
+ return True
+
+cdef bint no_leap(int year):
+ "Return False for all years."
+ return False
+
+# numbers of days per month for calendars supported by add_timedelta(...)
+cdef int[13] month_lengths_365_day, month_lengths_366_day
+# Dummy Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
+for j,N in enumerate([-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]):
+ month_lengths_365_day[j] = N
+
+# Dummy Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
+for j,N in enumerate([-1, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]):
+ month_lengths_366_day[j] = N
+
+cdef int* month_lengths(bint (*is_leap)(int), int year):
+ if is_leap(year):
+ return month_lengths_366_day
+ else:
+ return month_lengths_365_day
+
+# Add a datetime.timedelta to a netcdftime.datetime instance. Uses
+# integer arithmetic to avoid rounding errors and preserve
+# microsecond accuracy.
+#
+# The argument is_leap is the pointer to a function returning 1 for leap years and 0 otherwise.
+#
+# This implementation supports 365_day (no_leap), 366_day (all_leap),
+# julian, proleptic_gregorian, and the mixed Julian/Gregorian
+# (standard, gregorian) calendars by using different is_leap and
+# julian_gregorian_mixed arguments.
+#
+# The date of the transition from the Julian to Gregorian calendar and
+# the number of invalid dates are hard-wired (1582-10-4 is the last day
+# of the Julian calendar, after which follows 1582-10-15).
+cdef tuple add_timedelta(datetime dt, delta, bint (*is_leap)(int), bint julian_gregorian_mixed):
+ cdef int microsecond, second, minute, hour, day, month, year
+ cdef int delta_microseconds, delta_seconds, delta_days
+ cdef int* month_length
+ cdef int extra_days, n_invalid_dates
+
+ # extract these inputs here to avoid type conversion in the code below
+ delta_microseconds = delta.microseconds
+ delta_seconds = delta.seconds
+ delta_days = delta.days
+
+ # shift microseconds, seconds, days
+ microsecond = dt.microsecond + delta_microseconds
+ second = dt.second + delta_seconds
+ minute = dt.minute
+ hour = dt.hour
+ day = dt.day
+ month = dt.month
+ year = dt.year
+
+ # validate inputs:
+ if year == 0:
+ raise ValueError("invalid year in {0!r}".format(dt))
+
+ month_length = month_lengths(is_leap, year)
+
+ if month < 1 or month > 12:
+ raise ValueError("invalid month in {0!r}".format(dt))
+
+ if day < 1 or day > month_length[month]:
+ raise ValueError("invalid day number in {0!r}".format(dt))
+
+ if julian_gregorian_mixed and year == 1582 and month == 10 and day > 4 and day < 15:
+ raise ValueError("{0!r} is not present in the mixed Julian/Gregorian calendar".format(dt))
+
+ n_invalid_dates = 10 if julian_gregorian_mixed else 0
+
+ # Normalize microseconds, seconds, minutes, hours.
+ second += microsecond // 1000000
+ microsecond = microsecond % 1000000
+ minute += second // 60
+ second = second % 60
+ hour += minute // 60
+ minute = minute % 60
+ extra_days = hour // 24
+ hour = hour % 24
+
+ delta_days += extra_days
+
+ while delta_days < 0:
+ if year == 1582 and month == 10 and day > 14 and day + delta_days < 15:
+ delta_days -= n_invalid_dates # skip over invalid dates
+ if day + delta_days < 1:
+ delta_days += day
+ # decrement month
+ month -= 1
+ if month < 1:
+ month = 12
+ year -= 1
+ if year == 0:
+ year = -1
+ month_length = month_lengths(is_leap, year)
+ day = month_length[month]
+ else:
+ day += delta_days
+ delta_days = 0
+
+ while delta_days > 0:
+ if year == 1582 and month == 10 and day < 5 and day + delta_days > 4:
+ delta_days += n_invalid_dates # skip over invalid dates
+ if day + delta_days > month_length[month]:
+ delta_days -= month_length[month] - (day - 1)
+ # increment month
+ month += 1
+ if month > 12:
+ month = 1
+ year += 1
+ if year == 0:
+ year = 1
+ month_length = month_lengths(is_leap, year)
+ day = 1
+ else:
+ day += delta_days
+ delta_days = 0
+
+ return (year, month, day, hour, minute, second, microsecond, -1, 1)
+
+# Add a datetime.timedelta to a netcdftime.datetime instance with the 360_day calendar.
+#
+# Assumes that the 360_day calendar (unlike the rest of supported
+# calendars) has the year 0. Also, there are no leap years and all
+# months are 30 days long, so we can compute month and year by using
+# "//" and "%".
+cdef tuple add_timedelta_360_day(datetime dt, delta):
+ cdef int microsecond, second, minute, hour, day, month, year
+ cdef int delta_microseconds, delta_seconds, delta_days
+
+ assert dt.month >= 1 and dt.month <= 12
+
+ # extract these inputs here to avoid type conversion in the code below
+ delta_microseconds = delta.microseconds
+ delta_seconds = delta.seconds
+ delta_days = delta.days
+
+ # shift microseconds, seconds, days
+ microsecond = dt.microsecond + delta_microseconds
+ second = dt.second + delta_seconds
+ minute = dt.minute
+ hour = dt.hour
+ day = dt.day + delta_days
+ month = dt.month
+ year = dt.year
+
+ # Normalize microseconds, seconds, minutes, hours, days, and months.
+ second += microsecond // 1000000
+ microsecond = microsecond % 1000000
+ minute += second // 60
+ second = second % 60
+ hour += minute // 60
+ minute = minute % 60
+ day += hour // 24
+ hour = hour % 24
+ # day and month are counted from 1; all months have 30 days
+ month += (day - 1) // 30
+ day = (day - 1) % 30 + 1
+ # all years have 12 months
+ year += (month - 1) // 12
+ month = (month - 1) % 12 + 1
+
+ return (year, month, day, hour, minute, second, microsecond, -1, 1)
diff --git a/setup.py b/setup.py
index 10db390..b8496e2 100644
--- a/setup.py
+++ b/setup.py
@@ -401,7 +401,7 @@ if has_cython and 'sdist' not in sys.argv[1:] and 'clean' not in sys.argv[1:]:
library_dirs=lib_dirs,
include_dirs=inc_dirs,
runtime_library_dirs=runtime_lib_dirs),
- Extension('netcdftime._datetime', ['netcdftime/_datetime.pyx'])]
+ Extension('netcdftime._netcdftime', ['netcdftime/_netcdftime.pyx'])]
# remove netCDF4.c file if it exists, so cython will recompile netCDF4.pyx.
# run for build *and* install (issue #263). Otherwise 'pip install' will
# not regenerate netCDF4.c, even if the C lib supports the new features.
@@ -444,12 +444,12 @@ else:
library_dirs=lib_dirs,
include_dirs=inc_dirs,
runtime_library_dirs=runtime_lib_dirs),
- Extension('netcdftime._datetime', ['netcdftime/_datetime.c'])]
+ Extension('netcdftime._netcdftime', ['netcdftime/_netcdftime.c'])]
ext_modules = extensions
setup(name = "netCDF4",
cmdclass = cmdclass,
- version = "1.2.4",
+ version = "1.2.5",
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 `Sub [...]
author = "Jeff Whitaker",
author_email = "jeffrey.s.whitaker at noaa.gov",
@@ -460,6 +460,13 @@ setup(name = "netCDF4",
description = "Provides an object-oriented python interface to the netCDF version 4 library.",
keywords = ['numpy','netcdf','data','science','network','oceanography','meteorology','climate'],
classifiers = ["Development Status :: 3 - Alpha",
+ "Programming Language :: Python :: 2",
+ "Programming Language :: Python :: 2.6",
+ "Programming Language :: Python :: 2.7",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.3",
+ "Programming Language :: Python :: 3.4",
+ "Programming Language :: Python :: 3.5",
"Intended Audience :: Science/Research",
"License :: OSI Approved",
"Topic :: Software Development :: Libraries :: Python Modules",
diff --git a/test/tst_atts.py b/test/tst_atts.py
index c972a90..284ce51 100644
--- a/test/tst_atts.py
+++ b/test/tst_atts.py
@@ -30,7 +30,7 @@ EMPTYSTRATT = ''
INTATT = 1
FLOATATT = math.pi
SEQATT = NP.arange(10)
-STRINGSEQATT = ['mary ','had ','a ','little ','lamb']
+STRINGSEQATT = ['mary ','','had ','a ','little ','lamb',]
ATTDICT = {'stratt':STRATT,'floatatt':FLOATATT,'seqatt':SEQATT,
'stringseqatt':''.join(STRINGSEQATT),
'emptystratt':EMPTYSTRATT,'intatt':INTATT}
@@ -51,6 +51,7 @@ class VariablesTestCase(unittest.TestCase):
f.seqatt = SEQATT
# sequences of strings converted to a single string.
f.stringseqatt = STRINGSEQATT
+ f.setncattr_string('stringseqatt_array',STRINGSEQATT) # array of NC_STRING
g = f.createGroup(GROUP_NAME)
f.createDimension(DIM1_NAME, DIM1_LEN)
f.createDimension(DIM2_NAME, DIM2_LEN)
@@ -65,6 +66,7 @@ class VariablesTestCase(unittest.TestCase):
g.floatatt = FLOATATT
g.seqatt = SEQATT
g.stringseqatt = STRINGSEQATT
+ g.setncattr_string('stringseqatt_array',STRINGSEQATT) # array of NC_STRING
v = f.createVariable(VAR_NAME, 'f8',(DIM1_NAME,DIM2_NAME,DIM3_NAME))
# try to set a variable attribute with one of the reserved names.
v.setncattr('ndim','three')
@@ -77,6 +79,7 @@ class VariablesTestCase(unittest.TestCase):
v.floatatt = FLOATATT
v.seqatt = SEQATT
v.stringseqatt = STRINGSEQATT
+ v.setncattr_string('stringseqatt_array',STRINGSEQATT) # array of NC_STRING
v1 = g.createVariable(VAR_NAME, 'f8',(DIM1_NAME,DIM2_NAME,DIM3_NAME))
v1.stratt = STRATT
v1.emptystratt = EMPTYSTRATT
@@ -84,6 +87,7 @@ class VariablesTestCase(unittest.TestCase):
v1.floatatt = FLOATATT
v1.seqatt = SEQATT
v1.stringseqatt = STRINGSEQATT
+ v1.setncattr_string('stringseqatt_array',STRINGSEQATT) # array of NC_STRING
# issue #485 (triggers segfault in C lib
# with version 1.2.1 without pull request #486)
f.foo = NP.array('bar','S')
@@ -123,6 +127,7 @@ class VariablesTestCase(unittest.TestCase):
assert f.emptystratt == EMPTYSTRATT
assert f.seqatt.tolist() == SEQATT.tolist()
assert f.stringseqatt == ''.join(STRINGSEQATT)
+ assert f.stringseqatt_array == STRINGSEQATT
assert f.getncattr('file_format') == 'netcdf4_format'
# variable attributes.
# check __dict__ method for accessing all netCDF attributes.
@@ -137,6 +142,7 @@ class VariablesTestCase(unittest.TestCase):
assert v.stratt == STRATT
assert v.seqatt.tolist() == SEQATT.tolist()
assert v.stringseqatt == ''.join(STRINGSEQATT)
+ assert v.stringseqatt_array == STRINGSEQATT
assert v.getncattr('ndim') == 'three'
assert v.getncattr('foo') == 1
assert v.getncattr('bar') == 2
@@ -173,6 +179,7 @@ class VariablesTestCase(unittest.TestCase):
assert g.emptystratt == EMPTYSTRATT
assert g.seqatt.tolist() == SEQATT.tolist()
assert g.stringseqatt == ''.join(STRINGSEQATT)
+ assert g.stringseqatt_array == STRINGSEQATT
for key,val in ATTDICT.items():
if type(val) == NP.ndarray:
assert v1.__dict__[key].tolist() == val.tolist()
@@ -184,6 +191,7 @@ class VariablesTestCase(unittest.TestCase):
assert v1.emptystratt == EMPTYSTRATT
assert v1.seqatt.tolist() == SEQATT.tolist()
assert v1.stringseqatt == ''.join(STRINGSEQATT)
+ assert v1.stringseqatt_array == STRINGSEQATT
assert getattr(v1,'nonexistantatt',None) == None
f.close()
diff --git a/test/tst_dap.py b/test/tst_dap.py
index 6347d7d..fab2439 100644
--- a/test/tst_dap.py
+++ b/test/tst_dap.py
@@ -1,13 +1,14 @@
import unittest
import netCDF4
+from numpy.testing import assert_array_almost_equal
# test accessing data over http with opendap.
-URL = 'http://test.opendap.org/opendap/hyrax/data/nc/bears.nc'
-firstvarname = 'shot'
-firstvarmin = 2
-firstvarmax = 7
-firstvarshape = (2,3)
+URL = "http://remotetest.unidata.ucar.edu/thredds/dodsC/testdods/testData.nc"
+varname = 'Z_sfc'
+varmin = 0
+varmax = 3292
+varshape = (1,95,135)
class DapTestCase(unittest.TestCase):
@@ -20,12 +21,12 @@ class DapTestCase(unittest.TestCase):
def runTest(self):
"""testing access of data over http using opendap"""
ncfile = netCDF4.Dataset(URL)
- assert firstvarname in ncfile.variables.keys()
- firstvar = ncfile.variables[firstvarname]
- assert firstvar.shape == firstvarshape
- data = firstvar[:]
- assert data.min() == firstvarmin
- assert data.max() == firstvarmax
+ assert varname in ncfile.variables.keys()
+ var = ncfile.variables[varname]
+ assert var.shape == varshape
+ data = var[:]
+ assert_array_almost_equal(data.min(),varmin)
+ assert_array_almost_equal(data.max(),varmax)
ncfile.close()
if __name__ == '__main__':
diff --git a/test/tst_masked4.py b/test/tst_masked4.py
new file mode 100755
index 0000000..94a62b7
--- /dev/null
+++ b/test/tst_masked4.py
@@ -0,0 +1,108 @@
+import unittest
+import os
+import tempfile
+
+import numpy as np
+from numpy import ma
+from numpy.testing import assert_array_almost_equal
+from netCDF4 import Dataset, default_fillvals
+
+# Test use of valid_min/valid_max/valid_range in generation of masked arrays
+
+class SetValidMinMax(unittest.TestCase):
+
+ def setUp(self):
+
+ self.testfile = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
+
+ self.valid_min = -32765
+ self.valid_max = 32765
+ self.valid_range = [self.valid_min,self.valid_max]
+ self.v = np.array([self.valid_min-1, 5, 4, self.valid_max+1], dtype = "i2")
+ self.v_ma = ma.array([self.valid_min-1, 5, 4, self.valid_max+1], dtype = "i2", mask = [True, False, False, True])
+
+ self.scale_factor = 10.
+ self.add_offset = 5.
+
+ self.v_scaled = self.v * self.scale_factor + self.add_offset
+ self.v_ma_scaled = self.v_ma * self.scale_factor + self.add_offset
+
+ f = Dataset(self.testfile, 'w')
+ _ = f.createDimension('x', None)
+ v = f.createVariable('v', "i2", 'x')
+ v2 = f.createVariable('v2', "i2", 'x')
+ v3 = f.createVariable('v3', "i2", 'x', fill_value=self.valid_min)
+
+ v.missing_value = np.array(32767, v.dtype)
+ v.valid_min = np.array(self.valid_min, v.dtype)
+ v.valid_max = np.array(self.valid_max, v.dtype)
+
+ v[0] = self.valid_min-1
+ v[1] = self.v[1]
+ v[2] = self.v[2]
+ v[3] = self.valid_max+1
+
+ v2.missing_value = np.array(32767, v.dtype)
+ v2.valid_range = np.array(self.valid_range, v.dtype)
+
+ v2[0] = self.valid_range[0]-1
+ v2[1] = self.v[1]
+ v2[2] = self.v[2]
+ v2[3] = self.valid_range[1]+1
+
+ v3.missing_value = np.array(32767, v.dtype)
+ v3.valid_max = np.array(self.valid_max, v.dtype)
+
+ # _FillValue should act as valid_min
+ v3[0] = v3._FillValue-1
+ v3[1] = self.v[1]
+ v3[2] = self.v[2]
+ v3[3] = self.valid_max+1
+
+ f.close()
+
+
+ def tearDown(self):
+
+ os.remove(self.testfile)
+
+
+ def test_scaled(self):
+
+ """Testing auto-conversion of masked arrays"""
+
+ # Update test data file
+
+ f = Dataset(self.testfile, "a")
+ f.variables["v"].scale_factor = self.scale_factor
+ f.variables["v"].add_offset = self.add_offset
+ f.variables["v2"].scale_factor = self.scale_factor
+ f.variables["v2"].add_offset = self.add_offset
+ f.close()
+
+ f = Dataset(self.testfile, "r")
+ v = f.variables["v"][:]
+ v2 = f.variables["v2"][:]
+ v3 = f.variables["v3"][:]
+ self.assertEqual(v.dtype, "f8")
+ self.assert_(isinstance(v, np.ndarray))
+ self.assert_(isinstance(v, ma.core.MaskedArray))
+ assert_array_almost_equal(v, self.v_scaled)
+ self.assertEqual(v2.dtype, "f8")
+ self.assert_(isinstance(v2, np.ndarray))
+ self.assert_(isinstance(v2, ma.core.MaskedArray))
+ assert_array_almost_equal(v2, self.v_scaled)
+ self.assert_(np.all(self.v_ma.mask == v.mask))
+ self.assert_(np.all(self.v_ma.mask == v2.mask))
+ self.assert_(np.all(self.v_ma.mask == v3.mask))
+ # check that underlying data is same as in netcdf file
+ v = f.variables['v']
+ v.set_auto_scale(False)
+ v = v[:]
+ self.assert_(np.all(self.v == v.data))
+
+ f.close()
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/tst_multifile.py b/test/tst_multifile.py
index 3d75d4c..7096ce8 100644
--- a/test/tst_multifile.py
+++ b/test/tst_multifile.py
@@ -44,6 +44,7 @@ class VariablesTestCase(unittest.TestCase):
def runTest(self):
"""testing multi-file dataset access"""
f = MFDataset(self.files,check=True)
+ f.set_auto_maskandscale(True) # issue570
assert f.history == 'created today'
assert_array_equal(np.arange(0,nx),f.variables['x'][:])
varin = f.variables['data']
diff --git a/test/tst_netcdftime.py b/test/tst_netcdftime.py
index b6851b4..9e5a478 100644
--- a/test/tst_netcdftime.py
+++ b/test/tst_netcdftime.py
@@ -1,5 +1,7 @@
from netcdftime import utime, JulianDayFromDate, DateFromJulianDay
from netcdftime import datetime as datetimex
+from netcdftime import DatetimeNoLeap, DatetimeAllLeap, Datetime360Day, DatetimeJulian, \
+ DatetimeGregorian, DatetimeProlepticGregorian
from netCDF4 import Dataset, num2date, date2num, date2index, num2date
import copy
import numpy
@@ -44,7 +46,7 @@ class netcdftimeTestCase(unittest.TestCase):
# check attributes.
self.assertTrue(self.cdftime_mixed.units == 'hours')
self.assertTrue(
- repr(self.cdftime_mixed.origin) == ' 1-01-01 00:00:00')
+ str(self.cdftime_mixed.origin) == ' 1-01-01 00:00:00')
self.assertTrue(
self.cdftime_mixed.unit_string == 'hours since 0001-01-01 00:00:00')
self.assertTrue(self.cdftime_mixed.calendar == 'standard')
@@ -83,7 +85,7 @@ class netcdftimeTestCase(unittest.TestCase):
self.assertTrue(d_check == ''.join(d2))
# test proleptic gregorian calendar.
self.assertTrue(self.cdftime_pg.units == 'seconds')
- self.assertTrue(repr(self.cdftime_pg.origin) == ' 1-01-01 00:00:00')
+ self.assertTrue(str(self.cdftime_pg.origin) == ' 1-01-01 00:00:00')
self.assertTrue(
self.cdftime_pg.unit_string == 'seconds since 0001-01-01 00:00:00')
self.assertTrue(self.cdftime_pg.calendar == 'proleptic_gregorian')
@@ -103,7 +105,7 @@ class netcdftimeTestCase(unittest.TestCase):
ValueError, utime, 'days since 1600-02-29 00:00:00', calendar='noleap')
self.assertTrue(self.cdftime_noleap.units == 'days')
self.assertTrue(
- repr(self.cdftime_noleap.origin) == '1600-02-28 00:00:00')
+ str(self.cdftime_noleap.origin) == '1600-02-28 00:00:00')
self.assertTrue(
self.cdftime_noleap.unit_string == 'days since 1600-02-28 00:00:00')
self.assertTrue(self.cdftime_noleap.calendar == 'noleap')
@@ -130,7 +132,7 @@ class netcdftimeTestCase(unittest.TestCase):
# check all_leap calendar.
self.assertTrue(self.cdftime_leap.units == 'days')
self.assertTrue(
- repr(self.cdftime_leap.origin) == '1600-02-29 00:00:00')
+ str(self.cdftime_leap.origin) == '1600-02-29 00:00:00')
self.assertTrue(
self.cdftime_leap.unit_string == 'days since 1600-02-29 00:00:00')
self.assertTrue(self.cdftime_leap.calendar == 'all_leap')
@@ -159,7 +161,7 @@ class netcdftimeTestCase(unittest.TestCase):
# check 360_day calendar.
self.assertTrue(self.cdftime_360day.units == 'days')
self.assertTrue(
- repr(self.cdftime_360day.origin) == '1600-02-30 00:00:00')
+ str(self.cdftime_360day.origin) == '1600-02-30 00:00:00')
self.assertTrue(
self.cdftime_360day.unit_string == 'days since 1600-02-30 00:00:00')
self.assertTrue(self.cdftime_360day.calendar == '360_day')
@@ -229,8 +231,18 @@ class netcdftimeTestCase(unittest.TestCase):
d) - self.cdftime_mixed.date2num(d) == 6)
# Check comparisons with Python datetime types
- d1 = num2date(0, 'days since 1000-01-01', 'standard')
+
+ # Note that d1 has to use the proleptic Gregorian calendar to
+ # be comparable to d2: datetime.datetime uses the proleptic
+ # Gregorian calendar and year 1000 is before the
+ # Julian/Gregorian transition (1582-10-15).
+ d1 = num2date(0, 'days since 1000-01-01', 'proleptic_gregorian')
+
d2 = datetime(2000, 1, 1)
+
+ # The date d3 is well after the Julian/Gregorian transition
+ # and so this Gregorian date can be compared to the proleptic
+ # Gregorian date d2.
d3 = num2date(0, 'days since 3000-01-01', 'standard')
assert d1 < d2
assert d2 < d3
@@ -253,40 +265,22 @@ class netcdftimeTestCase(unittest.TestCase):
# check datetime immutability
# using assertRaises as a context manager
# only works with python >= 2.7 (issue #497).
- #with self.assertRaises(AttributeError):
- # d1.year = 1999
- #with self.assertRaises(AttributeError):
- # d1.month = 6
- #with self.assertRaises(AttributeError):
- # d1.day = 5
- #with self.assertRaises(AttributeError):
- # d1.hour = 10
- #with self.assertRaises(AttributeError):
- # d1.minute = 33
- #with self.assertRaises(AttributeError):
- # d1.second = 45
- #with self.assertRaises(AttributeError):
- # d1.dayofwk = 1
- #with self.assertRaises(AttributeError):
- # d1.dayofyr = 52
- #with self.assertRaises(AttributeError):
- # d1.format = '%Y'
- try:
- d1.year = 1999
- d1.month = 6
- d1.day = 5
- d1.hour = 10
- d1.minute = 33
- d1.second = 45
- d1.dayofwk = 1
- d1.dayofyr = 52
- d1.format = '%Y'
- except AttributeError:
- pass
+ immutability_tests = {"year": 1999,
+ "month": 6,
+ "day": 5,
+ "hour": 10,
+ "minute": 33,
+ "second": 45,
+ "dayofwk": 1,
+ "dayofyr": 52,
+ "format": '%Y'}
+
+ for name, value in immutability_tests.items():
+ self.assertRaises(AttributeError, setattr, d1, name, value)
# Check leading white space
self.assertEqual(
- repr(self.cdftime_leading_space.origin), ' 850-01-01 00:00:00')
+ str(self.cdftime_leading_space.origin), ' 850-01-01 00:00:00')
#issue 330
units = "seconds since 1970-01-01T00:00:00Z"
@@ -442,9 +436,9 @@ class netcdftimeTestCase(unittest.TestCase):
t = date2num(datetime(1, 1, 1), units, calendar='360_day')
self.assertEqual(t, 360)
d = num2date(t, units, calendar='360_day')
- self.assertEqual(d, datetimex(1,1,1))
+ self.assertEqual(d, Datetime360Day(1,1,1))
d = num2date(0, units, calendar='360_day')
- self.assertEqual(d, datetimex(0,1,1))
+ self.assertEqual(d, Datetime360Day(0,1,1))
# list around missing dates in Gregorian calendar
# scalar
@@ -462,6 +456,26 @@ class netcdftimeTestCase(unittest.TestCase):
t1, t2, t3 = date2num([datetime(1582, 10, 4), datetime(1582, 10, 10), datetime(1582, 10, 15)], units, calendar='standard')
except ValueError:
pass
+ # test fix for issue #596 - julian day calculations wrong for negative years,
+ # caused incorrect rountrip num2date(date2num(date)) roundtrip for dates with year
+ # < 0.
+ u = utime("seconds since 1-1-1",calendar='julian')
+ date1 = datetimex(-1, 1, 1)
+ date2 = u.num2date(u.date2num(date1))
+ assert (date2.year == date1.year)
+ assert (date2.month == date1.month)
+ assert (date2.day == date1.day)
+ assert (date2.hour == date1.hour)
+ assert (date2.minute == date1.minute)
+ assert (date2.second == date1.second)
+ assert_almost_equal(JulianDayFromDate(date1), 1721057.5)
+ # issue 596 - negative years fail in utime.num2date
+ u = utime("seconds since 1-1-1", "proleptic_gregorian")
+ d = u.num2date(u.date2num(datetimex(-1, 1, 1)))
+ assert (d.year == -1)
+ assert (d.month == 1)
+ assert (d.day == 1)
+ assert (d.hour == 0)
class TestDate2index(unittest.TestCase):
@@ -659,5 +673,256 @@ class TestDate2index(unittest.TestCase):
assert(index == 11)
f.close()
+class issue584TestCase(unittest.TestCase):
+ """Regression tests for issue #584."""
+ converters = None
+
+ def setUp(self):
+ self.converters = {"360_day" : utime("days since 1-1-1", "360_day"),
+ "noleap" : utime("days since 1-1-1", "365_day")}
+
+ def test_roundtrip(self):
+ "Test roundtrip conversion (num2date <-> date2num) using 360_day and 365_day calendars."
+
+ for datetime_class in [Datetime360Day, DatetimeNoLeap]:
+ # Pick a date and time outside of the range of the Julian calendar.
+ date = datetime_class(-5000, 1, 1, 12)
+
+ converter = self.converters[date.calendar]
+ self.assertEqual(date, converter.num2date(converter.date2num(date)))
+
+ def test_dayofwk(self):
+ "Test computation of dayofwk in the 365_day calendar."
+
+ converter = self.converters["noleap"]
+
+ # Pick the date corresponding to the Julian day of 1.0 to test
+ # the transision from positive to negative Julian days.
+ julian_day = converter.date2num(datetimex(-4712, 1, 2, 12))
+
+ old_date = converter.num2date(julian_day)
+ for delta_year in range(1, 101): # 100 years cover several 7-year cycles
+ date = converter.num2date(julian_day - delta_year * 365)
+
+ # test that the day of the week changes by one every year (except
+ # for wrapping around every 7 years, of course)
+ if date.dayofwk == 6:
+ self.assertEqual(old_date.dayofwk, 0)
+ else:
+ self.assertEqual(old_date.dayofwk - date.dayofwk, 1)
+
+ old_date = date
+
+class DateTime(unittest.TestCase):
+ def setUp(self):
+ self.date1_365_day = DatetimeNoLeap(-5000, 1, 2, 12)
+ self.date2_365_day = DatetimeNoLeap(-5000, 1, 3, 12)
+ self.date3_gregorian = DatetimeGregorian(1969, 7, 20, 12)
+
+ # last day of the Julian calendar in the mixed Julian/Gregorian calendar
+ self.date4_gregorian = DatetimeGregorian(1582, 10, 4)
+ # first day of the Gregorian calendar in the mixed Julian/Gregorian calendar
+ self.date5_gregorian = DatetimeGregorian(1582, 10, 15)
+
+ self.date6_proleptic_gregorian = DatetimeProlepticGregorian(1582, 10, 15)
+
+ self.date7_360_day = Datetime360Day(2000, 1, 1)
+
+ self.date8_julian = DatetimeJulian(1582, 10, 4)
+
+ # a datetime.datetime instance (proleptic Gregorian calendar)
+ self.datetime_date1 = datetime(1969, 7, 21, 12)
+
+ self.delta = timedelta(hours=25)
+
+ def test_add(self):
+ dt = self.date1_365_day
+ # datetime + timedelta
+ self.assertEqual(dt + self.delta, # add 25 hours
+ dt.replace(day=dt.day + 1, hour=dt.hour + 1))
+
+ # timedelta + datetime
+ self.assertEqual(self.delta + dt, # add 25 hours
+ dt.replace(day=dt.day + 1, hour=dt.hour + 1))
+
+ # test the Julian/Gregorian transition
+ self.assertEqual(self.date4_gregorian + self.delta,
+ DatetimeGregorian(1582, 10, 15, 1))
+
+ # The Julian calendar has no invalid dates
+ self.assertEqual(self.date8_julian + self.delta,
+ DatetimeJulian(1582, 10, 5, 1))
+
+ # Test going over the year boundary.
+ self.assertEqual(DatetimeGregorian(2000, 11, 1) + timedelta(days=30 + 31),
+ DatetimeGregorian(2001, 1, 1))
+
+ # Year 2000 is a leap year.
+ self.assertEqual(DatetimeGregorian(2000, 1, 1) + timedelta(days=31 + 29),
+ DatetimeGregorian(2000, 3, 1))
+
+ # Test the 366_day calendar.
+ self.assertEqual(DatetimeAllLeap(1, 1, 1) + timedelta(days=366 * 10 + 31),
+ DatetimeAllLeap(11, 2, 1))
+
+ # The Gregorian calendar has no year zero.
+ self.assertEqual(DatetimeGregorian(-1, 12, 31) + self.delta,
+ DatetimeGregorian(1, 1, 1, 1))
+
+ def invalid_add_1():
+ self.date1_365_day + 1
+
+ def invalid_add_2():
+ 1 + self.date1_365_day
+
+ for func in [invalid_add_1, invalid_add_2]:
+ self.assertRaises(TypeError, func)
+
+ def test_sub(self):
+ # subtracting a timedelta
+ previous_day = self.date1_365_day - self.delta
+ self.assertEqual(previous_day.day, self.date1_365_day.day - 1)
+
+ def total_seconds(td):
+ """Equivalent to td.total_seconds() on Python >= 2.7. See
+ https://docs.python.org/2/library/datetime.html#datetime.timedelta.total_seconds
+ """
+ return (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6
+
+ # sutracting two netcdftime.datetime instances
+ delta = self.date2_365_day - self.date1_365_day
+ # date1 and date2 are exactly one day apart
+ self.assertEqual(total_seconds(delta), 86400)
+
+ # subtracting netcdftime.datetime from datetime.datetime
+ delta = self.datetime_date1 - self.date3_gregorian
+ # real_date2 and real_date1 are exactly one day apart
+ self.assertEqual(total_seconds(delta), 86400)
+
+ # subtracting datetime.datetime from netcdftime.datetime
+ delta = self.date3_gregorian - self.datetime_date1
+ # real_date2 and real_date1 are exactly one day apart
+ self.assertEqual(total_seconds(delta), -86400)
+
+ # Test the Julian/Gregorian transition.
+ self.assertEqual(self.date5_gregorian - self.delta,
+ DatetimeGregorian(1582, 10, 3, 23))
+
+ # The proleptic Gregorian calendar does not have invalid dates.
+ self.assertEqual(self.date6_proleptic_gregorian - self.delta,
+ DatetimeProlepticGregorian(1582, 10, 13, 23))
+
+ # The Gregorian calendar has no year zero.
+ self.assertEqual(DatetimeGregorian(1, 1, 1) - self.delta,
+ DatetimeGregorian(-1, 12, 30, 23))
+
+ # The 360_day calendar has year zero.
+
+ self.assertEqual(self.date7_360_day - timedelta(days=2000 * 360),
+ Datetime360Day(0, 1, 1))
+
+ # Test going over the year boundary.
+ self.assertEqual(DatetimeGregorian(2000, 3, 1) - timedelta(days=29 + 31 + 31),
+ DatetimeGregorian(1999, 12, 1))
+
+ # Year 2000 is a leap year.
+ self.assertEqual(DatetimeGregorian(2000, 3, 1) - self.delta,
+ DatetimeGregorian(2000, 2, 28, 23))
+
+ def invalid_sub_1():
+ self.date1_365_day - 1
+
+ def invalid_sub_2():
+ 1 - self.date1_365_day
+
+ def invalid_sub_3():
+ self.date1_365_day - self.datetime_date1
+
+ def invalid_sub_4():
+ self.datetime_date1 - self.date1_365_day
+
+ def invalid_sub_5():
+ self.date3_gregorian - self.date1_365_day
+
+ for func in [invalid_sub_1, invalid_sub_2]:
+ self.assertRaises(TypeError, func)
+
+ for func in [invalid_sub_3, invalid_sub_4, invalid_sub_5]:
+ self.assertRaises(ValueError, func)
+
+ def test_replace(self):
+ self.assertEqual(self.date1_365_day.replace(year=4000).year, 4000)
+ self.assertEqual(self.date1_365_day.replace(month=3).month, 3)
+ self.assertEqual(self.date1_365_day.replace(day=3).day, 3)
+ self.assertEqual(self.date1_365_day.replace(hour=3).hour, 3)
+ self.assertEqual(self.date1_365_day.replace(minute=3).minute, 3)
+ self.assertEqual(self.date1_365_day.replace(second=3).second, 3)
+ self.assertEqual(self.date1_365_day.replace(microsecond=3).microsecond, 3)
+ self.assertEqual(self.date1_365_day.replace(dayofwk=3).dayofwk, 3)
+ self.assertEqual(self.date1_365_day.replace(dayofyr=3).dayofyr, 3)
+
+ def test_pickling(self):
+ "Test reversibility of pickling."
+ import pickle
+
+ date = Datetime360Day(year=1, month=2, day=3, hour=4, minute=5, second=6, microsecond=7)
+ self.assertEqual(date, pickle.loads(pickle.dumps(date)))
+
+ def test_misc(self):
+ "Miscellaneous tests."
+ # make sure repr succeeds
+ repr(self.date1_365_day)
+
+ # make sure strftime without a format string works
+ self.assertEqual(self.date3_gregorian.strftime(None),
+ "1969-07-20 12:00:00")
+
+ def invalid_year():
+ DatetimeGregorian(0, 1, 1) + self.delta
+
+ def invalid_month():
+ DatetimeGregorian(1, 13, 1) + self.delta
+
+ def invalid_day():
+ DatetimeGregorian(1, 1, 32) + self.delta
+
+ def invalid_gregorian_date():
+ DatetimeGregorian(1582, 10, 5) + self.delta
+
+ for func in [invalid_year, invalid_month, invalid_day, invalid_gregorian_date]:
+ self.assertRaises(ValueError, func)
+
+ def test_richcmp(self):
+ # compare datetime and datetime
+ self.assertTrue(self.date1_365_day == self.date1_365_day)
+ self.assertFalse(self.date1_365_day == self.date2_365_day)
+ self.assertTrue(self.date1_365_day < self.date2_365_day)
+ self.assertFalse(self.date1_365_day < self.date1_365_day)
+ self.assertTrue(self.date2_365_day > self.date1_365_day)
+ self.assertFalse(self.date1_365_day > self.date2_365_day)
+ # compare real_datetime and datetime
+ self.assertTrue(self.datetime_date1 > self.date3_gregorian)
+ # compare datetime and real_datetime
+ self.assertFalse(self.date3_gregorian > self.datetime_date1)
+
+ def not_comparable_1():
+ "compare two datetime instances with different calendars"
+ self.date1_365_day > self.date3_gregorian
+
+ def not_comparable_2():
+ "compare a datetime instance with a non-standard calendar to real_datetime"
+ self.date2_365_day > self.datetime_date1
+
+ def not_comparable_3():
+ "compare datetime.datetime to netcdftime.datetime with a non-gregorian calendar"
+ self.datetime_date1 > self.date2_365_day
+
+ def not_comparable_4():
+ "compare a datetime instance to something other than a datetime"
+ self.date1_365_day > 0
+
+ for func in [not_comparable_1, not_comparable_2, not_comparable_3, not_comparable_4]:
+ self.assertRaises(TypeError, func)
+
if __name__ == '__main__':
unittest.main()
diff --git a/test/tst_vlen.py b/test/tst_vlen.py
index 47c4e92..46849c2 100644
--- a/test/tst_vlen.py
+++ b/test/tst_vlen.py
@@ -133,5 +133,48 @@ class TestObjectArrayIndexing(unittest.TestCase):
assert fancy_indexed[2] == 'abcdef'
f.close()
+class VlenAppendTestCase(unittest.TestCase):
+ def setUp(self):
+
+ import netCDF4
+ if netCDF4.__netcdf4libversion__ < "4.4.1":
+ self.skip = True
+ try:
+ self.skipTest("This test requires NetCDF 4.4.1 or later.")
+ except AttributeError:
+ # workaround for Python 2.6 (skipTest(reason) is new
+ # in Python 2.7)
+ pass
+ else:
+ self.skip = False
+
+ self.file = FILE_NAME
+ f = Dataset(self.file, 'w')
+ vlen_type = f.createVLType(np.float64, 'vltest')
+ f.createDimension('x', None)
+ v = f.createVariable('vl', vlen_type, 'x')
+ w = f.createVariable('vl2', np.float64, 'x')
+ f.close()
+
+ def tearDown(self):
+ # Remove the temporary files
+ os.remove(self.file)
+
+ def runTest(self):
+ """testing appending to vlen variables (issue #527)."""
+ # workaround for Python 2.6
+ if self.skip:
+ return
+
+ f = Dataset(self.file, 'a')
+ w = f.variables["vl2"]
+ v = f.variables["vl"]
+ w[0:3] = np.arange(3, dtype=np.float64)
+ v[0] # sometimes crashes
+ v[0].tolist() # sometimes crashes
+ v[0].size # BOOM!
+ f.close()
+
+
if __name__ == '__main__':
unittest.main()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/netcdf4-python.git
More information about the Pkg-grass-devel
mailing list