diff --git a/cf/data/data.py b/cf/data/data.py index 83735069d7..2820e89852 100644 --- a/cf/data/data.py +++ b/cf/data/data.py @@ -828,19 +828,6 @@ def __float__(self): """ return float(self._get_dask()) - def __round__(self, *ndigits): - """Called to implement the built-in function `round` - - x.__round__(*ndigits) <==> round(x, *ndigits) - - """ - if self.size != 1: - raise TypeError( - "only length-1 arrays can be converted to Python scalars" - ) - - return round(self.datum(), *ndigits) - @daskified(_DASKIFIED_VERBOSE) def __int__(self): """Called to implement the built-in function `int` diff --git a/cf/test/test_Data.py b/cf/test/test_Data.py index 3dce6264af..b53725cd2a 100644 --- a/cf/test/test_Data.py +++ b/cf/test/test_Data.py @@ -2359,32 +2359,6 @@ def test_Data__int__(self): with self.assertRaises(Exception): _ = int(cf.Data([1, 2])) - def test_Data__round__(self): - if self.test_only and inspect.stack()[0][3] not in self.test_only: - return - - for ndigits in ([], [0], [1], [2], [3]): - for x in ( - -1.9123, - -1.5789, - -1.4123, - -1.789, - 0, - 1.123, - 1.0234, - 1.412, - 1.9345, - ): - self.assertEqual( - round(cf.Data(x), *ndigits), round(x, *ndigits) - ) - self.assertEqual( - round(cf.Data(x), *ndigits), round(x, *ndigits) - ) - - with self.assertRaises(Exception): - _ = round(cf.Data([1, 2])) - def test_Data_argmax(self): if self.test_only and inspect.stack()[0][3] not in self.test_only: return