int nX,nY,nZ; nX = boost::python::extract<int>(sec[2]) - boost::python::extract<int>(sec[1]) + 1; nY = boost::python::extract<int>(sec[5]) - boost::python::extract<int>(sec[4]) + 1; nZ = boost::python::extract<int>(sec[8]) - boost::python::extract<int>(sec[7]) + 1;  af::versa<double,af::c_grid<3> > m(af::c_grid<3>(nX,nY,nZ));
int nX = sec[2] - sec[1] + 1; int nY = sec[5] - sec[4] + 1; int nZ = sec[8] - sec[7] + 1; SCITBX_ASSERT(nX > 0); SCITBX_ASSERT(nY > 0); SCITBX_ASSERT(nZ > 0); af::versa<double,af::c_grid<3> > m(af::c_grid<3>(nX,nY,nZ));
af::versa<double,af::c_grid<3> > XplorMap::ReadXplorMap(const std::string& filename,                             int headers,                             boost::python::list sec                             ) {  std::ifstream cin(filename.c_str());  std::string line;  for (std::size_t i = 0; i < headers; i++) {    std::getline(cin,line);  }  // dump everything to a 3-D array  int nX,nY,nZ;  nX = boost::python::extract<int>(sec[2]) - boost::python::extract<int>(sec[1]) + 1;  nY = boost::python::extract<int>(sec[5]) - boost::python::extract<int>(sec[4]) + 1;  nZ = boost::python::extract<int>(sec[8]) - boost::python::extract<int>(sec[7]) + 1;  af::versa<double,af::c_grid<3> > m(af::c_grid<3>(nX,nY,nZ));   af::ref<double, af::c_grid<3> > mref=m.ref();  for (int section = 0; section < nZ; section++) {    std::getline(cin,line); //reads section number    int x=0;    int y=0;    for (int rect = 0, fast = 0; rect < (nX*nY); rect++,fast++) {      if (fast%6==0)         {    std::getline(cin,line); fast=0;      }      mref(x,y,section) = std::atof(line.substr(fast*12,12).c_str());      ++x;      if (x==nX) {x=0; ++y;}          }  }      cin.close();  return m;}