Skip to content

Commit

Permalink
Merge pull request #93 from lsst/tickets/DM-14834
Browse files Browse the repository at this point in the history
DM-14834: Use pybind11's native Eigen wrapping instead of ndarray EigenView
  • Loading branch information
r-owen committed Jun 29, 2018
2 parents a2cb10d + 26cdf22 commit 90dae03
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ config.log
.cache
.pytest_cache
pytest_session.txt
.coverage
bin/*.py
doc/html
doc/xml
Expand Down
1 change: 1 addition & 0 deletions python/lsst/jointcal/astrometryMappings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/

#include "pybind11/pybind11.h"
#include "pybind11/eigen.h"

#include "lsst/jointcal/Gtransfo.h"
#include "lsst/jointcal/AstrometryMapping.h"
Expand Down
1 change: 1 addition & 0 deletions python/lsst/jointcal/astrometryModels.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/

#include "pybind11/pybind11.h"
#include "pybind11/eigen.h"
#include "pybind11/stl.h"
#include "ndarray/pybind11.h"
#include "ndarray/eigen.h"
Expand Down
1 change: 1 addition & 0 deletions python/lsst/jointcal/gtransfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include "astshim.h"
#include "pybind11/pybind11.h"
#include "pybind11/eigen.h"
#include "ndarray/pybind11.h"
#include "ndarray/eigen.h"
#include "Eigen/Core"
Expand Down
1 change: 1 addition & 0 deletions python/lsst/jointcal/photometryMappings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/

#include "pybind11/pybind11.h"
#include "pybind11/eigen.h"
#include "pybind11/stl.h"
#include "ndarray/pybind11.h"
#include "ndarray/eigen.h"
Expand Down
1 change: 1 addition & 0 deletions python/lsst/jointcal/photometryModels.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/

#include "pybind11/pybind11.h"
#include "pybind11/eigen.h"
#include "pybind11/stl.h"
#include "ndarray/pybind11.h"
#include "ndarray/eigen.h"
Expand Down
1 change: 1 addition & 0 deletions python/lsst/jointcal/photometryTransfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/

#include "pybind11/pybind11.h"
#include "pybind11/eigen.h"
#include "ndarray/pybind11.h"
#include "ndarray/eigen.h"
#include "Eigen/Core"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_photometryMapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def test_transformFlux(self):

def test_offsetParams(self):
"""Test offsetting; note that offsetParams offsets by `-delta`."""
delta = np.array(0.0)
self._test_offsetParams(delta, np.array(self.scale))
delta = np.array([0.0])
self._test_offsetParams(delta, np.array([self.scale]))
delta -= 1
self._test_offsetParams(delta, self.scale-delta)

Expand Down

0 comments on commit 90dae03

Please sign in to comment.