Skip to content

NumPy matrix class is pending deprecation and issuing warnings #567

@wkschwartz

Description

@wkschwartz

On Python 3.7, with NumPy 1.15.1 and cvxpy 1.0.6, I get the following warning.

venv/lib/python3.7/site-packages/cvxpy/cvxcore/python/canonInterface.py:107: 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 np.asfortranarray(np.matrix(matrix))
venv/lib/python3.7/site-packages/numpy/matrixlib/defmatrix.py:68: 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions