diff options
author | shumkovnd <shumkovnd@yandex-team.com> | 2023-11-10 14:39:34 +0300 |
---|---|---|
committer | shumkovnd <shumkovnd@yandex-team.com> | 2023-11-10 16:42:24 +0300 |
commit | 77eb2d3fdcec5c978c64e025ced2764c57c00285 (patch) | |
tree | c51edb0748ca8d4a08d7c7323312c27ba1a8b79a /contrib/python/contourpy/src/common.h | |
parent | dd6d20cadb65582270ac23f4b3b14ae189704b9d (diff) | |
download | ydb-77eb2d3fdcec5c978c64e025ced2764c57c00285.tar.gz |
KIKIMR-19287: add task_stats_drawing script
Diffstat (limited to 'contrib/python/contourpy/src/common.h')
-rw-r--r-- | contrib/python/contourpy/src/common.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/contrib/python/contourpy/src/common.h b/contrib/python/contourpy/src/common.h new file mode 100644 index 0000000000..cc4bc851a0 --- /dev/null +++ b/contrib/python/contourpy/src/common.h @@ -0,0 +1,32 @@ +#ifndef CONTOURPY_COMMON_H +#define CONTOURPY_COMMON_H + +#include <pybind11/pybind11.h> +#include <pybind11/numpy.h> + +namespace contourpy { + +namespace py = pybind11; + +// quad/point index type, the same as for numpy array shape/indices (== npy_intp). Also used for +// chunks. +typedef py::ssize_t index_t; + +// Count of points, lines and holes. +typedef py::size_t count_t; + +// Offsets into point arrays. +typedef uint32_t offset_t; + +// Input numpy array classes. +typedef py::array_t<double, py::array::c_style | py::array::forcecast> CoordinateArray; +typedef py::array_t<bool, py::array::c_style | py::array::forcecast> MaskArray; + +// Output numpy array classes. +typedef py::array_t<double> PointArray; +typedef py::array_t<uint8_t> CodeArray; +typedef py::array_t<offset_t> OffsetArray; + +} // namespace contourpy + +#endif // CONTOURPY_COMMON_H |