Skip to content

compare broken where the first array cells are zeros #288

Closed

Description

@gdementen

The "maximum absolute relative difference" is displayed as 0 instead of 'inf' and all cells are colored white, which makes it very misleading.

On the other hand "differences only" sees those differences just fine.

arr1 = ndtest((2, 3))
arr2 = arr1.copy()
arr2['a0', 'b0'] = 42
compare(arr1, arr2)

In the session comparator, the array is colored red as it should though:

s1 = Session(arr1=arr1)
s2 = Session(arr1=arr2)
compare(s1, s2)

Activity

  1. added this to the 0.35 milestone on Jul 17, 2025
  2. gdementen commented on Jul 18, 2025

    @gdementen
    CollaboratorAuthor
    Image
  3. gdementen commented on Oct 15, 2025

    @gdementen
    CollaboratorAuthor

    This only occured when all the cells with differences were 0 in array 0 (because in that case the minimum relative diff was 0)

  4. added 7 commits that reference this issue on Oct 15, 2025
    e51d697
    c07f13b
    6b54dcb
    c1b0941
    661580b
    7c54f00
    ffe9027
  5. added a commit that references this issue on Nov 12, 2025
    a9508b7
  6. added a commit that references this issue on Dec 12, 2025
    27c748b
  7. added a commit that references this issue on Jan 7, 2026
    fe897d9
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions