From 34e3a44e627b6143876c7c35830067fc5a18a3b7 Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Wed, 24 Dec 2025 07:48:56 -0800 Subject: [PATCH 01/14] include free-threaded 3.14 wheels --- .github/workflows/cibuildwheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index eaf0861b7..886f03b65 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -79,7 +79,7 @@ jobs: # These needs to rotate every new Python release. run: | set -x - echo "CIBW_BUILD=cp310-* cp311-* cp314-*" >> $GITHUB_ENV + echo "CIBW_BUILD=cp310-* cp311-* cp314-* cp314t-*" >> $GITHUB_ENV set +x if: ${{ github.event_name }} == "pull_request" @@ -170,7 +170,7 @@ jobs: uses: pypa/cibuildwheel@v3.3.0 env: CIBW_ARCHS: ARM64 - CIBW_SKIP: "cp310-* cp314t-*" + CIBW_SKIP: "cp310-* - uses: actions/upload-artifact@v6 with: From f426c4f36f9ab4e31dd9ae5ea1656b62237b137e Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 16:18:33 -0700 Subject: [PATCH 02/14] try to fix stubtest errors --- test/test_masked2.py | 2 +- test/test_masked3.py | 2 +- test/test_masked4.py | 2 +- test/test_masked5.py | 2 +- test/test_masked6.py | 2 +- test/test_scaled.py | 2 +- test/test_types.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/test_masked2.py b/test/test_masked2.py index 249f2e9ac..71bab907a 100755 --- a/test/test_masked2.py +++ b/test/test_masked2.py @@ -64,7 +64,7 @@ def setUp(self): v = f.createVariable('v',np.float32,'x',zlib=True,least_significant_digit=1) # assign masked array to that variable with one missing value. data =\ - ma.array([1.5678,99.99,3.75145,4.127654],mask=np.array([False,True,False,False],np.bool_)) + ma.MaskedArray([1.5678,99.99,3.75145,4.127654],mask=np.array([False,True,False,False],np.bool_)) data.mask[1]=True v[:] = data f.close() diff --git a/test/test_masked3.py b/test/test_masked3.py index c7cd4f2f5..2c2ff3043 100755 --- a/test/test_masked3.py +++ b/test/test_masked3.py @@ -19,7 +19,7 @@ def setUp(self): self.fillval = default_fillvals["i2"] self.v = np.array([self.fillval, 5, 4, -9999], dtype = "i2") - self.v_ma = ma.array([self.fillval, 5, 4, -9999], dtype = "i2", mask = [True, False, False, True]) + self.v_ma = ma.MaskedArray([self.fillval, 5, 4, -9999], dtype = "i2", mask = [True, False, False, True]) self.scale_factor = 10. self.add_offset = 5. diff --git a/test/test_masked4.py b/test/test_masked4.py index 61d9a1690..791b8cdda 100755 --- a/test/test_masked4.py +++ b/test/test_masked4.py @@ -20,7 +20,7 @@ def setUp(self): 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.v_ma = ma.MaskedArray([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. diff --git a/test/test_masked5.py b/test/test_masked5.py index 87734024a..22a25c6d4 100755 --- a/test/test_masked5.py +++ b/test/test_masked5.py @@ -17,7 +17,7 @@ def setUp(self): self.missing_values = [-999,999,0] self.v = np.array([-999,0,1,2,3,999], dtype = "i2") - self.v_ma = ma.array([-1,0,1,2,3,4], dtype = "i2", \ + self.v_ma = ma.MaskedArray([-1,0,1,2,3,4], dtype = "i2", \ mask = [True, True, False, False, False, True]) f = Dataset(self.testfile, 'w') diff --git a/test/test_masked6.py b/test/test_masked6.py index dc77da99e..0f19d6f14 100644 --- a/test/test_masked6.py +++ b/test/test_masked6.py @@ -18,7 +18,7 @@ def setUp(self): self.testfile = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name self.v = np.array([4, 3, 2, 1], dtype="i2") - self.w = np.ma.array([-1, -2, -3, -4], mask=[False, True, False, False], dtype="i2") + self.w = np.ma.MaskedArray([-1, -2, -3, -4], mask=[False, True, False, False], dtype="i2") f = Dataset(self.testfile, 'w') _ = f.createDimension('x', None) diff --git a/test/test_scaled.py b/test/test_scaled.py index 5c1ce9542..63f037558 100755 --- a/test/test_scaled.py +++ b/test/test_scaled.py @@ -22,7 +22,7 @@ def setUp(self): self.missing_value = -9999 self.v = np.array([0, 5, 4, self.missing_value], dtype = "i2") - self.v_ma = ma.array([0, 5, 4, self.missing_value], dtype = "i2", + self.v_ma = ma.MaskedArray([0, 5, 4, self.missing_value], dtype = "i2", mask = [True, False, False, True], fill_value = self.fillval) self.scale_factor = 10. diff --git a/test/test_types.py b/test/test_types.py index 3c5054bbd..b0a02fe51 100644 --- a/test/test_types.py +++ b/test/test_types.py @@ -22,7 +22,7 @@ zlib=False; complevel=0; shuffle=False; least_significant_digit=None datatypes = ['f8','f4','i1','i2','i4','i8','u1','u2','u4','u8','S1'] FillValue = 1.0 -issue273_data = np.ma.array(['z']*10,dtype='S1',\ +issue273_data = np.ma.MaskedArray(['z']*10,dtype='S1',\ mask=[False,False,False,False,False,True,False,False,False,False]) class PrimitiveTypesTestCase(unittest.TestCase): From 263d10c3f103d9f292c49579528bd00848fd3a09 Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 16:23:59 -0700 Subject: [PATCH 03/14] temporarily enable cibuildwheel test for all pushes, fix stubtest error in test --- .github/workflows/cibuildwheel.yml | 10 +++++----- test/test_masked2.py | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 886f03b65..f34ac32bb 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -3,11 +3,11 @@ name: Wheels on: pull_request: push: - tags: - - "v*" - release: - types: - - published +# tags: +# - "v*" +# release: +# types: +# - published permissions: contents: read diff --git a/test/test_masked2.py b/test/test_masked2.py index 71bab907a..17fe06236 100755 --- a/test/test_masked2.py +++ b/test/test_masked2.py @@ -65,7 +65,6 @@ def setUp(self): # assign masked array to that variable with one missing value. data =\ ma.MaskedArray([1.5678,99.99,3.75145,4.127654],mask=np.array([False,True,False,False],np.bool_)) - data.mask[1]=True v[:] = data f.close() From 6d17ee84a30b90c51c485def135f8b55c9fb721c Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 16:28:55 -0700 Subject: [PATCH 04/14] fix typo --- .github/workflows/cibuildwheel.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index f34ac32bb..ff1f925ee 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -3,11 +3,11 @@ name: Wheels on: pull_request: push: -# tags: -# - "v*" -# release: -# types: -# - published + tags: + - "v*" + release: + types: + - published permissions: contents: read @@ -170,7 +170,7 @@ jobs: uses: pypa/cibuildwheel@v3.3.0 env: CIBW_ARCHS: ARM64 - CIBW_SKIP: "cp310-* + CIBW_SKIP: "cp310-*" - uses: actions/upload-artifact@v6 with: From 6960fa5b24a2f62d3de0f069993c3c8f8f8db1bc Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 16:42:57 -0700 Subject: [PATCH 05/14] don't skip 314t --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b0f4f7d3f..c7c98475a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -110,7 +110,6 @@ build-verbosity = 1 build-frontend = "build" skip = [ "*-musllinux*", - "cp314t-*", ] test-extras = "tests" test-sources = [ From e83c443a60fd3fcf4ad1663dcd4054bcd61d1463 Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 19:17:18 -0700 Subject: [PATCH 06/14] disable GIL for running tests --- .github/workflows/cibuildwheel.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index ff1f925ee..cf99484eb 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -88,6 +88,7 @@ jobs: uses: pypa/cibuildwheel@v3.3.0 env: CIBW_ARCHS: ${{ matrix.arch }} + PYTHON_GIL: 0 - uses: actions/upload-artifact@v6 with: @@ -131,6 +132,7 @@ jobs: uses: pypa/cibuildwheel@v3.3.0 env: CIBW_ARCHS: ${{ matrix.arch }} + PYTHON_GIL: 0 - uses: actions/upload-artifact@v6 with: @@ -171,6 +173,7 @@ jobs: env: CIBW_ARCHS: ARM64 CIBW_SKIP: "cp310-*" + PYTHON_GIL: 0 - uses: actions/upload-artifact@v6 with: From 92bcf3ebf1c703732a64061d5d9d59e622cf03f6 Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 20:34:36 -0700 Subject: [PATCH 07/14] another attempt to disable GIL for running tests --- .github/workflows/cibuildwheel.yml | 3 --- pyproject.toml | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index cf99484eb..ff1f925ee 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -88,7 +88,6 @@ jobs: uses: pypa/cibuildwheel@v3.3.0 env: CIBW_ARCHS: ${{ matrix.arch }} - PYTHON_GIL: 0 - uses: actions/upload-artifact@v6 with: @@ -132,7 +131,6 @@ jobs: uses: pypa/cibuildwheel@v3.3.0 env: CIBW_ARCHS: ${{ matrix.arch }} - PYTHON_GIL: 0 - uses: actions/upload-artifact@v6 with: @@ -173,7 +171,6 @@ jobs: env: CIBW_ARCHS: ARM64 CIBW_SKIP: "cp310-*" - PYTHON_GIL: 0 - uses: actions/upload-artifact@v6 with: diff --git a/pyproject.toml b/pyproject.toml index c7c98475a..c8499712a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,8 +117,8 @@ test-sources = [ "pyproject.toml" ] test-command = [ - '''python -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"''', - "pytest -s -rxs -v test", + '''PYTHON_GIL=0 python -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"''', + "pytest -Xgil=0 -s -rxs -v test", ] manylinux-x86_64-image = "ghcr.io/ocefpaf/manylinux_2_28_x86_64-netcdf" manylinux-aarch64-image = "ghcr.io/ocefpaf/manylinux_2_28_aarch64-netcdf" From 442260f0bbc934061d2ff6479051884f2486e4c8 Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 20:46:11 -0700 Subject: [PATCH 08/14] turn off GIL for pytest --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c8499712a..7878bdadc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,7 +118,7 @@ test-sources = [ ] test-command = [ '''PYTHON_GIL=0 python -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"''', - "pytest -Xgil=0 -s -rxs -v test", + "python -X gil=0 -m pytest -s -rxs -v test", ] manylinux-x86_64-image = "ghcr.io/ocefpaf/manylinux_2_28_x86_64-netcdf" manylinux-aarch64-image = "ghcr.io/ocefpaf/manylinux_2_28_aarch64-netcdf" From 4eec50ac8f748877664b7131e9e2bbbf15d970df Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 20:51:05 -0700 Subject: [PATCH 09/14] update --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7878bdadc..06f07aab8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,7 +117,7 @@ test-sources = [ "pyproject.toml" ] test-command = [ - '''PYTHON_GIL=0 python -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"''', + '''python -X gil=0 -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"''', "python -X gil=0 -m pytest -s -rxs -v test", ] manylinux-x86_64-image = "ghcr.io/ocefpaf/manylinux_2_28_x86_64-netcdf" From 666399441582a9af02f2050ab2f1e11683b8c76c Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 21:14:50 -0700 Subject: [PATCH 10/14] revert --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 06f07aab8..c7c98475a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,8 +117,8 @@ test-sources = [ "pyproject.toml" ] test-command = [ - '''python -X gil=0 -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"''', - "python -X gil=0 -m pytest -s -rxs -v test", + '''python -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"''', + "pytest -s -rxs -v test", ] manylinux-x86_64-image = "ghcr.io/ocefpaf/manylinux_2_28_x86_64-netcdf" manylinux-aarch64-image = "ghcr.io/ocefpaf/manylinux_2_28_aarch64-netcdf" From 316bcb853be476a893f0a37410fc1806d8769788 Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Thu, 1 Jan 2026 21:20:46 -0700 Subject: [PATCH 11/14] ignore RuntimeWarnings for pytest --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index c7c98475a..965044732 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,6 +85,7 @@ pythonpath = ["test"] filterwarnings = [ "error", "ignore::UserWarning", + "ignore::RuntimeWarning", ] [tool.mypy] From e8e71669ddc6f246df275b91c8808734994a0fac Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Fri, 2 Jan 2026 12:48:32 -0700 Subject: [PATCH 12/14] update for 1.7.4 release --- Changelog | 6 +++++- README.md | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index c0267ddfe..88ba8c385 100644 --- a/Changelog +++ b/Changelog @@ -1,9 +1,13 @@ - version 1.7.4 (not yet released) + version 1.7.4 (tag v1.7.4rel) ================================ * Make sure automatic conversion of character arrays <--> string arrays works for Unicode strings (issue #1440). (previously only worked correctly for encoding="ascii"). * Add netcdf plugins (blosc, zstd, bzip2) in wheels. Blosc plugin doesn't work in Windows wheels. Macos wheels now use conda provided libs. (PR #1450) + * Add windows/arm (PR #1453) and free-threaded python wheels (issue #1454). Windows wheels now use netcdf-c 4.9.3. + WARNING: netcdf-c is not thread-safe and netcdf4-python does have internal locking so expect segfaults if you + use netcdf4-python on multiple threads with free-threaded python. Users must exercise care to only call netcdf from + a single thread. version 1.7.3 (tag v1.7.3rel) ============================= diff --git a/README.md b/README.md index 57a352c2d..8b9b52bef 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,12 @@ ## News For details on the latest updates, see the [Changelog](https://github.com/Unidata/netcdf4-python/blob/master/Changelog). +1/5/2026: Version [1.7.4](https://pypi.python.org/pypi/netCDF4/1.7.4) released. Compression plugins now included in wheels, windows/arm and +free-threaded python wheels provided. Automatic conversion of character arrays <--> string arrays works for Unicode (not just ascii) strings. +WARNING: netcdf-c is not thread-safe and netcdf4-python does have internal locking so expect segfaults if you +use netcdf4-python on multiple threads with free-threaded python. Users must exercise care to only call netcdf from +a single thread. + 10/13/2025: Version [1.7.3](https://pypi.python.org/pypi/netCDF4/1.7.3) released. Minor updates/bugfixes and python 3.14 wheels, see Changelog for details. 10/22/2024: Version [1.7.2](https://pypi.python.org/pypi/netCDF4/1.7.2) released. Minor updates/bugfixes and python 3.13 wheels, see Changelog for details. From 2ba0cbe1e4459bb32a9777c48c3a8d765370dfd4 Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Fri, 2 Jan 2026 12:53:46 -0700 Subject: [PATCH 13/14] insert warning about threads --- src/netCDF4/_netCDF4.pyx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/netCDF4/_netCDF4.pyx b/src/netCDF4/_netCDF4.pyx index ecebcd4bf..f2312b59e 100644 --- a/src/netCDF4/_netCDF4.pyx +++ b/src/netCDF4/_netCDF4.pyx @@ -1050,6 +1050,10 @@ are collective. There are a couple of important limitations of parallel IO: to write to it. - You cannot use variable-length (VLEN) data types. +***Import warning regarding threads:*** The underlying netcdf-c library is not thread-safe, so netcdf4-python cannot perform parallel +IO in a multi-threaded environment. Users should expect segfaults if a netcdf file is opened on multiple threads - care should +be taken to restrict netcdf4-python usage to a single thread, even when using free-threaded python. + ## Dealing with strings The most flexible way to store arrays of strings is with the From 2752937b5df65f4564b7253a5ca985238c633fab Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Fri, 2 Jan 2026 12:57:28 -0700 Subject: [PATCH 14/14] update docs with threading warning --- docs/index.html | 48 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/docs/index.html b/docs/index.html index a6b430483..f4f6cbc4d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,20 +3,31 @@ - + netCDF4 API documentation - - + @@ -26,7 +37,7 @@

Package netCDF4

-

Version 1.7.2

+

Version 1.7.4

Introduction

netcdf4-python is a Python interface to the netCDF C library.

netCDF version 4 has many features @@ -1003,6 +1014,11 @@

Parallel IO

to write to it.
  • You cannot use variable-length (VLEN) data types.
  • +

    Import warning regarding threads: +The underlying netcdf-c library is not thread-safe, so netcdf4-python cannot perform parallel +IO in a multi-threaded environment. +Users should expect segfaults if a netcdf file is opened on multiple threads - care should +be taken to restrict netcdf4-python usage to a single thread, even when using free-threaded python.

    Dealing with strings

    The most flexible way to store arrays of strings is with the Variable-length (vlen) string data type. However, this requires @@ -1018,7 +1034,7 @@

    Dealing with strings

    (dtype S1) variable, the chartostring() utility function is used to convert the array of characters to an array of strings with one less dimension (the last dimension is interpreted as the length of each string) when reading the data. The character -set (usually ascii) is specified by the _Encoding attribute. If _Encoding +set is specified by the _Encoding attribute. If _Encoding is 'none' or 'bytes', then the character array is converted to a numpy fixed-width byte string array (dtype S#), otherwise a numpy unicode (dtype U#) array is created. @@ -1196,7 +1212,7 @@

    Support for complex numbers

    Support for complex numbers is handled via the nc-complex library. See there for further details.

    -

    contact: Jeffrey Whitaker jeffrey.s.whitaker@noaa.gov

    +

    contact: Jeffrey Whitaker whitaker.jeffrey@gmail.com

    copyright: 2008 by Jeffrey Whitaker.

    license: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    @@ -1229,7 +1245,7 @@

    Functions

    def date2index(dates, nctime, calendar=None, select='exact', has_year_zero=None)
    -

    date2index(dates, nctime, calendar=None, select=u'exact', has_year_zero=None)

    +

    date2index(dates, nctime, calendar=None, select='exact', has_year_zero=None)

    Return indices of a netCDF time variable corresponding to the given dates.

    dates: A datetime object or a sequence of datetime objects. The datetime objects should not include a time-zone offset.

    @@ -1347,10 +1363,10 @@

    Functions

    used to build the module, and when it was built.

    -def num2date(times, units, calendar='standard', only_use_cftime_datetimes=True, only_use_python_datetimes=False, has_year_zero=None) +def num2date(times,
    units,
    calendar='standard',
    only_use_cftime_datetimes=True,
    only_use_python_datetimes=False,
    has_year_zero=None)
    -

    num2date(times, units, calendar=u'standard', only_use_cftime_datetimes=True, only_use_python_datetimes=False, has_year_zero=None)

    +

    num2date(times, units, calendar='standard', only_use_cftime_datetimes=True, only_use_python_datetimes=False, has_year_zero=None)

    Return datetime objects given numeric time values. The units of the numeric time values are described by the units argument and the calendar keyword. The returned datetime objects represent @@ -1460,10 +1476,10 @@

    Functions

    (default) or 'U1' (if dtype='U')

    -def stringtochar(a, encoding='utf-8') +def stringtochar(a, encoding='utf-8', n_strlen=None)
    -

    stringtochar(a,encoding='utf-8')

    +

    stringtochar(a,encoding='utf-8',n_strlen=None)

    convert a string array to a character array with one extra dimension

    a: Input numpy string array with numpy datatype 'SN' or 'UN', where N @@ -1473,6 +1489,10 @@

    Functions

    optional kwarg encoding can be used to specify character encoding (default utf-8). If encoding is 'none' or 'bytes', a numpy.string_ the input array is treated a raw byte strings (numpy.string_).

    +

    optional kwarg n_strlen is the number of characters in each string. +Default +is None, which means n_strlen will be set to a.itemsize (the number of bytes +used to represent each string in the input array).

    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.

    @@ -1834,7 +1854,7 @@

    Methods

    datatype.

    -def createVariable(self, varname, datatype, dimensions=(), compression=None, zlib=False, complevel=4, shuffle=True, szip_coding='nn', szip_pixels_per_block=8, blosc_shuffle=1, fletcher32=False, contiguous=False, chunksizes=None, endian='native', least_significant_digit=None, significant_digits=None, quantize_mode='BitGroom', fill_value=None, chunk_cache=None) +def createVariable(self,
    varname,
    datatype,
    dimensions=(),
    compression=None,
    zlib=False,
    complevel=4,
    shuffle=True,
    szip_coding='nn',
    szip_pixels_per_block=8,
    blosc_shuffle=1,
    fletcher32=False,
    contiguous=False,
    chunksizes=None,
    endian='native',
    least_significant_digit=None,
    significant_digits=None,
    quantize_mode='BitGroom',
    fill_value=None,
    chunk_cache=None)

    createVariable(self, varname, datatype, dimensions=(), compression=None, zlib=False, @@ -3144,7 +3164,7 @@

    Methods