From this comment:
It could be worth doing an experiment to check if the explicit bit vector from GetFingerprintAsNumpy can be replaced by a call to GetSparseFingerprint which returns a SparseBitVect that is much smaller than the explicit version. In this way much less temporary memory would need to be allocated. However, I am not sure if the csr_matrix constructor supports the SparseBitVect. In addition, this more memory efficient way is probably slower than using numpy arrays.
From this comment:
It could be worth doing an experiment to check if the explicit bit vector from
GetFingerprintAsNumpy
can be replaced by a call toGetSparseFingerprint
which returns aSparseBitVect
that is much smaller than the explicit version. In this way much less temporary memory would need to be allocated. However, I am not sure if thecsr_matrix
constructor supports theSparseBitVect
. In addition, this more memory efficient way is probably slower than using numpy arrays.