Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ classifiers = [
dependencies = [
"cftime",
"certifi",
"packaging",
"numpy>=2.3.0; platform_system == 'Windows' and platform_machine == 'ARM64'",
"numpy>=1.21.2; platform_system != 'Windows' or platform_machine != 'ARM64'",
]
Expand All @@ -45,7 +46,6 @@ dynamic = ["version"]
[project.optional-dependencies]
tests = [
"Cython",
"packaging",
"pytest",
"typing-extensions>=4.15.0",
]
Expand Down
3 changes: 2 additions & 1 deletion src/netCDF4/_netCDF4.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,7 @@ __version__ = "1.7.4.1"
# Initialize numpy
import posixpath
from cftime import date2num, num2date, date2index
from packaging.version import Version
import numpy
cimport numpy
import weakref
Expand Down Expand Up @@ -2410,7 +2411,7 @@ strings.

# flag to indicate that Variables in this Dataset support orthogonal indexing.
self.__orthogonal_indexing__ = True
if diskless and __netcdf4libversion__ < '4.2.1':
if diskless and Version(__netcdf4libversion__) < Version('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__)
# convert filename into string (from os.path object for example),
Expand Down
Loading