Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: np.timedelta64 + Period #44182

Merged
merged 3 commits into from
Oct 28, 2021

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

@jreback jreback added Compat pandas objects compatability with Numpy or Python functions Period Period data type labels Oct 28, 2021
@jreback jreback added this to the 1.4 milestone Oct 28, 2021
@jreback jreback merged commit 66ce5de into pandas-dev:master Oct 28, 2021
@jbrockmendel jbrockmendel deleted the bug-per-array_priority branch October 28, 2021 15:07
@mathause
Copy link
Contributor

mathause commented Nov 1, 2021

This can fail for 0D arrays

import pandas as pd
import numpy as np
result = np.array(0) == pd.Period("2000", freq="B")

Now raises TypeError: iteration over a 0-d array while it returned False before (where type(result) == numpy.bool_).

@jbrockmendel
Copy link
Member Author

Good catch. PR to address this will be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Period Period data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants