DEV: doctests fail on automatic int32/int64 selection
- [x] I have checked that this issue has not already been reported.

- [x] I have confirmed this bug exists on the latest version of pandas.

- [x] (optional) I have confirmed this bug exists on the master branch of pandas.

---

**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.

#### Code Sample, a copy-pastable example

On Windows 64 bit, latest commit from `master` branch, etc. (see output of `pd.show_versions()` below), fresh virtual environment, install pandas in editable mode from repo root and run the `validate_docstrings.py` script on `pandas.core.generic.NDFrame.resample`:

```cmd
pip install -e .
python scripts\validate_docstrings.py pandas.core.generic.NDFrame.resample
```

A bunch of doctests fail, with the only difference between actual and expected being int32/int64 respectively:

<details>

```none
################################################################################
################### Docstring (pandas.core.generic.NDFrame)  ###################
################################################################################

[...]

################################################################################
################################## Validation ##################################
################################################################################

2 Errors found:
        Return value has no description
        Examples do not pass tests

################################################################################
################################### Doctests ###################################
################################################################################

**********************************************************************
Line 291, in pandas.core.generic.NDFrame.resample
Failed example:
    ts
Expected:
    2000-10-01 23:30:00     0
    2000-10-01 23:37:00     3
    2000-10-01 23:44:00     6
    2000-10-01 23:51:00     9
    2000-10-01 23:58:00    12
    2000-10-02 00:05:00    15
    2000-10-02 00:12:00    18
    2000-10-02 00:19:00    21
    2000-10-02 00:26:00    24
    Freq: 7T, dtype: int64
Got:
    2000-10-01 23:30:00     0
    2000-10-01 23:37:00     3
    2000-10-01 23:44:00     6
    2000-10-01 23:51:00     9
    2000-10-01 23:58:00    12
    2000-10-02 00:05:00    15
    2000-10-02 00:12:00    18
    2000-10-02 00:19:00    21
    2000-10-02 00:26:00    24
    Freq: 7T, dtype: int32
**********************************************************************
Line 303, in pandas.core.generic.NDFrame.resample
Failed example:
    ts.resample('17min').sum()
Expected:
    2000-10-01 23:14:00     0
    2000-10-01 23:31:00     9
    2000-10-01 23:48:00    21
    2000-10-02 00:05:00    54
    2000-10-02 00:22:00    24
    Freq: 17T, dtype: int64
Got:
    2000-10-01 23:14:00     0
    2000-10-01 23:31:00     9
    2000-10-01 23:48:00    21
    2000-10-02 00:05:00    54
    2000-10-02 00:22:00    24
    Freq: 17T, dtype: int32
**********************************************************************
Line 311, in pandas.core.generic.NDFrame.resample
Failed example:
    ts.resample('17min', origin='epoch').sum()
Expected:
    2000-10-01 23:18:00     0
    2000-10-01 23:35:00    18
    2000-10-01 23:52:00    27
    2000-10-02 00:09:00    39
    2000-10-02 00:26:00    24
    Freq: 17T, dtype: int64
Got:
    2000-10-01 23:18:00     0
    2000-10-01 23:35:00    18
    2000-10-01 23:52:00    27
    2000-10-02 00:09:00    39
    2000-10-02 00:26:00    24
    Freq: 17T, dtype: int32
**********************************************************************
Line 319, in pandas.core.generic.NDFrame.resample
Failed example:
    ts.resample('17min', origin='2000-01-01').sum()
Expected:
    2000-10-01 23:24:00     3
    2000-10-01 23:41:00    15
    2000-10-01 23:58:00    45
    2000-10-02 00:15:00    45
    Freq: 17T, dtype: int64
Got:
    2000-10-01 23:24:00     3
    2000-10-01 23:41:00    15
    2000-10-01 23:58:00    45
    2000-10-02 00:15:00    45
    Freq: 17T, dtype: int32
**********************************************************************
Line 329, in pandas.core.generic.NDFrame.resample
Failed example:
    ts.resample('17min', origin='start').sum()
Expected:
    2000-10-01 23:30:00     9
    2000-10-01 23:47:00    21
    2000-10-02 00:04:00    54
    2000-10-02 00:21:00    24
    Freq: 17T, dtype: int64
Got:
    2000-10-01 23:30:00     9
    2000-10-01 23:47:00    21
    2000-10-02 00:04:00    54
    2000-10-02 00:21:00    24
    Freq: 17T, dtype: int32
**********************************************************************
Line 336, in pandas.core.generic.NDFrame.resample
Failed example:
    ts.resample('17min', offset='23h30min').sum()
Expected:
    2000-10-01 23:30:00     9
    2000-10-01 23:47:00    21
    2000-10-02 00:04:00    54
    2000-10-02 00:21:00    24
    Freq: 17T, dtype: int64
Got:
    2000-10-01 23:30:00     9
    2000-10-01 23:47:00    21
    2000-10-02 00:04:00    54
    2000-10-02 00:21:00    24
    Freq: 17T, dtype: int32
**********************************************************************
Line 346, in pandas.core.generic.NDFrame.resample
Failed example:
    ts.resample('17min', offset='2min').sum()
Expected:
    2000-10-01 23:16:00     0
    2000-10-01 23:33:00     9
    2000-10-01 23:50:00    36
    2000-10-02 00:07:00    39
    2000-10-02 00:24:00    24
    Freq: 17T, dtype: int64
Got:
    2000-10-01 23:16:00     0
    2000-10-01 23:33:00     9
    2000-10-01 23:50:00    36
    2000-10-02 00:07:00    39
    2000-10-02 00:24:00    24
    Freq: 17T, dtype: int32
**********************************************************************
Line 360, in pandas.core.generic.NDFrame.resample
Failed example:
    ts_out
Expected:
    2000-10-01 23:33:00     0
    2000-10-01 23:50:00     9
    2000-10-02 00:07:00    21
    2000-10-02 00:24:00    54
    2000-10-02 00:41:00    24
    Freq: 17T, dtype: int64
Got:
    2000-10-01 23:33:00     0
    2000-10-01 23:50:00     9
    2000-10-02 00:07:00    21
    2000-10-02 00:24:00    54
    2000-10-02 00:41:00    24
    Freq: 17T, dtype: int32
```

But when I run these examples from the python console of the virtual environment, I get the correct results (i.e. with int64).

</details>

#### Expected Output

No doctests fail.

#### Problem description

The selection of the integer dtype (int64 vs int32) shouldn't differ between running the `validate_dosctrings.py` script and running the examples manually. Why does this happen?

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

<details>

```none
INSTALLED VERSIONS
------------------
commit           : 8df0218a4bfae50a7191ff0869e63c28884fb733
python           : 3.8.2.final.0
python-bits      : 64
OS               : Windows
OS-release       : 10
Version          : 10.0.18362
machine          : AMD64
processor        : Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
byteorder        : little
LC_ALL           : None
LANG             : None
LOCALE           : English_United Kingdom.1252
pandas           : 1.2.0.dev0+378.g8df0218a4
numpy            : 1.18.4
pytz             : 2020.1
dateutil         : 2.8.1
pip              : 20.1
setuptools       : 46.1.3
Cython           : 0.29.17
pytest           : 5.4.2
hypothesis       : 5.11.0
sphinx           : 3.2.1
blosc            : 1.9.1
feather          : None
xlsxwriter       : 1.2.8
lxml.etree       : 4.5.0
html5lib         : 1.0.1
pymysql          : None
psycopg2         : None
jinja2           : 2.11.2
IPython          : 7.14.0
pandas_datareader: None
bs4              : 4.9.0
bottleneck       : 1.3.2
fsspec           : 0.8.2
fastparquet      : 0.3.3
gcsfs            : 0.7.1
matplotlib       : 3.2.1
numexpr          : 2.7.1
odfpy            : None
openpyxl         : 3.0.3
pandas_gbq       : None
pyarrow          : 0.17.0
pytables         : None
pyxlsb           : None
s3fs             : 0.4.2
scipy            : 1.4.1
sqlalchemy       : 1.3.16
tables           : 3.6.1
tabulate         : 0.8.7
xarray           : 0.15.1
xlrd             : 1.2.0
xlwt             : 1.3.0
numba            : 0.49.1
```

</details>
