PendingDeprecationWarning using Scalar_XY_fields

Issue #17 resolved
Juan Jose Valencia created an issue

Hello,

There is a pending deprecation warning being raised when using scalar_fields_XY:

numpy/matrixlib/defmatrix.py:69: 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.
  return matrix(data, dtype=dtype, copy=False)

scalar_fields_XY.py:651: 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.
  d1x = matrix(cx)

scalar_fields_XY.py:652: 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.
d1y = matrix(cy)

Would it be possible to update the code to prevent this warning?

Thank you!

Comments (4)

  1. LUIS MIGUEL SANCHEZ BREA repo owner

    Thank you Juan Jose.

    I have updated it in Bitbucket repository. It will be available in the next pip version.

    Luis Miguel.

  2. Juan Jose Valencia reporter

    Thank you very much for adding this update!, Luis Miguel.

    Just out of curiosity, do you have an expected date for the release of the new version of diffractio?

    Thanks again,

    Juan.

  3. LUIS MIGUEL SANCHEZ BREA repo owner

    I am adding a new propagation algorithm and I hope to have it by the end of October. If you need this solved, you can download directly from bitbucket.

  4. Log in to comment