[P] tsdownsample: extremely fast time series downsampling for visualization


[P] tsdownsample: extremely fast time series downsampling for visualization

tsdownsample brings highly optimized time series downsampling to Python! The downsampling algorithms are written and optimized in Rust, which are made available in Python through the use of PyO3 bindings.

Code: https://github.com/predict-idlab/tsdownsample

Features

  • Fast: leverages the optimized argminmax crate which is SIMD accelerated with runtime feature detection (matches or even outperforms numpy's speed)
  • Efficient: operates on views of the data, eliminating the need for unnecessary data copies and avoiding the creation of intermediate data structures
  • Flexible: supports a wide range of datatypes, including f16 which is 200-300x faster than numpy's implementation.
  • Easy to use: simple and flexible API

Installation

pip install tsdownsample 

Example

When using multi-threading, tsdownsample can downsample 500 MILLION datapoints (f32) in 0.05s! ⬇️

https://preview.redd.it/frqh8o2bezda1.png?width=1650&format=png&auto=webp&s=08a6989b4ffeeb12afd63edd75c6c1d5d0b086ad

I would love to hear your feedback on this!

submitted by /u/Adorable-Giraffe5754
[link] [comments]



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.