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

numpy-svn@scip... numpy-svn@scip...
Tue Mar 20 05:14:19 CDT 2007


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

Modified:
   trunk/numpy/random/mtrand/mtrand.c
   trunk/numpy/random/mtrand/mtrand.pyx
Log:
Fix ticket #471

Modified: trunk/numpy/random/mtrand/mtrand.c
===================================================================
--- trunk/numpy/random/mtrand/mtrand.c	2007-03-20 10:05:43 UTC (rev 3584)
+++ trunk/numpy/random/mtrand/mtrand.c	2007-03-20 10:14:14 UTC (rev 3585)
@@ -1,4 +1,4 @@
-/* Generated by Pyrex 0.9.5.1 on Sat Mar 17 23:42:27 2007 */
+/* Generated by Pyrex 0.9.5.1 on Tue Mar 20 04:22:44 2007 */
 
 #include "Python.h"
 #include "structmember.h"
@@ -276,8 +276,6 @@
   return __pyx_r;
 }
 
-static PyObject *__pyx_n_Float64;
-
 static PyObject *__pyx_f_6mtrand_cont1_array_sc(rk_state (*__pyx_v_state),double ((*__pyx_v_func)(rk_state (*),double )),PyObject *__pyx_v_size,double __pyx_v_a) {
   double (*__pyx_v_array_data);
   PyArrayObject *arrayObject;
@@ -309,7 +307,7 @@
     __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; 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 = 149; goto __pyx_L1;}
-    __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_Float64); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; goto __pyx_L1;}
+    __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; 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 = 149; goto __pyx_L1;}
     Py_INCREF(__pyx_v_size);
@@ -776,7 +774,7 @@
     __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; 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 = 248; goto __pyx_L1;}
-    __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_Float64); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; goto __pyx_L1;}
+    __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; 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 = 248; goto __pyx_L1;}
     Py_INCREF(__pyx_v_size);
@@ -1576,21 +1574,19 @@
     __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;}
     __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; 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 = 420; goto __pyx_L1;}
-    __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_Int); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; 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 = 420; goto __pyx_L1;}
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; 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 = 420; 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 = 420; 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":421 */
     __pyx_v_length = PyArray_SIZE(arrayObject);
@@ -9531,7 +9527,6 @@
 }
 
 static __Pyx_InternTabEntry __pyx_intern_tab[] = {
-  {&__pyx_n_Float64, "Float64"},
   {&__pyx_n_Int, "Int"},
   {&__pyx_n_MT19937, "MT19937"},
   {&__pyx_n_PyInt_AsLong, "PyInt_AsLong"},

Modified: trunk/numpy/random/mtrand/mtrand.pyx
===================================================================
--- trunk/numpy/random/mtrand/mtrand.pyx	2007-03-20 10:05:43 UTC (rev 3584)
+++ trunk/numpy/random/mtrand/mtrand.pyx	2007-03-20 10:14:14 UTC (rev 3585)
@@ -146,7 +146,7 @@
     if size is None:
         return func(state, a)
     else:
-        array = <ndarray>_sp.empty(size, _sp.Float64)
+        array = <ndarray>_sp.empty(size, _sp.float64)
         length = PyArray_SIZE(array)
         array_data = <double *>array.data
         for i from 0 <= i < length:
@@ -245,7 +245,7 @@
     if size is None:
         return func(state, a, b, c)
     else:
-        array = <ndarray>_sp.empty(size, _sp.Float64)
+        array = <ndarray>_sp.empty(size, _sp.float64)
         length = PyArray_SIZE(array)
         array_data = <double *>array.data
         for i from 0 <= i < length:
@@ -417,7 +417,7 @@
     if size is None:
         return func(state, a)
     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