MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / __is_contiguous

Function __is_contiguous

external/ggml/examples/python/ggml/utils.py:133–133  ·  view source on GitHub ↗
(tensor: TensorLike)

Source from the content-addressed store, hash-verified

131def __get_nbytes(tensor: TensorLike): return tensor.nbytes if isinstance(tensor, np.ndarray) else lib.ggml_nbytes(tensor)
132def __get_nelements(tensor: TensorLike): return tensor.size if isinstance(tensor, np.ndarray) else lib.ggml_nelements(tensor)
133def __is_contiguous(tensor: TensorLike): return tensor.flags['C_CONTIGUOUS'] if isinstance(tensor, np.ndarray) else lib.ggml_is_contiguous(tensor)
134
135def __get_floats(tensor: TensorLike) -> ffi.CData:
136 data, type = __get_data(tensor), __get_type(tensor)

Callers 2

numpyFunction · 0.85
__expect_same_layoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected