MCPcopy Create free account
hub / github.com/PyTables/PyTables / _v_wdflts

Method _v_wdflts

tables/table.py:588–602  ·  view source on GitHub ↗

Contain the default values for writing in recarray format.

(self)

Source from the content-addressed store, hash-verified

586
587 @lazyattr
588 def _v_wdflts(self) -> np.ndarray | None:
589 """Contain the default values for writing in recarray format."""
590 # First, do a check to see whether we need to set default values
591 # different from 0 or not.
592 for coldflt in self.coldflts.values():
593 if isinstance(coldflt, np.ndarray) or coldflt:
594 break
595 else:
596 # No default different from 0 found. Returning None.
597 return None
598 wdflts = self._get_container(1)
599 for colname, coldflt in self.coldflts.items():
600 ra = get_nested_field(wdflts, colname)
601 ra[:] = coldflt
602 return wdflts
603
604 @lazyattr
605 def _colunaligned(self) -> frozenset:

Callers

nothing calls this directly

Calls 3

_get_containerMethod · 0.95
valuesMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected