11""" 
2- Routines for filling missing data 
2+ Routines for filling missing data.  
33""" 
44from  distutils .version  import  LooseVersion 
55import  operator 
@@ -116,7 +116,7 @@ def interpolate_1d(xvalues, yvalues, method='linear', limit=None,
116116 xvalues and yvalues will each be 1-d arrays of the same length. 
117117
118118 Bounds_error is currently hardcoded to False since non-scipy ones don't 
119-  take it as an argumnet . 
119+  take it as an argument . 
120120 """ 
121121 # Treat the original, non-scipy methods first. 
122122
@@ -244,9 +244,9 @@ def interpolate_1d(xvalues, yvalues, method='linear', limit=None,
244244def  _interpolate_scipy_wrapper (x , y , new_x , method , fill_value = None ,
245245 bounds_error = False , order = None , ** kwargs ):
246246 """ 
247-  passed  off to scipy.interpolate.interp1d. method is scipy's kind. 
247+  Passed  off to scipy.interpolate.interp1d. method is scipy's kind. 
248248 Returns an array interpolated at new_x. Add any new methods to 
249-  the list in _clean_interp_method 
249+  the list in _clean_interp_method.  
250250 """ 
251251 try :
252252 from  scipy  import  interpolate 
@@ -314,7 +314,7 @@ def _interpolate_scipy_wrapper(x, y, new_x, method, fill_value=None,
314314
315315def  _from_derivatives (xi , yi , x , order = None , der = 0 , extrapolate = False ):
316316 """ 
317-  Convenience function for interpolate.BPoly.from_derivatives 
317+  Convenience function for interpolate.BPoly.from_derivatives.  
318318
319319 Construct a piecewise polynomial in the Bernstein basis, compatible 
320320 with the specified values and derivatives at breakpoints. 
@@ -325,7 +325,7 @@ def _from_derivatives(xi, yi, x, order=None, der=0, extrapolate=False):
325325 sorted 1D array of x-coordinates 
326326 yi : array_like or list of array-likes 
327327 yi[i][j] is the j-th derivative known at xi[i] 
328-  orders  : None or int or array_like of ints. Default: None. 
328+  order : None or int or array_like of ints. Default: None. 
329329 Specifies the degree of local polynomials. If not None, some 
330330 derivatives are ignored. 
331331 der : int or list 
@@ -344,8 +344,7 @@ def _from_derivatives(xi, yi, x, order=None, der=0, extrapolate=False):
344344 Returns 
345345 ------- 
346346 y : scalar or array_like 
347-  The result, of length R or length M or M by R, 
348- 
347+  The result, of length R or length M or M by R. 
349348 """ 
350349 import  scipy 
351350 from  scipy  import  interpolate 
@@ -418,8 +417,9 @@ def _akima_interpolate(xi, yi, x, der=0, axis=0):
418417
419418def  interpolate_2d (values , method = 'pad' , axis = 0 , limit = None , fill_value = None ,
420419 dtype = None ):
421-  """ perform an actual interpolation of values, values will be make 2-d if 
422-  needed fills inplace, returns the result 
420+  """ 
421+  Perform an actual interpolation of values, values will be make 2-d if 
422+  needed fills inplace, returns the result. 
423423 """ 
424424
425425 transf  =  (lambda  x : x ) if  axis  ==  0  else  (lambda  x : x .T )
@@ -533,13 +533,13 @@ def clean_reindex_fill_method(method):
533533
534534def  fill_zeros (result , x , y , name , fill ):
535535 """ 
536-  if  this is a reversed op, then flip x,y 
536+  If  this is a reversed op, then flip x,y 
537537
538-  if  we have an integer value (or array in y) 
538+  If  we have an integer value (or array in y) 
539539 and we have 0's, fill them with the fill, 
540-  return the result 
540+  return the result.  
541541
542-  mask  the nan's from x 
542+  Mask  the nan's from x.  
543543 """ 
544544 if  fill  is  None  or  is_float_dtype (result ):
545545 return  result 
0 commit comments