Skip to content

Commit

Permalink
Support for SciPy sparse arrays
Browse files Browse the repository at this point in the history
See also LiberTEM/LiberTEM#1684

Probably one will have to do a two-step rollout, first making the constants
available and then incluing them in BACKEND_ALL?
  • Loading branch information
uellue authored and sk1p committed Oct 23, 2024
1 parent 1b3e6f7 commit 89e9b35
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/libertem_live/udf/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ def get_backends(self):
''
return [
backend for backend in self.BACKEND_ALL
if backend not in {self.BACKEND_CUPY_SCIPY_COO, self.BACKEND_SCIPY_COO}
if backend not in {
self.BACKEND_CUPY_SCIPY_COO,
self.BACKEND_SCIPY_COO,
self.BACKEND_SCIPY_COO_ARRAY
}
]

# def get_preferred_input_dtype(self):
Expand All @@ -36,7 +40,7 @@ def process_tile(self, tile):
''
# Assign the portion from the last frame within the tile
# to the result buffer
self.results.intensity[:] = self.forbuf(tile[-1], self.results.intensity)
self.results.intensity[:] = self.forbuf(tile[[-1]], self.results.intensity)

def merge(self, dest, src):
''
Expand Down

0 comments on commit 89e9b35

Please sign in to comment.