I've posted patches for:

#630: If float('123.45') works, so should numpy.float32('123.45')
#581: random.set_state does not reset state of random.standard_normal

James

On Fri, Apr 4, 2008 at 6:49 PM, Anne Archibald
<[EMAIL PROTECTED]> wrote:
> On 04/04/2008, Travis E. Oliphant <[EMAIL PROTECTED]> wrote:
>
>  > Hey Anne,
>  >
>  >  Do you currently have SVN access?   Would you like it?
>  >
>  >  I think the SciPy/NumPy sprint would be a good time to clean-up the
>  >  committers list and add new people interested in helping.
>
>  I don't have SVN access. I'd be happy (and careful!) to have it, but I
>  should warn you that I won't have time to do serious, regular
>  development on scipy/numpy; I do hope to be able to write a little
>  code here and there, though, and it would be handy to be able to add
>  it directly instead of sending patches into the ether.
>
>  Anne
>
>
> _______________________________________________
>  Numpy-discussion mailing list
>  Numpy-discussion@scipy.org
>  http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
--- mtrand.pyx.old	2008-04-05 19:45:54.000000000 +0100
+++ mtrand.pyx	2008-04-05 19:46:39.000000000 +0100
@@ -37,6 +37,7 @@
     ctypedef struct rk_state:
         unsigned long key[624]
         int pos
+        int has_gauss
 
     ctypedef enum rk_error:
         RK_NOERR = 0
@@ -552,6 +553,7 @@
             raise ValueError("state must be 624 longs")
         memcpy(<void*>(self.internal_state.key), <void*>(obj.data), 624*sizeof(long))
         self.internal_state.pos = pos
+        self.internal_state.has_gauss = 0 # Clear out the gaussian value
     
     # Pickling support:
     def __getstate__(self):
--- arraytypes.inc.src.old	2008-04-05 19:15:57.000000000 +0100
+++ arraytypes.inc.src	2008-04-05 19:22:12.000000000 +0100
@@ -106,6 +106,19 @@
 static double
 MyPyFloat_AsDouble(PyObject *obj)
 {
+        PyObject *tmp;
+        double d;
+        if (PyString_Check(obj)) {
+                tmp = PyFloat_FromString(obj, 0);
+                if (tmp) {
+                        d = PyFloat_AsDouble(tmp);
+                        Py_DECREF(tmp);
+                        return d;
+                }
+                else {
+                        return _getNAN();
+                }
+        }
         if (obj == Py_None) return _getNAN();
         return PyFloat_AsDouble(obj);
 }
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to