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

Method mutable_unchecked

include/pybind11/numpy.h:1238–1246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1236 */
1237 template <typename T, ssize_t Dims = -1>
1238 detail::unchecked_mutable_reference<T, Dims> mutable_unchecked() & {
1239 if (Dims >= 0 && ndim() != Dims) {
1240 throw std::domain_error("array has incorrect number of dimensions: "
1241 + std::to_string(ndim()) + "; expected "
1242 + std::to_string(Dims));
1243 }
1244 return detail::unchecked_mutable_reference<T, Dims>(
1245 mutable_data(), shape(), strides(), ndim());
1246 }
1247
1248 /**
1249 * Returns a proxy object that provides const access to the array's data without bounds or

Callers 1

TEST_SUBMODULEFunction · 0.80

Calls 1

mutable_dataFunction · 0.85

Tested by 1

TEST_SUBMODULEFunction · 0.64