httk.core.vectors.vector_native_backend¶
Backend wrapping plain nested sequences (lists/tuples of numeric or string leaves).
Classes¶
Backend for a vector backed by plain nested sequences. |
Module Contents¶
- class httk.core.vectors.vector_native_backend.VectorNativeBackend(obj, **hints)[source]¶
Bases:
httk.core.vectors.vector_backend.VectorBackendBackend for a vector backed by plain nested sequences.
The native representation is a (possibly nested) rectangular list or tuple whose leaves are
int,float,decimal.Decimal,fractions.Fraction, orstr. Conversion into the exactfractionsinterchange goes throughFracVector, so string-uncertainty parsing (e.g."0.33342(10)") works here too.unwrapreturns the original raw object.- Parameters:
obj (Any) – The rectangular source data to wrap.
**hints (Any) – Optional backend-selection hints.
- property native: Any[source]¶
The original nested list/tuple this backend wraps, leaves untouched.
This is the same object returned by
unwrap(), exposed as a named accessor so the native view can present a natively-held vector’s leaves verbatim (its preserve-original default) without reaching into private state.
- property fractions: httk.core.vectors.vector_api.Fractions[source]¶
Return the native value in the exact Fraction interchange format.