MCPcopy Create free account
hub / github.com/pybind/pybind11 / from_buffer

Method from_buffer

include/pybind11/pytypes.h:2449–2456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2447 bool readonly = false);
2448
2449 static memoryview from_buffer(const void *ptr,
2450 ssize_t itemsize,
2451 const char *format,
2452 detail::any_container<ssize_t> shape,
2453 detail::any_container<ssize_t> strides) {
2454 return memoryview::from_buffer(
2455 const_cast<void *>(ptr), itemsize, format, std::move(shape), std::move(strides), true);
2456 }
2457
2458 template <typename T>
2459 static memoryview from_buffer(T *ptr,

Callers 1

test_ctypes_from_bufferFunction · 0.80

Calls 1

moveFunction · 0.85

Tested by 1

test_ctypes_from_bufferFunction · 0.64