VectorizeInfo#
-
class numpy::VectorizeInfo#
numpy C++ class.
Example#
#include <numpy/np_ndarray.h>
using namespace numpy;
// Use VectorizeInfo
VectorizeInfo obj;
// ... operations ...
Other Methods#
Signature |
Return Type |
Location |
Example |
|---|---|---|---|
|
std::string |
NP_VECTORIZE.H:574 |
Code Examples#
The following examples are extracted from the test suite.
describe (np_test_1_all.cpp:11448)
11438 auto moment2_result = moment(normal_data, 2);
11439 // std::cout << "2nd moment: " << moment2_result.getElementAt({ 0 }) << std::endl;
11440 if (!(moment2_result.getElementAt({ 0 }) > 0)) {
11441 std::string description = std::string("testDistributionShapeMeasures():") + __FILE__ + ":" + std::to_string(__LINE__) + ": !(moment2_result.getElementAt({ 0 }) > 0)";
11442 std::cout << std::string("[FAIL] ") + description << std::endl;
11443 throw std::runtime_error(description);
11444 }
11445 // std::cout << "[OK] Moment calculation\n";
11446
11447 // Test describe
11448 auto desc_result = describe(normal_data);
11449 // std::cout << "Describe result:" << std::endl;
11450 // std::cout << " nobs: " << desc_result.nobs << std::endl;
11451 // std::cout << " min: " << desc_result.minmax.first << ", max: " << desc_result.minmax.second << std::endl;
11452 // std::cout << " mean: " << desc_result.mean << std::endl;
11453 // std::cout << " variance: " << desc_result.variance << std::endl;
11454 if (!(desc_result.nobs == 5)) {
11455 std::string description = std::string("testDistributionShapeMeasures():") + __FILE__ + ":" + std::to_string(__LINE__) + ": !(desc_result.nobs == 5)";
11456 std::cout << std::string("[FAIL] ") + description << std::endl;
11457 throw std::runtime_error(description);
11458 }