Skip to content

Documentation mistake numpy.floor_divide #13215

Closed

Description

@PDiracDelta

The floor_divide docs claim that

Return the largest integer smaller or equal to the division of the inputs. It is equivalent to the Python // operator and pairs with the Python % (remainder), function so that b = a % b + b * (a // b) up to roundoff.

However, the mathematical expression is equal to a, not equal to b.

Reproducing code example:

a=9; b=2; a % b + b * (a // b)  == a
True

Numpy/Python version information:

Numpy docs V1.16.1

Activity

  1. mbengtanyi commented on Mar 30, 2019

    @mbengtanyi

    Hello, I'm new to open source and would like to work on this if no one is.

  2. seberg commented on Mar 30, 2019

    @seberg
    Member

    Please just go ahead, in case you are thinking about Outreachy. Especially also in that case, please look into building the documentation locally as well.

    For some general notes about our workflow have a short look at: http://www.numpy.org/devdocs/dev/gitwash/development_workflow.html.

    For instructions on building the documentation, see:
    http://www.numpy.org/devdocs/docs/index.html?highlight=documentation

    (One quick way to get into a shell to run make html which uses the development numpy version may be to use python runtests.py --shell)

  3. SahanaJavgal commented on Mar 30, 2019

    @SahanaJavgal

    Hi Im Interested in solving the issue

  4. mbengtanyi commented on Mar 30, 2019

    @mbengtanyi

    On it. Thanks @seberg

  5. RuchikaChugh commented on Mar 30, 2019

    @RuchikaChugh

    hey! I am an Outreachy Applicant. I am interested in solving this issue.

  6. mattip commented on Mar 30, 2019

    @mattip
    Member

    @RuchikaChugh, @SahanaJavgal please choose another issue.

  7. ay11111111111 commented on Apr 2, 2019

    @ay11111111111
    Contributor

    @mattip Hi! Since nobody opened a PR, can I work on this issue?

  8. mattip commented on Apr 2, 2019

    @mattip
    Member

    It seems the others gave up, so go ahead. Please xref the issue by adding #13215 in the comments after you create the pull request, i.e. Fixes #13215

  9. added a commit that references this issue on Apr 2, 2019
    ea280a6
  10. mbengtanyi commented on Apr 2, 2019

    @mbengtanyi
  11. aditipansari commented on Apr 2, 2019

    @aditipansari

    Hello, I am interested in solving this issue. I am an Outreachy applicant.

  12. mattip commented on Apr 2, 2019

    @mattip
    Member

    @aditipansari please choose another issue.

  13. mattip commented on Apr 2, 2019

    @mattip
    Member

    Fixed in #13242

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions