Binded SVD in the python level and documented
2 unresolved threads
2 unresolved threads
Implemented the signal standarization. The signs of U and V is defined analysing the first element of U. If U[0, 0] < 0 then U=-1U and V=-1V With that we have a consistent SVD binds along different implementations (http://prod.sandia.gov/techlib/access-control.cgi/2007/076422.pdf)
Closes #8 (closed)
Merge request reports
Activity
mentioned in commit 6297d7bb
125 // I need to create a matrix S_output of size MxN and fits the diagonal of S (NxN) on it. 126 blitz::Array<double,2> S_output(M, N); S_output=0; 127 blitz::Array<double,2> S_diag(N, N); S_diag=0; 128 bob::math::diag(S, S_diag); 129 S_output(blitz::Range(0,N-1), blitz::Range(0,N-1)) = S_diag; 130 //bob::math::diag(S, (reinterpret_cast<blitz::Array<double,2>>)S_output(blitz::Range(0,N-1), blitz::Range(0,N-1))); 131 return Py_BuildValue("NNN", 132 PyBlitzArrayCxx_AsConstNumpy(U), 133 PyBlitzArrayCxx_AsConstNumpy(S_output), 134 PyBlitzArrayCxx_AsConstNumpy(V)); 135 } 136 catch (std::exception& e) { 137 PyErr_SetString(PyExc_RuntimeError, e.what()); 138 } 139 catch (...) { 140 PyErr_SetString(PyExc_RuntimeError, "norminv failed: unknown exception caught"); @tiago.pereira maybe you meant
svd
instead ofnorminv
here.
Please register or sign in to reply