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 .npy bytes of VertexC.

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 .npy format is used to match persisted NodeSet entries.

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_code to preserve existing database identities. It is not a complete semantic fingerprint: changes to constants, defaults, globals, or closure values may leave the digest unchanged.