| 65 | |
| 66 | |
| 67 | class MapOverlap(ArrayExpr): |
| 68 | _parameters = ["array", "axes"] |
| 69 | |
| 70 | @functools.cached_property |
| 71 | def _meta(self): |
| 72 | return meta_from_array(self.array) |
| 73 | |
| 74 | @functools.cached_property |
| 75 | def chunks(self): |
| 76 | return tuple(map(tuple, _overlap_internal_chunks(self.array.chunks, self.axes))) |
| 77 | |
| 78 | @functools.cached_property |
| 79 | def _name(self) -> str: |
| 80 | return f"overlap-{super()._name}" |
| 81 | |
| 82 | def _layer(self) -> dict: |
| 83 | x = self.array |
| 84 | graph = ArrayOverlapLayer( |
| 85 | name=x.name, |
| 86 | axes=self.axes, |
| 87 | chunks=x.chunks, |
| 88 | numblocks=x.numblocks, |
| 89 | token="-".join(self._name.split("-")[1:]), |
| 90 | ) |
| 91 | return ensure_dict(graph) |
| 92 | |
| 93 | |
| 94 | def trim_overlap(x, depth, boundary=None): |
no outgoing calls
no test coverage detected
searching dependent graphs…