Skip to content

Commit

Permalink
Update validation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tagomatech committed Aug 17, 2020
1 parent 1354c44 commit ad9c868
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions statsmodels/tools/validation/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def _right_squeeze(arr, stop_dim=0):
stop_dim : int
Dimension where checking should stop so that shape[i] is not checked
for i < stop_dim
Returns
-------
squeezed : ndarray
Expand Down Expand Up @@ -73,12 +73,12 @@ def array_like(
Ensure that the array's data is contiguous with order ``order``
optional : bool
Flag indicating whether None is allowed
Returns
-------
ndarray
The converted input.
Examples
--------
Convert a list or pandas series to an array
Expand Down Expand Up @@ -163,7 +163,7 @@ class PandasWrapper(object):
----------
pandas_obj : {Series, DataFrame}
Object to extract the index from for wrapping
Notes
-----
Raises if ``orig`` is a pandas type but obj and and ``orig`` have
Expand Down Expand Up @@ -191,7 +191,7 @@ def wrap(self, obj, columns=None, append=None, trim_start=0, trim_end=0):
trim_end : int
The number of observations to drop from the end of the index , so
that the index applied is index[:nobs - trim_end].
Returns
-------
array_like
Expand Down Expand Up @@ -247,7 +247,7 @@ def bool_like(value, name, optional=False, strict=False):
strict : bool
If True, then only allow bool. If False, allow types that support
casting to bool.
Returns
-------
converted : bool
Expand Down Expand Up @@ -290,7 +290,7 @@ def int_like(
strict : bool
If True, then only allow int or np.integer that are not bool. If False,
allow types that support integer division by 1 and conversion to int.
Returns
-------
converted : int
Expand Down Expand Up @@ -333,7 +333,7 @@ def required_int_like(value: Any, name: str, strict: bool = False) -> int:
strict : bool
If True, then only allow int or np.integer that are not bool. If False,
allow types that support integer division by 1 and conversion to int.
Returns
-------
converted : int
Expand Down Expand Up @@ -361,7 +361,7 @@ def float_like(value, name, optional=False, strict=False):
not bool or complex. If False, allow complex types with 0 imag part or
any other type that is float like in the sense that it support
multiplication by 1.0 and conversion to float.
Returns
-------
converted : float
Expand Down Expand Up @@ -392,8 +392,8 @@ def float_like(value, name, optional=False, strict=False):
"{0} must be float_like (float or np.inexact)"
"{1}".format(name, extra_text)
)


def string_like(value, name, optional=False, options=None, lower=True):
"""
Check if object is string-like and raise if not
Expand All @@ -410,7 +410,7 @@ def string_like(value, name, optional=False, options=None, lower=True):
Allowed values for input parameter `value`
lower : bool
Convert all case-based characters in `value` into lowercase
Returns
-------
validated : str
Expand Down

0 comments on commit ad9c868

Please sign in to comment.