add <pybind/stl.h> and fix constructor argument order
parent
15120ce9ab
commit
b99bf4e929
|
@ -10,3 +10,5 @@
|
||||||
* Without this they will be automatically converted to a Python object, and all
|
* Without this they will be automatically converted to a Python object, and all
|
||||||
* mutations on Python side will not be reflected on C++.
|
* mutations on Python side will not be reflected on C++.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <pybind11/stl.h>
|
||||||
|
|
|
@ -25,7 +25,7 @@ class TestBasis(GtsamTestCase):
|
||||||
noise = gtsam.noiseModel.Unit.Create(1)
|
noise = gtsam.noiseModel.Unit.Create(1)
|
||||||
def testBasis(fitter, basis, f=f):
|
def testBasis(fitter, basis, f=f):
|
||||||
data = {x: f(x) for x in datax}
|
data = {x: f(x) for x in datax}
|
||||||
fit = fitter(N, data, noise)
|
fit = fitter(data, noise, N)
|
||||||
coeff = fit.parameters()
|
coeff = fit.parameters()
|
||||||
interpy = basis.WeightMatrix(N, interpx) @ coeff
|
interpy = basis.WeightMatrix(N, interpx) @ coeff
|
||||||
np.testing.assert_almost_equal(interpy, np.array([f(x) for x in interpx]), decimal=7)
|
np.testing.assert_almost_equal(interpy, np.array([f(x) for x in interpx]), decimal=7)
|
||||||
|
|
Loading…
Reference in New Issue