Skip to content

Commit

Permalink
fix larray-project#89 : updated docstring of method with_total
Browse files Browse the repository at this point in the history
  • Loading branch information
alixdamman committed Aug 30, 2017
1 parent 41138c7 commit 75bdf44
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions larray/core/array.py
Expand Up @@ -2942,12 +2942,15 @@ def with_total(self, *args, **kwargs):
Parameters
----------
args
kwargs
op : aggregate function
Defaults to `sum()`.
label : scalar value
label to use for the total. Defaults to "total".
\*args : int or str or Axis or Group or any combination of those, optional
Axes or groups along which to compute the aggregates. Defaults to aggregate over the whole array.
\**kwargs
* op : aggregate function
Defaults to `sum()`.
* label : scalar value
label to use for the total. Defaults to "total".
Returns
-------
Expand All @@ -2967,6 +2970,12 @@ def with_total(self, *args, **kwargs):
a1 3 4 5 12
a2 6 7 8 21
total 9 12 15 36
>>> arr.with_total('a')
a\\b b0 b1 b2
a0 0 1 2
a1 3 4 5
a2 6 7 8
total 9 12 15
>>> arr.with_total(op=prod, label='product')
a\\b b0 b1 b2 product
a0 0 1 2 0
Expand Down

0 comments on commit 75bdf44

Please sign in to comment.