Commit c6b5da70 authored by André Anjos's avatar André Anjos 💬
Browse files

All xbob.math tests are now passing

parent ff6a72d2
This diff is collapsed.
......@@ -9,3 +9,5 @@
extern PyTypeObject PyBobMathLpInteriorPoint_Type;
extern PyTypeObject PyBobMathLpInteriorPointShortstep_Type;
extern PyTypeObject PyBobMathLpInteriorPointPredictorCorrector_Type;
extern PyTypeObject PyBobMathLpInteriorPointLongstep_Type;
......@@ -509,6 +509,12 @@ PyMODINIT_FUNC XBOB_EXT_ENTRY_NAME (void) {
PyBobMathLpInteriorPointShortstep_Type.tp_base = &PyBobMathLpInteriorPoint_Type;
if (PyType_Ready(&PyBobMathLpInteriorPointShortstep_Type) < 0) return;
PyBobMathLpInteriorPointPredictorCorrector_Type.tp_base = &PyBobMathLpInteriorPoint_Type;
if (PyType_Ready(&PyBobMathLpInteriorPointPredictorCorrector_Type) < 0) return;
PyBobMathLpInteriorPointLongstep_Type.tp_base = &PyBobMathLpInteriorPoint_Type;
if (PyType_Ready(&PyBobMathLpInteriorPointLongstep_Type) < 0) return;
PyObject* m = Py_InitModule3(XBOB_EXT_MODULE_NAME,
module_methods, module_docstr);
......@@ -522,6 +528,12 @@ PyMODINIT_FUNC XBOB_EXT_ENTRY_NAME (void) {
Py_INCREF(&PyBobMathLpInteriorPointShortstep_Type);
PyModule_AddObject(m, "LPInteriorPointShortstep", (PyObject *)&PyBobMathLpInteriorPointShortstep_Type);
Py_INCREF(&PyBobMathLpInteriorPointPredictorCorrector_Type);
PyModule_AddObject(m, "LPInteriorPointPredictorCorrector", (PyObject *)&PyBobMathLpInteriorPointPredictorCorrector_Type);
Py_INCREF(&PyBobMathLpInteriorPointLongstep_Type);
PyModule_AddObject(m, "LPInteriorPointLongstep", (PyObject *)&PyBobMathLpInteriorPointLongstep_Type);
/* imports the NumPy C-API */
import_array();
......
......@@ -9,7 +9,7 @@
"""
import os, sys
from xbob.math import LPInteriorPointShortstep #, LPInteriorPointPredictorCorrector, LPInteriorPointLongstep
from xbob.math import LPInteriorPointShortstep, LPInteriorPointPredictorCorrector, LPInteriorPointLongstep
import numpy
import nose.tools
......@@ -74,8 +74,6 @@ def test_parameters():
nose.tools.eq_(op1.theta, 0.4)
nose.tools.eq_(op1.epsilon, 1e-6)
op1b = LPInteriorPointShortstep(op1)
print '***************************************'
print op1b.m
nose.tools.eq_(op1, op1b)
assert not (op1 != op1b)
op1b.theta = 0.5
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment