File tree Expand file tree Collapse file tree 2 files changed +1
-9
lines changed
src/frequenz/sdk/timeseries Expand file tree Collapse file tree 2 files changed +1
-9
lines changed Original file line number Diff line number Diff line change 4545 - Provide access to ` capacity ` (maximum number of elements) in ` MovingWindow ` .
4646 - Methods to retrieve oldest and newest timestamp of valid samples are added to both.
4747 - ` MovingWindow ` exposes underlying buffers ` window ` method.
48+ - ` len(window) ` and ` len(buffer) ` should be replaced with ` window.count_valid() ` and ` buffer.count_valid() ` , respectively.
4849 - ` OrderedRingBuffer.window ` :
4950 - By default returns a copy.
5051 - Can also return a view if the window contains ` None ` values and if ` force_copy ` is set to ` True ` .
Original file line number Diff line number Diff line change @@ -315,15 +315,6 @@ def count_valid(self) -> int:
315315 """
316316 return self ._buffer .count_valid ()
317317
318- def __len__ (self ) -> int :
319- """
320- Return the size of the `MovingWindow`s underlying buffer.
321-
322- Returns:
323- The size of the `MovingWindow`.
324- """
325- return self .count_valid ()
326-
327318 @overload
328319 def __getitem__ (self , key : SupportsIndex ) -> float :
329320 """See the main __getitem__ method.
You can’t perform that action at this time.
0 commit comments