예제 #1
0
Py::Object
Transformation::inverse_xy_tup(const Py::Tuple & args) {
  _VERBOSE("Transformation::inverse_xy_tup");
  args.verify_length(1);

  Py::Tuple tup = args[0];
  double xin = Py::Float(tup[0]);
  double yin = Py::Float(tup[1]);

  if (!_frozen) eval_scalars();
  
  inverse_api(xin, yin);
  Py::Tuple ret(2);
  ret[0] = Py::Float(xy.first);
  ret[1] = Py::Float(xy.second);
  return ret;
  
}
예제 #2
0
Py::Object
Transformation::inverse_xy_tup(const Py::Tuple & args) {
  _VERBOSE("Transformation::inverse_xy_tup");
  args.verify_length(1);

  Py::Tuple tup = args[0];
  double xin = Py::Float(tup[0]);
  double yin = Py::Float(tup[1]);

  try {
    if (!_frozen) eval_scalars();
  }
  catch(...) {
    throw Py::ValueError("Domain error on invser_xy_tup");
  }


  inverse_api(xin, yin);
  Py::Tuple ret(2);
  ret[0] = Py::Float(xy.first);
  ret[1] = Py::Float(xy.second);
  return ret;

}