42 int gLength = boost::python::len(gridCoordinates);
43 std::vector<std::vector<double> > coords(gLength);
44 for (
int i = 0; i < gLength; ++i) {
45 int lineLength = boost::python::len(gridCoordinates[i]);
46 coords[i] = std::vector<double>(lineLength);
47 for (
int j = 0; j < lineLength; ++j) {
48 coords[i][j] = boost::python::extract<double>(gridCoordinates[i][j]);
56 boost::python::list spacing,
57 boost::python::list
min) {
58 int dim = boost::python::len(size);
59 if (dim != boost::python::len(spacing)) {
61 }
else if (dim != boost::python::len(
min)) {
64 std::vector<int> sizeVec(dim);
65 std::vector<double> spacingVec(dim);
66 std::vector<double> minVec(dim);
67 for (
int i = 0; i < dim; ++i) {
68 sizeVec[i] = boost::python::extract<int>(size[i]);
69 spacingVec[i] = boost::python::extract<double>(spacing[i]);
70 minVec[i] = boost::python::extract<double>(
min[i]);
73 return NDGrid(dim, &sizeVec[0], &spacingVec[0], &minVec[0]);