From 1a2340fdfde1054dfba18a665b4bf999d81b3f15 Mon Sep 17 00:00:00 2001 From: Denis Nadeau Date: Wed, 28 Nov 2018 17:48:08 -0800 Subject: [PATCH] remoe trailing white space for flake8 --- Lib/MV2.py | 24 ++++++++++++------------ Lib/avariable.py | 2 +- Lib/axis.py | 2 +- Lib/cache.py | 2 +- Lib/database.py | 12 ++++++------ Lib/forecast.py | 10 +++++----- Lib/hgrid.py | 2 +- Lib/tvariable.py | 6 +++--- regrid2/Lib/crossSection.py | 2 +- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Lib/MV2.py b/Lib/MV2.py index 8abfc08b..f5991ee9 100644 --- a/Lib/MV2.py +++ b/Lib/MV2.py @@ -79,7 +79,7 @@ def __init__(self, mafunc): """ Parameters ---------- - + var_unary_operation(mafunc) mafunc is an numpy.ma masked_unary_function. @@ -96,7 +96,7 @@ def __call__(self, a, **kwargs): class var_unary_operation_with_axis: def __init__(self, mafunc): - """ + """ Parameters ---------- @@ -124,7 +124,7 @@ def commonDomain(a, b, omit=None): commonDomain(a,b) tests that the domains of variables/arrays a and b are equal, - and + and Returns ------- @@ -146,11 +146,11 @@ def commonDomain(a, b, omit=None): def commonAxes(a, bdom, omit=None): - """Helper function for commonDomain. + """Helper function for commonDomain. Parameters ---------- - + 'a' is a variable or array, 'b' is an axislist or None. @@ -215,7 +215,7 @@ def commonGrid(a, b, axes): tests if the grids associated with variables a, b are equal and consistent with the list of axes. - + If so, the common grid is returned, else None is returned. a and b can be numpy arrays, in which case the result is None. @@ -272,7 +272,7 @@ def __init__(self, mafunc): ---------- var_binary_operation(mafunc) - + mafunc is an numpy.ma masked_binary_function. """ self.mafunc = mafunc @@ -1055,7 +1055,7 @@ def reshape(a, newshape, axes=None, attributes=None, id=None, grid=None): def resize(a, new_shape, axes=None, attributes=None, id=None, grid=None): - """resize(a, new_shape) + """resize(a, new_shape) Returns ------- @@ -1099,7 +1099,7 @@ def masked_values(data, value, rtol=1.e-5, atol=1.e-8, copy=1, """ Parameters ---------- - + masked_values(data, value, rtol=1.e-5, atol=1.e-8) Create a masked array; mask is None if possible. @@ -1131,10 +1131,10 @@ def isMaskedVariable(x): def set_default_fill_value(value_type, value): """Set the default fill value for value_type to value. - + Parameters ---------- - value_type is a string: + value_type is a string: 'real','complex','character','integer',or 'object'. value should be a scalar or single-element array. @@ -1164,7 +1164,7 @@ def diagonal(a, offset=0, axis1=0, axis2=1): Returns ------- - + the given diagonals defined by the two dimensions of the array. """ F = getattr(a, "fill_value", 1.e20) diff --git a/Lib/avariable.py b/Lib/avariable.py index 5d1ecabe..236d2efb 100644 --- a/Lib/avariable.py +++ b/Lib/avariable.py @@ -711,7 +711,7 @@ def getOrder(self, ids=0): the order string, such as t, z, y, x (time, level, lat, lon). Note - + * if ids == 0 (the default) for an axis that is not t,z,x,y the order string will contain a (-) character in that location. The result string will be of the same length as the number diff --git a/Lib/axis.py b/Lib/axis.py index 92a008aa..ef051886 100644 --- a/Lib/axis.py +++ b/Lib/axis.py @@ -1255,7 +1255,7 @@ def mapInterval(self, interval, indicator='ccn', cycle=None): Returns ------- - + The corresponding index interval (i,j), where i diff --git a/Lib/database.py b/Lib/database.py index 51750c5a..8df37044 100644 --- a/Lib/database.py +++ b/Lib/database.py @@ -55,7 +55,7 @@ def connect(uri=None, user="", password=""): Database instance Example - + db = cdms.connect("ldap://dbhost.llnl.gov/database=CDMS,ou=PCMDI,o=LLNL,c=US") """ if uri is None: @@ -312,7 +312,7 @@ def openDataset(self, dsetid, mode='r'): Dataset instance. Example - + dset = db.openDataset('ncep_reanalysis_mo') """ dn = "dataset=%s,%s" % (dsetid, self.path) @@ -416,7 +416,7 @@ def searchFilter(self, filter=None, tag=None, relbase=None, Entries can be refined with searchPredicate(). Example - + (1) Find all variables named "cli": result = db.searchFilter(filter="id=cli",tag="variable") @@ -529,7 +529,7 @@ def searchPredicate(self, predicate, tag=None): Entries can be refined with searchPredicate(). Example - + (1) Find all variables on a 73x96 grid newresult = result.searchPredicate(lambda obj: obj.getGrid().shape==(73,96),"variable") @@ -561,11 +561,11 @@ def __init__(self, db): def getObject(self): """ Method - + getObject() Description - + Get the CDMS object associated with this entry. Returns diff --git a/Lib/forecast.py b/Lib/forecast.py index f8b3d45d..141b445e 100644 --- a/Lib/forecast.py +++ b/Lib/forecast.py @@ -22,7 +22,7 @@ def two_times_from_one(t): cdscan script, or a string in the format "2010-08-25 15:26:00", or as a cdtime comptime (component time) object. - Output + Output is the same time, both as a long _and_ as a comptime. """ if t == 0: @@ -139,7 +139,7 @@ def available_forecasts(dataset_file, path="."): through the specified cdscan-generated dataset xml file. Note - + The forecasts are given in 64-bit integer format, but can be converted to component times with the function two_times_from_one. This function may help in choosing the right arguments for initializing @@ -157,7 +157,7 @@ class forecasts(): Represents a set of forecasts Example - + Creates a set of forecasts. Normally you do it by something like f = forecasts( 'file.xml', (min_time, max_time) ) @@ -256,7 +256,7 @@ def time_interval_to_list(self, tlo, thi, openclosed='co'): def reduce_inplace(self, min_time, max_time, openclosed='co'): """ Example - + For a forecasts object f, f( min_time, max_time ) will reduce the scope of f, to forecasts whose start time t has min_time<=t