timelined_array 1.0.1__tar.gz → 1.0.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: timelined_array
3
- Version: 1.0.1
3
+ Version: 1.0.2
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
5
  Author: Timothe Jost
6
6
  Author-email: Timothe Jost <44769559+JostTim@users.noreply.github.com>
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "timelined_array"
3
3
  description = "Manage easily 1 or multidimensionnal samples numpy arrays that are time related. Extends numpy without removing any of it's abilities on such arrays."
4
- version = "1.0.1"
4
+ version = "1.0.2"
5
5
  dependencies = ["numpy>=2"]
6
6
  requires-python = ">=3.12"
7
7
  readme = "README.md"
@@ -53,12 +53,12 @@ omit = [
53
53
  ]
54
54
 
55
55
  [tool.bumpversion]
56
- current_version = "1.0.1"
56
+ current_version = "1.0.2"
57
57
  parse = '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)'
58
58
  serialize = ["{major}.{minor}.{patch}"]
59
59
  search = "{current_version}"
60
60
  replace = "{new_version}"
61
- regex = false
61
+ regex = true
62
62
  ignore_missing_version = false
63
63
  tag = false
64
64
  sign_tags = false
@@ -4,7 +4,7 @@ description = "Manage easily 1 or multidimensionnal samples numpy arrays that ar
4
4
  authors = [
5
5
  { name = "Timothe Jost", email = "44769559+JostTim@users.noreply.github.com" },
6
6
  ]
7
- version = "1.0.1"
7
+ version = "1.0.2"
8
8
  dependencies = ["numpy>=2"]
9
9
  requires-python = ">=3.12"
10
10
  readme = "README.md"
@@ -44,12 +44,12 @@ testpaths = ["tests"]
44
44
  omit = [".vscode/*", ".tests/*"]
45
45
 
46
46
  [tool.bumpversion]
47
- current_version = "1.0.1"
47
+ current_version = "1.0.2"
48
48
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
49
49
  serialize = ["{major}.{minor}.{patch}"]
50
50
  search = "{current_version}"
51
51
  replace = "{new_version}"
52
- regex = false
52
+ regex = true
53
53
  ignore_missing_version = false
54
54
  tag = false
55
55
  sign_tags = false
@@ -1,4 +1,4 @@
1
- __version__ = "1.0.1"
1
+ __version__ = "1.0.2"
2
2
  __all__ = ["BaseTimeArray", "MaskedTimelinedArray", "Timeline", "TimelinedArray"]
3
3
 
4
4
 
@@ -215,14 +215,12 @@ class TimeIndexer[A: "BaseTimeArray"]:
215
215
  def time_to_index(self, time: PointTimeIndex) -> int: ...
216
216
 
217
217
  @overload
218
- def time_to_index(self, time: SimpleTimeIndex) -> slice[int, int, int]: ...
218
+ def time_to_index(self, time: SimpleTimeIndex) -> slice: ...
219
219
 
220
220
  @overload
221
221
  def time_to_index(self, time: ComplexTimeIndex) -> npt.NDArray[np.integer]: ...
222
222
 
223
- def time_to_index(
224
- self, time: TimeIndex
225
- ) -> int | slice[int, int, int] | npt.NDArray[np.integer]:
223
+ def time_to_index(self, time: TimeIndex) -> int | slice | npt.NDArray[np.integer]:
226
224
  """Converts time to index with methods based on the different input types.
227
225
 
228
226
  Args:
@@ -271,9 +269,9 @@ class TimeIndexer[A: "BaseTimeArray"]:
271
269
 
272
270
  seconds_to_index = time_to_index
273
271
 
274
- def insert_time_index_into_full_index[T: int | slice[int, int, int] | np.ndarray](
272
+ def insert_time_index_into_full_index[T: "int | slice | np.ndarray"](
275
273
  self, time_index: T
276
- ) -> tuple[slice[None] | T, ...]:
274
+ ) -> tuple[slice | T, ...]:
277
275
  """Inserts a time index into the full index.
278
276
  Becauer Time indexer is supposed to work only on the time
279
277
  dimension, the indexing of the rest of the dimensions is made only of
@@ -286,7 +284,7 @@ class TimeIndexer[A: "BaseTimeArray"]:
286
284
  tuple: The full index with the time index inserted.
287
285
  """
288
286
  # first we get a list of [slice(None), ...] as much times as there is dimensions
289
- full_index: list[slice[None] | T] = [slice(None)] * len(self.array.shape)
287
+ full_index: list[slice | T] = [slice(None)] * len(self.array.shape)
290
288
 
291
289
  # then we put the integer value at the position of time index at
292
290
  # the right position (time_dimension) in the tuple of all sliced dimensions
@@ -390,7 +388,7 @@ class TimeIndexer[A: "BaseTimeArray"]:
390
388
  time_start: float | None = None,
391
389
  time_stop: float | None = None,
392
390
  time_step: float | None = None,
393
- ) -> slice[int, int, int]:
391
+ ) -> slice:
394
392
  """Get the index range based on the given start, stop, and step values in seconds.
395
393
 
396
394
  Args: