No project description provided
Project description
# Rolling Window
## A generic rolling window function for analytics
(To be expanded on)
Example of use:
```
from dataclasses import dataclass
import random
@dataclass
class PressureData:
time: int
pressure: float
window = RollingWindow(window_type = 'sliding', datastructure=PressureData, sort=False, persistance=False, window_options=window_options)
for ii in range(0,N):
data = PressureData(time=ii, pressure=round(random.uniform(2,20),2) )
await rolling_window.add_data(id = window_id, data=data)
data_to_process = rolling_window.send(id=window_id)
```
when data is available to the processed 'data_to_process' will return a numpy representation of the data in a structured array
## License
This project is licensed under the MIT License
## A generic rolling window function for analytics
(To be expanded on)
Example of use:
```
from dataclasses import dataclass
import random
@dataclass
class PressureData:
time: int
pressure: float
window = RollingWindow(window_type = 'sliding', datastructure=PressureData, sort=False, persistance=False, window_options=window_options)
for ii in range(0,N):
data = PressureData(time=ii, pressure=round(random.uniform(2,20),2) )
await rolling_window.add_data(id = window_id, data=data)
data_to_process = rolling_window.send(id=window_id)
```
when data is available to the processed 'data_to_process' will return a numpy representation of the data in a structured array
## License
This project is licensed under the MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rolling_window-0.1.tar.gz
(4.7 kB
view hashes)
Built Distributions
rolling_window-0.1-py3.7.egg
(13.5 kB
view hashes)
Close
Hashes for rolling_window-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db3dfc22e532002459bee2ae1820d2339231a4794ec7d9879babae7f02a59199 |
|
MD5 | 9d9a028ec9587fb06703f9cfc32c19a2 |
|
BLAKE2b-256 | 93388e8d8ce7176c4ac71ef215188d9c14347c10223601a875e97d34204d84e6 |