pkgsrc-wip/py-scikits_learn/patches/patch-aa
Kamel Ibn Aziz Derouiche ea96ee195b Import py26-scikits_learn-0.5 as wip/py-scikits_learn.
A set of python modules for machine learning and data mining
2011-01-17 22:17:27 +00:00

42 lines
1.3 KiB
Text

$NetBSD: patch-aa,v 1.1.1.1 2011/01/17 22:17:27 jihbed Exp $
--- scikits/learn/utils/src/cholesky_delete.c.orig 2011-01-04 18:42:32.000000000 +0100
+++ scikits/learn/utils/src/cholesky_delete.c 2011-01-04 18:43:10.000000000 +0100
@@ -18,27 +18,27 @@
double c, s;
/* delete row go_out */
- double * _L = L + (go_out * m);
+ double * L1 = L + (go_out * m);
int i;
for (i = go_out; i < n - 1; ++i) {
- cblas_dcopy (i + 2, _L + m , 1, _L, 1);
- _L += m;
+ cblas_dcopy (i + 2, L1 + m , 1, L1, 1);
+ L1 += m;
}
- _L = L + (go_out * m);
+ L1 = L + (go_out * m);
for (i=go_out; i < n - 1; ++i) {
- cblas_drotg (_L + i, _L + i + 1, &c, &s);
- if (_L[i] < 0) {
+ cblas_drotg (L1 + i, L1 + i + 1, &c, &s);
+ if (L1[i] < 0) {
/* Diagonals cannot be negative */
- _L[i] = copysign(_L[i], 1.0);
+ L1[i] = copysign(L1[i], 1.0);
c = -c;
s = -s;
}
- _L[i+1] = 0.; /* just for cleanup */
- _L += m;
+ L1[i+1] = 0.; /* just for cleanup */
+ L1 += m;
- cblas_drot (n - (i + 2), _L + i, m, _L + i + 1,
+ cblas_drot (n - (i + 2), L1 + i, m, L1 + i + 1,
m, c, s);
}