Skip to content

perf: avoid duplication of PCA array with reshape - #283

Open
alejoe91 wants to merge 1 commit into
SpikeInterface:mainfrom
alejoe91:avoid-pca-duplication
Open

alejoe91 wants to merge 1 commit into
SpikeInterface:mainfrom
alejoe91:avoid-pca-duplication

Conversation

@alejoe91

Copy link
Copy Markdown
Member

The self.pc_data.swapaxes(1,2).reshape(self.pc_data.shape[0], -1) was essentialy duplicating the full PCA buffer in memory, which can be very large already.

This PR modifies the construction of the controller._pc_projections so that reshaping ends up being a view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant