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

TST: ensure np.equal.reduce raises a TypeError #22223

Merged
merged 2 commits into from Sep 7, 2022

Commits on Sep 7, 2022

  1. Copy the full SHA
    fc0d627 View commit details
    Browse the repository at this point in the history
  2. BUG: Replace assert with correct error

    If we cache a promoted version of the loop, that promoted can mismatch
    the correct one.  This ends up being rejected later in the legacy paths
    (should be the only path currently used), but we should reject it here
    (or in principle we could reject it after cache lookup, but we are fixing
    up the operation DTypes here anyway, so we are looking at the signature).
    
    A call sequence reproducing this directly is:
    
    np.add(1, 2, signature=(bool, int, None))  # should fail
    
    np.add(True, 2)  # A promoted loop
    np.add(1, 2, signature=(bool, int, None))  # should still fail
    
    Not that the errors differ, because the first one comes from the old
    type resolution code and is currently less precise
    seberg authored and charris committed Sep 7, 2022
    Copy the full SHA
    fb9666f View commit details
    Browse the repository at this point in the history