Returns subnode or None (see `decomposition` flag description). Parameters ---------- part : Subnode name decompose : bool, optional If the param is True and corresponding subnode does not exist, the subnode will be create
(self, part, decompose=True)
| 211 | raise NotImplementedError() # override this in subclasses |
| 212 | |
| 213 | def get_subnode(self, part, decompose=True): |
| 214 | """ |
| 215 | Returns subnode or None (see `decomposition` flag description). |
| 216 | |
| 217 | Parameters |
| 218 | ---------- |
| 219 | part : |
| 220 | Subnode name |
| 221 | decompose : bool, optional |
| 222 | If the param is True and corresponding subnode does not |
| 223 | exist, the subnode will be created using coefficients |
| 224 | from the DWT decomposition of the current node. |
| 225 | (default: True) |
| 226 | """ |
| 227 | self._validate_node_name(part) |
| 228 | subnode = self._get_node(part) |
| 229 | if subnode is None and decompose and not self.is_empty: |
| 230 | self.decompose() |
| 231 | subnode = self._get_node(part) |
| 232 | return subnode |
| 233 | |
| 234 | def __getitem__(self, path): |
| 235 | """ |
no test coverage detected