Skip to content
Snippets Groups Projects
Commit 1a000acb authored by David Hammer's avatar David Hammer
Browse files

Maybe fix: np.asarray, let it decide whether to copy

parent 7cb8ffbe
No related branches found
No related tags found
2 merge requests!145Fixes found during BUD winter 2025,!118Draft: MID: put arbiter on manager scene
...@@ -138,9 +138,9 @@ class FrameselectionFriend: ...@@ -138,9 +138,9 @@ class FrameselectionFriend:
def get_mask(self, sources): def get_mask(self, sources):
if self._enabled and self._arbiter in sources: if self._enabled and self._arbiter in sources:
return np.array( return np.asarray(
sources[self._arbiter][0]["data.dataFramePattern"], copy=False sources[self._arbiter][0]["data.dataFramePattern"], dtype=bool
).astype(bool, copy=False) )
else: else:
return None return None
...@@ -171,8 +171,7 @@ class FrameselectionFriend: ...@@ -171,8 +171,7 @@ class FrameselectionFriend:
if not arbiter.has(mask_key): if not arbiter.has(mask_key):
# no mask # no mask
continue continue
mask = np.array( mask = np.asarray(arbiter[mask_key], dtype=bool)
arbiter[mask_key], dtype=bool, copy=False)
for source, data in correction_sources.items(): for source, data in correction_sources.items():
if not data.has(arg): if not data.has(arg):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment