New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-15431: expand pybind11 interface #113
Conversation
f03328d
to
1fd2ddf
Compare
The commit messages violate the guidelines for commit messages:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why this is included in this ticket since it doesn't seem related, but...
python/lsst/jointcal/gtransfo.cc
Outdated
@@ -49,6 +49,11 @@ void declareGtransfo(py::module &mod) { | |||
"inputframe"_a, "inscribed"_a); | |||
cls.def("getNpar", &Gtransfo::getNpar); | |||
cls.def("offsetParams", &Gtransfo::offsetParams); | |||
cls.def("computeDerivative", [](Gtransfo const &self, Point const &where, const double step) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double const
is LSST standard.
cls.def("computeDerivative", [](Gtransfo const &self, Point const &where, const double step) { | ||
GtransfoLin derivative; | ||
self.computeDerivative(where, derivative, step); | ||
return derivative; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this pattern (create a GtransfoLin
, pass it in and then return it) indicates that the computeDerivative
method should have an API that returns a new derivative object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing C++ uses of computeDerivative
almost all reuse an existing array for the output. We could look at those and see if they are worth turning into what you suggest, but that's not for this ticket.
Although not used in python currently, these methods were useful for some exploratory work.
1fd2ddf
to
2bd4cbf
Compare
No description provided.