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

Method squeeze

include/pybind11/numpy.h:1266–1269  ·  view source on GitHub ↗

Return a new view with all of the dimensions of length 1 removed

Source from the content-addressed store, hash-verified

1264
1265 /// Return a new view with all of the dimensions of length 1 removed
1266 array squeeze() {
1267 auto &api = detail::npy_api::get();
1268 return reinterpret_steal<array>(api.PyArray_Squeeze_(m_ptr));
1269 }
1270
1271 /// Resize array to given shape
1272 /// If refcheck is true and more that one reference exist to this array

Callers 1

loadMethod · 0.80

Calls 1

getFunction · 0.85

Tested by

no test coverage detected