MCPcopy Create free account
hub / github.com/apple/coremltools / reshape

Method reshape

deps/pybind11/include/pybind11/numpy.h:1069–1078  ·  view source on GitHub ↗

Optional `order` parameter omitted, to be added as needed.

Source from the content-addressed store, hash-verified

1067
1068 /// Optional `order` parameter omitted, to be added as needed.
1069 array reshape(ShapeContainer new_shape) {
1070 detail::npy_api::PyArray_Dims d
1071 = {reinterpret_cast<Py_intptr_t *>(new_shape->data()), int(new_shape->size())};
1072 auto new_array
1073 = reinterpret_steal<array>(detail::npy_api::get().PyArray_Newshape_(m_ptr, &d, 0));
1074 if (!new_array) {
1075 throw error_already_set();
1076 }
1077 return new_array;
1078 }
1079
1080 /// Create a view of an array in a different data type.
1081 /// This function may fundamentally reinterpret the data in the array.

Callers 15

validateReshapeLayerMethod · 0.80
shapeReshapeLayerMethod · 0.80
compute_qparams_by_dtypeFunction · 0.80
lut_to_denseFunction · 0.80
pack_elements_into_bitsFunction · 0.80
_compute_hessianMethod · 0.80

Calls 3

sizeMethod · 0.65
getFunction · 0.50
dataMethod · 0.45

Tested by 15

test_basicMethod · 0.64
test_stressMethod · 0.64
test_vector_basicMethod · 0.64
test_vector_stressMethod · 0.64
forwardMethod · 0.64
test_k_means_vector_wiseFunction · 0.64
test_observer_fixed_dataFunction · 0.64
_mock_initializerFunction · 0.64