CellStyle#
-
class numpy::CellStyle#
numpy C++ class.
Example#
#include <numpy/np_ndarray.h>
using namespace numpy;
// Use CellStyle
CellStyle obj;
// ... operations ...
Array Creation#
Signature |
Return Type |
Location |
Example |
|---|---|---|---|
|
bool |
df_styler.h:80 |
I/O#
Signature |
Return Type |
Location |
Example |
|---|---|---|---|
|
std::string |
df_styler.h:64 |
Other Methods#
Signature |
Return Type |
Location |
Example |
|---|---|---|---|
|
void |
df_styler.h:74 |
|
|
void |
df_styler.h:60 |
Code Examples#
The following examples are extracted from the test suite.
empty (np_test_1_all.cpp:6316)
6306}
6307
6308void test_data_generator_emptyBenchmarkSorting() {
6309 std::cout << "========= test_data_generator_empty =======================";
6310
6311 DataGenerator<int> gen(42);
6312
6313 // Test empty data generation
6314 std::vector<int> data = gen.generate(0, DataPattern::RANDOM);
6315
6316 if (!(data.empty())) {
6317 std::string description = std::string("test_data_generator_emptyBenchmarkSorting():") + __FILE__ + ":" + std::to_string(__LINE__) + ": !(data.empty())";
6318 std::cout << std::string("[FAIL] ") + description << std::endl;
6319 throw std::runtime_error(description);
6320 }
6321
6322 // std::cout << "Empty data generation test passed" << std::endl;
6323
6324 std::cout << " -> tests passed" << std::endl;
6325}
set (np_test_1_all.cpp:6747)
6737 std::cout << "========= testArrayPrinting =======================";
6738
6739 // Test 1D array printing
6740 std::vector<std::string> words = {"Hello", "World", "Test"};
6741 auto arr_1d = array<16>(words);
6742 // std::cout << "1D CharArray:" << std::endl;
6743 // arr_1d.print();
6744
6745 // Test 2D array printing
6746 chararray16 arr_2d({2, 2}, "test");
6747 arr_2d.set({0, 0}, "A");
6748 arr_2d.set({0, 1}, "B");
6749 arr_2d.set({1, 0}, "C");
6750 arr_2d.set({1, 1}, "D");
6751
6752 // std::cout << "2D CharArray:" << std::endl;
6753 // arr_2d.print();
6754
6755 std::cout << " -> tests passed" << std::endl;
6756}