Data-File Parsing #
This module contains the small pieces shared by the CSV and NPY loaders:
- ASCII digit/sign parsing used by numeric CSV cells and NPY headers; and
- small string helpers for parsing Python/NumPy-style header fragments.
The parser is deliberately small. It supports TorchLean examples and regression tests, not a full data-ingestion framework.
Maximum number of characters accepted for a numeric CSV cell or numeric NPY header atom.
Instances For
Prefix a parser error with the file format or field that produced it.
Instances For
Decimal scanning #
ASCII digit test used by the numeric parser.
Instances For
Convert a digit character to its numeric value, or return none if not a digit.
Instances For
Interpret a list of base-10 digits as a natural number.
Instances For
Parse a natural number header value (expects a pure digit string).
Instances For
Header string helpers #
End of one field value in a NumPy header dictionary or standalone parser input.
Instances For
Parse a closed quoted value from a header fragment. Escaped strings are unsupported.
Instances For
Find the substring after key in a header string, if present.
Instances For
Find a header field value by key name (handles both 'key': and \"key\": spellings).