Unexpected behaviour of apply function
#### Code Sample, a copy-pastable example if possible

```python
import numpy as np
import pandas as pd

tmp = np.array([[1,1,1], [1,0,0], [1,1,0], [1,1,0]])
tmp_df = pd.DataFrame(tmp)

tmp_df.apply(lambda x: x[x==1].index.tolist() , axis=1) # throws ValueError [I]
Out[0]:
ValueError: could not broadcast input array from shape (2) into shape (3)

tmp_df.apply(lambda x: [x[x==1].index.tolist()] , axis=1) # This doesn't throw Error [II]
Out[1]: 
0    [[0, 1, 2]]
1          [[0]]
2       [[0, 1]]
3       [[0, 1]]
dtype: object

tmp2 = np.array([[1,0,0], [1,0,0], [0,1,1]])
tmp2_df.apply(lambda x: x[x==1].index.tolist(), axis=1)  # This works
Out[2]: 
0       [0]
1       [0]
2    [1, 2]
dtype: object

```
#### Problem description
my pandas version is v0.22.0 and numpy version is 0.14.0
The expected output of [I] is a Series containing a list in each row but it's throwing an ValueError. 

#### Expected Output
[I] should return,
0    [0, 1, 2]
1          [0]
2       [0, 1]
3       [0, 1]

#### Output of ``pd.show_versions()``

<details>

[paste the output of ``pd.show_versions()`` here below this line]
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.4.final.0
python-bits: 64
OS: Darwin
OS-release: 17.6.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.22.0
pytest: 3.4.0
pip: 9.0.1
setuptools: 38.5.1
Cython: 0.27.3
numpy: 1.14.0
scipy: 1.0.0
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: 1.7.0
patsy: 0.5.0
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: 1.2.1
tables: None
numexpr: 2.6.4
feather: None
matplotlib: 2.1.2
openpyxl: 2.5.0
xlrd: 1.1.0
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.9999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None

</details>