-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: could it be possible to accept other TypedArrays? #88
Comments
Yes we could. It makes sense indeed if we can to keep the memory footprint as small as possible. This will be justified for large high-resolution GC/MS (or a dataset of 1000 NMR spectra). There is already the concept of NumberArray ( cheminfo-types/src/core/NumberArray.d.ts Lines 6 to 16 in 946936b
Some methods of spectra-processing also already accepts the NumberArray: https://github.com/search?q=repo%3Amljs%2Fspectra-processing%20%20NumberArray&type=code I don't know however if we should go directly to NumberArray, extend DoubleArray (and allow Float32) or add one more numerical array type. |
|
The most useful one to add seems Float32Array, but maybe any array could be better ?
One current issue is that a Typed Array (8,16,32) will have to be converted to 64 and takes time and extra memory.
Currently only accepts extensions of
DoubleArray
, from this interface.The text was updated successfully, but these errors were encountered: