INNER CODE UNIT · Python

_compiled_float32_array

QianyeSu/Skyborn · src/skyborn/calc/GPI/core.py:101

def _compiled_float32_array(values: Any, *, order: Optional[str] = None) -> np.ndarray:
    """Materialize a float32 array with an explicit compiled-boundary layout."""
    arr = np.asarray(values, dtype=np.float32)

    if order == "F":
        if arr.ndim <= 1:
            return np.ascontiguousarray(arr)
        return arr if arr.flags.f_contiguous else np.asfortranarray(arr)

    if order == "C":
        return arr if arr.flags.c_contiguous else np.ascontiguousarray(arr)

    if arr.flags.c_contiguous or arr.flags.f_contiguous:
        return arr
    return np.ascontiguousarray(arr)


def _diagnostic_result(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…