Surface NumPy FutureWarning about comparisons
State: closed

Closes https://github.com/pandas-dev/pandas/issues/22698

Specifically, see
https://github.com/pandas-dev/pandas/issues/22698#issuecomment-458968300.

I don't think we need to worry about the others in https://github.com/pandas-dev/pandas/issues/22698#issuecomment-422446071 datetimearray and integer array. I couldn't reproduce the returning a scalar behavior with those.

Labels:
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
Oh, I was a bit confused... This happens with IntegerArray

```python
In [7]: a = pd.array([1, None], dtype='Int64')

In [8]: a == 'a'
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-8-3812dba97b6d> in <module>
----> 1 a == 'a'

~/sandbox/pandas/pandas/core/arrays/integer.py in cmp_method(self, other)
    561                 mask = self._mask | mask
    562
--> 563             result[mask] = op_name == 'ne'
    564             return result
    565

TypeError: 'bool' object does not support item assignment
```

So right now `IntegerArray.__eq__(other)` is broken when the op is using the deprecated behavior.

I don't think showing a warning here is useful. We could work around it I suppose?
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26966?src=pr&el=h1) Report
> Merging [#26966](https://codecov.io/gh/pandas-dev/pandas/pull/26966?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/cfd65e98e694b2ad40e97d06ffdd9096a3dea909?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/26966/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/26966?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #26966      +/-   ##
==========================================
- Coverage   91.87%   91.87%   -0.01%     
==========================================
  Files         180      180              
  Lines       50746    50744       -2     
==========================================
- Hits        46623    46621       -2     
  Misses       4123     4123
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.47% <100%> (ø)` | :arrow_up: |
| #single | `41.1% <100%> (-0.09%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26966?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/26966/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.92% <100%> (+0.21%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26966/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `88.88% <0%> (-11.12%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/26966/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `96.89% <0%> (-0.12%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26966?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26966?src=pr&el=footer). Last update [cfd65e9...8a967d2](https://codecov.io/gh/pandas-dev/pandas/pull/26966?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26966?src=pr&el=h1) Report
> Merging [#26966](https://codecov.io/gh/pandas-dev/pandas/pull/26966?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/cfd65e98e694b2ad40e97d06ffdd9096a3dea909?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/26966/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/26966?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #26966      +/-   ##
==========================================
- Coverage   91.87%   91.87%   -0.01%     
==========================================
  Files         180      180              
  Lines       50746    50744       -2     
==========================================
- Hits        46623    46621       -2     
  Misses       4123     4123
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.47% <100%> (ø)` | :arrow_up: |
| #single | `41.1% <100%> (-0.09%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26966?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/26966/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.92% <100%> (+0.21%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26966/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `88.88% <0%> (-11.12%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/26966/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `96.89% <0%> (-0.12%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26966?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26966?src=pr&el=footer). Last update [cfd65e9...add926f](https://codecov.io/gh/pandas-dev/pandas/pull/26966?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

looks fine. do we need to catch / suppress this in *any* of our tests?
I don’t think we hit this anywhere else. If we did the NumPy dev build would be failing. 
k thanks @TomAugspurger