executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
api-variantsSelect and interoperate among h3-py's string, integer, memoryview, and optional NumPy APIs while preserving H3 index meaning and collection contracts.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this route when a task mentions H3 string or integer indices, NumPy arrays,
memoryview, API parity, int_to_str, str_to_int, conversion, memory,
performance, or optional NumPy installation. The four public variants expose the
same public function names and signatures, but change scalar and collection
representations:
import h3 is the default h3.api.basic_str interface.h3.api.basic_int uses Python integers and ordinary Python collections.h3.api.memview_int uses Python integers and typed uint64 buffer outputs;
it has no NumPy dependency.h3.api.numpy_int uses Python integers for scalar results and NumPy
ndarray collections with uint64 dtype; NumPy is optional.h3/h3.api.basic_str.basic_int.memview_int for dependency-free typed-buffer exchange. Supply a
uint64 buffer, not a list or set, and preserve the returned view's lifetime.numpy_int when downstream code already consumes NumPy arrays or needs
vectorized array handling. Install the optional NumPy extra first.Read the root router for overall H3 routing. For geographic indexing algorithms, use core-indexing; for polygon and shape workflows, use polygon-geospatial.
0x
prefix. str_to_int and int_to_str are the explicit conversion boundary.memview_int.np.asarray(view) can share the memoryview's storage, whereas np.array(view)
makes an independent copy. Choose deliberately before mutating or retaining a
result.int_to_str/str_to_int as described in workflows.python scripts/check_api_variants.py. It reports available variants,
scalar/collection types, NumPy dtype, and a tiny parity check without running
a geospatial benchmark.Before handing a result to another component, record:
When an API boundary is part of a public function, document the accepted scalar and collection representation rather than relying on a module import name. For reproducibility, include the package version and the diagnostic output, but keep those task artifacts outside this runtime skill tree.
If a caller can select more than one variant, expose the choice as an explicit configuration value and test both the selected representation and the normalized semantic result. Do not switch variants implicitly because an optional import happens to be present. A missing optional dependency should produce a clear fallback or a clear installation error, depending on the caller's contract.
This route does not teach cell geometry, hierarchy, grid algorithms, edge/vertex algorithms, or polygon construction. Follow the sibling routes above for those operations, then return here only for representation conversion or interop.
Keep this route focused on public Python behavior and observable contracts.