Skip to content

BUG: Integers raised to negative powers gives wrong results #7649

Closed

Description

@mhvk

In current master:

np.array(1, dtype=int) ** -2
Out[5]: 0

In 1.11 and earlier:

In [3]: np.array(1, dtype=int) ** -2
Out[3]: 1

(Found in astropy testing; astropy/astropy#4950)

Activity

  1. jakevdp commented on May 19, 2016

    @jakevdp
    Contributor

    Duplicate of #7648 – this can probably be closed.

  2. mhvk commented on May 19, 2016

    @mhvk
    ContributorAuthor

    Oops, sorry. Will close (though my example is even worse...)

  3. jakevdp commented on May 19, 2016

    @jakevdp
    Contributor

    Actually, you're right – this looks like a regression in master that might be unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions