Skip to content

Commit

Permalink
Update transform.cc wrapper for modern style
Browse files Browse the repository at this point in the history
  • Loading branch information
r-owen committed Mar 8, 2017
1 parent 0d09cb8 commit 0967862
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions python/lsst/afw/geom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@
from .transformMap import *
from .utils import *
from .endpoint import *
from .transform import *
12 changes: 4 additions & 8 deletions python/lsst/afw/geom/transform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ using namespace py::literals;
namespace lsst {
namespace afw {
namespace geom {

namespace {

template<typename Class>
Expand Down Expand Up @@ -84,14 +83,10 @@ void declareTransform(py::module& mod, std::string const & fromName, std::string
});
}

} // <anonymous>

PYBIND11_PLUGIN(_transform) {
// TODO uncomment these import(s) as part of the afw pybind11 cleanup pass,
// once we can make library names not have the leading underscore
// py::module::import("lsst.afw.geom.endpoint");
PYBIND11_PLUGIN(transform) {
py::module mod("transform");

py::module mod("_transform");
py::module::import("lsst.afw.geom.endpoint");

// Need to import numpy for ndarray and eigen conversions
if (_import_array() < 0) {
Expand Down Expand Up @@ -119,6 +114,7 @@ PYBIND11_PLUGIN(_transform) {
return mod.ptr();
}

} // <anonymous>
} // geom
} // afw
} // lsst

0 comments on commit 0967862

Please sign in to comment.