Handling NaN during resampling
#### Problem description

When resampling a time-series by averaging, I want the resampled result to be a nan value, if the values which are averaged contain a nan value.

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


def resample_func(values):
    if np.isnan(values).any():
        return np.nan
    else:
        return np.mean(values)


n_data = 12
data = np.arange(n_data, dtype=np.float)
data[5] = np.nan
index = pd.date_range('1/1/2000', periods=n_data, freq='10S')
series = pd.Series(data, index=index)

# Series
print(series)
# Resampled, ...
# ...using the mean() method of pandas
print(series.resample('1T').mean())
# ...using numpy.mean() (normally returns nan if any value is nan)
print(series.resample('1T').apply(np.mean))
# ...using custom function, that does, what np.mean should do
print(series.resample('1T').apply(resample_func))
```

When resampling a timeseries with pandas using the apply(function), np.mean() does not work as intended. Usually np.mean(array) returns nan, if any there is a nan value in the array. In the example shown below, applying np.mean works like applying np.nanmean, where nan values are simply ignored. Only by using a simple custom function, I could get a nan value in the resampled time series for periods that contain a nan value.

#### So where is the problem?

Why is the behaviour of np.mean or other functions (np.max, np.min, ...) different from its original use when using them as a function in apply()?

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

<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.1.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 69 Stepping 1, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None

pandas: 0.23.3
pytest: None
pip: 18.0
setuptools: 38.5.1
Cython: 0.28.4
numpy: 1.15.0
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.6.1
pytz: 2018.3
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.2.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
</details>
