numpy

numpy ndarray и matrix Какая разница между типами -- отличия

  • matrix -- потомок ndarray но строго двухмерный. Все операции проводимые с ndarray можно проводить и с matrix. matrix Позволяет уможать матрицы обычным знаком умножения (одан из главных преимуществ).

Источник:
https://stackoverflow.com/questions/4151...

np.linalg eigh и eig Какая разница и что лучше использовать

Вот цитата из рассыли [1]:

eig() is for nonsymmetric matrices and eigh() is for symmetric
(or hermitian matrices).

The former most likely will return complex eigen values. The latter
always returns real eigen values.

eig() is slower and numerically less reliable (it calls LAPACK's DGEEV
and ZGEEV). Even for symmetric matrices it can produce complex
eigen pairs due to numerical round-off.

Subscribe to RSS - numpy