catch Exception currently ignored
State: closed

From Travis log: https://travis-ci.org/pandas-dev/pandas/jobs/295371293
```
.ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
Exception ignored in: 'pandas._libs.lib.is_bool_array'
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
.................ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
Exception ignored in: 'pandas._libs.lib.is_bool_array'
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
.ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
Exception ignored in: 'pandas._libs.lib.is_bool_array'
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
```

This just catches that error so we can track it down.

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Internals
description: Related to non-user accessible pandas implementation

Comments:
Poking at this a bit, the main takeaway so far is that the `lib.is_xyz_array` funcs need attention.  Every case I've tried either raises a `ValueError` or gives a warning about an ignored `ValueError` before returning `False`.

```
In [1]: import pandas as pd
In [2]: import numpy as np
In [3]: from pandas._libs import lib
In [4]: values = np.array([2, 1, 1, 2], dtype=np.int64)    # The relevant arg in TestMergeCategorical.test_other_columns
In [5]: lib.is_bool_array(values)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
Exception ValueError: "Buffer dtype mismatch, expected 'Python object' but got 'long'" in 'pandas._libs.lib.is_bool_array' ignored
Out[5]: False

In [7]: lib.is_bool_array(values.astype(bool))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
ValueError: Does not understand character buffer dtype format string ('?')
Exception ValueError: "Does not understand character buffer dtype format string ('?')" in 'pandas._libs.lib.is_bool_array' ignored
Out[7]: False

In [8]: lib.is_datetime_array(values)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-8-a5b7fc4b6701> in <module>()
----> 1 lib.is_datetime_array(values)

pandas/_libs/src/inference.pyx in pandas._libs.lib.is_datetime_array()

ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'

In [9]: lib.is_datetime_array(values.astype('datetime64[ns]'))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-9-0c109014e134> in <module>()
----> 1 lib.is_datetime_array(values.astype('datetime64[ns]'))

pandas/_libs/src/inference.pyx in pandas._libs.lib.is_datetime_array()

ValueError: cannot include dtype 'M' in a buffer

In [11]: lib.is_integer_array(values)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
Exception ValueError: "Buffer dtype mismatch, expected 'Python object' but got 'long'" in 'pandas._libs.lib.is_integer_array' ignored
Out[11]: False

In [14]: lib.is_bytes_array(values)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long'
Exception ValueError: "Buffer dtype mismatch, expected 'Python object' but got 'long'" in 'pandas._libs.lib.is_bytes_array' ignored
Out[14]: False

In [15]: lib.is_bytes_array(values.astype(bytes))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
ValueError: Buffer dtype mismatch, expected 'Python object' but got a string
Exception ValueError: "Buffer dtype mismatch, expected 'Python object' but got a string" in 'pandas._libs.lib.is_bytes_array' ignored
Out[15]: False
```

The closest thing to good news is that most of these functions are not used very much (at least not outside of inference.pyx, where maybe they behave better because of [mumble]).   Four of them are explicitly tested in `tests.dtypes.test_inference` (`is_datetime_array, is_datetime64_array`, `is_timdelta_array`, `is_timedelta64_array`).  Other than that, its just two uses of `is_bool_array` (`core.common`, `core.internals`) and one of `is_datetime_array` (in `core.indexes.base`)

I'm hereby handing this off to the next person in line.
> I'm hereby handing this off to the next person in line.

@jbrockmendel : IIUC, I think you should create an issue for this.  Then I'll close the PR.