[Numpy-svn] r3586 - trunk/numpy/random/mtrand

numpy-svn@scip... numpy-svn@scip...
Tue Mar 20 05:16:09 CDT 2007


Author: oliphant
Date: 2007-03-20 05:16:03 -0500 (Tue, 20 Mar 2007)
New Revision: 3586

Modified:
   trunk/numpy/random/mtrand/mtrand.c
   trunk/numpy/random/mtrand/mtrand.pyx
Log:
More fixes related to #471

Modified: trunk/numpy/random/mtrand/mtrand.c
===================================================================
--- trunk/numpy/random/mtrand/mtrand.c	2007-03-20 10:14:14 UTC (rev 3585)
+++ trunk/numpy/random/mtrand/mtrand.c	2007-03-20 10:16:03 UTC (rev 3586)
@@ -1,4 +1,4 @@
-/* Generated by Pyrex 0.9.5.1 on Tue Mar 20 04:22:44 2007 */
+/* Generated by Pyrex 0.9.5.1 on Tue Mar 20 04:24:28 2007 */
 
 #include "Python.h"
 #include "structmember.h"
@@ -1066,8 +1066,6 @@
   return __pyx_r;
 }
 
-static PyObject *__pyx_n_Int;
-
 static PyObject *__pyx_f_6mtrand_discnp_array_sc(rk_state (*__pyx_v_state),long ((*__pyx_v_func)(rk_state (*),long ,double )),PyObject *__pyx_v_size,long __pyx_v_n,double __pyx_v_p) {
   long (*__pyx_v_array_data);
   PyArrayObject *arrayObject;
@@ -1098,21 +1096,19 @@
     __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;}
     __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
-    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;}
-    __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_Int); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;}
-    Py_DECREF(__pyx_2); __pyx_2 = 0;
-    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;}
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;}
     Py_INCREF(__pyx_v_size);
-    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_size);
-    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4);
-    __pyx_4 = 0;
-    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_size);
+    PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2);
+    __pyx_2 = 0;
+    __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;}
     Py_DECREF(__pyx_3); __pyx_3 = 0;
-    Py_DECREF(__pyx_2); __pyx_2 = 0;
-    Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4)));
-    Py_DECREF(((PyObject *)arrayObject));
-    arrayObject = ((PyArrayObject *)__pyx_4);
     Py_DECREF(__pyx_4); __pyx_4 = 0;
+    Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2)));
+    Py_DECREF(((PyObject *)arrayObject));
+    arrayObject = ((PyArrayObject *)__pyx_2);
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
     /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":318 */
     __pyx_v_length = PyArray_SIZE(arrayObject);
@@ -1333,21 +1329,19 @@
     __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
     __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
-    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
-    __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_Int); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
-    Py_DECREF(__pyx_2); __pyx_2 = 0;
-    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
     Py_INCREF(__pyx_v_size);
-    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_size);
-    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4);
-    __pyx_4 = 0;
-    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_size);
+    PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2);
+    __pyx_2 = 0;
+    __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;}
     Py_DECREF(__pyx_3); __pyx_3 = 0;
-    Py_DECREF(__pyx_2); __pyx_2 = 0;
-    Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4)));
-    Py_DECREF(((PyObject *)arrayObject));
-    arrayObject = ((PyArrayObject *)__pyx_4);
     Py_DECREF(__pyx_4); __pyx_4 = 0;
+    Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2)));
+    Py_DECREF(((PyObject *)arrayObject));
+    arrayObject = ((PyArrayObject *)__pyx_2);
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
     /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":368 */
     __pyx_v_length = PyArray_SIZE(arrayObject);
@@ -9527,7 +9521,6 @@
 }
 
 static __Pyx_InternTabEntry __pyx_intern_tab[] = {
-  {&__pyx_n_Int, "Int"},
   {&__pyx_n_MT19937, "MT19937"},
   {&__pyx_n_PyInt_AsLong, "PyInt_AsLong"},
   {&__pyx_n_ValueError, "ValueError"},

Modified: trunk/numpy/random/mtrand/mtrand.pyx
===================================================================
--- trunk/numpy/random/mtrand/mtrand.pyx	2007-03-20 10:14:14 UTC (rev 3585)
+++ trunk/numpy/random/mtrand/mtrand.pyx	2007-03-20 10:16:03 UTC (rev 3586)
@@ -314,7 +314,7 @@
     if size is None:
         return func(state, n, p)
     else:
-        array = <ndarray>_sp.empty(size, _sp.Int)
+        array = <ndarray>_sp.empty(size, int)
         length = PyArray_SIZE(array)
         array_data = <long *>array.data
         for i from 0 <= i < length:
@@ -364,7 +364,7 @@
     if size is None:
         return func(state, n, m, N)
     else:
-        array = <ndarray>_sp.empty(size, _sp.Int)
+        array = <ndarray>_sp.empty(size, int)
         length = PyArray_SIZE(array)
         array_data = <long *>array.data
         for i from 0 <= i < length:



More information about the Numpy-svn mailing list