Closed bjonnh closed 7 years ago
Hi @bjonnh, are you just interested in creating a spectrum object from a 2d numpy array? If so, that should be pretty easy to add.
What I do for now is: [tuple(a) for a in molpeaks.peaks.tolist()] to generate in a format that it likes.
I have millions of spectrum to generate fingerprint for and was wondering if this whole library would benefit from being rewritten in numpy (this is likely).
Understood. I use numpy a lot, but it was actually more of a hassle to implement SPLASH algorithm with numpy arrays. I can certainly add support for numpy arrays as input, but I don't think we will rewrite the SPLASH implementation based on numpy.
The two-step procedure of creating a Spectrum object and then SPLASHing it, which was done to allow for additional spectral types, makes it difficult to add elegant, numpy-friendly support (or at least I can't think of a good way).
Would it be possible to get the module to handle (or even use?) numpy arrays?