JelteF / PyLaTeX

A Python library for creating LaTeX files
https://jeltef.github.io/PyLaTeX/
MIT License
2.24k stars 287 forks source link

fix: replace deprecated `np.matrix` #374

Closed emmanuel-ferdman closed 1 month ago

emmanuel-ferdman commented 1 year ago

PR Summary: This PR updates the code by replacing all instances of np.matrix with operations that treat the objects as arrays. The changes align with the recommendations mentioned in the NumPy documentation. This modification ensures consistency and compatibility with modern coding practices and solves the following deprecation warning:

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.

emmanuel-ferdman commented 11 months ago

@JelteF Can you please check out and merge my PR when you have a moment?

JelteF commented 1 month ago

thank you for the contribution and sorry for the slow response. Closing this now since the samefix was part of #385