Skip to content

BUG: Determine cause of floating point exception with accelerated __mod__ #3819

Closed
@jtratner

Description

@jtratner

For some reason, using numexpr with % and zeros causes floating point exceptions. I.e., in this Travis CI test you can see the mysterious floating point exception occur:

#snippet from nosetests
........................................................S.................................................................
ci/script.sh: line 13:  4513 Floating point exceptionnosetests --exe -w /tmp -A "$NOSE_ARGS" pandas

The exception occurs when __mod__ is evaluated with str_rep of % (meaning a_values % b_values is passed to numexpr.evaluate), and it occurs in test_expressions.py under test_mixed_floats_arithmetic and test_integer_with_zeros in (for example) jtratner/pandas@e938da2 . Omitting str_rep from __mod__ fixes the issues, clearly showing it's occurring with numexpr. Going to investigate more in the future.

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