Transpositions on fetch_olivetti_faces #19467
-
Hello guys, I'm a CS and AI teacher using scikit-learn for educational purposes atm. While perusing the code there I noticed a matrix is transposed twice (faces right after remote download at line 116 with .T operator and then at line 127 a few lines before returning using .transpose()), why the double transpose? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
I think it's just a matter of getting the data into the right shape at the end. The downloaded data probably doesn't come in the expected shape or alignment (storing columns instead of rows, that kind of stuff). Unless you think there's an issue here, it's probably not worth worrying about it too much. These transposes are quite cheap |
Beta Was this translation helpful? Give feedback.
I think it's just a matter of getting the data into the right shape at the end. The downloaded data probably doesn't come in the expected shape or alignment (storing columns instead of rows, that kind of stuff).
Unless you think there's an issue here, it's probably not worth worrying about it too much. These transposes are quite cheap