BUG: bug in GroupBy.count where arg minlength passed to np.bincount must be None for np<1.13
State: closed

- [x] closes #21956
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

See #21956 for details.

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

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21957?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@495a0c1`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff            @@
##             master   #21957   +/-   ##
=========================================
  Coverage          ?   92.02%           
=========================================
  Files             ?      170           
  Lines             ?    50710           
  Branches          ?        0           
=========================================
  Hits              ?    46664           
  Misses            ?     4046           
  Partials          ?        0
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.42% <100%> (?)` | |
| #single | `42.31% <0%> (?)` | |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21957?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/groupby/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/21957/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9nZW5lcmljLnB5) | `86.8% <100%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21957?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/21957?src=pr&el=footer). Last update [495a0c1...32a5fcf](https://codecov.io/gh/pandas-dev/pandas/pull/21957?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@jreback I got a straight up ValueError in master, so no warning. That ValueError is not in this PR, obviously

I've got a feeling I don't understand you. Could you give an example where a warning is emitted?
Hello @topper-123! Thanks for updating the PR.





Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on July 26, 2018 at 12:58 Hours UTC
Something's wrong with travis, else green:

```
Worker information
hostname: 1773d14a-144b-4458-b6fe-9060bb57620b@1.production-2-worker-org-09-packet
version: v4.0.0 https://github.com/travis-ci/worker/tree/e5cb567e10c0eefe380e81c9a2229ac8fb6a16ce
instance: 2a708b5 travisci/ci-garnet:packer-1512502276-986baf0 (via amqp)
startup: 2.24796375s
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated
```

thanks @topper-123 
so these are the warnings: https://travis-ci.org/pandas-dev/pandas/jobs/410445444
```
/home/travis/build/pandas-dev/pandas/pandas/core/groupby/generic.py:1209: DeprecationWarning: 0 should be passed as minlength instead of None; this will error in future.
    out = np.bincount(ids[mask], minlength=ngroups or None)
```

can you PR to fix this. I guess we have to switch on the version and actually pass 0 rather than None for > 113