BUG: on groupby and sum between inf and float
### 

- [X] I have checked that this issue has not already been reported.

- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.

- [ ] I have confirmed this bug exists on the master branch of pandas.


### Reproducible Example

```python
python 3.8.10 (default, Jun  4 2021, 15:09:15) 
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd
>>> pd.__version__
'1.3.3'
>>> import numpy as np
>>> df = pd.DataFrame({'A':[1,1], 'B':[np.inf,2]})
>>> df.sum()
A    2.0
B    inf
dtype: float64
>>> df.groupby(['A']).agg(sum)
    B
A    
1 NaN
>>> df.groupby(['A']).sum()
    B
A    
1 NaN

```


### Issue Description

when summing inf and a number from a groupby aggregation the result is NaN

### Expected Behavior

when summing inf and a number from a groupby aggregation the result should be inf

### Installed Versions

<details>
pd.show_version()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/thomas/miniconda3/envs/py38/lib/python3.8/site-packages/pandas/__init__.py", line 244, in __getattr__
    raise AttributeError(f"module 'pandas' has no attribute '{name}'")
AttributeError: module 'pandas' has no attribute 'show_version'
</details>
