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

Fix numpy warnings in afw

    XMLWordPrintable

Details

    • Improvement
    • Status: Done
    • Resolution: Done
    • None
    • afw
    • 1
    • AP S19-2
    • Alert Production

    Description

      Building afw with Numpy 1.15 gives a large number of FutureWarning and PendingDeprecationWarning, such as:

      PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
          dtype=float))
       
      FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
          array = self._array[allSlices]
       
      FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
        To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
      

      Rewrite the code to use non-deprecated APIs, as long as it's possible to do so using the Numpy 1.14 API.

      Attachments

        Issue Links

          Activity

            Hi rowen, can you take a quick look at these changes? Thanks!

            krzys Krzysztof Findeisen added a comment - Hi rowen , can you take a quick look at these changes? Thanks!
            rowen Russell Owen added a comment -

            Looking at pull request https://github.com/lsst/afw/pull/429 now

            rowen Russell Owen added a comment - Looking at pull request https://github.com/lsst/afw/pull/429 now
            rowen Russell Owen added a comment -

            Approved. Waffling about rcond=None vs -1.

            rowen Russell Owen added a comment - Approved. Waffling about rcond=None vs -1.

            Merged with rcond=None. Thanks for the review!

            krzys Krzysztof Findeisen added a comment - Merged with rcond=None . Thanks for the review!

            People

              krzys Krzysztof Findeisen
              krzys Krzysztof Findeisen
              Russell Owen
              Krzysztof Findeisen, Russell Owen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.