Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-9316

meas_base tests broken with NumPy 1.12

    XMLWordPrintable

Details

    • Story
    • Status: Done
    • Resolution: Done
    • None
    • None
    • None
    • 1
    • DRP S17-3
    • Data Release Production

    Description

      meas_base's tests/testVariance.py contains the line:

      var.getArray()[bad, :] = float("nan")
      

      Where bad is 54.0.

      As of NumPy 1.12, this will throw an IndexError and the tests (obviously) fail.

      Should be an easy fix.

      Attachments

        Issue Links

          Activity

            Hey reiss, do you have time to review this? It should be pretty trivial!

            swinbank John Swinbank added a comment - Hey reiss , do you have time to review this? It should be pretty trivial!

            My unsolicited comment is that these changes all look good, but I suggest using int(py+psfh) instead of int(py)+psfh in ip_diffim. (If reiss is comfortable with it, this could be deemed a review).

            rowen Russell Owen added a comment - My unsolicited comment is that these changes all look good, but I suggest using int(py+psfh) instead of int(py)+psfh in ip_diffim. (If reiss is comfortable with it, this could be deemed a review).

            I've tweaked the way the casting is done in ip_diffim based on the suggestion from rowen and further comments from tjenness. Not quite in the way either of them suggested, but I hope it's good enough to keep them happy!

            I'll wait for David to chime in on whether he thinks this has had enough reviewing before I do anything else.

            swinbank John Swinbank added a comment - I've tweaked the way the casting is done in ip_diffim based on the suggestion from rowen and further comments from tjenness . Not quite in the way either of them suggested, but I hope it's good enough to keep them happy! I'll wait for David to chime in on whether he thinks this has had enough reviewing before I do anything else.
            reiss David Reiss added a comment -

            Looks good to me and you chose the casting that I would have preferred. So call it reviewed.
            Thanks also to rowen and tjenness.

            reiss David Reiss added a comment - Looks good to me and you chose the casting that I would have preferred. So call it reviewed. Thanks also to rowen and tjenness .

            Thanks, all. Merged.

            swinbank John Swinbank added a comment - Thanks, all. Merged.

            People

              swinbank John Swinbank
              swinbank John Swinbank
              David Reiss
              David Reiss, John Swinbank, Russell Owen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.