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

Method unchecked

include/pybind11/numpy.h:1256–1263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1254 */
1255 template <typename T, ssize_t Dims = -1>
1256 detail::unchecked_reference<T, Dims> unchecked() const & {
1257 if (Dims >= 0 && ndim() != Dims) {
1258 throw std::domain_error("array has incorrect number of dimensions: "
1259 + std::to_string(ndim()) + "; expected "
1260 + std::to_string(Dims));
1261 }
1262 return detail::unchecked_reference<T, Dims>(data(), shape(), strides(), ndim());
1263 }
1264
1265 /// Return a new view with all of the dimensions of length 1 removed
1266 array squeeze() {

Callers 1

TEST_SUBMODULEFunction · 0.80

Calls 1

dataFunction · 0.70

Tested by 1

TEST_SUBMODULEFunction · 0.64