Skip to content

TypedPython: numpy float floor_divide/remainder warnings differ from numpy on Linux (glibc) #292

Closed

Description

@b-re-w

Since #264, test_buffer_numpy p_fdiv, p_mod, i_fdiv, i_mod fail on ubuntu CI (numpy 2.5.4, same as macOS where they pass). p_mod/i_mod (0.0 % 0.0): numpy on Linux reports 'invalid value encountered in scalar remainder', compiled code clears the flags after fmod by zero (tp_np_divmod, tp_runtime.h around line 479). p_fdiv/i_fdiv (0.0 // nan): compiled code reports invalid, numpy does not (likely a NaN comparison raising FE_INVALID under gcc/x86). Compiled code must report exactly what numpy reports on the same platform.

Done when: test_buffer_numpy passes on ubuntu and macOS CI.

Activity

  1. added a commit that references this issue on Oct 25, 2026
  2. b-re-w commented on Oct 25, 2026

    @b-re-w
    MemberAuthor

    Landed in develop via the PR from feat/tp-np-linux.

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