Skip to content

Commit 7156ce1

Browse files
authored
Fixed #239 replace np.roll with slice indexing in stumpy.floss (#241)
1 parent 91d5da7 commit 7156ce1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

stumpy/floss.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def update(self, t):
481481
This is the implementation for Fast Low-cost Online Semantic
482482
Segmentation (FLOSS).
483483
"""
484-
self._T[:] = np.roll(self._T, -1)
484+
self._T[:-1] = self._T[1:]
485485
self._T[-1] = t
486486
Q = self._T[-self._m :]
487487
excl_zone = int(np.ceil(self._m / 4))
@@ -492,7 +492,7 @@ def update(self, t):
492492
# Egress
493493
# Remove the first element in the matrix profile index
494494
# Shift mp up by one and replace the last row with new values
495-
self._mp[:] = np.roll(self._mp, -1, axis=0)
495+
self._mp[:-1, :] = self._mp[1:, :]
496496
self._mp[-1, 0] = np.inf
497497
self._mp[-1, 3] = self._last_idx
498498

0 commit comments

Comments
 (0)