1

I am trying to optimize (memorywise the multiplication of X and its transpose X'

Does anyone know if numpys matrix multiplication takes into consideration that X' is just the transpose of X. What I mean is that if it detects this and therfore does not create the object X' but just works on the cols/rows of X to produce the product? Thank you for any help on this!

J.

2
  • look in to numpy views. scipy-lectures.github.com might be a good reference. Commented Aug 29, 2012 at 19:33
  • Depending on the application, you may also be able to get by with numpy.cov(X), which I assume is well-optimized, instead of computing XX' explicitly. Commented Aug 29, 2012 at 19:39

1 Answer 1

3

In numpy convention, the transpose of X is represented byX.T and you're in luck, X.T is just a view of the original array X, meaning that no copy is done.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.