optiwindnet.fingerprint ======================= .. py:module:: optiwindnet.fingerprint .. autoapi-nested-parse:: Canonical fingerprints for persisted OptiWindNet data. Module Contents --------------- .. py:function:: fingerprint_coordinates(VertexC: numpy.ndarray) -> tuple[bytes, bytes] 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 :class:`~optiwindnet.db.NodeSet` entries. .. py:function:: fingerprint_function(function: types.FunctionType) -> dict[str, bytes | str] 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.