29#include "openPMD/RecordComponent.hpp"
31#include <pybind11/numpy.h>
32#include <pybind11/pybind11.h>
33#include <pybind11/stl.h>
37namespace py = pybind11;
47void store_chunk(
RecordComponent &r, py::array &a, py::tuple
const &slices);
51constexpr static char const *is_scalar = R
"docstr(
52Returns true if this record only contains a single component.
56template <
typename Class>
57Class &&addRecordComponentSetGet(Class &&class_)
68 return load_chunk(r, slices);
70 py::arg(
"tuple of index slices"))
74 auto const slices = py::make_tuple(slice_obj);
75 return load_chunk(r, slices);
81 auto const slices = py::make_tuple(slice_obj);
82 return load_chunk(r, slices);
84 py::arg(
"axis index"))
89 store_chunk(r, a, slices);
91 py::arg(
"tuple of index slices"),
92 py::arg(
"array with values to assign"))
96 auto const slices = py::make_tuple(slice_obj);
97 store_chunk(r, a, slices);
100 py::arg(
"array with values to assign"))
104 auto const slices = py::make_tuple(slice_obj);
105 store_chunk(r, a, slices);
107 py::arg(
"axis index"),
108 py::arg(
"array with values to assign"));
109 return std::forward<Class>(class_);
Definition RecordComponent.hpp:114
Public definitions of openPMD-api.
Definition Date.cpp:29