What are the differences between numpy arrays and matrices? Which one should I use?

前端 未结 5 1906
野的像风
野的像风 2020-11-22 07:08

What are the advantages and disadvantages of each?

From what I\'ve seen, either one can work as a replacement for the other if need be, so should I bother using both

5条回答
  •  自闭症患者
    2020-11-22 07:23

    As per the official documents, it's not anymore advisable to use matrix class since it will be removed in the future.

    https://numpy.org/doc/stable/reference/generated/numpy.matrix.html

    As other answers already state that you can achieve all the operations with NumPy arrays.

提交回复
热议问题