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

Fix numpy warnings in afw

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw

      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

            Hide
            krzys Krzysztof Findeisen added a comment -

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

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

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

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

            Approved. Waffling about rcond=None vs -1.

            Show
            rowen Russell Owen added a comment - Approved. Waffling about rcond=None vs -1.
            Hide
            krzys Krzysztof Findeisen added a comment -

            Merged with rcond=None. Thanks for the review!

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

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.