vigliensoni/StaffFinder — Issue #1: Check the use of map()
Author: ahankinson
Created: 2011-11-26 12:39:36+00:00
State: open

Here:

https://github.com/vigliensoni/StaffFinder/blob/master/linear_regression.py#L13

I think you probably mean something like:

for x,y in zip(X,Y):
... do something...

`map()` is pretty inefficient in Python, and if you're mapping `None` over two lists, you probably wanted to `zip()` them anyway.

Just for interest sake, you can usually replace `map()` with a list comprehension:

output = [foo(X) for X in Y]

List comprehensions are much faster in Python than their functional equivalents (map(), reduce() and filter()).