(self, update)
| 450 | return self._get_node(self.A), self._get_node(self.D) |
| 451 | |
| 452 | def _reconstruct(self, update): |
| 453 | data_a, data_d = None, None |
| 454 | node_a, node_d = self._get_node(self.A), self._get_node(self.D) |
| 455 | |
| 456 | if node_a is not None: |
| 457 | data_a = node_a.reconstruct() # TODO: (update) ??? |
| 458 | if node_d is not None: |
| 459 | data_d = node_d.reconstruct() # TODO: (update) ??? |
| 460 | |
| 461 | if data_a is None and data_d is None: |
| 462 | raise ValueError("Node is a leaf node and cannot be reconstructed" |
| 463 | " from subnodes.") |
| 464 | else: |
| 465 | rec = idwt(data_a, data_d, self.wavelet, self.mode, axis=self.axes) |
| 466 | if self._data_shape is not None and ( |
| 467 | rec.shape != self._data_shape): |
| 468 | rec = rec[tuple([slice(sz) for sz in self._data_shape])] |
| 469 | if update: |
| 470 | self.data = rec |
| 471 | return rec |
| 472 | |
| 473 | |
| 474 | class Node2D(BaseNode): |
nothing calls this directly
no test coverage detected