[Scipy-svn] r7143 - in trunk/scipy: integrate interpolate interpolate/src io odr optimize signal weave weave/doc weave/scxx

scipy-svn at scipy.org scipy-svn at scipy.org
Sun Feb 13 09:53:16 EST 2011


Author: warren.weckesser
Date: 2011-02-13 08:53:15 -0600 (Sun, 13 Feb 2011)
New Revision: 7143

Modified:
   trunk/scipy/integrate/multipack.h
   trunk/scipy/integrate/quadpack.py
   trunk/scipy/interpolate/fitpack.py
   trunk/scipy/interpolate/src/multipack.h
   trunk/scipy/io/idl.py
   trunk/scipy/odr/__odrpack.c
   trunk/scipy/odr/odrpack.py
   trunk/scipy/optimize/minpack.h
   trunk/scipy/signal/splinemodule.c
   trunk/scipy/weave/catalog.py
   trunk/scipy/weave/doc/tutorial.txt
   trunk/scipy/weave/doc/tutorial_original.html
   trunk/scipy/weave/ext_tools.py
   trunk/scipy/weave/inline_tools.py
   trunk/scipy/weave/scxx/object.h
Log:
Fixed spelling of 'occurred' and 'occurrence'.

Modified: trunk/scipy/integrate/multipack.h
===================================================================
--- trunk/scipy/integrate/multipack.h	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/integrate/multipack.h	2011-02-13 14:53:15 UTC (rev 7143)
@@ -177,7 +177,7 @@
     PyErr_Print();
     tmpobj = PyObject_GetAttrString(func, "func_name");
     if (tmpobj == NULL) goto fail;
-    str1 = PyString_FromString("Error occured while calling the Python function named ");
+    str1 = PyString_FromString("Error occurred while calling the Python function named ");
     if (str1 == NULL) { Py_DECREF(tmpobj); goto fail;}
     PyString_ConcatAndDel(&str1, tmpobj);
     PyErr_SetString(error_obj, PyString_AsString(str1));

Modified: trunk/scipy/integrate/quadpack.py
===================================================================
--- trunk/scipy/integrate/quadpack.py	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/integrate/quadpack.py	2011-02-13 14:53:15 UTC (rev 7143)
@@ -252,7 +252,7 @@
 
     msgs = {80: "A Python error occurred possibly while calling the function.",
              1: "The maximum number of subdivisions (%d) has been achieved.\n  If increasing the limit yields no improvement it is advised to analyze \n  the integrand in order to determine the difficulties.  If the position of a \n  local difficulty can be determined (singularity, discontinuity) one will \n  probably gain from splitting up the interval and calling the integrator \n  on the subranges.  Perhaps a special-purpose integrator should be used." % limit,
-             2: "The ocurrence of roundoff error is detected, which prevents \n  the requested tolerance from being achieved.  The error may be \n  underestimated.",
+             2: "The occurrence of roundoff error is detected, which prevents \n  the requested tolerance from being achieved.  The error may be \n  underestimated.",
              3: "Extremely bad integrand behavior occurs at some points of the\n  integration interval.",
              4: "The algorithm does not converge.  Roundoff error is detected\n  in the extrapolation table.  It is assumed that the requested tolerance\n  cannot be achieved, and that the returned result (if full_output = 1) is \n  the best which can be obtained.",
              5: "The integral is probably divergent, or slowly convergent.",

Modified: trunk/scipy/interpolate/fitpack.py
===================================================================
--- trunk/scipy/interpolate/fitpack.py	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/interpolate/fitpack.py	2011-02-13 14:53:15 UTC (rev 7143)
@@ -98,7 +98,7 @@
     the minimal least-squares solution of a rank deficient system of linear
     equations.""",ValueError],
             'unknown':["""\
-    An error occured""",TypeError]}
+    An error occurred""",TypeError]}
 
 _parcur_cache = {'t': array([],float), 'wrk': array([],float),
                  'iwrk':array([],int32), 'u': array([],float),'ub':0,'ue':1}

Modified: trunk/scipy/interpolate/src/multipack.h
===================================================================
--- trunk/scipy/interpolate/src/multipack.h	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/interpolate/src/multipack.h	2011-02-13 14:53:15 UTC (rev 7143)
@@ -193,7 +193,7 @@
     PyErr_Print();
     tmpobj = PyObject_GetAttrString(func, "func_name");
     if (tmpobj == NULL) goto fail;
-    str1 = PyString_FromString("Error occured while calling the Python function named ");
+    str1 = PyString_FromString("Error occurred while calling the Python function named ");
     if (str1 == NULL) { Py_DECREF(tmpobj); goto fail;}
     PyString_ConcatAndDel(&str1, tmpobj);
     PyErr_SetString(error_obj, PyString_AsString(str1));

Modified: trunk/scipy/io/idl.py
===================================================================
--- trunk/scipy/io/idl.py	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/io/idl.py	2011-02-13 14:53:15 UTC (rev 7143)
@@ -176,7 +176,7 @@
     '''Read a variable with a specified data type'''
     if dtype==1:
         if _read_int32(f) <> 1:
-            raise Exception("Error occured while reading byte variable")
+            raise Exception("Error occurred while reading byte variable")
         return _read_byte(f)
     elif dtype==2:
         return _read_int16(f)
@@ -265,7 +265,7 @@
         if typecode == 1:
             nbytes = _read_int32(f)
             if nbytes <> array_desc['nbytes']:
-                raise Exception("Error occured while reading byte array")
+                raise Exception("Error occurred while reading byte array")
 
         # Read bytes as numpy array
         array = np.fromstring(f.read(array_desc['nbytes']), \

Modified: trunk/scipy/odr/__odrpack.c
===================================================================
--- trunk/scipy/odr/__odrpack.c	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/odr/__odrpack.c	2011-02-13 14:53:15 UTC (rev 7143)
@@ -116,7 +116,7 @@
 
           str1 =
             PyString_FromString
-            ("Error occured while calling the Python function named ");
+            ("Error occurred while calling the Python function named ");
           if (str1 == NULL)
             {
               Py_DECREF(tmpobj);
@@ -171,7 +171,7 @@
 
           str1 =
             PyString_FromString
-            ("Error occured while calling the Python function named ");
+            ("Error occurred while calling the Python function named ");
           if (str1 == NULL)
             {
               Py_DECREF(tmpobj);
@@ -249,7 +249,7 @@
 
           str1 =
             PyString_FromString
-            ("Error occured while calling the Python function named ");
+            ("Error occurred while calling the Python function named ");
           if (str1 == NULL)
             {
               Py_DECREF(tmpobj);

Modified: trunk/scipy/odr/odrpack.py
===================================================================
--- trunk/scipy/odr/odrpack.py	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/odr/odrpack.py	2011-02-13 14:53:15 UTC (rev 7143)
@@ -170,7 +170,7 @@
             if I[1] != 0:
                 problems.append('Derivatives possibly not correct')
             if I[2] != 0:
-                problems.append('Error occured in callback')
+                problems.append('Error occurred in callback')
             if I[3] != 0:
                 problems.append('Problem is not full rank at solution')
             problems.append(stopreason)
@@ -204,7 +204,7 @@
         elif I[0] == 4:
             problems.append('Error in derivatives')
         elif I[0] == 5:
-            problems.append('Error occured in callback')
+            problems.append('Error occurred in callback')
         elif I[0] == 6:
             problems.append('Numerical error detected')
 

Modified: trunk/scipy/optimize/minpack.h
===================================================================
--- trunk/scipy/optimize/minpack.h	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/optimize/minpack.h	2011-02-13 14:53:15 UTC (rev 7143)
@@ -156,7 +156,7 @@
     PyErr_Print();
     tmpobj = PyObject_GetAttrString(func, "func_name");
     if (tmpobj == NULL) goto fail;
-    str1 = PyString_FromString("Error occured while calling the Python function named ");
+    str1 = PyString_FromString("Error occurred while calling the Python function named ");
     if (str1 == NULL) { Py_DECREF(tmpobj); goto fail;}
     PyString_ConcatAndDel(&str1, tmpobj);
     PyErr_SetString(error_obj, PyString_AsString(str1));

Modified: trunk/scipy/signal/splinemodule.c
===================================================================
--- trunk/scipy/signal/splinemodule.c	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/signal/splinemodule.c	2011-02-13 14:53:15 UTC (rev 7143)
@@ -97,7 +97,7 @@
   }
 
   if (retval == -3) PYERR("Precision too high.  Error did not converge.");
-  if (retval < 0) PYERR("Problem occured inside routine");
+  if (retval < 0) PYERR("Problem occurred inside routine");
 
   Py_DECREF(a_image);
   return PyArray_Return(ck);
@@ -156,7 +156,7 @@
   }
 
   if (retval == -3) PYERR("Precision too high.  Error did not converge.");
-  if (retval < 0) PYERR("Problem occured inside routine");
+  if (retval < 0) PYERR("Problem occurred inside routine");
 
   Py_DECREF(a_image);
   return PyArray_Return(ck);
@@ -242,7 +242,7 @@
     PYERR("Incorrect type.");
   }
   
-  if (ret < 0) PYERR("Problem occured inside routine.");
+  if (ret < 0) PYERR("Problem occurred inside routine.");
 
   Py_DECREF(a_image);
   Py_DECREF(a_hrow);
@@ -446,7 +446,7 @@
     PYERR("Incorrect type.");
   }
   
-  if (ret < 0) PYERR("Problem occured inside routine.");
+  if (ret < 0) PYERR("Problem occurred inside routine.");
 
   Py_DECREF(a_sig);
   return PyArray_Return(out);

Modified: trunk/scipy/weave/catalog.py
===================================================================
--- trunk/scipy/weave/catalog.py	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/weave/catalog.py	2011-02-13 14:53:15 UTC (rev 7143)
@@ -248,7 +248,7 @@
         bases the name of the value returned by sys.platform and the
         version of python being run.  If this isn't enough to descriminate
         on some platforms, we can try to add other info.  It has
-        occured to me that if we get fancy enough to optimize for different
+        occurred to me that if we get fancy enough to optimize for different
         architectures, then chip type might be added to the catalog name also.
     """
     version = '%d%d' % sys.version_info[:2]

Modified: trunk/scipy/weave/doc/tutorial.txt
===================================================================
--- trunk/scipy/weave/doc/tutorial.txt	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/weave/doc/tutorial.txt	2011-02-13 14:53:15 UTC (rev 7143)
@@ -1165,7 +1165,7 @@
     static PyObject* compiled_func(PyObject*self, PyObject* args)
     {
         py::object return_val;
-        int exception_occured = 0;
+        int exception_occurred = 0;
         PyObject *py__locals = NULL;
         PyObject *py__globals = NULL;
         PyObject *py_a;
@@ -1187,10 +1187,10 @@
         catch(...)
         {
             return_val =  py::object();
-            exception_occured = 1;
+            exception_occurred = 1;
         }
         /* cleanup code */
-        if(!(PyObject*)return_val && !exception_occured)
+        if(!(PyObject*)return_val && !exception_occurred)
         {
             return_val = Py_None;
         }

Modified: trunk/scipy/weave/doc/tutorial_original.html
===================================================================
--- trunk/scipy/weave/doc/tutorial_original.html	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/weave/doc/tutorial_original.html	2011-02-13 14:53:15 UTC (rev 7143)
@@ -1286,7 +1286,7 @@
 And here is the extension function generated by <code>inline</code>:
 <blockquote>
   <pre><code>
-static PyObject* compiled_func(PyObject*self, PyObject* args)<br>{<br>    py::object return_val;<br>    int exception_occured = 0;<br>    PyObject *py__locals = NULL;<br>    PyObject *py__globals = NULL;<br>    PyObject *py_a;<br>    py_a = NULL;<br><br>    if(!PyArg_ParseTuple(args,"OO:compiled_func",&py__locals,&py__globals))<br>        return NULL;<br>    try<br>    {<br>        PyObject* raw_locals = py_to_raw_dict(py__locals,"_locals");<br>        PyObject* raw_globals = py_to_raw_dict(py__globals,"_globals");<br>        /* argument conversion code */<br>        py_a = get_variable("a",raw_locals,raw_globals);<br>        int a = convert_to_int(py_a,"a");<br>        /* inline code */<br>        /* NDARRAY API VERSION 90907 */<br>        printf("%d\n",a);    /*I would like to fill in changed    locals and globals here...*/<br><br>    }<br>    catch(...)<br>    {<br>        return_val =  py::object();<br>        exception_occured = 1;<br>    }<br>    /* cleanup code */<br>    if(!(PyObject*)return_val && !exception_occured)<br>    {<br><br>        return_val = Py_None;<br>    }<br><br>    return return_val.disown();<br>}<br>       </code><br></pre>
+static PyObject* compiled_func(PyObject*self, PyObject* args)<br>{<br>    py::object return_val;<br>    int exception_occurred = 0;<br>    PyObject *py__locals = NULL;<br>    PyObject *py__globals = NULL;<br>    PyObject *py_a;<br>    py_a = NULL;<br><br>    if(!PyArg_ParseTuple(args,"OO:compiled_func",&py__locals,&py__globals))<br>        return NULL;<br>    try<br>    {<br>        PyObject* raw_locals = py_to_raw_dict(py__locals,"_locals");<br>        PyObject* raw_globals = py_to_raw_dict(py__globals,"_globals");<br>        /* argument conversion code */<br>        py_a = get_variable("a",raw_locals,raw_globals);<br>        int a = convert_to_int(py_a,"a");<br>        /* inline code */<br>        /* NDARRAY API VERSION 90907 */<br>        printf("%d\n",a);    /*I would like to fill in changed    locals and globals here...*/<br><br>    }<br>    catch(...)<br>    {<br>        return_val =  py::object();<br>        exception_occurred = 1;<br>    }<br>    /* cleanup code */<br>    if(!(PyObject*)return_val && !exception_occurred)<br>    {<br><br>        return_val = Py_None;<br>    }<br><br>    return return_val.disown();<br>}<br>       </code><br></pre>
 </blockquote>
 Every inline function takes exactly two arguments -- the local and
 global

Modified: trunk/scipy/weave/ext_tools.py
===================================================================
--- trunk/scipy/weave/ext_tools.py	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/weave/ext_tools.py	2011-02-13 14:53:15 UTC (rev 7143)
@@ -42,7 +42,7 @@
         """
 
         declare_return = 'py::object return_val;\n' \
-                         'int exception_occured = 0;\n' \
+                         'int exception_occurred = 0;\n' \
                          'PyObject *py_local_dict = NULL;\n'
         arg_string_list = self.arg_specs.variable_as_strings() + ['"local_dict"']
         arg_strings = ','.join(arg_string_list)
@@ -131,12 +131,12 @@
         catch_code =  "catch(...)                       \n"   \
                       "{                                \n" + \
                       "    return_val =  py::object();      \n"   \
-                      "    exception_occured = 1;       \n"   \
+                      "    exception_occurred = 1;       \n"   \
                       "}                                \n"
 
         return_code = "    /*cleanup code*/                     \n" + \
                            cleanup_code                             + \
-                      '    if(!(PyObject*)return_val && !exception_occured)\n'   \
+                      '    if(!(PyObject*)return_val && !exception_occurred)\n'   \
                       '    {\n                                  \n'   \
                       '        return_val = Py_None;            \n'   \
                       '    }\n                                  \n'   \

Modified: trunk/scipy/weave/inline_tools.py
===================================================================
--- trunk/scipy/weave/inline_tools.py	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/weave/inline_tools.py	2011-02-13 14:53:15 UTC (rev 7143)
@@ -32,7 +32,7 @@
             This code got a lot uglier when I added local_dict...
         """
         declare_return = 'py::object return_val;\n'    \
-                         'int exception_occured = 0;\n'    \
+                         'int exception_occurred = 0;\n'    \
                          'PyObject *py__locals = NULL;\n' \
                          'PyObject *py__globals = NULL;\n'
 
@@ -100,11 +100,11 @@
         catch_code =  "catch(...)                        \n"   \
                       "{                                 \n" + \
                       "    return_val =  py::object();   \n"   \
-                      "    exception_occured = 1;        \n"   \
+                      "    exception_occurred = 1;        \n"   \
                       "}                                 \n"
         return_code = "    /* cleanup code */                   \n" + \
                            cleanup_code                             + \
-                      "    if(!(PyObject*)return_val && !exception_occured)\n"   \
+                      "    if(!(PyObject*)return_val && !exception_occurred)\n"   \
                       "    {\n                                  \n"   \
                       "        return_val = Py_None;            \n"   \
                       "    }\n                                  \n"   \

Modified: trunk/scipy/weave/scxx/object.h
===================================================================
--- trunk/scipy/weave/scxx/object.h	2011-02-13 12:25:19 UTC (rev 7142)
+++ trunk/scipy/weave/scxx/object.h	2011-02-13 14:53:15 UTC (rev 7143)
@@ -617,7 +617,7 @@
     object method = attr(nm);
     PyObject* result = PyEval_CallObjectWithKeywords(method,NULL,NULL);
     if (!result)
-      throw 1; // signal exception has occured.
+      throw 1; // signal exception has occurred.
     return object(lose_ref(result));
   }
   
@@ -625,7 +625,7 @@
     object method = attr(nm);
     PyObject* result = PyEval_CallObjectWithKeywords(method,args_tup,NULL);
     if (!result)
-      throw 1; // signal exception has occured.
+      throw 1; // signal exception has occurred.
     return object(lose_ref(result));
   }
   
@@ -633,7 +633,7 @@
     object method = attr(nm);
     PyObject* result = PyEval_CallObjectWithKeywords(method,args_tup,kw_dict);
     if (!result)
-      throw 1; // signal exception has occured.
+      throw 1; // signal exception has occurred.
     return object(lose_ref(result));
   }
 




More information about the Scipy-svn mailing list