From 43a2e8d5dfc9d0bfa7f7e657031bad10646c901b Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Keck <Jean-Baptiste.Keck@imag.fr> Date: Mon, 9 Nov 2020 15:09:23 +0100 Subject: [PATCH] fix DeprecationWarnings --- hysop/backend/device/opencl/opencl_array_backend.py | 6 +++--- hysop/fields/cartesian_discrete_field.py | 2 +- hysop/fields/continuous_field.py | 2 +- hysop/fields/discrete_field.py | 8 ++++---- hysop/testsenv.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/hysop/backend/device/opencl/opencl_array_backend.py b/hysop/backend/device/opencl/opencl_array_backend.py index 58a90acc1..0bc155f93 100644 --- a/hysop/backend/device/opencl/opencl_array_backend.py +++ b/hysop/backend/device/opencl/opencl_array_backend.py @@ -757,7 +757,7 @@ class OpenClArrayBackend(ArrayBackend): Kernel=_ElementwiseKernel, kernel_build_kwargs=None, kernel_call_kwargs=None, build_kernel_launcher=False): - """ + r""" Build and call kernel that takes: n read-only scalars or OpenClArray as input arguments xi, m OpenClArray as output arguments yi, @@ -2304,7 +2304,7 @@ class OpenClArrayBackend(ArrayBackend): def cumprod(self, a, axis=None, dtype=None, out=None, queue=None): - """ + r""" Return the cumulative product of elements along a given axis. /!\ precision loss because of operation ordering """ @@ -2319,7 +2319,7 @@ class OpenClArrayBackend(ArrayBackend): neutral='0', scan_expr='a+b', queue=queue) def nancumprod(self, a, axis=None, dtype=None, out=None, queue=None): - """ + r""" Return the cumulative product of array elements over a given axis treating Not a Numbers (NaNs) as one. /!\ precision loss because of operation ordering diff --git a/hysop/fields/cartesian_discrete_field.py b/hysop/fields/cartesian_discrete_field.py index 3128bd4f6..3601f1c80 100644 --- a/hysop/fields/cartesian_discrete_field.py +++ b/hysop/fields/cartesian_discrete_field.py @@ -1105,7 +1105,7 @@ class CartesianDiscreteScalarFieldView(CartesianDiscreteScalarFieldViewContainer grid_resolution=None, ghosts=None, tstate=None, lboundaries=None, rboundaries=None, register_discrete_field=False, **kwds): - """ + r""" Create a new Field and a new temporary CartesianDiscreteScalarField. like the current object, possibly on a different backend. /!\ The returned discrete field is not allocated. diff --git a/hysop/fields/continuous_field.py b/hysop/fields/continuous_field.py index a6339c78a..e055b27c8 100644 --- a/hysop/fields/continuous_field.py +++ b/hysop/fields/continuous_field.py @@ -532,7 +532,7 @@ class ScalarField(NamedScalarContainerI, FieldContainerI): initial_values=None, dtype=HYSOP_REAL, lboundaries=None, rboundaries=None, is_tmp=False, mem_tag=None, **kwds): - """ + r""" Create or get an existing continuous ScalarField (scalar or vector) on a specific domain. Parameters diff --git a/hysop/fields/discrete_field.py b/hysop/fields/discrete_field.py index c8ebd79ef..d3babc3a0 100644 --- a/hysop/fields/discrete_field.py +++ b/hysop/fields/discrete_field.py @@ -125,7 +125,7 @@ class DiscreteScalarFieldViewContainerI(object, metaclass=ABCMeta): @abstractmethod def tmp_dfield_like(self, name, **kwds): - """ + r""" Create a new Field container and a new temporary CartesianDiscreteField. like the current object, possibly on a different backend. /!\ The returned discrete field is not allocated. @@ -270,7 +270,7 @@ class DiscreteScalarFieldViewContainerI(object, metaclass=ABCMeta): objects[idx] = obj def has_unique_attribute(self, *attr): - """ + r""" Return true if all contained discrete fields share the same attribute (as stated by the == comparisson operator). @@ -326,7 +326,7 @@ class DiscreteScalarFieldViewContainerI(object, metaclass=ABCMeta): return self.has_unique_attribute('dtype') def get_unique_attribute(self, *attr): - """ + r""" Try to return the unique attribute common to all contained discrete fields. Raise an AttributeError if a attribute is not unique accross contained discrete field views. @@ -926,7 +926,7 @@ class DiscreteTensorField(NamedTensorContainerI, DiscreteScalarFieldViewContaine **kwds) def tmp_dfield_like(self, name, pretty_name=None, **kwds): - """ + r""" Create a new Field container and a new temporary CartesianDiscreteField. like the current object, possibly on a different backend. /!\ The returned discrete field is not allocated. diff --git a/hysop/testsenv.py b/hysop/testsenv.py index 7aab91f1b..d368c3633 100644 --- a/hysop/testsenv.py +++ b/hysop/testsenv.py @@ -178,7 +178,7 @@ class postclean(object): class TestCartesianField(object): - """ + r""" Generate data layouts like cartesian fields (only for testing purposes). This is usefull to test operators internals without the need -- GitLab