Unexpected behaviour of numpy.ufuncs for all NaN DataFrame
#### Code Sample, a copy-pastable example if possible

```python
import numpy as np
import pandas as pd
x = pd.DataFrame(index=[0, 1, 2], columns=[0, 1])
np.log(x)
>>> AttributeError: 'float' object has no attribute 'log'
np.sum(df)
>>> 0    0.0
>>> 1    0.0
dtype: float64

y = pd.DataFrame(index=[0, 1, 2], columns=[0, 1, dtype=float])
np.log(y)
>>>     0   1
>>> 0 NaN NaN
>>> 1 NaN NaN
>>> 2 NaN NaN

```
#### Problem description
The AttributeError raised by calling a numpy.ufunc on a DataFrame with object columns containing NaN values is completely uninformative about the problem. 

The error suggest that the namespace `np` is assigned to a float during execution of that numpy.ufunc. This shouldn't happen in any case.

The error can be observed for ufuncs: `exp`, `log`, `sin`, `cos`, etc.

It is also confusing that the ufunc `sum` can be applied to `x` resulting in the expected output for a DataFrame of dtype=float.

The second example, where the dtype is explicitly set to float, passes as expected.

#### Expected Output
An appropriate exception stating that the numpy.ufunc cannot be applied to a frame with (all) object columns.

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

<details>

INSTALLED VERSIONS
------------------
commit: None

pandas: 0.23.4
pytest: None
pip: 10.0.1
setuptools: 39.2.0
Cython: None
numpy: 1.15.4
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 6.5.0
sphinx: None
patsy: 0.5.1
dateutil: 2.7.3
pytz: 2018.5
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.2.3
openpyxl: None
xlrd: 1.2.0
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 1.0.1
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None

</details>
