Skip to content

Commit 0975457

Browse files
committed
dev
2 parents 24435d9 + 6dea879 commit 0975457

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

Changelog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ version NEXTVERSION
2323
* New class `cf.NetCDF4Array`
2424
* New class `cf.CFAH5netcdfArray`
2525
* New class `cf.CFANetCDF4Array`
26-
* Replace core `dask` functionality with that imported from `cfdm`.
27-
https://github.com/NCAS-CMS/cf-python/pull/836)
26+
* Replace core `dask` functionality with that imported from `cfdm`
27+
(https://github.com/NCAS-CMS/cf-python/pull/836)
2828
* Fix bug that sometimes puts an incorrect ``radian-1`` or
2929
``radian-2`` in the returned units of the differential operator
3030
methods and functions

cf/data/data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ def diff(self, axis=-1, n=1, inplace=False):
540540
[1.0 1.5 0.5]]
541541
>>> print(d.diff(n=2).array)
542542
[[0.0 0.0]
543-
[ -- --]s
543+
[ -- --]
544544
[0.5 -1.0]]
545545
>>> print(d.diff(axis=0).array)
546546
[[4.0 3.5 -- 4.0]
@@ -2646,7 +2646,7 @@ def _cyclic(self):
26462646
"""Storage for axis cyclicity.
26472647
26482648
Contains a `set` that identifies which axes are cyclic (and
2649-
therefore allow cyclic slicing). The set contains a subset of
2649+
therefore allows cyclic slicing). The set contains a subset of
26502650
the axis identifiers defined by the `_axes` attribute.
26512651
26522652
.. warning:: Never change the value of the `_cyclic` attribute

cf/field.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5155,7 +5155,7 @@ def collapse(
51555155
field construct.
51565156

51575157
*Example:*
5158-
Calculate the temporal maximum of the weighted areal means
5158+
Calculate the temporal maximum of the weighted area means
51595159
using two independent calls:
51605160

51615161
>>> b = a.collapse('area: mean', weights=True).collapse('T: maximum')
@@ -5166,7 +5166,7 @@ def collapse(
51665166
specifies each axis, and a space delimits the separate collapses).
51675167

51685168
*Example:*
5169-
Calculate the temporal maximum of the weighted areal means in
5169+
Calculate the temporal maximum of the weighted area means in
51705170
a single call, using the cf-netCDF cell methods-like syntax:
51715171

51725172
>>> b =a.collapse('area: mean T: maximum', weights=True)
@@ -5782,7 +5782,7 @@ def collapse(
57825782
numbers of elements.
57835783

57845784
* The start of the first group may be
5785-
before the first first axis element,
5785+
before the first axis element,
57865786
depending on the offset defined by the
57875787
time duration. For example, if
57885788
``group=cf.Y(month=12)`` then the first

cf/read_write/read.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from urllib.parse import urlparse
77

88
import cfdm
9-
from cfdm.read_write.exceptions import FileTypeError
9+
from cfdm.read_write.exceptions import DatasetTypeError
1010
from cfdm.read_write.netcdf import NetCDFRead
1111

1212
from ..aggregate import aggregate as cf_aggregate
@@ -384,7 +384,7 @@ class read(cfdm.read):
384384
385385
.. versionadded:: NEXTVERSION
386386
387-
{{read store_hdf5_chunks: `bool`, optional}}
387+
{{read store_dataset_chunks: `bool`, optional}}
388388
389389
.. versionadded:: NEXTVERSION
390390
@@ -502,7 +502,7 @@ def __new__(
502502
unpack=True,
503503
warn_valid=False,
504504
dask_chunks="storage-aligned",
505-
store_hdf5_chunks=True,
505+
store_dataset_chunks=True,
506506
domain=False,
507507
cfa=None,
508508
cfa_write=None,
@@ -728,7 +728,7 @@ def __new__(
728728
storage_options=storage_options,
729729
netcdf_backend=netcdf_backend,
730730
dask_chunks=dask_chunks,
731-
store_hdf5_chunks=store_hdf5_chunks,
731+
store_dataset_chunks=store_dataset_chunks,
732732
cache=cache,
733733
cfa=cfa,
734734
cfa_write=cfa_write,
@@ -737,7 +737,7 @@ def __new__(
737737
unsqueeze=unsqueeze,
738738
file_type=file_type,
739739
)
740-
except FileTypeError as error:
740+
except DatasetTypeError as error:
741741
if file_type is None:
742742
file_format_errors.append(error)
743743
else:
@@ -764,7 +764,7 @@ def __new__(
764764
domain=domain,
765765
file_type=file_type,
766766
)
767-
except FileTypeError as error:
767+
except DatasetTypeError as error:
768768
if file_type is None:
769769
file_format_errors.append(error)
770770
else:
@@ -773,7 +773,7 @@ def __new__(
773773

774774
if file_format_errors:
775775
error = "\n".join(map(str, file_format_errors))
776-
raise FileTypeError(f"\n{error}")
776+
raise DatasetTypeError(f"\n{error}")
777777

778778
if domain:
779779
file_contents = DomainList(file_contents)

cf/read_write/um/umread.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import dask.array as da
1010
import numpy as np
1111
from cfdm import Constructs, is_log_level_info
12-
from cfdm.read_write.exceptions import FileTypeError
12+
from cfdm.read_write.exceptions import DatasetTypeError
1313
from dask.array.core import getter, normalize_chunks
1414
from dask.base import tokenize
1515
from netCDF4 import date2num as netCDF4_date2num
@@ -3608,7 +3608,7 @@ def _open_um_file(
36083608
except Exception:
36093609
pass
36103610

3611-
raise FileTypeError(
3611+
raise DatasetTypeError(
36123612
f"Can't interpret {filename} as a PP or UM dataset"
36133613
)
36143614

cf/umread_lib/umfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from functools import cmp_to_key
33

44
import numpy
5-
from cfdm.read_write.exceptions import FileTypeError
5+
from cfdm.read_write.exceptions import DatasetTypeError
66

77
from . import cInterface
88
from .extraData import ExtraDataUnpacker
@@ -133,7 +133,7 @@ def _detect_file_type(self):
133133
file_type_obj = c.detect_file_type(self.fd)
134134
except Exception:
135135
self.close_fd()
136-
raise FileTypeError(
136+
raise DatasetTypeError(
137137
f"Can't open {self.path} as a PP or UM dataset"
138138
)
139139

cf/units.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Units:
2222
"""
2323

2424
def __new__(cls, *args, **kwargs):
25-
"""Return a new new Units instance."""
25+
"""Return a new Units instance."""
2626
return cfUnits(*args, **kwargs)
2727

2828
@staticmethod

0 commit comments

Comments
 (0)