pydata/pandas — pull request #2880 by stephenwlin (2013-02-16 04:56:33+00:00)
Title: BUG: Series construction from MaskedArray fails for non-floating, non-object types

Currently Series constructor is throwing exceptions or ignoring the mask for non-floating, non-object MaskedArray input:
```python
In [1]: from numpy.ma import MaskedArray as ma
In [2]: from pandas import Series
In [3]: from datetime import datetime as dt
In [4]: mask = [True, False]

In [5]: Series(ma([2, 0], mask=mask, dtype=int))
(exception)

In [6]: Series(ma([True, False], mask=mask, dtype=bool))
Out[6]:
0 True
1 False

In [7]: Series(ma([dt(2006, 1, 1), dt(2007, 1, 1)],
...: mask=mask, dtype='M8[ns]'))
(exception)
```

After fix:
```python
In [1]: from numpy.ma import MaskedArray as ma
In [2]: from pandas import Series
In [3]: from datetime import datetime as dt
In [4]: mask = [True, False]

In [5]: Series(ma([2, 0], mask=mask, dtype=int))
Out[5]:
0 NaN
1 0
Dtype: float64

In [6]: Series(ma([True, False], mask=mask, dtype=bool))
Out[6]:
0 NaN
1 False
Dtype: object

In [7]: Series(ma([dt(2006, 1, 1), dt(2007, 1, 1)],
...: mask=mask, dtype='M8[ns]'))
Out[7]:
0 NaT
1 2007-01-01 00:00:00
Dtype: datetime64[ns]
```

Also made some PEP8 line length fixes