MCPcopy Create free account
hub / github.com/catboost/catboost / reshape

Method reshape

contrib/libs/pybind11/include/pybind11/numpy.h:1077–1086  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 15

test_hnsw_estimatorFunction · 0.80
bfloat16_to_float32Function · 0.80
float8e4m3_to_float32Function · 0.80
float8e5m2_to_float32Function · 0.80
unpack_int4Function · 0.80
to_arrayFunction · 0.80
_unpack_4bitx2Function · 0.80
test_multiregressionFunction · 0.80
fit_from_dfFunction · 0.80

Calls 3

getFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45

Tested by 13

test_hnsw_estimatorFunction · 0.64
test_multiregressionFunction · 0.64
fit_from_dfFunction · 0.64
test_shap_multiclassFunction · 0.64
test_baselineFunction · 0.64
test_stochastic_filterFunction · 0.64