diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/setup.py | 4 | ||||
-rw-r--r-- | numpy/core/src/umath/test_rational.c.src | 8 | ||||
-rw-r--r-- | numpy/core/tests/test_ufunc.py | 10 |
3 files changed, 11 insertions, 11 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index a72d82841..6df82b3fa 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -925,8 +925,8 @@ def configuration(parent_package='',top_path=None): # custom rational dtype module # ####################################################################### - config.add_extension('rational', - sources = [join('src','umath', 'rational.c.src')]) + config.add_extension('test_rational', + sources = [join('src','umath', 'test_rational.c.src')]) ####################################################################### # multiarray_tests module # diff --git a/numpy/core/src/umath/test_rational.c.src b/numpy/core/src/umath/test_rational.c.src index 3f437233a..168bc0438 100644 --- a/numpy/core/src/umath/test_rational.c.src +++ b/numpy/core/src/umath/test_rational.c.src @@ -1058,7 +1058,7 @@ PyMethodDef module_methods[] = { #if defined(NPY_PY3K) static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT, - "rational", + "test_rational", NULL, -1, module_methods, @@ -1070,9 +1070,9 @@ static struct PyModuleDef moduledef = { #endif #if defined(NPY_PY3K) -PyMODINIT_FUNC PyInit_rational(void) { +PyMODINIT_FUNC PyInit_test_rational(void) { #else -PyMODINIT_FUNC initrational(void) { +PyMODINIT_FUNC inittest_rational(void) { #endif PyObject *m; @@ -1199,7 +1199,7 @@ PyMODINIT_FUNC initrational(void) { #if defined(NPY_PY3K) m = PyModule_Create(&moduledef); #else - m = Py_InitModule("rational", module_methods); + m = Py_InitModule("test_rational", module_methods); #endif if (!m) { diff --git a/numpy/core/tests/test_ufunc.py b/numpy/core/tests/test_ufunc.py index 66e2544eb..b0a44fed7 100644 --- a/numpy/core/tests/test_ufunc.py +++ b/numpy/core/tests/test_ufunc.py @@ -6,7 +6,7 @@ import numpy as np from numpy.testing import * import numpy.core.umath_tests as umt from numpy.compat import asbytes -from numpy.core import rational +from numpy.core.test_rational import * class TestUfunc(TestCase): def test_pickle(self): @@ -777,14 +777,14 @@ class TestUfunc(TestCase): a = np.array([0, 1, 2], dtype='i8') b = np.array([0, 1, 2], dtype='i8') - c = np.empty(3, dtype=rational.rational) + c = np.empty(3, dtype=rational) # output must be specified so numpy knows what ufunc signature to look for - result = rational.test_add(a, b, c) - assert_equal(result, np.array([0, 2, 4], dtype=rational.rational)) + result = test_add(a, b, c) + assert_equal(result, np.array([0, 2, 4], dtype=rational)) # no output type should raise TypeError - assert_raises(TypeError, rational.test_add, a, b) + assert_raises(TypeError, test_add, a, b) if __name__ == "__main__": run_module_suite() |