anastasiiia
anastasiiia

Reputation: 209

Orthogonalize in Python. Which package?

I need to orthogonalize vectors in Python. I have found so far only algorithms.orthogonalize.

Nevertheless, it looks like "algorithms" is a kind of a package (module?) I cannot find to install. Has anybody done an orthogonalization? Please, advice me a nice package/module for this procedure. I am quite new in Python.

Upvotes: 3

Views: 7276

Answers (2)

anastasiiia
anastasiiia

Reputation: 209

numpy.linalg.qr turns out to be the best option to orthogonalize vectors, since the vectors I consider vectors with complex components. And if one does it with the orthogonalize method mentioned above, then one LOSES the complex parts!

Upvotes: 4

Martijn Pieters
Martijn Pieters

Reputation: 1122022

That package is part of the Spectral Python project.

The orthogonalize method is documented here:

Performs Gram-Schmidt Orthogonalization on a set of vectors

It is installable via pip and easy_install.

Upvotes: 2

Related Questions