Flags#
-
class numpy::Flags#
numpy C++ class.
Example#
#include <numpy/np_ndarray.h>
using namespace numpy;
// Use Flags
Flags obj;
// ... operations ...
Constructors#
Signature |
Location |
Example |
|---|---|---|
|
df_flags.h:35 |
|
|
df_flags.h:50 |
|
|
df_flags.h:55 |
Other Methods#
Signature |
Return Type |
Location |
Example |
|---|---|---|---|
|
void |
df_flags.h:85 |
Code Examples#
The following examples are extracted from the test suite.
reset (np_test_2_all.cpp:22610)
22600 // Count iterations
22601 size_t outer_count = 0;
22602 size_t total_inner_count = 0;
22603 for (; !outer.is_finished(); ++outer) {
22604 size_t inner_count = 0;
22605 for (; !inner.is_finished(); ++inner) {
22606 inner_count++;
22607 total_inner_count++;
22608 }
22609 outer_count++;
22610 inner.reset();
22611 }
22612
22613 if (outer_count != 3 || total_inner_count != 12) {
22614 std::cout << " [FAIL] : Iteration counts incorrect";
22615 throw std::runtime_error("np_test_nested_iters_basic failed");
22616 }
22617
22618 std::cout << " -> tests passed" << std::endl;
22619 }