timelined_array 0.0.4__tar.gz → 0.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- timelined_array-0.0.5/PKG-INFO +97 -0
- timelined_array-0.0.5/README.md +87 -0
- {timelined_array-0.0.4 → timelined_array-0.0.5}/pyproject.toml +1 -1
- {timelined_array-0.0.4 → timelined_array-0.0.5}/src/timelined_array/__init__.py +1 -1
- timelined_array-0.0.4/PKG-INFO +0 -11
- timelined_array-0.0.4/README.md +0 -1
- {timelined_array-0.0.4 → timelined_array-0.0.5}/LICENSE +0 -0
- {timelined_array-0.0.4 → timelined_array-0.0.5}/src/timelined_array/time.py +0 -0
- {timelined_array-0.0.4 → timelined_array-0.0.5}/tests/__init__.py +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: timelined_array
|
|
3
|
+
Version: 0.0.5
|
|
4
|
+
Summary: Manage easily 1 or multidimensionnal samples numpy arrays that are time related. Extends numpy without removing any of it's abilities on such arrays.
|
|
5
|
+
Author-Email: Timothe Jost <timothe.jost@wanadoo.fr>
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.11
|
|
8
|
+
Requires-Dist: numpy
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
# timelined_array
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
The TimelinedArray package provides a set of classes and utilities for working with time-indexed arrays. It extends the functionality of NumPy arrays to include time-based indexing and operations, making it easier to work with time-series data.
|
|
15
|
+
|
|
16
|
+
## Classes
|
|
17
|
+
### Timeline
|
|
18
|
+
A subclass of np.ndarray that represents a timeline associated with the array. It includes methods for creating uniformly spaced timelines and calculating time steps.
|
|
19
|
+
|
|
20
|
+
### Boundary
|
|
21
|
+
An enumeration that defines inclusive and exclusive boundaries for time indexing.
|
|
22
|
+
|
|
23
|
+
### TimeIndexer
|
|
24
|
+
A class that provides methods for converting time values to array indices and for indexing arrays based on time.
|
|
25
|
+
|
|
26
|
+
### TimeMixin
|
|
27
|
+
A mixin class that adds time-related methods and properties to arrays, including methods for aligning, transposing, and moving axes.
|
|
28
|
+
|
|
29
|
+
### TimePacker
|
|
30
|
+
A class for packing arrays with their associated timelines. Usefull to plot data fast to matplotlib.
|
|
31
|
+
|
|
32
|
+
### TimelinedArray
|
|
33
|
+
A subclass of np.ndarray that includes a timeline and a time dimension. It provides methods for time-based indexing and operations.
|
|
34
|
+
|
|
35
|
+
### MaskedTimelinedArray
|
|
36
|
+
A subclass of np.ma.MaskedArray that includes a timeline and a time dimension. It provides methods for time-based indexing and operations on masked arrays.
|
|
37
|
+
|
|
38
|
+
### Seconds
|
|
39
|
+
A simple class for converting seconds to array indices based on a given sampling frequency.
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
To install the TimelinedArray package, simply type in your environment activated console :
|
|
43
|
+
```bash
|
|
44
|
+
pip install timelined_array
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The package can be found on PyPI at : https://pypi.org/project/timelined_array/
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
|
|
51
|
+
### Imports
|
|
52
|
+
```python
|
|
53
|
+
from timelined_array import TimelinedArray, MaskedTimelinedArray, Boundary, Timeline
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Creating a TimelinedArray
|
|
57
|
+
```python
|
|
58
|
+
import numpy as np
|
|
59
|
+
from timelined_array import TimelinedArray
|
|
60
|
+
|
|
61
|
+
data = np.random.rand(100, 10)
|
|
62
|
+
timeline = np.linspace(0, 10, 100)
|
|
63
|
+
timelined_array = TimelinedArray(data, timeline=timeline, time_dimension=0)
|
|
64
|
+
```
|
|
65
|
+
### Time-based Indexing
|
|
66
|
+
```python
|
|
67
|
+
# Access data at a specific time
|
|
68
|
+
data_at_time = timelined_array.itime[5.0]
|
|
69
|
+
|
|
70
|
+
# Aligning arrays
|
|
71
|
+
aligned_array = TimelinedArray.align_from_iterable([timelined_array, another_timelined_array])
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Masked TimelinedArray
|
|
76
|
+
```python
|
|
77
|
+
from timelined_array import MaskedTimelinedArray
|
|
78
|
+
|
|
79
|
+
masked_data = np.ma.masked_array(data, mask=data > 0.5)
|
|
80
|
+
masked_timelined_array = MaskedTimelinedArray(masked_data, timeline=timeline, time_dimension=0)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Converting Seconds to Index
|
|
84
|
+
```python
|
|
85
|
+
masked_data.itime.time_to_index(5.0)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Misc
|
|
89
|
+
|
|
90
|
+
### License
|
|
91
|
+
This package is licensed under the MIT License. See the LICENSE file for more details.
|
|
92
|
+
|
|
93
|
+
### Contributing
|
|
94
|
+
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
|
|
95
|
+
|
|
96
|
+
### Contact
|
|
97
|
+
For any questions or issues, please contact the package maintainer.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# timelined_array
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
The TimelinedArray package provides a set of classes and utilities for working with time-indexed arrays. It extends the functionality of NumPy arrays to include time-based indexing and operations, making it easier to work with time-series data.
|
|
5
|
+
|
|
6
|
+
## Classes
|
|
7
|
+
### Timeline
|
|
8
|
+
A subclass of np.ndarray that represents a timeline associated with the array. It includes methods for creating uniformly spaced timelines and calculating time steps.
|
|
9
|
+
|
|
10
|
+
### Boundary
|
|
11
|
+
An enumeration that defines inclusive and exclusive boundaries for time indexing.
|
|
12
|
+
|
|
13
|
+
### TimeIndexer
|
|
14
|
+
A class that provides methods for converting time values to array indices and for indexing arrays based on time.
|
|
15
|
+
|
|
16
|
+
### TimeMixin
|
|
17
|
+
A mixin class that adds time-related methods and properties to arrays, including methods for aligning, transposing, and moving axes.
|
|
18
|
+
|
|
19
|
+
### TimePacker
|
|
20
|
+
A class for packing arrays with their associated timelines. Usefull to plot data fast to matplotlib.
|
|
21
|
+
|
|
22
|
+
### TimelinedArray
|
|
23
|
+
A subclass of np.ndarray that includes a timeline and a time dimension. It provides methods for time-based indexing and operations.
|
|
24
|
+
|
|
25
|
+
### MaskedTimelinedArray
|
|
26
|
+
A subclass of np.ma.MaskedArray that includes a timeline and a time dimension. It provides methods for time-based indexing and operations on masked arrays.
|
|
27
|
+
|
|
28
|
+
### Seconds
|
|
29
|
+
A simple class for converting seconds to array indices based on a given sampling frequency.
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
To install the TimelinedArray package, simply type in your environment activated console :
|
|
33
|
+
```bash
|
|
34
|
+
pip install timelined_array
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The package can be found on PyPI at : https://pypi.org/project/timelined_array/
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
### Imports
|
|
42
|
+
```python
|
|
43
|
+
from timelined_array import TimelinedArray, MaskedTimelinedArray, Boundary, Timeline
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Creating a TimelinedArray
|
|
47
|
+
```python
|
|
48
|
+
import numpy as np
|
|
49
|
+
from timelined_array import TimelinedArray
|
|
50
|
+
|
|
51
|
+
data = np.random.rand(100, 10)
|
|
52
|
+
timeline = np.linspace(0, 10, 100)
|
|
53
|
+
timelined_array = TimelinedArray(data, timeline=timeline, time_dimension=0)
|
|
54
|
+
```
|
|
55
|
+
### Time-based Indexing
|
|
56
|
+
```python
|
|
57
|
+
# Access data at a specific time
|
|
58
|
+
data_at_time = timelined_array.itime[5.0]
|
|
59
|
+
|
|
60
|
+
# Aligning arrays
|
|
61
|
+
aligned_array = TimelinedArray.align_from_iterable([timelined_array, another_timelined_array])
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Masked TimelinedArray
|
|
66
|
+
```python
|
|
67
|
+
from timelined_array import MaskedTimelinedArray
|
|
68
|
+
|
|
69
|
+
masked_data = np.ma.masked_array(data, mask=data > 0.5)
|
|
70
|
+
masked_timelined_array = MaskedTimelinedArray(masked_data, timeline=timeline, time_dimension=0)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Converting Seconds to Index
|
|
74
|
+
```python
|
|
75
|
+
masked_data.itime.time_to_index(5.0)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Misc
|
|
79
|
+
|
|
80
|
+
### License
|
|
81
|
+
This package is licensed under the MIT License. See the LICENSE file for more details.
|
|
82
|
+
|
|
83
|
+
### Contributing
|
|
84
|
+
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
|
|
85
|
+
|
|
86
|
+
### Contact
|
|
87
|
+
For any questions or issues, please contact the package maintainer.
|
timelined_array-0.0.4/PKG-INFO
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: timelined_array
|
|
3
|
-
Version: 0.0.4
|
|
4
|
-
Summary: Manage easily 1 or multidimensionnal samples numpy arrays that are time related. Extends numpy without removing any of it's abilities on such arrays.
|
|
5
|
-
Author-Email: Timothe Jost <timothe.jost@wanadoo.fr>
|
|
6
|
-
License: MIT
|
|
7
|
-
Requires-Python: >=3.11
|
|
8
|
-
Requires-Dist: numpy
|
|
9
|
-
Description-Content-Type: text/markdown
|
|
10
|
-
|
|
11
|
-
# timelined_array
|
timelined_array-0.0.4/README.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# timelined_array
|
|
File without changes
|
|
File without changes
|
|
File without changes
|