Skip to content

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke commented Mar 12, 2021

  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them

I believe #40293 may have caused the current typing failures in the CI

@mroeschke mroeschke added this to the 1.3 milestone Mar 12, 2021
@mroeschke mroeschke added Typing type annotations, mypy/pyright type checking Window rolling, ewma, expanding labels Mar 12, 2021
@jorisvandenbossche
Copy link
Member

Thanks for the follow-up!

@jorisvandenbossche jorisvandenbossche merged commit bed5ae2 into pandas-dev:master Mar 12, 2021
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge this to get master green again, but still a question about the actual change

def cov(
self,
other: Optional[Union[np.ndarray, FrameOrSeriesUnion]] = None,
other: Optional[FrameOrSeriesUnion] = None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this change correct? Or is the docstring not correct? (which says that other can also be an ndarray)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least on master, passing a numpy array raises

In [1]: pd.Series(range(10)).expanding().cov(np.arange(10))
Exception: Input arrays must be of the same type!

as well there's a test, test_different_input_array_raise_exception that checks that an Exception is raised with a numpy array.

So I can follow up fixing the documentation

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Typing type annotations, mypy/pyright type checking Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants