Author: mattip <[email protected]>
Branch: ufuncapi
Changeset: r73882:055731d00921
Date: 2014-10-08 17:53 +0300
http://bitbucket.org/pypy/pypy/changeset/055731d00921/

Log:    rename for numpy compatability

diff --git a/pypy/module/cpyext/ndarrayobject.py 
b/pypy/module/cpyext/ndarrayobject.py
--- a/pypy/module/cpyext/ndarrayobject.py
+++ b/pypy/module/cpyext/ndarrayobject.py
@@ -299,7 +299,7 @@
 @cpython_api([rffi.CArrayPtr(rffi.CArrayPtr(gufunctype)), rffi.VOIDP, 
rffi.CCHARP, Py_ssize_t, Py_ssize_t,
               Py_ssize_t, Py_ssize_t, rffi.CCHARP, rffi.CCHARP, Py_ssize_t,
               rffi.CCHARP], PyObject)
-def _PyUFunc_FromFuncAndDataAndSignature(space, funcs, data, types, ntypes,
+def PyUFunc_FromFuncAndDataAndSignature(space, funcs, data, types, ntypes,
                     nin, nout, identity, name, doc, check_return, signature):
     funcs_w = [None] * ntypes
     dtypes_w = [None] * ntypes * (nin + nout)
diff --git a/pypy/module/cpyext/test/test_ndarrayobject.py 
b/pypy/module/cpyext/test/test_ndarrayobject.py
--- a/pypy/module/cpyext/test/test_ndarrayobject.py
+++ b/pypy/module/cpyext/test/test_ndarrayobject.py
@@ -212,14 +212,14 @@
         res = api._PyArray_SimpleNewFromData(0, ptr_s, 15, ptr_a)
         assert res.get_scalar_value().real == 3.
         assert res.get_scalar_value().imag == 4.
-    
+
     def _test_Ufunc_FromFuncAndDataAndSignature(self, space, api):
         py.test.skip('preliminary non-translated test')
         '''
         PyUFuncGenericFunction funcs[] = {&double_times2, &int_times2};
         char types[] = { NPY_DOUBLE,NPY_DOUBLE, NPY_INT, NPY_INT };
         void *array_data[] = {NULL, NULL};
-        ufunc = api._PyUFunc_FromFuncAndDataAndSignature(space, funcs, data,
+        ufunc = api.PyUFunc_FromFuncAndDataAndSignature(space, funcs, data,
                         types, ntypes, nin, nout, identity, doc, check_return,
                         signature)
         '''
@@ -322,7 +322,7 @@
                 char types[] = { NPY_DOUBLE,NPY_DOUBLE, NPY_INT, NPY_INT };
                 void *array_data[] = {NULL, NULL};
                 PyObject * retval;
-                retval = _PyUFunc_FromFuncAndDataAndSignature(funcs,
+                retval = PyUFunc_FromFuncAndDataAndSignature(funcs,
                                     array_data, types, 2, 1, 1, PyUFunc_None,
                                     "times2", "times2_docstring", 0, "()->()");
                 return retval;
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to