ndarray_to_bytes¶ ndarray_to_bytes(ndarray: ndarray[tuple[int, ...], dtype[Any]]) → bytes[source]¶ 将 NumPy ndarray 序列化为字节。