rolling.corr has different result 

```python
# I have a dataset of part2 and part5
part2 = pd.DataFrame([1,3,4,2,452,2,4,1,4,3,1,4,31,57,8,9,1,1,2,2,12,1,5,4,123,5,6,7,87])
part5 = pd.DataFrame([1,2,3,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1,123,4])
```
```
part2.rolling(3).corr(part5)
```


0
--
NaN
NaN
9.819805e-01
-5.000000e-01
8.640902e-01
5.000000e-01
8.829221e-08
-2.341224e-07
0.000000e+00
2.341224e-07
2.341224e-07
2.341224e-07
0.000000e+00
0.000000e+00
0.000000e+00
-1.021577e-07
0.000000e+00
0.000000e+00
3.097148e-07
0.000000e+00
1.238859e-07
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
8.434557e-08
0.000000e+00
-1.231093e-07
NaN
NaN
NaN



```
p2 = part2.loc[5:15]
p5 = part5.loc[5:15]
p2.rolling(3).corr(p5)

```
0
5	NaN
6	NaN
7	-inf
8	NaN
9	inf
10	inf
11	inf
12	NaN
13	NaN
14	NaN
15	-inf

#### Problem description

part5 has some data same so the result of rolling.corr() should has some inf or nan in
but there isn't
when I cut some part of part2 and part5 to do the rolling.corr I got the different result 
so i want to know that which answer is correct 
and i also get some result of rolling.corr which is greater than 1 or smaller than -1 when i cut these data to do rolling.corr it become to nan or inf


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

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.7.1.final.0
python-bits: 64
OS: Linux
OS-release: 3.10.0-957.1.3.el7.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: zh_CN.UTF-8
LOCALE: zh_CN.UTF-8

pandas: 0.24.2
pytest: 4.0.2
pip: 18.1
setuptools: 40.6.3
Cython: 0.29.2
numpy: 1.15.4
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: 1.8.2
patsy: 0.5.1
dateutil: 2.7.5
pytz: 2018.7
blosc: None
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.8
feather: None
matplotlib: 3.0.2
openpyxl: 2.5.12
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.2
lxml.etree: 4.2.5
bs4: 4.6.3
html5lib: 1.0.1
sqlalchemy: 1.2.15
pymysql: 0.9.3
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None

</details>
