optiwindnet.fingerprint¶
Canonical fingerprints for persisted OptiWindNet data.
Module Contents¶
- optiwindnet.fingerprint.fingerprint_coordinates(VertexC: numpy.ndarray) tuple[bytes, bytes][source]¶
Return the SHA-256 digest and canonical
.npybytes ofVertexC.Arrays are normalized to C order before serialization so numerically equal C- and Fortran-contiguous inputs have the same digest. Version 3 of NumPy’s
.npyformat is used to match persistedNodeSetentries.
- optiwindnet.fingerprint.fingerprint_function(function: types.FunctionType) dict[str, bytes | str][source]¶
Return the bytecode digest, source filename, and name of
function.The digest intentionally covers only
code.co_codeto preserve existing database identities. It is not a complete semantic fingerprint: changes to constants, defaults, globals, or closure values may leave the digest unchanged.