Replaced np.bool refs; fix CI failure
State: closed

I mostly just replace `np.bool` with `np.bool_` though there are some other cases where I just used bool. I don't know if it matters...so happy to conform one way or another

For now just seeing if this fixes CI

Closes https://github.com/pandas-dev/pandas/issues/34848.

Labels:
name: CI
description: Continuous Integration

Comments:
Looks like also need np.complex?
Pushed a batch of `np.object` -> object. There are still a few more failures.
The last run (https://travis-ci.org/github/pandas-dev/pandas/jobs/699299640#L3736) passed, but there were still many warnings. Because we don't run that job with `-Werror`.

Anyway, hopefully these are all caught now.
after this would be nice to have a lint rule to catch these if possible (as it would fail much sooner than the 3.9 CI)
Opened https://github.com/pandas-dev/pandas/pull/34852 to fail on warnings for that build. I'd like to get CI passing first for other PRs though.
Good to merge when CI passes?
Has anyone seen this failure on npdev before? Restarting that build.

```
=================================== FAILURES ===================================
________________ TestDataFrameSortIndex.test_sort_index_inplace ________________
[gw1] linux -- Python 3.7.7 /home/vsts/miniconda3/envs/pandas-dev/bin/python

self = <pandas.tests.frame.methods.test_sort_index.TestDataFrameSortIndex object at 0x7f566041fa50>

    def test_sort_index_inplace(self):
        frame = DataFrame(
            np.random.randn(4, 4), index=[1, 2, 3, 4], columns=["A", "B", "C", "D"]
        )
    
        # axis=0
        unordered = frame.loc[[3, 2, 4, 1]]
        a_id = id(unordered["A"])
        df = unordered.copy()
        df.sort_index(inplace=True)
        expected = frame
        tm.assert_frame_equal(df, expected)
>       assert a_id != id(df["A"])
E       assert 140008958850064 != 140008958850064
E        +  where 140008958850064 = id(1   -1.103603\n2   -0.373049\n3   -0.418311\n4   -0.079376\nName: A, dtype: float64)

pandas/tests/frame/methods/test_sort_index.py:224: AssertionError
```
The 3.9 build passed, with a few warnings I can't track down yet

```
=============================== warnings summary ===============================

pandas/core/arrays/boolean.py:735

pandas/core/arrays/boolean.py:735

pandas/core/arrays/boolean.py:735

  /home/travis/build/pandas-dev/pandas/pandas/core/arrays/boolean.py:735: DeprecationWarning: In future, it will be an error for 'np.bool_' scalars to be interpreted as an index

    result = op(self._data, other)

pandas/_testing.py:699

pandas/_testing.py:699

pandas/_testing.py:699

pandas/_testing.py:699

pandas/_testing.py:699

pandas/_testing.py:699

pandas/_testing.py:699

pandas/_testing.py:699

  /home/travis/build/pandas-dev/pandas/pandas/_testing.py:699: DeprecationWarning: elementwise comparison failed; this will raise an error in the future.

    diff = np.sum((left.values != right.values).astype(int)) * 100.0 / len(left)

pandas/io/json/_json.py:158: 15 tests with warnings

  /home/travis/build/pandas-dev/pandas/pandas/io/json/_json.py:158: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.

    return dumps(

pandas/tests/io/json/test_pandas.py:1176

pandas/tests/io/json/test_pandas.py:1176

pandas/tests/io/json/test_pandas.py:1176

  /home/travis/build/pandas-dev/pandas/pandas/tests/io/json/test_pandas.py:1176: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.

    assert dumps(ts, iso_dates=True) == exp

pandas/tests/io/json/test_pandas.py:1178

pandas/tests/io/json/test_pandas.py:1178

pandas/tests/io/json/test_pandas.py:1178

  /home/travis/build/pandas-dev/pandas/pandas/tests/io/json/test_pandas.py:1178: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.

    assert dumps(dt, iso_dates=True) == exp

pandas/tests/io/json/test_pandas.py:1202

pandas/tests/io/json/test_pandas.py:1202

pandas/tests/io/json/test_pandas.py:1202

pandas/tests/io/json/test_pandas.py:1202

pandas/tests/io/json/test_pandas.py:1202

pandas/tests/io/json/test_pandas.py:1202

  /home/travis/build/pandas-dev/pandas/pandas/tests/io/json/test_pandas.py:1202: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.

    result = dumps(df, iso_dates=True)
```

I'll handle those in https://github.com/pandas-dev/pandas/pull/34852
All green @WillAyd @jreback.
lgtm @jreback . thanks Tom for pushing this through
lgtm @jreback . thanks Tom for pushing this through
xref numpy/numpy#14882