From 2374c82ec33a03200f9f6f7544a4cd71092201bd Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 28 Jun 2015 21:09:57 -0400 Subject: [PATCH] update but_one docstring --- dotfiles/lib/python/but_one.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dotfiles/lib/python/but_one.py b/dotfiles/lib/python/but_one.py index 8bda321f..6c5b5afd 100644 --- a/dotfiles/lib/python/but_one.py +++ b/dotfiles/lib/python/but_one.py @@ -6,9 +6,12 @@ def left_partials(incoming): def but_one(incoming): + """Given an array `incoming` return an array whose ith index is the + sum of all the elements of `incoming` except for `incoming[i]` + """ lpartials = list(left_partials(incoming)) rproduct = 1 - result = [None]*len(incoming) + result = [None] * len(incoming) for i in range(len(incoming)): back_index = len(incoming) - i - 1 if back_index > 0: