[Python-modules-commits] r22446 - in packages/scipy/trunk/debian (4 files)

varun at users.alioth.debian.org varun at users.alioth.debian.org
Sun Jul 22 02:12:35 UTC 2012


    Date: Sunday, July 22, 2012 @ 02:12:34
  Author: varun
Revision: 22446

* debian/patches:
  - add dtype.diff (Closes: #682030)
  - add up_minpack_ints.diff, thanks to Yaroslav Halchenko (Closes: #681270)

Added:
  packages/scipy/trunk/debian/patches/dtype.diff
  packages/scipy/trunk/debian/patches/up_minpack_ints.diff
Modified:
  packages/scipy/trunk/debian/changelog
  packages/scipy/trunk/debian/patches/series

Modified: packages/scipy/trunk/debian/changelog
===================================================================
--- packages/scipy/trunk/debian/changelog	2012-07-21 22:42:38 UTC (rev 22445)
+++ packages/scipy/trunk/debian/changelog	2012-07-22 02:12:34 UTC (rev 22446)
@@ -1,11 +1,17 @@
-python-scipy (0.10.1+dfsg1-4) UNRELEASED; urgency=low
+python-scipy (0.10.1+dfsg1-4) unstable; urgency=low
 
+  [ Julian Taylor ]
   * use dh_numpy3
     - build depend on python3-numpy >= 1:1.6.2~rc1-1~
   * debian/rules: remove reference to pyshared
 
- -- Julian Taylor <jtaylor.debian at googlemail.com>  Sun, 20 May 2012 14:29:13 +0200
+  [ Varun Hiremath ]
+  * debian/patches:
+    - add dtype.diff (Closes: #682030)
+    - add up_minpack_ints.diff, thanks to Yaroslav Halchenko (Closes: #681270)
 
+ -- Varun Hiremath <varun at debian.org>  Sat, 21 Jul 2012 17:23:02 -0400
+
 python-scipy (0.10.1+dfsg1-3) unstable; urgency=low
 
   * wrap-and-sort debian folder

Added: packages/scipy/trunk/debian/patches/dtype.diff
===================================================================
--- packages/scipy/trunk/debian/patches/dtype.diff	                        (rev 0)
+++ packages/scipy/trunk/debian/patches/dtype.diff	2012-07-22 02:12:34 UTC (rev 22446)
@@ -0,0 +1,21 @@
+Description: BUG: fix dtype comparison on big-endian machines.
+URL: https://github.com/scipy/scipy/commit/4625c061b2fa37defa66eb5c8d5593aaedca8229
+Debian: http://bugs.debian.org/682030
+
+Index: python-scipy-0.10.1+dfsg1/scipy/sparse/linalg/dsolve/umfpack/umfpack.py
+===================================================================
+--- python-scipy-0.10.1+dfsg1.orig/scipy/sparse/linalg/dsolve/umfpack/umfpack.py	2012-02-19 10:53:08.000000000 -0500
++++ python-scipy-0.10.1+dfsg1/scipy/sparse/linalg/dsolve/umfpack/umfpack.py	2012-07-21 16:56:15.966422806 -0400
+@@ -345,10 +345,10 @@
+                 raise ValueError('matrix must have long indices')
+
+         if self.isReal:
+-            if mtx.data.dtype != np.dtype('<f8'):
++            if mtx.data.dtype != np.dtype('f8'):
+                 raise ValueError('matrix must have float64 values')
+         else:
+-            if mtx.data.dtype != np.dtype('<c16'):
++            if mtx.data.dtype != np.dtype('c16'):
+                 raise ValueError('matrix must have complex128 values')
+
+         return indx

Modified: packages/scipy/trunk/debian/patches/series
===================================================================
--- packages/scipy/trunk/debian/patches/series	2012-07-21 22:42:38 UTC (rev 22445)
+++ packages/scipy/trunk/debian/patches/series	2012-07-22 02:12:34 UTC (rev 22446)
@@ -1,3 +1,4 @@
+dtype.diff
 kde.diff
 kolmogorov.diff
 restore_sys_argv.patch
@@ -2 +3,2 @@
 blitz++.patch
+up_minpack_ints.diff

Added: packages/scipy/trunk/debian/patches/up_minpack_ints.diff
===================================================================
--- packages/scipy/trunk/debian/patches/up_minpack_ints.diff	                        (rev 0)
+++ packages/scipy/trunk/debian/patches/up_minpack_ints.diff	2012-07-22 02:12:34 UTC (rev 22446)
@@ -0,0 +1,179 @@
+Description: minpack API types misfit on s390x
+URL: http://projects.scipy.org/scipy/ticket/1700
+Debian: http://bugs.debian.org/681270
+
+Index: python-scipy-0.10.1+dfsg1/scipy/optimize/__minpack.h
+===================================================================
+--- python-scipy-0.10.1+dfsg1.orig/scipy/optimize/__minpack.h	2012-02-21 17:50:06.000000000 -0500
++++ python-scipy-0.10.1+dfsg1/scipy/optimize/__minpack.h	2012-07-21 17:05:14.270325178 -0400
+@@ -63,7 +63,7 @@
+   */
+ 
+   PyArrayObject *result_array = NULL;
+- 
++
+   result_array = (PyArrayObject *)call_python_function(multipack_python_function, *n, x, multipack_extra_arguments, 1, minpack_error);
+   if (result_array == NULL) {
+     *iflag = -1;
+@@ -122,7 +122,7 @@
+   */
+ 
+   PyArrayObject *result_array = NULL;
+- 
++
+   result_array = (PyArrayObject *)call_python_function(multipack_python_function,*n, x, multipack_extra_arguments, 1, minpack_error);
+   if (result_array == NULL) {
+     *iflag = -1;
+@@ -161,7 +161,7 @@
+       *iflag = -1;
+       return -1;
+     }
+-    if (multipack_jac_transpose == 1) 
++    if (multipack_jac_transpose == 1)
+       MATRIXC2F(fjac, result_array->data, *n, *ldfjac)
+     else
+       memcpy(fjac, result_array->data, (*n)*(*ldfjac)*sizeof(double));
+@@ -231,6 +231,7 @@
+   double   xtol = 1.49012e-8, epsfcn = 0.0, factor = 1.0e2;
+   int      mode = 2, nprint = 0, info, nfev, ldfjac;
+   npy_intp n,lr;
++  int      n_int, lr_int;  /* for casted storage to pass int into HYBRD */
+   double   *x, *fvec, *diag, *fjac, *r, *qtf;
+ 
+   PyArrayObject *ap_x = NULL, *ap_fvec = NULL;
+@@ -242,7 +243,7 @@
+   double   *wa = NULL;
+ 
+   STORE_VARS();    /* Define storage variables for global variables. */
+-  
++
+   if (!PyArg_ParseTuple(args, "OO|OidiiiddO", &fcn, &x0, &extra_args, &full_output, &xtol, &maxfev, &ml, &mu, &epsfcn, &factor, &o_diag)) return NULL;
+ 
+   INIT_FUNC(fcn,extra_args,minpack_error);
+@@ -262,7 +263,7 @@
+   ap_fvec = (PyArrayObject *)call_python_function(fcn, n, x, extra_args, 1, minpack_error);
+   if (ap_fvec == NULL) goto fail;
+   fvec = (double *) ap_fvec->data;
+-  if (ap_fvec->nd == 0) 
++  if (ap_fvec->nd == 0)
+     n = 1;
+   else if (ap_fvec->dimensions[0] < n)
+     n = ap_fvec->dimensions[0];
+@@ -288,7 +289,8 @@
+   allocated = 1;
+ 
+   /* Call the underlying FORTRAN routines. */
+-  HYBRD(raw_multipack_calling_function, &n, x, fvec, &xtol, &maxfev, &ml, &mu, &epsfcn, diag, &mode, &factor, &nprint, &info, &nfev, fjac, &ldfjac, r, &lr, qtf, wa, wa+n, wa+2*n, wa+3*n);
++  n_int = n; lr_int = lr; /* cast/store/pass into HYBRD */
++  HYBRD(raw_multipack_calling_function, &n_int, x, fvec, &xtol, &maxfev, &ml, &mu, &epsfcn, diag, &mode, &factor, &nprint, &info, &nfev, fjac, &ldfjac, r, &lr_int, qtf, wa, wa+n, wa+2*n, wa+3*n);
+ 
+   RESTORE_FUNC();
+ 
+@@ -332,6 +334,7 @@
+   double   xtol = 1.49012e-8, factor = 1.0e2;
+   int      mode = 2, nprint = 0, info, nfev, njev, ldfjac;
+   npy_intp n, lr;
++  int n_int, lr_int;
+   double   *x, *fvec, *diag, *fjac, *r, *qtf;
+ 
+   PyArrayObject *ap_x = NULL, *ap_fvec = NULL;
+@@ -388,7 +391,8 @@
+   allocated = 1;
+ 
+   /* Call the underlying FORTRAN routines. */
+-  HYBRJ(jac_multipack_calling_function, &n, x, fvec, fjac, &ldfjac, &xtol, &maxfev, diag, &mode, &factor, &nprint, &info, &nfev, &njev, r, &lr, qtf, wa, wa+n, wa+2*n, wa+3*n);
++  n_int = n; lr_int = lr; /* cast/store/pass into HYBRJ */
++  HYBRJ(jac_multipack_calling_function, &n_int, x, fvec, fjac, &ldfjac, &xtol, &maxfev, diag, &mode, &factor, &nprint, &info, &nfev, &njev, r, &lr_int, qtf, wa, wa+n, wa+2*n, wa+3*n);
+ 
+   RESTORE_JAC_FUNC();
+ 
+@@ -420,7 +424,7 @@
+   Py_XDECREF(ap_qtf);
+   if (allocated) free(wa);
+   return NULL;
+-  
++
+ }
+ 
+ /************************ Levenberg-Marquardt *******************/
+@@ -434,6 +438,7 @@
+   double   gtol = 0.0, epsfcn = 0.0, factor = 1.0e2;
+   int      m, mode = 2, nprint = 0, info, nfev, ldfjac, *ipvt;
+   npy_intp n;
++  int      n_int;  /* for casted storage to pass int into LMDIF */
+   double   *x, *fvec, *diag, *fjac, *qtf;
+ 
+   PyArrayObject *ap_x = NULL, *ap_fvec = NULL;
+@@ -486,14 +491,15 @@
+   allocated = 1;
+ 
+   /* Call the underlying FORTRAN routines. */
+-  LMDIF(raw_multipack_lm_function, &m, &n, x, fvec, &ftol, &xtol, &gtol, &maxfev, &epsfcn, diag, &mode, &factor, &nprint, &info, &nfev, fjac, &ldfjac, ipvt, qtf, wa, wa+n, wa+2*n, wa+3*n);
+-    
++  n_int = n; /* to provide int*-pointed storage for int argument of LMDIF */
++  LMDIF(raw_multipack_lm_function, &m, &n_int, x, fvec, &ftol, &xtol, &gtol, &maxfev, &epsfcn, diag, &mode, &factor, &nprint, &info, &nfev, fjac, &ldfjac, ipvt, qtf, wa, wa+n, wa+2*n, wa+3*n);
++
+   RESTORE_FUNC();
+ 
+   if (info < 0) goto fail;           /* Python error */
+ 
+   free(wa);
+-  Py_DECREF(extra_args); 
++  Py_DECREF(extra_args);
+   Py_DECREF(ap_diag);
+ 
+   if (full_output) {
+@@ -517,7 +523,7 @@
+   Py_XDECREF(ap_ipvt);
+   Py_XDECREF(ap_qtf);
+   if (allocated) free(wa);
+-  return NULL;  
++  return NULL;
+ }
+ 
+ 
+@@ -530,6 +536,7 @@
+   double   gtol = 0.0, factor = 1.0e2;
+   int      m, mode = 2, nprint = 0, info, nfev, njev, ldfjac, *ipvt;
+   npy_intp n;
++  int n_int;
+   double   *x, *fvec, *diag, *fjac, *qtf;
+ 
+   PyArrayObject *ap_x = NULL, *ap_fvec = NULL;
+@@ -582,7 +589,8 @@
+   allocated = 1;
+ 
+   /* Call the underlying FORTRAN routines. */
+-  LMDER(jac_multipack_lm_function, &m, &n, x, fvec, fjac, &ldfjac, &ftol, &xtol, &gtol, &maxfev, diag, &mode, &factor, &nprint, &info, &nfev, &njev, ipvt, qtf, wa, wa+n, wa+2*n, wa+3*n);
++  n_int = n;
++  LMDER(jac_multipack_lm_function, &m, &n_int, x, fvec, fjac, &ldfjac, &ftol, &xtol, &gtol, &maxfev, diag, &mode, &factor, &nprint, &info, &nfev, &njev, ipvt, qtf, wa, wa+n, wa+2*n, wa+3*n);
+ 
+   RESTORE_JAC_FUNC();
+ 
+@@ -613,7 +621,7 @@
+   Py_XDECREF(ap_ipvt);
+   Py_XDECREF(ap_qtf);
+   if (allocated) free(wa);
+-  return NULL;  
++  return NULL;
+ }
+ 
+ 
+@@ -660,7 +668,7 @@
+     fjac = (double *)ap_fjac -> data;
+     xp = (double *)ap_xp->data;
+     fvecp = (double *)ap_fvecp -> data;
+-    err = (double *)ap_err->data;    
++    err = (double *)ap_err->data;
+ 
+     CHKDER(&m, &n, x, fvec, fjac, &m, xp, fvecp, &mode, err);
+ 
+@@ -668,7 +676,7 @@
+     Py_DECREF(ap_fjac);
+     Py_DECREF(ap_fvecp);
+   }
+-  else 
++  else
+     PYERR(minpack_error,"Invalid mode, must be 1 or 2.");
+ 
+   Py_DECREF(ap_x);




More information about the Python-modules-commits mailing list