diff --git a/cf/mixin/propertiesdata.py b/cf/mixin/propertiesdata.py index 949e411811..63102ef032 100644 --- a/cf/mixin/propertiesdata.py +++ b/cf/mixin/propertiesdata.py @@ -3282,7 +3282,7 @@ def equivalent(self, other, rtol=None, atol=None, traceback=False): return True # Check that each instance is the same type - if type(self) != type(other): + if type(self) is not type(other): print( f"{self.__class__.__name__}: Different types: " f"{self.__class__.__name__}, {other.__class__.__name__}" diff --git a/cf/mixin/propertiesdatabounds.py b/cf/mixin/propertiesdatabounds.py index 020e373d56..e51c61e8aa 100644 --- a/cf/mixin/propertiesdatabounds.py +++ b/cf/mixin/propertiesdatabounds.py @@ -1734,7 +1734,7 @@ def equivalent(self, other, rtol=None, atol=None, traceback=False): return True # Check that each instance is the same type - if type(self) != type(other): + if type(self) is not type(other): print( f"{self.__class__.__name__}: Different types: " f"{self.__class__.__name__}, {other.__class__.__name__}" diff --git a/docs/2_to_3_changes.html b/docs/2_to_3_changes.html index 4b1b3d902e..bfabf7b2cb 100644 --- a/docs/2_to_3_changes.html +++ b/docs/2_to_3_changes.html @@ -44,7 +44,7 @@ -
At version 3.x, in-place operations return None
, rather than the
+
At version 3.x, in-place operations return None
, rather than the
modified construct. The keyword that defines the operation to be
in-place is now inplace (rather than i).
2023-10-10
+Record dimension coordinate cell characteristics +(https://github.com/NCAS-CMS/cf-python/issues/692)
New set of methods to query, set, del, and get_cell_characterstics
Fix bug in cf.Field.match_by_construct
that always returned True for
+1-d constructs whose axis is not in the data, even when the
+criterion was not matched
+(https://github.com/NCAS-CMS/cf-python/issues/691)
Fix bug that prevented “https://” netCDF files from being read +(https://github.com/NCAS-CMS/cf-python/issues/699)
2023-08-31
Prevent unlimited dimensions from being written to CFA-netCDF files @@ -252,7 +269,7 @@
2023-07-21
Performance improvements to cf.Field.regrids
and
@@ -280,7 +297,7 @@
2023-06-09
New documentation cheat sheet @@ -297,7 +314,7 @@
Fix set_data
when the units are invalid
(https://github.com/NCAS-CMS/cf-python/pull/646)
Fix cf.Field.laplacian_xy
, cf.Field.grad_xy`, cf.curl_xy
and
+
Fix cf.Field.laplacian_xy
, cf.Field.grad_xy
, cf.curl_xy
and
cf.div_xy
to work in cases when the dimension coordinates are
missing standard names
(https://github.com/NCAS-CMS/cf-python/pull/643)
2023-04-27
Re-introduction of CFA-netCDF functionality for CFA-0.6 @@ -337,7 +354,7 @@
2023-03-10
Python 3.7 support removed @@ -361,7 +378,7 @@
2023-01-31
Introduction of dask
for all data manipulations, replacing the old
@@ -395,7 +412,7 @@
2022-10-17
Upgrade to allow cf to work with Python 3.10 @@ -413,7 +430,7 @@
2022-06-23
Fixed bug in cf.read
when reading PP or fields files for which the
@@ -426,7 +443,7 @@
Removed -g
from the umread_lib/c-lib
compiler options
(https://github.com/NCAS-CMS/cf-python/pull/305)
Updated the deprecated distutils.version
to packaging.version
+
Updated the deprecated distutils.version
to packaging.version
(https://github.com/NCAS-CMS/cf-python/pull/324)
Changed dependency: 1.9.0.3<=cfdm<1.9.1.0
New dependency: packaging>=20.0
2022-01-18
New method: cf.Field.grad_xy
@@ -445,7 +462,7 @@
New function: cf.curl_xy
(https://github.com/NCAS-CMS/cf-python/issues/292)
Allow element-wise comparisons with None
on cf.Data
and
cf.Field
objects (https://github.com/NCAS-CMS/cf-python/issues/281)
Add missing closing parenthesis in cf.Query
string representations
(https://github.com/NCAS-CMS/cf-python/issues/279)
2021-10-08
Python 3.6 support removed @@ -503,20 +520,20 @@
2021-06-10
Improve performance by allowing a saved RegridOperator
instance to
define the regrid operator in cf.Field.regridc
and
cf.Field.regrids
(https://github.com/NCAS-CMS/cf-python/issues/222)
Fix for incorrectly formatted logging.info
statement sometimes
+
Fix for incorrectly formatted logging.info
statement sometimes
causing a hang in cf.Field.collapse
(https://github.com/NCAS-CMS/cf-python/issues/217)
2021-05-25
Construct access API changes @@ -548,7 +565,7 @@
2020-12-18
The setting of global constants can now be controlled by a context @@ -578,7 +595,7 @@
2020-10-15
Python 3.5 support deprecated (3.5 was retired on 2020-09-13)
Fixed bug in cf.aggregate
that caused it to error if either the
-equal_all
or exist_all
parameter were set to True
.
equal_all
or exist_all
parameter were set to True
.Fixed bug in Data.percentile
that caused it to error for non-singular
-ranks if the squeeze parameter was set to True
.
True
.cfa
now prints error messages to the stderr stream rather than
stdout.
Changed dependency: 1.8.7.0<=cfdm<1.8.8.0
2020-07-24
Implemented the reading and writing of netCDF4 group hierarchies for @@ -643,7 +660,7 @@
2020-06-10
Changed dependency: 1.8.5<=cfdm<1.9.0
2020-06-09
Changed the API to cf.Field.period
: Now sets and reports on the
@@ -703,7 +720,7 @@
2020-04-30
New method: cf.Field.apply_masking
Fixed bug in cf.Field.has_construct
that caused it to always
-return False
unless a construct key was used as the construct
+return False
unless a construct key was used as the construct
identity (https://github.com/NCAS-CMS/cf-python/issues/67).
2020-04-20
Changed the API to cf.Field.convolution_filter
: renamed the
weights
parameter to window
.
Reinstated True
as a permitted value of the weights
keyword of
+
Reinstated True
as a permitted value of the weights
keyword of
cf.Field.collapse
(which was deprecated at version 3.2.0).
New method: cf.Field.moving_window
(https://github.com/NCAS-CMS/cf-python/issues/44)
2020-04-01
First release for CF-1.8 (does not include netCDF hierarchical groups functionality) (https://github.com/NCAS-CMS/cf-python/issues/33)
Deprecated True
as a permitted value of the weights
keyword of
+
Deprecated True
as a permitted value of the weights
keyword of
cf.Field.collapse
.
New methods: cf.Data.compressed
, cf.Data.diff
New function: cf.implementation
2020-01-17
Changed the API to cf.Field.match_by_construct
and
cf.FieldList.select_by_construct
.
Changed the default value of the cf.Field.collapse
group_span
-parameter to True
and default value of the group_contiguous
+parameter to True
and default value of the group_contiguous
parameter to 1
(https://github.com/NCAS-CMS/cf-python/issues/28).
Changed the default values of the cf.Field.collapse
group_by
-and coordinate
parameters to None
.
Changed the default value of the identity
parameter to None
+and coordinate
parameters to None
.
Changed the default value of the identity
parameter to None
for cf.Field.coordinate
, cf.Field.dimension_coordinate
,
cf.Field.auxiliary_coordinate
, cf.Field.field_ancillary
,
cf.Field.domain_ancillary
, cf.Field.cell_method
,
@@ -848,7 +865,7 @@
2019-11-27
Changed the default value of the ignore_compression
parameter to
-True
.
True
.Fixed bug that sometimes gave incorrect cell sizes from the
cellsize
attribute when used on multidimensional coordinates
(https://github.com/NCAS-CMS/cf-python/issues/15).
2019-11-14
New method: cf.Field.compress
.
2019-11-08
New methods: cf.Field.percentile
, cf.Field.example_field
,
@@ -914,7 +931,7 @@
2019-11-01
Fixed bug (introduced at v3.0.2) that caused mean_absolute_value
@@ -926,7 +943,7 @@
2019-10-31
Now reads CDL files (https://github.com/NCAS-CMS/cf-python/issues/1)
2019-10-01
Updated description in setup.py
2019-10-01
Complete refactor for Python 3, including some API changes.
@@ -991,7 +1008,7 @@2019-10-07
In cf.write
, can set single=False
to mean double=True
, and
@@ -1006,7 +1023,7 @@
2019-04-04
Changed calculation of chunksize in parallel case to avoid potential @@ -1016,7 +1033,7 @@
2019-03-27
Fix bug in creating a during cell method during a field collapse.
2019-03-05
Allow failure to compile to go through with a warning, rather than @@ -1036,7 +1053,7 @@
2018-12-10
cf.Field.regridc
now compares the units of the source and
@@ -1046,7 +1063,7 @@
2018-11-07
Fixed bug in cf.Field.regridc
that caused it to fail when
@@ -1056,7 +1073,7 @@
2018-10-22
The collapse method can now be parallelised by running any cf-python @@ -1067,7 +1084,7 @@
2018-08-28
Bug fix: better handle subspacing by multiple multidimensional items
2018-07-25
Bug fix: correctly set units of bounds when the cf.Data
object
@@ -1085,7 +1102,7 @@
2018-07-24
Improved error messages
2018-07-02
Fixed bug with HDF chunk sizes that prevented the writing of large @@ -1105,7 +1122,7 @@
2018-06-29
Interim fix for with HDF chunk sizes that prevented the writing of @@ -1113,7 +1130,7 @@
2018-06-21
2018-06-21
During writing, disallow the creation of netCDF variable names that @@ -1132,7 +1149,7 @@
2018-06-06
Fix for removing duplicated netCDF dimensions when writing data on @@ -1141,14 +1158,14 @@
2018-06-05
Fix for calculating are weights from projection coordinates
2018-06-04
2018-05-31
Allowed invalid units through. Can test with cf.Units.isvalid
.
2018-03-08
Fixed bug when weights parameter is a string in cf.Field.collapse
2018-02-13
Fixed bug in cf.Field.collapse
when doing climatological time
@@ -1182,7 +1199,7 @@
2018-02-09
Fixed bug in Variable.mask
2018-02-09
Added override_calendar method to coordinates and domain ancillaries @@ -1202,14 +1219,14 @@
2018-02-07
Allowed scipy
and matplotlib
imports to be optional
Allowed scipy
and matplotlib
imports to be optional
2017-11-28
2017-11-10
Disallowed raising offset units to a power (e.g. taking the square @@ -1233,14 +1250,14 @@
2017-10-30
Misc. bug fixes
2017-09-28
2017-09-19
Bug fix when creating wrap-around subspaces from cyclic fields
2017-09-15
submodel property for PP files
2017-08-01
2017-07-12
Bug fix for reading DSG ragged arrays
2017-07-11
Updated cf.FieldList
behaviour (with reduced methods)
2017-07-07
First release with full CF data model and full CF-1.6 compliance @@ -1303,7 +1320,7 @@
2017-07-07
Bug fixes to cf.Field.regridc
2017-06-13
removed errant scikit import
2017-06-09
Tripolar regridding
2017-05-10
Updated STASH code to standard_name table (with thanks to Jeff Cole)
2017-03-17
Fixed bug when accessing PP file whose format/endian/word-size has @@ -1345,7 +1362,7 @@
2017-03-14
Can specify ‘pp’ or ‘PP’ in um option to cf.read
2017-02-24
Changed weights in calculation of variance to reliability weights @@ -1363,7 +1380,7 @@
2017-02-22
Rounded datetime to time-since conversions to the nearest @@ -1375,7 +1392,7 @@
2017-01-31
Rounded datetime to time-since conversions to the nearest @@ -1386,7 +1403,7 @@
2016-09-21
Added –build-id to LDFLAGS in umread Makefile, for sake of RPM @@ -1403,7 +1420,7 @@
2016-09-09
New method: cf.Field.unlimited
, and new ‘unlimited’ parameter to
@@ -1412,7 +1429,7 @@
2016-09-05