MCPcopy Create free account
hub / github.com/PyWavelets/pywt / get_subnode

Method get_subnode

pywt/_wavelet_packets.py:213–232  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 """

Callers 4

__getitem__Method · 0.95
__setitem__Method · 0.95
walkMethod · 0.95
walk_depthMethod · 0.95

Calls 3

_validate_node_nameMethod · 0.95
_get_nodeMethod · 0.95
decomposeMethod · 0.95

Tested by

no test coverage detected