Skip to content

BUG: reducing ufuncs don't return a scalar #23312

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

But are wrapped again in the Series or Index:

In [1]: s = pd.Series([1, 2, 3])

In [3]: np.add.reduce(s)
Out[3]: 
0    6
1    6
2    6
dtype: int64

In [4]: np.add.reduce(s.values)
Out[4]: 6

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugCompatpandas objects compatability with Numpy or Python functions

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions