Skip to content
Browse files

GEN: special: regenerate files

  • Loading branch information...
1 parent d221ae9 commit 8923ef1d8a0750825314ba033e4c27567209eceb @pv pv committed Oct 14, 2012
Showing with 435 additions and 456 deletions.
  1. +403 −403 scipy/special/_ufuncs.c
  2. +32 −53 scipy/special/{_ufuncs_cxx.c → _ufuncs_cxx.cxx}
View
806 scipy/special/_ufuncs.c
403 additions, 403 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
85 scipy/special/_ufuncs_cxx.c → scipy/special/_ufuncs_cxx.cxx
@@ -248,7 +248,6 @@
#include <math.h>
#define __PYX_HAVE__scipy__special___ufuncs_cxx
#define __PYX_HAVE_API__scipy__special___ufuncs_cxx
-#include "complex.h"
#include "stdio.h"
#include "stdlib.h"
#include "numpy/arrayobject.h"
@@ -682,9 +681,6 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
-static void __Pyx_WriteUnraisable(const char *name, int clineno,
- int lineno, const char *filename);
-
static int __Pyx_check_binary_version(void);
#if !defined(__Pyx_PyIdentifier_FromString)
@@ -747,7 +743,9 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, cha
-__PYX_EXTERN_C DL_IMPORT(int) scipy_special_print_error_messages;
+
+
+__PYX_EXTERN_C DL_EXPORT(int) scipy_special_print_error_messages;
__PYX_EXTERN_C DL_EXPORT(void) scipy_special_raise_warning(char *, ...);
#define __Pyx_MODULE_NAME "scipy.special._ufuncs_cxx"
int __pyx_module_is_main_scipy__special___ufuncs_cxx = 0;
@@ -756,7 +754,7 @@ int __pyx_module_is_main_scipy__special___ufuncs_cxx = 0;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_RuntimeError;
-static PyObject *__pyx_pf_5scipy_7special_11_ufuncs_cxx_errprint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_inflag);
+static PyObject *__pyx_pf_5scipy_7special_11_ufuncs_cxx__errprint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_inflag);
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags);
static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info);
static char __pyx_k_1[] = "scipy.special";
@@ -791,7 +789,7 @@ static char __pyx_k__inflag[] = "inflag";
static char __pyx_k__oldflag[] = "oldflag";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____test__[] = "__test__";
-static char __pyx_k__errprint[] = "errprint";
+static char __pyx_k___errprint[] = "_errprint";
static char __pyx_k__ValueError[] = "ValueError";
static char __pyx_k__RuntimeError[] = "RuntimeError";
static PyObject *__pyx_n_s_1;
@@ -808,7 +806,7 @@ static PyObject *__pyx_n_s__RuntimeError;
static PyObject *__pyx_n_s__ValueError;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____test__;
-static PyObject *__pyx_n_s__errprint;
+static PyObject *__pyx_n_s___errprint;
static PyObject *__pyx_n_s__inflag;
static PyObject *__pyx_n_s__oldflag;
static PyObject *__pyx_n_s__range;
@@ -821,6 +819,7 @@ static PyObject *__pyx_k_tuple_12;
static PyObject *__pyx_k_tuple_14;
static PyObject *__pyx_k_tuple_15;
static PyObject *__pyx_k_codeobj_16;
+int scipy_special_print_error_messages;
@@ -831,6 +830,7 @@ void scipy_special_raise_warning(char *__pyx_v_fmt, ...) {
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -857,18 +857,18 @@ void scipy_special_raise_warning(char *__pyx_v_fmt, ...) {
{
- __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L7;}
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L7;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_n_s_2));
PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s_2));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s_2));
- __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_1), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L7;}
+ __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_1), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L7;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
__pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s_2);
if (__pyx_t_1 == NULL) {
if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s_2);
- if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L7;}
+ if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L7;}
}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_t_1);
@@ -877,9 +877,7 @@ void scipy_special_raise_warning(char *__pyx_v_fmt, ...) {
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyErr_Warn(__pyx_v_SpecialFunctionWarning, __pyx_v_msg); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L7;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = PyErr_WarnEx(__pyx_v_SpecialFunctionWarning, __pyx_v_msg, 1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L7;}
}
@@ -916,7 +914,7 @@ void scipy_special_raise_warning(char *__pyx_v_fmt, ...) {
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_WriteUnraisable("scipy.special._ufuncs_cxx.scipy_special_raise_warning", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("scipy.special._ufuncs_cxx.scipy_special_raise_warning", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_SpecialFunctionWarning);
#ifdef WITH_THREAD
@@ -925,14 +923,14 @@ void scipy_special_raise_warning(char *__pyx_v_fmt, ...) {
}
-static PyObject *__pyx_pw_5scipy_7special_11_ufuncs_cxx_1errprint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
-static char __pyx_doc_5scipy_7special_11_ufuncs_cxx_errprint[] = "\n errprint(flag)\n\n Sets the error printing flag for special functions (from the\n cephesmodule). The output is the previous state. With errprint(0)\n no error messages are shown; the default is errprint(1). If no\n argument is given the current state of the flag is returned and no\n change occurs.\n\n ";
-static PyMethodDef __pyx_mdef_5scipy_7special_11_ufuncs_cxx_1errprint = {__Pyx_NAMESTR("errprint"), (PyCFunction)__pyx_pw_5scipy_7special_11_ufuncs_cxx_1errprint, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5scipy_7special_11_ufuncs_cxx_errprint)};
-static PyObject *__pyx_pw_5scipy_7special_11_ufuncs_cxx_1errprint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_5scipy_7special_11_ufuncs_cxx_1_errprint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds);
+static char __pyx_doc_5scipy_7special_11_ufuncs_cxx__errprint[] = "\n errprint(flag)\n\n Sets the error printing flag for special functions (from the\n cephesmodule). The output is the previous state. With errprint(0)\n no error messages are shown; the default is errprint(1). If no\n argument is given the current state of the flag is returned and no\n change occurs.\n\n ";
+static PyMethodDef __pyx_mdef_5scipy_7special_11_ufuncs_cxx_1_errprint = {__Pyx_NAMESTR("_errprint"), (PyCFunction)__pyx_pw_5scipy_7special_11_ufuncs_cxx_1_errprint, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5scipy_7special_11_ufuncs_cxx__errprint)};
+static PyObject *__pyx_pw_5scipy_7special_11_ufuncs_cxx_1_errprint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_inflag = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("errprint (wrapper)", 0);
+ __Pyx_RefNannySetupContext("_errprint (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__inflag,0};
PyObject* values[1] = {0};
@@ -956,7 +954,7 @@ static PyObject *__pyx_pw_5scipy_7special_11_ufuncs_cxx_1errprint(PyObject *__py
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "errprint") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_errprint") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -969,18 +967,18 @@ static PyObject *__pyx_pw_5scipy_7special_11_ufuncs_cxx_1errprint(PyObject *__py
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("errprint", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("_errprint", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
- __Pyx_AddTraceback("scipy.special._ufuncs_cxx.errprint", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("scipy.special._ufuncs_cxx._errprint", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_5scipy_7special_11_ufuncs_cxx_errprint(__pyx_self, __pyx_v_inflag);
+ __pyx_r = __pyx_pf_5scipy_7special_11_ufuncs_cxx__errprint(__pyx_self, __pyx_v_inflag);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_5scipy_7special_11_ufuncs_cxx_errprint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_inflag) {
+static PyObject *__pyx_pf_5scipy_7special_11_ufuncs_cxx__errprint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_inflag) {
int __pyx_v_oldflag;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
@@ -989,7 +987,7 @@ static PyObject *__pyx_pf_5scipy_7special_11_ufuncs_cxx_errprint(CYTHON_UNUSED P
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("errprint", 0);
+ __Pyx_RefNannySetupContext("_errprint", 0);
__pyx_v_oldflag = scipy_special_print_error_messages;
@@ -999,15 +997,15 @@ static PyObject *__pyx_pf_5scipy_7special_11_ufuncs_cxx_errprint(CYTHON_UNUSED P
if (__pyx_t_1) {
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_inflag); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_inflag); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
scipy_special_print_error_messages = ((int)(!(!__pyx_t_1)));
goto __pyx_L3;
}
__pyx_L3:;
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyInt_FromLong(__pyx_v_oldflag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_oldflag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
@@ -1017,7 +1015,7 @@ static PyObject *__pyx_pf_5scipy_7special_11_ufuncs_cxx_errprint(CYTHON_UNUSED P
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("scipy.special._ufuncs_cxx.errprint", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("scipy.special._ufuncs_cxx._errprint", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -2250,7 +2248,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
{&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
{&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
- {&__pyx_n_s__errprint, __pyx_k__errprint, sizeof(__pyx_k__errprint), 0, 0, 1, 1},
+ {&__pyx_n_s___errprint, __pyx_k___errprint, sizeof(__pyx_k___errprint), 0, 0, 1, 1},
{&__pyx_n_s__inflag, __pyx_k__inflag, sizeof(__pyx_k__inflag), 0, 0, 1, 1},
{&__pyx_n_s__oldflag, __pyx_k__oldflag, sizeof(__pyx_k__oldflag), 0, 0, 1, 1},
{&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
@@ -2318,7 +2316,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));
- __pyx_k_tuple_15 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_tuple_15 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_15);
__Pyx_INCREF(((PyObject *)__pyx_n_s__inflag));
PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, ((PyObject *)__pyx_n_s__inflag));
@@ -2327,7 +2325,7 @@ static int __Pyx_InitCachedConstants(void) {
PyTuple_SET_ITEM(__pyx_k_tuple_15, 1, ((PyObject *)__pyx_n_s__oldflag));
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldflag));
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));
- __pyx_k_codeobj_16 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_17, __pyx_n_s__errprint, 47, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_k_codeobj_16 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_17, __pyx_n_s___errprint, 43, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
@@ -2431,9 +2429,9 @@ PyMODINIT_FUNC PyInit__ufuncs_cxx(void)
import_ufunc();
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5scipy_7special_11_ufuncs_cxx_1errprint, NULL, __pyx_n_s_18); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5scipy_7special_11_ufuncs_cxx_1_errprint, NULL, __pyx_n_s_18); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s__errprint, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s___errprint, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
@@ -3603,25 +3601,6 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject*
}
}
-static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
- CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) {
- PyObject *old_exc, *old_val, *old_tb;
- PyObject *ctx;
- __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
- #if PY_MAJOR_VERSION < 3
- ctx = PyString_FromString(name);
- #else
- ctx = PyUnicode_FromString(name);
- #endif
- __Pyx_ErrRestore(old_exc, old_val, old_tb);
- if (!ctx) {
- PyErr_WriteUnraisable(Py_None);
- } else {
- PyErr_WriteUnraisable(ctx);
- Py_DECREF(ctx);
- }
-}
-
static int __Pyx_check_binary_version(void) {
char ctversion[4], rtversion[4];
PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);

0 comments on commit 8923ef1

Please sign in to comment.
Something went wrong with that request. Please try again.