diff --git a/lisa/datautils.py b/lisa/datautils.py index 808669898603a4450a0d425b3ee974c6476b53c3..8804109d06aefd4d6b921e40fa876022c7db2297 100644 --- a/lisa/datautils.py +++ b/lisa/datautils.py @@ -547,7 +547,7 @@ def series_derivate(y, x=None, order=1): :param x: Series with the `x` data. If ``None``, the index of `y` will be used. Note that `y` and `x` are expected to have the same index. - :type y: pandas.DataFrame or None + :type x: pandas.DataFrame or None :param order: Order of the derivative (1 is speed, 2 is acceleration etc). :type order: int @@ -573,7 +573,7 @@ def series_integrate(y, x=None, sign=None, method='rect', rect_step='post'): :param x: Series with the `x` data. If ``None``, the index of `y` will be used. Note that `y` and `x` are expected to have the same index. - :type y: pandas.DataFrame or None + :type x: pandas.DataFrame or None :param sign: Clip the data for the area in positive or negative regions. Can be any of: @@ -691,7 +691,7 @@ def series_mean(y, x=None, **kwargs): :param x: Series with the `x` data. If ``None``, the index of `y` will be used. Note that `y` and `x` are expected to have the same index. - :type y: pandas.DataFrame or None + :type x: pandas.DataFrame or None :Variable keyword arguments: Forwarded to :func:`series_integrate`. """ diff --git a/lisa/monad.py b/lisa/monad.py index f84e2d6bdb78fca90dd5e40a09e4b53b2b80be92..9b95290b2a13641305d8a58e371d60df0a91484b 100644 --- a/lisa/monad.py +++ b/lisa/monad.py @@ -23,8 +23,9 @@ All monads share the following API:: # for a given monad Monad # Turns a regular function into a function returning an instance of Monad, - # and able to consume monadic values. Similar to liftM in Haskell. - @Monad.lift + # and able to await on monadic values. Similar to the "do notation" in + # Haskell. + @Monad.do async def foo(x, y): # Inside a decorated function, await can be used to "extract" the value # contained in the monad, like ``<-`` in Haskell. @@ -32,7 +33,7 @@ All monads share the following API:: return x # Equivalent to - @Monad.lift + @Monad.do async def foo(x, y): # note: await is used automatically if x is an instance of Monad x_ = await x @@ -40,7 +41,7 @@ All monads share the following API:: # Monad.pure() is called if x_ is not an instance of Monad return Monad.pure(x_) -This allow composing lifted functions easily +This allow composing decorated functions easily .. note:: There currently is no overridable ``bind`` operation, since nothing in Python currently allows getting a proper continuation without explicit