diff --git a/doc/logos/scikit-learn-logo.bmp b/doc/logos/scikit-learn-logo.bmp new file mode 100644 index 0000000000000000000000000000000000000000..0760b69654cb86c1e1d11cd355e64ff154afab5d Binary files /dev/null and b/doc/logos/scikit-learn-logo.bmp differ diff --git a/doc/scikit-learn-logo.svg b/doc/logos/scikit-learn-logo.svg similarity index 98% rename from doc/scikit-learn-logo.svg rename to doc/logos/scikit-learn-logo.svg index 2f9fbfae99b03598d49217b256b7d5fa8c543c5e..5080a4ccdced0a8ccfaf6765981c4cdd42accb4d 100644 --- a/doc/scikit-learn-logo.svg +++ b/doc/logos/scikit-learn-logo.svg @@ -1,58 +1,58 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) --> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" - width="792px" height="612px" viewBox="0 0 792 612" enable-background="new 0 0 792 612" xml:space="preserve"> -<g> - <path fill="#F89939" d="M333.32,347.348c33.869-33.867,39.498-83.146,12.572-110.07c-26.922-26.921-76.199-21.293-110.066,12.572 - c-33.867,33.866-24.07,98.568-12.57,110.07C232.549,369.213,299.455,381.213,333.32,347.348z"/> - <path fill="#3499CD" d="M194.35,298.411c-19.648-19.648-48.242-22.919-63.867-7.295c-15.621,15.622-12.355,44.22,7.297,63.865 - c19.652,19.654,57.195,13.969,63.863,7.295C207.039,356.889,214.004,318.061,194.35,298.411z"/> -</g> -<g> - <g> - <path fill="#010101" d="M262.143,339.047c-3.471,3.195-6.516,5.553-9.133,7.068c-2.617,1.52-5.113,2.279-7.488,2.279 - c-2.732,0-4.936-1.059-6.607-3.178c-1.674-2.121-2.508-4.965-2.508-8.543c0-5.361,1.162-11.797,3.486-19.301 - c2.32-7.51,5.145-14.43,8.463-20.761l9.729-3.602c0.305-0.102,0.537-0.154,0.691-0.154c0.738,0,1.348,0.544,1.816,1.627 - c0.473,1.088,0.711,2.55,0.711,4.388c0,5.209-1.199,10.252-3.602,15.129c-2.402,4.879-6.154,10.086-11.26,15.627 - c-0.205,2.656-0.307,4.48-0.307,5.477c0,2.223,0.408,3.982,1.225,5.285c0.818,1.305,1.902,1.953,3.256,1.953 - c1.381,0,2.848-0.494,4.406-1.49c1.555-0.998,3.93-3.064,7.121-6.207V339.047z M247.475,324.074 - c3.242-3.605,5.875-7.648,7.891-12.121c2.016-4.475,3.023-8.324,3.023-11.549c0-0.94-0.139-1.704-0.418-2.278 - c-0.281-0.575-0.641-0.864-1.074-0.864c-0.941,0-2.316,2.352-4.117,7.057C250.979,309.023,249.211,315.609,247.475,324.074z"/> - <path fill="#010101" d="M290.795,339.047c-3.242,3.195-6.152,5.553-8.732,7.068c-2.58,1.52-5.424,2.279-8.541,2.279 - c-3.473,0-6.275-1.111-8.41-3.33c-2.131-2.225-3.195-5.146-3.195-8.773c0-5.412,1.875-10.309,5.633-14.688 - c3.75-4.381,7.914-6.57,12.484-6.57c2.375,0,4.275,0.615,5.707,1.84c1.43,1.227,2.145,2.834,2.145,4.826 - c0,5.287-5.617,9.574-16.852,12.869c1.02,4.977,3.688,7.469,8.004,7.469c1.686,0,3.293-0.453,4.824-1.357 - c1.535-0.908,3.844-2.922,6.934-6.035V339.047z M270.725,331.963c6.535-1.84,9.805-5.234,9.805-10.188 - c0-2.451-0.895-3.676-2.68-3.676c-1.686,0-3.293,1.281-4.824,3.85C271.49,324.514,270.725,327.85,270.725,331.963z"/> - <path fill="#010101" d="M331.701,339.047c-4.086,3.881-7.01,6.412-8.77,7.588c-1.762,1.174-3.447,1.76-5.057,1.76 - c-4.035,0-5.936-3.561-5.707-10.686c-2.553,3.65-4.91,6.344-7.068,8.084c-2.156,1.736-4.383,2.602-6.684,2.602 - c-2.244,0-4.152-1.051-5.725-3.158s-2.354-4.691-2.354-7.758c0-3.828,1.051-7.48,3.156-10.955 - c2.109-3.473,4.809-6.279,8.102-8.424s6.207-3.219,8.732-3.219c3.193,0,5.428,1.469,6.705,4.404l7.828-4.326h2.148l-3.381,11.221 - c-1.736,5.645-2.607,9.514-2.607,11.607c0,2.195,0.777,3.293,2.336,3.293c0.992,0,2.09-0.529,3.291-1.59s2.883-2.676,5.053-4.846 - V339.047z M303.664,341.156c2.553,0,4.959-2.176,7.223-6.529c2.26-4.355,3.389-8.373,3.389-12.049c0-1.428-0.322-2.547-0.957-3.35 - c-0.641-0.807-1.496-1.207-2.566-1.207c-2.555,0-4.977,2.17-7.258,6.512c-2.285,4.342-3.43,8.338-3.43,11.986 - c0,1.381,0.34,2.498,1.016,3.354S302.615,341.156,303.664,341.156z"/> - <path fill="#010101" d="M360.314,339.047c-6.41,6.281-11.352,9.424-14.824,9.424c-1.559,0-2.875-0.658-3.945-1.969 - c-1.07-1.316-1.609-2.945-1.609-4.887c0-3.6,1.93-8.424,5.785-14.477c-1.891,0.971-3.957,1.645-6.205,2.029 - c-1.66,3.064-4.266,6.359-7.814,9.879h-0.879v-3.443c1.99-2.068,3.791-4.291,5.4-6.666c-2.199-0.971-3.295-2.414-3.295-4.326 - c0-1.969,0.668-4.068,2.012-6.305c1.34-2.232,3.184-3.348,5.535-3.348c1.992,0,2.986,1.018,2.986,3.062 - c0,1.609-0.574,3.906-1.725,6.895c4.238-0.461,7.941-3.701,11.109-9.729l3.484-0.154l-3.562,9.805 - c-1.48,4.137-2.438,6.955-2.871,8.447s-0.652,2.816-0.652,3.963c0,1.074,0.25,1.932,0.746,2.566 - c0.498,0.643,1.17,0.959,2.012,0.959c0.918,0,1.801-0.314,2.643-0.936c0.842-0.631,2.732-2.359,5.67-5.193V339.047z"/> - <path fill="#010101" d="M397.928,339.047c-5.898,6.234-10.957,9.348-15.168,9.348c-1.711,0-3.09-0.6-4.137-1.801 - c-1.049-1.199-1.572-2.807-1.572-4.824c0-2.732,1.125-6.908,3.373-12.523c1.199-3.014,1.801-4.932,1.801-5.746 - c0-0.818-0.322-1.227-0.957-1.227c-0.357,0-0.832,0.18-1.418,0.535c-0.539,0.357-1.164,0.859-1.879,1.496 - c-0.637,0.586-1.354,1.301-2.145,2.141c-0.691,0.721-1.432,1.537-2.219,2.453l-2.148,2.492c-0.943,1.148-1.531,2.359-1.76,3.637 - c-0.385,2.17-0.639,4.164-0.768,5.979c-0.078,1.35-0.115,3.174-0.115,5.477l-8.465,1.988c-0.279-3.447-0.422-6.014-0.422-7.697 - c0-4.111,0.479-8.006,1.438-11.682c0.957-3.68,2.494-7.814,4.615-12.412l9.344-1.799c-1.965,5.287-3.254,9.447-3.867,12.484 - c4.188-4.672,7.508-7.906,9.969-9.709c2.457-1.801,4.645-2.697,6.557-2.697c1.299,0,2.385,0.49,3.25,1.471 - c0.869,0.982,1.301,2.215,1.301,3.689c0,2.449-1.098,6.484-3.291,12.104c-1.508,3.854-2.262,6.355-2.262,7.51 - c0,1.537,0.627,2.305,1.881,2.305c1.867,0,4.891-2.465,9.064-7.393V339.047z"/> - </g> -</g> -<rect x="273.943" y="285.613" fill="none" width="225.242" height="83.948"/> -<text transform="matrix(1 0 0 1 273.9414 302.2061)" fill="#FFFFFF" font-family="'Helvetica'" font-size="23.0795">scikits</text> -<rect x="345.568" y="357.979" fill="none" width="327.432" height="42.963"/> -<text transform="matrix(1 0 0 1 345.5684 375.5176)" fill="#010101" font-family="'Verdana'" font-size="23.0795">machine learning in Python</text> -</svg> +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="792px" height="612px" viewBox="0 0 792 612" enable-background="new 0 0 792 612" xml:space="preserve"> +<g> + <path fill="#F89939" d="M333.32,347.348c33.869-33.867,39.498-83.146,12.572-110.07c-26.922-26.921-76.199-21.293-110.066,12.572 + c-33.867,33.866-24.07,98.568-12.57,110.07C232.549,369.213,299.455,381.213,333.32,347.348z"/> + <path fill="#3499CD" d="M194.35,298.411c-19.648-19.648-48.242-22.919-63.867-7.295c-15.621,15.622-12.355,44.22,7.297,63.865 + c19.652,19.654,57.195,13.969,63.863,7.295C207.039,356.889,214.004,318.061,194.35,298.411z"/> +</g> +<g> + <g> + <path fill="#010101" d="M262.143,339.047c-3.471,3.195-6.516,5.553-9.133,7.068c-2.617,1.52-5.113,2.279-7.488,2.279 + c-2.732,0-4.936-1.059-6.607-3.178c-1.674-2.121-2.508-4.965-2.508-8.543c0-5.361,1.162-11.797,3.486-19.301 + c2.32-7.51,5.145-14.43,8.463-20.761l9.729-3.602c0.305-0.102,0.537-0.154,0.691-0.154c0.738,0,1.348,0.544,1.816,1.627 + c0.473,1.088,0.711,2.55,0.711,4.388c0,5.209-1.199,10.252-3.602,15.129c-2.402,4.879-6.154,10.086-11.26,15.627 + c-0.205,2.656-0.307,4.48-0.307,5.477c0,2.223,0.408,3.982,1.225,5.285c0.818,1.305,1.902,1.953,3.256,1.953 + c1.381,0,2.848-0.494,4.406-1.49c1.555-0.998,3.93-3.064,7.121-6.207V339.047z M247.475,324.074 + c3.242-3.605,5.875-7.648,7.891-12.121c2.016-4.475,3.023-8.324,3.023-11.549c0-0.94-0.139-1.704-0.418-2.278 + c-0.281-0.575-0.641-0.864-1.074-0.864c-0.941,0-2.316,2.352-4.117,7.057C250.979,309.023,249.211,315.609,247.475,324.074z"/> + <path fill="#010101" d="M290.795,339.047c-3.242,3.195-6.152,5.553-8.732,7.068c-2.58,1.52-5.424,2.279-8.541,2.279 + c-3.473,0-6.275-1.111-8.41-3.33c-2.131-2.225-3.195-5.146-3.195-8.773c0-5.412,1.875-10.309,5.633-14.688 + c3.75-4.381,7.914-6.57,12.484-6.57c2.375,0,4.275,0.615,5.707,1.84c1.43,1.227,2.145,2.834,2.145,4.826 + c0,5.287-5.617,9.574-16.852,12.869c1.02,4.977,3.688,7.469,8.004,7.469c1.686,0,3.293-0.453,4.824-1.357 + c1.535-0.908,3.844-2.922,6.934-6.035V339.047z M270.725,331.963c6.535-1.84,9.805-5.234,9.805-10.188 + c0-2.451-0.895-3.676-2.68-3.676c-1.686,0-3.293,1.281-4.824,3.85C271.49,324.514,270.725,327.85,270.725,331.963z"/> + <path fill="#010101" d="M331.701,339.047c-4.086,3.881-7.01,6.412-8.77,7.588c-1.762,1.174-3.447,1.76-5.057,1.76 + c-4.035,0-5.936-3.561-5.707-10.686c-2.553,3.65-4.91,6.344-7.068,8.084c-2.156,1.736-4.383,2.602-6.684,2.602 + c-2.244,0-4.152-1.051-5.725-3.158s-2.354-4.691-2.354-7.758c0-3.828,1.051-7.48,3.156-10.955 + c2.109-3.473,4.809-6.279,8.102-8.424s6.207-3.219,8.732-3.219c3.193,0,5.428,1.469,6.705,4.404l7.828-4.326h2.148l-3.381,11.221 + c-1.736,5.645-2.607,9.514-2.607,11.607c0,2.195,0.777,3.293,2.336,3.293c0.992,0,2.09-0.529,3.291-1.59s2.883-2.676,5.053-4.846 + V339.047z M303.664,341.156c2.553,0,4.959-2.176,7.223-6.529c2.26-4.355,3.389-8.373,3.389-12.049c0-1.428-0.322-2.547-0.957-3.35 + c-0.641-0.807-1.496-1.207-2.566-1.207c-2.555,0-4.977,2.17-7.258,6.512c-2.285,4.342-3.43,8.338-3.43,11.986 + c0,1.381,0.34,2.498,1.016,3.354S302.615,341.156,303.664,341.156z"/> + <path fill="#010101" d="M360.314,339.047c-6.41,6.281-11.352,9.424-14.824,9.424c-1.559,0-2.875-0.658-3.945-1.969 + c-1.07-1.316-1.609-2.945-1.609-4.887c0-3.6,1.93-8.424,5.785-14.477c-1.891,0.971-3.957,1.645-6.205,2.029 + c-1.66,3.064-4.266,6.359-7.814,9.879h-0.879v-3.443c1.99-2.068,3.791-4.291,5.4-6.666c-2.199-0.971-3.295-2.414-3.295-4.326 + c0-1.969,0.668-4.068,2.012-6.305c1.34-2.232,3.184-3.348,5.535-3.348c1.992,0,2.986,1.018,2.986,3.062 + c0,1.609-0.574,3.906-1.725,6.895c4.238-0.461,7.941-3.701,11.109-9.729l3.484-0.154l-3.562,9.805 + c-1.48,4.137-2.438,6.955-2.871,8.447s-0.652,2.816-0.652,3.963c0,1.074,0.25,1.932,0.746,2.566 + c0.498,0.643,1.17,0.959,2.012,0.959c0.918,0,1.801-0.314,2.643-0.936c0.842-0.631,2.732-2.359,5.67-5.193V339.047z"/> + <path fill="#010101" d="M397.928,339.047c-5.898,6.234-10.957,9.348-15.168,9.348c-1.711,0-3.09-0.6-4.137-1.801 + c-1.049-1.199-1.572-2.807-1.572-4.824c0-2.732,1.125-6.908,3.373-12.523c1.199-3.014,1.801-4.932,1.801-5.746 + c0-0.818-0.322-1.227-0.957-1.227c-0.357,0-0.832,0.18-1.418,0.535c-0.539,0.357-1.164,0.859-1.879,1.496 + c-0.637,0.586-1.354,1.301-2.145,2.141c-0.691,0.721-1.432,1.537-2.219,2.453l-2.148,2.492c-0.943,1.148-1.531,2.359-1.76,3.637 + c-0.385,2.17-0.639,4.164-0.768,5.979c-0.078,1.35-0.115,3.174-0.115,5.477l-8.465,1.988c-0.279-3.447-0.422-6.014-0.422-7.697 + c0-4.111,0.479-8.006,1.438-11.682c0.957-3.68,2.494-7.814,4.615-12.412l9.344-1.799c-1.965,5.287-3.254,9.447-3.867,12.484 + c4.188-4.672,7.508-7.906,9.969-9.709c2.457-1.801,4.645-2.697,6.557-2.697c1.299,0,2.385,0.49,3.25,1.471 + c0.869,0.982,1.301,2.215,1.301,3.689c0,2.449-1.098,6.484-3.291,12.104c-1.508,3.854-2.262,6.355-2.262,7.51 + c0,1.537,0.627,2.305,1.881,2.305c1.867,0,4.891-2.465,9.064-7.393V339.047z"/> + </g> +</g> +<rect x="273.943" y="285.613" fill="none" width="225.242" height="83.948"/> +<text transform="matrix(1 0 0 1 273.9414 302.2061)" fill="#FFFFFF" font-family="'Helvetica'" font-size="23.0795">scikits</text> +<rect x="345.568" y="357.979" fill="none" width="327.432" height="42.963"/> +<text transform="matrix(1 0 0 1 345.5684 375.5176)" fill="#010101" font-family="'Verdana'" font-size="23.0795">machine learning in Python</text> +</svg> diff --git a/doc/scikit-learn-logo.bmp b/doc/scikit-learn-logo.bmp deleted file mode 100644 index 198a07a45fe7c56407abe2f4bdc1aa45b44a7283..0000000000000000000000000000000000000000 Binary files a/doc/scikit-learn-logo.bmp and /dev/null differ diff --git a/scikits/learn/em/src/c_gden.c b/scikits/learn/em/src/c_gden.c index 6a45c2f158d9b3e6d52b5e9550b282d64fb87555..82d6685b229741ee18ef20d84abc9602c6fe7f9a 100644 --- a/scikits/learn/em/src/c_gden.c +++ b/scikits/learn/em/src/c_gden.c @@ -1,5 +1,6 @@ #include <stddef.h> #include <stdio.h> +#define _USE_MATH_DEFINES /* for Visual Studio */ #include <math.h> /* diff --git a/scikits/learn/em/src/pure_den.c b/scikits/learn/em/src/pure_den.c index aa2a4ecded2441675092c632ee4d9e2605d28a57..27ca134427e3cc7777ab5eff686507cb7c50d307 100644 --- a/scikits/learn/em/src/pure_den.c +++ b/scikits/learn/em/src/pure_den.c @@ -7,6 +7,7 @@ #include <Python.h> #include <numpy/arrayobject.h> +#define _USE_MATH_DEFINES #include <math.h> PyObject* compute_ss_frame_1d_py(PyObject* dum, PyObject *arg); diff --git a/scikits/learn/glm/setup.py b/scikits/learn/glm/setup.py index 71481bdc46b933f1374abcaa44696ca51315d63a..c2cfc8c9c2da1b9f2e4d5a9b7bab91dfe742f9bc 100644 --- a/scikits/learn/glm/setup.py +++ b/scikits/learn/glm/setup.py @@ -11,6 +11,7 @@ def configuration(parent_package='', top_path=None): config = Configuration('glm',parent_package,top_path) config.add_extension('lasso_cd_fast', sources=['src/lasso_cd_fast.c'], + # libraries=['m'], include_dirs=[numpy.get_include()]) config.add_extension('enet_cd_fast', sources=['src/enet_cd_fast.c'], diff --git a/scikits/learn/glm/src/enet_cd_fast.c b/scikits/learn/glm/src/enet_cd_fast.c index 95762c8c6ebee3b4324d5e983abcd35ac8b34a53..7b2b05dc4ea494c16159cbe541f395f6be43f0cb 100644 --- a/scikits/learn/glm/src/enet_cd_fast.c +++ b/scikits/learn/glm/src/enet_cd_fast.c @@ -1,11 +1,12 @@ -/* Generated by Cython 0.11.2 on Wed Apr 21 19:48:29 2010 */ +/* Generated by Cython 0.12.1 on Fri Apr 30 10:25:33 2010 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #include "structmember.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. -#endif +#else + #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif @@ -15,7 +16,9 @@ #if PY_VERSION_HEX < 0x02040000 #define METH_COEXIST 0 #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type) + #define PyDict_Contains(d,o) PySequence_Contains(d,o) #endif + #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX @@ -25,7 +28,9 @@ #define PyInt_AsSsize_t(o) PyInt_AsLong(o) #define PyNumber_Index(o) PyNumber_Int(o) #define PyIndex_Check(o) PyNumber_Check(o) + #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #endif + #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) @@ -35,17 +40,17 @@ #define PyType_Modified(t) typedef struct { - void *buf; - PyObject *obj; - Py_ssize_t len; - Py_ssize_t itemsize; - int readonly; - int ndim; - char *format; - Py_ssize_t *shape; - Py_ssize_t *strides; - Py_ssize_t *suboffsets; - void *internal; + void *buf; + PyObject *obj; + Py_ssize_t len; + Py_ssize_t itemsize; + int readonly; + int ndim; + char *format; + Py_ssize_t *shape; + Py_ssize_t *strides; + Py_ssize_t *suboffsets; + void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 @@ -59,22 +64,32 @@ #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #endif + #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #endif + #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif + #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif + #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type - #define PyString_Type PyBytes_Type - #define PyString_CheckExact PyBytes_CheckExact + #define PyString_Type PyUnicode_Type + #define PyString_CheckExact PyUnicode_CheckExact +#else + #define PyBytes_Type PyString_Type + #define PyBytes_CheckExact PyString_CheckExact +#endif + +#if PY_MAJOR_VERSION >= 3 #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) @@ -89,13 +104,17 @@ #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) - #define PyBytes_Type PyString_Type + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) + #endif + #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func) #endif + #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall @@ -109,6 +128,7 @@ #else #define _USE_MATH_DEFINES #endif + #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) @@ -118,6 +138,7 @@ #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif + #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) @@ -133,24 +154,22 @@ #include <math.h> #define __PYX_HAVE_API__enet_cd_fast #include "stdlib.h" +#include "stdio.h" #include "numpy/arrayobject.h" +#include "numpy/ufuncobject.h" #include "math.h" -#define __PYX_USE_C99_COMPLEX defined(_Complex_I) - -#ifdef __GNUC__ -#define INLINE __inline__ -#elif _WIN32 -#define INLINE __inline -#else -#define INLINE +#ifndef CYTHON_INLINE + #if defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #else + #define CYTHON_INLINE + #endif #endif -typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/ - - - -static int __pyx_skip_dispatch = 0; +typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ /* Type Conversion Predeclarations */ @@ -165,9 +184,12 @@ static int __pyx_skip_dispatch = 0; #define __Pyx_PyBytes_AsString PyBytes_AsString #endif +#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) +#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) __Pyx_PyBytes_AsString(s)) + #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) -static INLINE int __Pyx_PyObject_IsTrue(PyObject*); -static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); #if !defined(T_PYSSIZET) #if PY_VERSION_HEX < 0x02050000 @@ -184,6 +206,40 @@ static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); #endif #endif + +#if !defined(T_ULONGLONG) +#define __Pyx_T_UNSIGNED_INT(x) \ + ((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \ + ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \ + ((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \ + ((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : -1)))) +#else +#define __Pyx_T_UNSIGNED_INT(x) \ + ((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \ + ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \ + ((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \ + ((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : \ + ((sizeof(x) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1))))) +#endif +#if !defined(T_LONGLONG) +#define __Pyx_T_SIGNED_INT(x) \ + ((sizeof(x) == sizeof(char)) ? T_BYTE : \ + ((sizeof(x) == sizeof(short)) ? T_SHORT : \ + ((sizeof(x) == sizeof(int)) ? T_INT : \ + ((sizeof(x) == sizeof(long)) ? T_LONG : -1)))) +#else +#define __Pyx_T_SIGNED_INT(x) \ + ((sizeof(x) == sizeof(char)) ? T_BYTE : \ + ((sizeof(x) == sizeof(short)) ? T_SHORT : \ + ((sizeof(x) == sizeof(int)) ? T_INT : \ + ((sizeof(x) == sizeof(long)) ? T_LONG : \ + ((sizeof(x) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1))))) +#endif + +#define __Pyx_T_FLOATING(x) \ + ((sizeof(x) == sizeof(float)) ? T_FLOAT : \ + ((sizeof(x) == sizeof(double)) ? T_DOUBLE : -1)) + #if !defined(T_SIZET) #if !defined(T_ULONGLONG) #define T_SIZET \ @@ -197,9 +253,9 @@ static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); #endif #endif -static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); -static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) @@ -221,6 +277,7 @@ static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); static PyObject *__pyx_m; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; @@ -228,35 +285,144 @@ static const char *__pyx_filename; static const char **__pyx_f; -#ifdef CYTHON_REFNANNY -typedef struct { - void (*INCREF)(void*, PyObject*, int); - void (*DECREF)(void*, PyObject*, int); - void (*GOTREF)(void*, PyObject*, int); - void (*GIVEREF)(void*, PyObject*, int); - void* (*NewContext)(const char*, int, const char*); - void (*FinishContext)(void**); -} __Pyx_RefnannyAPIStruct; -static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL; -#define __Pyx_ImportRefcountAPI(name) (__Pyx_RefnannyAPIStruct *) PyCObject_Import((char *)name, (char *)"RefnannyAPI") -#define __Pyx_INCREF(r) __Pyx_Refnanny->INCREF(__pyx_refchk, (PyObject *)(r), __LINE__) -#define __Pyx_DECREF(r) __Pyx_Refnanny->DECREF(__pyx_refchk, (PyObject *)(r), __LINE__) -#define __Pyx_GOTREF(r) __Pyx_Refnanny->GOTREF(__pyx_refchk, (PyObject *)(r), __LINE__) -#define __Pyx_GIVEREF(r) __Pyx_Refnanny->GIVEREF(__pyx_refchk, (PyObject *)(r), __LINE__) -#define __Pyx_XDECREF(r) if((r) == NULL) ; else __Pyx_DECREF(r) -#define __Pyx_SetupRefcountContext(name) void* __pyx_refchk = __Pyx_Refnanny->NewContext((name), __LINE__, __FILE__) -#define __Pyx_FinishRefcountContext() __Pyx_Refnanny->FinishContext(&__pyx_refchk) +#if !defined(CYTHON_CCOMPLEX) + #if defined(__cplusplus) + #define CYTHON_CCOMPLEX 1 + #elif defined(_Complex_I) + #define CYTHON_CCOMPLEX 1 + #else + #define CYTHON_CCOMPLEX 0 + #endif +#endif + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #include <complex> + #else + #include <complex.h> + #endif +#endif + +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj +#endif + +typedef npy_int8 __pyx_t_5numpy_int8_t; + +typedef npy_int16 __pyx_t_5numpy_int16_t; + +typedef npy_int32 __pyx_t_5numpy_int32_t; + +typedef npy_int64 __pyx_t_5numpy_int64_t; + +typedef npy_uint8 __pyx_t_5numpy_uint8_t; + +typedef npy_uint16 __pyx_t_5numpy_uint16_t; + +typedef npy_uint32 __pyx_t_5numpy_uint32_t; + +typedef npy_uint64 __pyx_t_5numpy_uint64_t; + +typedef npy_float32 __pyx_t_5numpy_float32_t; + +typedef npy_float64 __pyx_t_5numpy_float64_t; + +typedef npy_long __pyx_t_5numpy_int_t; + +typedef npy_longlong __pyx_t_5numpy_long_t; + +typedef npy_intp __pyx_t_5numpy_intp_t; + +typedef npy_uintp __pyx_t_5numpy_uintp_t; + +typedef npy_ulong __pyx_t_5numpy_uint_t; + +typedef npy_ulonglong __pyx_t_5numpy_ulong_t; + +typedef npy_double __pyx_t_5numpy_float_t; + +typedef npy_double __pyx_t_5numpy_double_t; + +typedef npy_longdouble __pyx_t_5numpy_longdouble_t; + +typedef __pyx_t_5numpy_float64_t __pyx_t_12enet_cd_fast_DOUBLE; + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< float > __pyx_t_float_complex; + #else + typedef float _Complex __pyx_t_float_complex; + #endif +#else + typedef struct { float real, imag; } __pyx_t_float_complex; +#endif + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< double > __pyx_t_double_complex; + #else + typedef double _Complex __pyx_t_double_complex; + #endif +#else + typedef struct { double real, imag; } __pyx_t_double_complex; +#endif + +/* Type declarations */ + +typedef npy_cfloat __pyx_t_5numpy_cfloat_t; + +typedef npy_cdouble __pyx_t_5numpy_cdouble_t; + +typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; + +typedef npy_cdouble __pyx_t_5numpy_complex_t; + +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif + +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule((char *)modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); + end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; + } + #define __Pyx_RefNannySetupContext(name) void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) + #define __Pyx_RefNannyFinishContext() __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0) #else -#define __Pyx_INCREF(r) Py_INCREF(r) -#define __Pyx_DECREF(r) Py_DECREF(r) -#define __Pyx_GOTREF(r) -#define __Pyx_GIVEREF(r) -#define __Pyx_XDECREF(r) Py_XDECREF(r) -#define __Pyx_SetupRefcountContext(name) -#define __Pyx_FinishRefcountContext() + #define __Pyx_RefNannySetupContext(name) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) #endif /* CYTHON_REFNANNY */ -#define __Pyx_XGIVEREF(r) if((r) == NULL) ; else __Pyx_GIVEREF(r) -#define __Pyx_XGOTREF(r) if((r) == NULL) ; else __Pyx_GOTREF(r) +#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0) +#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0) static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name); /*proto*/ @@ -288,89 +454,27 @@ typedef struct { } __Pyx_BufFmt_StackElem; -static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); -static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ +static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) #define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) -static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ - - -static INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { - PyObject *r; - if (!j) return NULL; - r = PyObject_GetItem(o, j); - Py_DECREF(j); - return r; -} +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -#define __Pyx_GetItemInt_List(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_List_Fast(o, i, size <= sizeof(long)) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) - -static INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) { - if (likely(o != Py_None)) { - if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { - PyObject *r = PyList_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) { - PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i); - Py_INCREF(r); - return r; - } - } - return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i)); -} - -#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) - -static INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) { - if (likely(o != Py_None)) { - if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) { - PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i); - Py_INCREF(r); - return r; - } - } - return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i)); -} +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void); +static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/ +static int __Pyx_EndUnpack(PyObject *); /*proto*/ -#define __Pyx_GetItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -static INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) { - PyObject *r; - if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) { - r = PyList_GET_ITEM(o, i); - Py_INCREF(r); - } - else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { - r = PyTuple_GET_ITEM(o, i); - Py_INCREF(r); - } - else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) { - r = PySequence_GetItem(o, i); - } - else { - r = __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i)); - } - return r; -} +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ @@ -389,450 +493,341 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ -#if __PYX_USE_C99_COMPLEX - #define __Pyx_REAL_PART(z) __real__(z) - #define __Pyx_IMAG_PART(z) __imag__(z) +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #define __Pyx_CREAL(z) ((z).real()) + #define __Pyx_CIMAG(z) ((z).imag()) + #else + #define __Pyx_CREAL(z) (__real__(z)) + #define __Pyx_CIMAG(z) (__imag__(z)) + #endif #else - #define __Pyx_REAL_PART(z) ((z).real) - #define __Pyx_IMAG_PART(z) ((z).imag) + #define __Pyx_CREAL(z) ((z).real) + #define __Pyx_CIMAG(z) ((z).imag) #endif -#define __pyx_PyObject_from_complex(z) PyComplex_FromDoubles((double)__Pyx_REAL_PART(z), (double)__Pyx_IMAG_PART(z)) - -#if __PYX_USE_C99_COMPLEX - - typedef float _Complex __pyx_t_float_complex; - static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { - return x + y*(__pyx_t_float_complex)_Complex_I; - } - - #define __pyx_t_float_complex_is_zero(a) ((a) == 0) - #define __pyx_t_float_complex_eq(a, b) ((a) == (b)) - #define __pyx_t_float_complex_add(a, b) ((a)+(b)) - #define __pyx_t_float_complex_sub(a, b) ((a)-(b)) - #define __pyx_t_float_complex_mul(a, b) ((a)*(b)) - #define __pyx_t_float_complex_div(a, b) ((a)/(b)) - #define __pyx_t_float_complex_neg(a) (-(a)) - +#if defined(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX + #define __Pyx_SET_CREAL(z,x) ((z).real(x)) + #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) #else - - typedef struct { float real, imag; } __pyx_t_float_complex; - static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { - __pyx_t_float_complex c; c.real = x; c.imag = y; return c; - } - - static INLINE int __pyx_t_float_complex_is_zero(__pyx_t_float_complex a) { - return (a.real == 0) & (a.imag == 0); - } - - static INLINE int __pyx_t_float_complex_eq(__pyx_t_float_complex a, __pyx_t_float_complex b) { - return (a.real == b.real) & (a.imag == b.imag); - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_add(__pyx_t_float_complex a, __pyx_t_float_complex b) { - __pyx_t_float_complex z; - z.real = a.real + b.real; - z.imag = a.imag + b.imag; - return z; - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_sub(__pyx_t_float_complex a, __pyx_t_float_complex b) { - __pyx_t_float_complex z; - z.real = a.real - b.real; - z.imag = a.imag - b.imag; - return z; - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_mul(__pyx_t_float_complex a, __pyx_t_float_complex b) { - __pyx_t_float_complex z; - z.real = a.real * b.real - a.imag * b.imag; - z.imag = a.real * b.imag + a.imag * b.real; - return z; - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_div(__pyx_t_float_complex a, __pyx_t_float_complex b) { - __pyx_t_float_complex z; - float denom = b.real*b.real + b.imag*b.imag; - z.real = (a.real * b.real + a.imag * b.imag) / denom; - z.imag = (a.imag * b.real - a.real * b.imag) / denom; - return z; - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_neg(__pyx_t_float_complex a) { - __pyx_t_float_complex z; - z.real = -a.real; - z.imag = -a.imag; - return z; - } - + #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) + #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) #endif -#if __PYX_USE_C99_COMPLEX - - typedef double _Complex __pyx_t_double_complex; - static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { - return x + y*(__pyx_t_double_complex)_Complex_I; - } - - #define __pyx_t_double_complex_is_zero(a) ((a) == 0) - #define __pyx_t_double_complex_eq(a, b) ((a) == (b)) - #define __pyx_t_double_complex_add(a, b) ((a)+(b)) - #define __pyx_t_double_complex_sub(a, b) ((a)-(b)) - #define __pyx_t_double_complex_mul(a, b) ((a)*(b)) - #define __pyx_t_double_complex_div(a, b) ((a)/(b)) - #define __pyx_t_double_complex_neg(a) (-(a)) - +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); + +#if CYTHON_CCOMPLEX + #define __Pyx_c_eqf(a, b) ((a)==(b)) + #define __Pyx_c_sumf(a, b) ((a)+(b)) + #define __Pyx_c_difff(a, b) ((a)-(b)) + #define __Pyx_c_prodf(a, b) ((a)*(b)) + #define __Pyx_c_quotf(a, b) ((a)/(b)) + #define __Pyx_c_negf(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zerof(z) ((z)==(float)0) + #define __Pyx_c_conjf(z) (::std::conj(z)) + /*#define __Pyx_c_absf(z) (::std::abs(z))*/ + #else + #define __Pyx_c_is_zerof(z) ((z)==0) + #define __Pyx_c_conjf(z) (conjf(z)) + /*#define __Pyx_c_absf(z) (cabsf(z))*/ + #endif #else - - typedef struct { double real, imag; } __pyx_t_double_complex; - static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { - __pyx_t_double_complex c; c.real = x; c.imag = y; return c; - } - - static INLINE int __pyx_t_double_complex_is_zero(__pyx_t_double_complex a) { - return (a.real == 0) & (a.imag == 0); - } - - static INLINE int __pyx_t_double_complex_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) { - return (a.real == b.real) & (a.imag == b.imag); - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_add(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - z.real = a.real + b.real; - z.imag = a.imag + b.imag; - return z; - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_sub(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - z.real = a.real - b.real; - z.imag = a.imag - b.imag; - return z; - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_mul(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - z.real = a.real * b.real - a.imag * b.imag; - z.imag = a.real * b.imag + a.imag * b.real; - return z; - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_div(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - double denom = b.real*b.real + b.imag*b.imag; - z.real = (a.real * b.real + a.imag * b.imag) / denom; - z.imag = (a.imag * b.real - a.real * b.imag) / denom; - return z; - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_neg(__pyx_t_double_complex a) { - __pyx_t_double_complex z; - z.real = -a.real; - z.imag = -a.imag; - return z; - } - + static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); + /*static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex);*/ #endif -#if __PYX_USE_C99_COMPLEX - - typedef long double _Complex __pyx_t_long__double_complex; - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_from_parts(long double x, long double y) { - return x + y*(__pyx_t_long__double_complex)_Complex_I; - } - - #define __pyx_t_long__double_complex_is_zero(a) ((a) == 0) - #define __pyx_t_long__double_complex_eq(a, b) ((a) == (b)) - #define __pyx_t_long__double_complex_add(a, b) ((a)+(b)) - #define __pyx_t_long__double_complex_sub(a, b) ((a)-(b)) - #define __pyx_t_long__double_complex_mul(a, b) ((a)*(b)) - #define __pyx_t_long__double_complex_div(a, b) ((a)/(b)) - #define __pyx_t_long__double_complex_neg(a) (-(a)) - +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); + +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq(a, b) ((a)==(b)) + #define __Pyx_c_sum(a, b) ((a)+(b)) + #define __Pyx_c_diff(a, b) ((a)-(b)) + #define __Pyx_c_prod(a, b) ((a)*(b)) + #define __Pyx_c_quot(a, b) ((a)/(b)) + #define __Pyx_c_neg(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero(z) ((z)==(double)0) + #define __Pyx_c_conj(z) (::std::conj(z)) + /*#define __Pyx_c_abs(z) (::std::abs(z))*/ + #else + #define __Pyx_c_is_zero(z) ((z)==0) + #define __Pyx_c_conj(z) (conj(z)) + /*#define __Pyx_c_abs(z) (cabs(z))*/ + #endif #else - - typedef struct { long double real, imag; } __pyx_t_long__double_complex; - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_from_parts(long double x, long double y) { - __pyx_t_long__double_complex c; c.real = x; c.imag = y; return c; - } - - static INLINE int __pyx_t_long__double_complex_is_zero(__pyx_t_long__double_complex a) { - return (a.real == 0) & (a.imag == 0); - } - - static INLINE int __pyx_t_long__double_complex_eq(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - return (a.real == b.real) & (a.imag == b.imag); - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_add(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - __pyx_t_long__double_complex z; - z.real = a.real + b.real; - z.imag = a.imag + b.imag; - return z; - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_sub(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - __pyx_t_long__double_complex z; - z.real = a.real - b.real; - z.imag = a.imag - b.imag; - return z; - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_mul(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - __pyx_t_long__double_complex z; - z.real = a.real * b.real - a.imag * b.imag; - z.imag = a.real * b.imag + a.imag * b.real; - return z; - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_div(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - __pyx_t_long__double_complex z; - long double denom = b.real*b.real + b.imag*b.imag; - z.real = (a.real * b.real + a.imag * b.imag) / denom; - z.imag = (a.imag * b.real - a.real * b.imag) / denom; - return z; - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_neg(__pyx_t_long__double_complex a) { - __pyx_t_long__double_complex z; - z.real = -a.real; - z.imag = -a.imag; - return z; - } - + static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); + /*static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex);*/ #endif static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static INLINE int __Pyx_StrEq(const char *, const char *); /*proto*/ - -static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); +static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); -static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); +static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); -static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); +static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); -static INLINE char __Pyx_PyInt_AsChar(PyObject *); +static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); -static INLINE short __Pyx_PyInt_AsShort(PyObject *); +static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); -static INLINE int __Pyx_PyInt_AsInt(PyObject *); +static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); -static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); +static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); -static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); +static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); -static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); +static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); -static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); +static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); -static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); -static INLINE long __Pyx_PyInt_AsLong(PyObject *); +static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); -static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); -static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); +static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); -static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); +static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); -static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size); /*proto*/ +static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict); /*proto*/ static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static void __Pyx_AddTraceback(const char *funcname); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ - -/* Type declarations */ - -typedef npy_int8 __pyx_t_5numpy_int8_t; - -typedef npy_int16 __pyx_t_5numpy_int16_t; - -typedef npy_int32 __pyx_t_5numpy_int32_t; - -typedef npy_int64 __pyx_t_5numpy_int64_t; - -typedef npy_uint8 __pyx_t_5numpy_uint8_t; - -typedef npy_uint16 __pyx_t_5numpy_uint16_t; - -typedef npy_uint32 __pyx_t_5numpy_uint32_t; - -typedef npy_uint64 __pyx_t_5numpy_uint64_t; - -typedef npy_float32 __pyx_t_5numpy_float32_t; - -typedef npy_float64 __pyx_t_5numpy_float64_t; - -typedef npy_complex64 __pyx_t_5numpy_complex64_t; - -typedef npy_complex128 __pyx_t_5numpy_complex128_t; - -typedef npy_long __pyx_t_5numpy_int_t; - -typedef npy_longlong __pyx_t_5numpy_long_t; - -typedef npy_ulong __pyx_t_5numpy_uint_t; - -typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - -typedef npy_double __pyx_t_5numpy_float_t; - -typedef npy_double __pyx_t_5numpy_double_t; - -typedef npy_longdouble __pyx_t_5numpy_longdouble_t; - -typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - -typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - -typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - -typedef npy_cdouble __pyx_t_5numpy_complex_t; - -typedef __pyx_t_5numpy_float64_t __pyx_t_12enet_cd_fast_DOUBLE; /* Module declarations from python_buffer */ +/* Module declarations from python_ref */ + /* Module declarations from stdlib */ +/* Module declarations from stdio */ + /* Module declarations from numpy */ /* Module declarations from numpy */ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; +static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; +static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ +static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *); /*proto*/ /* Module declarations from cython */ /* Module declarations from enet_cd_fast */ -static INLINE double __pyx_f_12enet_cd_fast_fsign(double); /*proto*/ +static CYTHON_INLINE double __pyx_f_12enet_cd_fast_fmax(double, double); /*proto*/ +static CYTHON_INLINE double __pyx_f_12enet_cd_fast_fsign(double); /*proto*/ static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_12enet_cd_fast_DOUBLE = { "enet_cd_fast.DOUBLE", NULL, sizeof(__pyx_t_12enet_cd_fast_DOUBLE), 'R' }; #define __Pyx_MODULE_NAME "enet_cd_fast" int __pyx_module_is_main_enet_cd_fast = 0; /* Implementation of enet_cd_fast */ -static PyObject *__pyx_int_2; -static PyObject *__pyx_int_0; -static char __pyx_k___main__[] = "__main__"; -static PyObject *__pyx_kp___main__; -static char __pyx_k_model[] = "model"; -static PyObject *__pyx_kp_model; -static char __pyx_k_X[] = "X"; -static PyObject *__pyx_kp_X; -static char __pyx_k_y[] = "y"; -static PyObject *__pyx_kp_y; -static char __pyx_k_maxit[] = "maxit"; -static PyObject *__pyx_kp_maxit; -static char __pyx_k_numpy[] = "numpy"; -static PyObject *__pyx_kp_numpy; -static char __pyx_k_np[] = "np"; -static PyObject *__pyx_kp_np; -static char __pyx_k_31[] = "scipy.linalg"; -static PyObject *__pyx_kp_31; -static char __pyx_k_32[] = "*"; -static PyObject *__pyx_kp_32; -static char __pyx_k_linalg[] = "linalg"; -static PyObject *__pyx_kp_linalg; -static char __pyx_k_alpha[] = "alpha"; -static PyObject *__pyx_kp_alpha; -static char __pyx_k_beta[] = "beta"; -static PyObject *__pyx_kp_beta; -static char __pyx_k_coef_[] = "coef_"; -static PyObject *__pyx_kp_coef_; -static char __pyx_k_callbacks[] = "callbacks"; -static PyObject *__pyx_kp_callbacks; -static char __pyx_k_sum[] = "sum"; -static PyObject *__pyx_kp_sum; -static char __pyx_k_axis[] = "axis"; -static PyObject *__pyx_kp_axis; -static char __pyx_k_empty[] = "empty"; -static PyObject *__pyx_kp_empty; -static char __pyx_k_dot[] = "dot"; -static PyObject *__pyx_kp_dot; -static char __pyx_k_range[] = "range"; -static PyObject *__pyx_kp_range; -static char __pyx_k_xrange[] = "xrange"; -static PyObject *__pyx_kp_xrange; -static char __pyx_k_w[] = "w"; -static PyObject *__pyx_kp_w; -static char __pyx_k_R[] = "R"; -static PyObject *__pyx_kp_R; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_xrange; -static PyObject *__pyx_int_15; -static char __pyx_k___getbuffer__[] = "__getbuffer__"; -static PyObject *__pyx_kp___getbuffer__; -static char __pyx_k___releasebuffer__[] = "__releasebuffer__"; -static PyObject *__pyx_kp___releasebuffer__; -static char __pyx_k_info[] = "info"; -static PyObject *__pyx_kp_info; -static char __pyx_k_flags[] = "flags"; -static PyObject *__pyx_kp_flags; -static char __pyx_k_ValueError[] = "ValueError"; -static PyObject *__pyx_kp_ValueError; -static char __pyx_k_itervalues[] = "itervalues"; -static PyObject *__pyx_kp_itervalues; -static char __pyx_k_RuntimeError[] = "RuntimeError"; -static PyObject *__pyx_kp_RuntimeError; -static PyObject *__pyx_kp_1; -static PyObject *__pyx_kp_2; -static PyObject *__pyx_kp_5; -static PyObject *__pyx_kp_23; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_RuntimeError; static char __pyx_k_1[] = "ndarray is not C contiguous"; static char __pyx_k_2[] = "ndarray is not Fortran contiguous"; -static char __pyx_k_3[] = ">"; -static char __pyx_k_4[] = "<"; -static char __pyx_k_5[] = "Non-native byte order not supported"; -static char __pyx_k_6[] = "b"; -static char __pyx_k_7[] = "B"; -static char __pyx_k_8[] = "h"; -static char __pyx_k_9[] = "H"; -static char __pyx_k_10[] = "i"; -static char __pyx_k_11[] = "I"; -static char __pyx_k_12[] = "l"; -static char __pyx_k_13[] = "L"; -static char __pyx_k_14[] = "q"; -static char __pyx_k_15[] = "Q"; -static char __pyx_k_16[] = "f"; -static char __pyx_k_17[] = "d"; -static char __pyx_k_18[] = "g"; -static char __pyx_k_19[] = "Zf"; -static char __pyx_k_20[] = "Zd"; -static char __pyx_k_21[] = "Zg"; -static char __pyx_k_22[] = "O"; -static char __pyx_k_23[] = "unknown dtype code in numpy.pxd (%d)"; -static char __pyx_k_24[] = "^"; -static PyObject *__pyx_kp_25; -static PyObject *__pyx_kp_28; -static PyObject *__pyx_kp_29; -static PyObject *__pyx_kp_30; -static char __pyx_k_25[] = "Format string allocated too short, see comment in numpy.pxd"; -static char __pyx_k_26[] = ">"; -static char __pyx_k_27[] = "<"; -static char __pyx_k_28[] = "Non-native byte order not supported"; -static char __pyx_k_29[] = "Format string allocated too short."; -static char __pyx_k_30[] = "unknown dtype code in numpy.pxd (%d)"; - -/* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":18 +static char __pyx_k_3[] = "Non-native byte order not supported"; +static char __pyx_k_4[] = "unknown dtype code in numpy.pxd (%d)"; +static char __pyx_k_5[] = "Format string allocated too short, see comment in numpy.pxd"; +static char __pyx_k_6[] = "Format string allocated too short."; +static char __pyx_k_7[] = "scipy.linalg"; +static char __pyx_k_8[] = "*"; +static char __pyx_k_9[] = "enet_coordinate_descent (line 34)"; +static char __pyx_k_10[] = "enet_coordinate_descent"; +static char __pyx_k__B[] = "B"; +static char __pyx_k__H[] = "H"; +static char __pyx_k__I[] = "I"; +static char __pyx_k__L[] = "L"; +static char __pyx_k__O[] = "O"; +static char __pyx_k__Q[] = "Q"; +static char __pyx_k__R[] = "R"; +static char __pyx_k__X[] = "X"; +static char __pyx_k__b[] = "b"; +static char __pyx_k__d[] = "d"; +static char __pyx_k__f[] = "f"; +static char __pyx_k__g[] = "g"; +static char __pyx_k__h[] = "h"; +static char __pyx_k__i[] = "i"; +static char __pyx_k__l[] = "l"; +static char __pyx_k__q[] = "q"; +static char __pyx_k__w[] = "w"; +static char __pyx_k__y[] = "y"; +static char __pyx_k__Zd[] = "Zd"; +static char __pyx_k__Zf[] = "Zf"; +static char __pyx_k__Zg[] = "Zg"; +static char __pyx_k__np[] = "np"; +static char __pyx_k__buf[] = "buf"; +static char __pyx_k__dot[] = "dot"; +static char __pyx_k__obj[] = "obj"; +static char __pyx_k__sum[] = "sum"; +static char __pyx_k__axis[] = "axis"; +static char __pyx_k__base[] = "base"; +static char __pyx_k__beta[] = "beta"; +static char __pyx_k__ndim[] = "ndim"; +static char __pyx_k__alpha[] = "alpha"; +static char __pyx_k__coef_[] = "coef_"; +static char __pyx_k__descr[] = "descr"; +static char __pyx_k__empty[] = "empty"; +static char __pyx_k__maxit[] = "maxit"; +static char __pyx_k__model[] = "model"; +static char __pyx_k__names[] = "names"; +static char __pyx_k__numpy[] = "numpy"; +static char __pyx_k__range[] = "range"; +static char __pyx_k__shape[] = "shape"; +static char __pyx_k__fields[] = "fields"; +static char __pyx_k__format[] = "format"; +static char __pyx_k__linalg[] = "linalg"; +static char __pyx_k__xrange[] = "xrange"; +static char __pyx_k__strides[] = "strides"; +static char __pyx_k____main__[] = "__main__"; +static char __pyx_k____test__[] = "__test__"; +static char __pyx_k__itemsize[] = "itemsize"; +static char __pyx_k__readonly[] = "readonly"; +static char __pyx_k__type_num[] = "type_num"; +static char __pyx_k__byteorder[] = "byteorder"; +static char __pyx_k__callbacks[] = "callbacks"; +static char __pyx_k__ValueError[] = "ValueError"; +static char __pyx_k__suboffsets[] = "suboffsets"; +static char __pyx_k__RuntimeError[] = "RuntimeError"; +static PyObject *__pyx_kp_u_1; +static PyObject *__pyx_n_s_10; +static PyObject *__pyx_kp_u_2; +static PyObject *__pyx_kp_u_3; +static PyObject *__pyx_kp_u_4; +static PyObject *__pyx_kp_u_5; +static PyObject *__pyx_kp_u_6; +static PyObject *__pyx_n_s_7; +static PyObject *__pyx_n_s_8; +static PyObject *__pyx_kp_u_9; +static PyObject *__pyx_n_s__R; +static PyObject *__pyx_n_s__RuntimeError; +static PyObject *__pyx_n_s__ValueError; +static PyObject *__pyx_n_s__X; +static PyObject *__pyx_n_s____main__; +static PyObject *__pyx_n_s____test__; +static PyObject *__pyx_n_s__alpha; +static PyObject *__pyx_n_s__axis; +static PyObject *__pyx_n_s__base; +static PyObject *__pyx_n_s__beta; +static PyObject *__pyx_n_s__buf; +static PyObject *__pyx_n_s__byteorder; +static PyObject *__pyx_n_s__callbacks; +static PyObject *__pyx_n_s__coef_; +static PyObject *__pyx_n_s__descr; +static PyObject *__pyx_n_s__dot; +static PyObject *__pyx_n_s__empty; +static PyObject *__pyx_n_s__fields; +static PyObject *__pyx_n_s__format; +static PyObject *__pyx_n_s__itemsize; +static PyObject *__pyx_n_s__linalg; +static PyObject *__pyx_n_s__maxit; +static PyObject *__pyx_n_s__model; +static PyObject *__pyx_n_s__names; +static PyObject *__pyx_n_s__ndim; +static PyObject *__pyx_n_s__np; +static PyObject *__pyx_n_s__numpy; +static PyObject *__pyx_n_s__obj; +static PyObject *__pyx_n_s__range; +static PyObject *__pyx_n_s__readonly; +static PyObject *__pyx_n_s__shape; +static PyObject *__pyx_n_s__strides; +static PyObject *__pyx_n_s__suboffsets; +static PyObject *__pyx_n_s__sum; +static PyObject *__pyx_n_s__type_num; +static PyObject *__pyx_n_s__w; +static PyObject *__pyx_n_s__xrange; +static PyObject *__pyx_n_s__y; +static PyObject *__pyx_int_0; +static PyObject *__pyx_int_2; +static PyObject *__pyx_int_15; + +/* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":18 * double rand() * + * cdef inline double fmax(double x, double y): # <<<<<<<<<<<<<< + * if x > y: return x + * return y + */ + +static CYTHON_INLINE double __pyx_f_12enet_cd_fast_fmax(double __pyx_v_x, double __pyx_v_y) { + double __pyx_r; + int __pyx_t_1; + __Pyx_RefNannySetupContext("fmax"); + + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":19 + * + * cdef inline double fmax(double x, double y): + * if x > y: return x # <<<<<<<<<<<<<< + * return y + * + */ + __pyx_t_1 = (__pyx_v_x > __pyx_v_y); + if (__pyx_t_1) { + __pyx_r = __pyx_v_x; + goto __pyx_L0; + goto __pyx_L3; + } + __pyx_L3:; + + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":20 + * cdef inline double fmax(double x, double y): + * if x > y: return x + * return y # <<<<<<<<<<<<<< + * + * cdef inline double fsign(double f): + */ + __pyx_r = __pyx_v_y; + goto __pyx_L0; + + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":22 + * return y + * * cdef inline double fsign(double f): # <<<<<<<<<<<<<< * if f == 0: * return 0 */ -static INLINE double __pyx_f_12enet_cd_fast_fsign(double __pyx_v_f) { +static CYTHON_INLINE double __pyx_f_12enet_cd_fast_fsign(double __pyx_v_f) { double __pyx_r; int __pyx_t_1; - __Pyx_SetupRefcountContext("fsign"); + __Pyx_RefNannySetupContext("fsign"); - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":19 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":23 * * cdef inline double fsign(double f): * if f == 0: # <<<<<<<<<<<<<< @@ -842,7 +837,7 @@ static INLINE double __pyx_f_12enet_cd_fast_fsign(double __pyx_v_f) { __pyx_t_1 = (__pyx_v_f == 0); if (__pyx_t_1) { - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":20 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":24 * cdef inline double fsign(double f): * if f == 0: * return 0 # <<<<<<<<<<<<<< @@ -854,7 +849,7 @@ static INLINE double __pyx_f_12enet_cd_fast_fsign(double __pyx_v_f) { goto __pyx_L3; } - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":21 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":25 * if f == 0: * return 0 * elif f > 0: # <<<<<<<<<<<<<< @@ -864,7 +859,7 @@ static INLINE double __pyx_f_12enet_cd_fast_fsign(double __pyx_v_f) { __pyx_t_1 = (__pyx_v_f > 0); if (__pyx_t_1) { - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":22 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":26 * return 0 * elif f > 0: * return 1.0 # <<<<<<<<<<<<<< @@ -877,7 +872,7 @@ static INLINE double __pyx_f_12enet_cd_fast_fsign(double __pyx_v_f) { } /*else*/ { - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":24 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":28 * return 1.0 * else: * return -1.0 # <<<<<<<<<<<<<< @@ -891,13 +886,13 @@ static INLINE double __pyx_f_12enet_cd_fast_fsign(double __pyx_v_f) { __pyx_r = 0; __pyx_L0:; - __Pyx_FinishRefcountContext(); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":30 - * @cython.boundscheck(False) - * @cython.wraparound(False) +/* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":34 + * # @cython.boundscheck(False) + * # @cython.wraparound(False) * def enet_coordinate_descent(model, # <<<<<<<<<<<<<< * np.ndarray[DOUBLE, ndim=2] X, * np.ndarray[DOUBLE, ndim=1] y, @@ -910,8 +905,8 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx PyArrayObject *__pyx_v_X = 0; PyArrayObject *__pyx_v_y = 0; unsigned int __pyx_v_maxit; - float __pyx_v_alpha; - float __pyx_v_beta; + double __pyx_v_alpha; + double __pyx_v_beta; PyArrayObject *__pyx_v_w = 0; PyObject *__pyx_v_callbacks; unsigned int __pyx_v_nsamples; @@ -919,8 +914,8 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx unsigned int __pyx_v_nclasses; PyArrayObject *__pyx_v_norm_cols_X = 0; PyArrayObject *__pyx_v_R = 0; - float __pyx_v_tmp; - float __pyx_v_w_ii; + double __pyx_v_tmp; + double __pyx_v_w_ii; unsigned int __pyx_v_ii; unsigned int __pyx_v_jj; unsigned int __pyx_v_n_iter; @@ -944,22 +939,21 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx Py_ssize_t __pyx_bshape_0_X = 0; Py_ssize_t __pyx_bshape_1_X = 0; PyObject *__pyx_r = NULL; - PyObject *__pyx_1 = 0; PyObject *__pyx_t_1 = NULL; - float __pyx_t_2; + double __pyx_t_2; PyArrayObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyArrayObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_5 = NULL; + PyArrayObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; unsigned int __pyx_t_9; unsigned int __pyx_t_10; unsigned int __pyx_t_11; - int __pyx_t_12; + unsigned int __pyx_t_12; unsigned int __pyx_t_13; - unsigned int __pyx_t_14; - unsigned int __pyx_t_15; + int __pyx_t_14; + int __pyx_t_15; unsigned int __pyx_t_16; unsigned int __pyx_t_17; unsigned int __pyx_t_18; @@ -969,13 +963,18 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx unsigned int __pyx_t_22; unsigned int __pyx_t_23; unsigned int __pyx_t_24; - unsigned int __pyx_t_25; + __pyx_t_12enet_cd_fast_DOUBLE __pyx_t_25; unsigned int __pyx_t_26; unsigned int __pyx_t_27; unsigned int __pyx_t_28; - int __pyx_t_29; - static PyObject **__pyx_pyargnames[] = {&__pyx_kp_model,&__pyx_kp_X,&__pyx_kp_y,&__pyx_kp_maxit,0}; - __Pyx_SetupRefcountContext("enet_coordinate_descent"); + unsigned int __pyx_t_29; + unsigned int __pyx_t_30; + unsigned int __pyx_t_31; + unsigned int __pyx_t_32; + PyObject *__pyx_t_33 = NULL; + int __pyx_t_34; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__model,&__pyx_n_s__X,&__pyx_n_s__y,&__pyx_n_s__maxit,0}; + __Pyx_RefNannySetupContext("enet_coordinate_descent"); __pyx_self = __pyx_self; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); @@ -990,50 +989,53 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx } switch (PyTuple_GET_SIZE(__pyx_args)) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_model); + values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__model); if (likely(values[0])) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_X); + values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__X); if (likely(values[1])) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("enet_coordinate_descent", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("enet_coordinate_descent", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: - values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_y); + values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y); if (likely(values[2])) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("enet_coordinate_descent", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("enet_coordinate_descent", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: - values[3] = PyDict_GetItem(__pyx_kwds, __pyx_kp_maxit); + values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__maxit); if (likely(values[3])) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("enet_coordinate_descent", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("enet_coordinate_descent", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "enet_coordinate_descent") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "enet_coordinate_descent") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __pyx_v_model = values[0]; __pyx_v_X = ((PyArrayObject *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); - __pyx_v_maxit = __Pyx_PyInt_AsUnsignedInt(values[3]); if (unlikely((__pyx_v_maxit == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_maxit = __Pyx_PyInt_AsUnsignedInt(values[3]); if (unlikely((__pyx_v_maxit == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { __pyx_v_model = PyTuple_GET_ITEM(__pyx_args, 0); __pyx_v_X = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1)); __pyx_v_y = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2)); - __pyx_v_maxit = __Pyx_PyInt_AsUnsignedInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_maxit == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_maxit = __Pyx_PyInt_AsUnsignedInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_maxit == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("enet_coordinate_descent", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("enet_coordinate_descent", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("enet_cd_fast.enet_coordinate_descent"); return NULL; __pyx_L4_argument_unpacking_done:; + __Pyx_INCREF(__pyx_v_model); + __Pyx_INCREF((PyObject *)__pyx_v_X); + __Pyx_INCREF((PyObject *)__pyx_v_y); __pyx_v_callbacks = Py_None; __Pyx_INCREF(Py_None); __pyx_v_callback = Py_None; __Pyx_INCREF(Py_None); __pyx_v_goon = Py_None; __Pyx_INCREF(Py_None); @@ -1042,63 +1044,63 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx __pyx_bstruct_R.buf = NULL; __pyx_bstruct_X.buf = NULL; __pyx_bstruct_y.buf = NULL; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_X), __pyx_ptype_5numpy_ndarray, 1, "X", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_X), __pyx_ptype_5numpy_ndarray, 1, "X", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_X, (PyObject*)__pyx_v_X, &__Pyx_TypeInfo_nn___pyx_t_12enet_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_X, (PyObject*)__pyx_v_X, &__Pyx_TypeInfo_nn___pyx_t_12enet_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_bstride_0_X = __pyx_bstruct_X.strides[0]; __pyx_bstride_1_X = __pyx_bstruct_X.strides[1]; __pyx_bshape_0_X = __pyx_bstruct_X.shape[0]; __pyx_bshape_1_X = __pyx_bstruct_X.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_y, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_12enet_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_y, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_12enet_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_bstride_0_y = __pyx_bstruct_y.strides[0]; __pyx_bshape_0_y = __pyx_bstruct_y.shape[0]; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":39 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":43 * * # get the data information into easy vars - * cdef float alpha = model.alpha # <<<<<<<<<<<<<< - * cdef float beta = model.beta + * cdef double alpha = model.alpha # <<<<<<<<<<<<<< + * cdef double beta = model.beta * cdef np.ndarray[DOUBLE, ndim=1] w = model.coef_ */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_model, __pyx_kp_alpha); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_v_model, __pyx_n_s__alpha); 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); - __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_alpha = __pyx_t_2; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":40 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":44 * # get the data information into easy vars - * cdef float alpha = model.alpha - * cdef float beta = model.beta # <<<<<<<<<<<<<< + * cdef double alpha = model.alpha + * cdef double beta = model.beta # <<<<<<<<<<<<<< * cdef np.ndarray[DOUBLE, ndim=1] w = model.coef_ * callbacks = model.callbacks */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_model, __pyx_kp_beta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_v_model, __pyx_n_s__beta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_beta = __pyx_t_2; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":41 - * cdef float alpha = model.alpha - * cdef float beta = model.beta + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":45 + * cdef double alpha = model.alpha + * cdef double beta = model.beta * cdef np.ndarray[DOUBLE, ndim=1] w = model.coef_ # <<<<<<<<<<<<<< * callbacks = model.callbacks * */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_model, __pyx_kp_coef_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_v_model, __pyx_n_s__coef_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_w, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_12enet_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_w = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_w.buf = NULL; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_w = __pyx_bstruct_w.strides[0]; __pyx_bshape_0_w = __pyx_bstruct_w.shape[0]; } @@ -1107,20 +1109,20 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx __pyx_v_w = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":42 - * cdef float beta = model.beta + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":46 + * cdef double beta = model.beta * cdef np.ndarray[DOUBLE, ndim=1] w = model.coef_ * callbacks = model.callbacks # <<<<<<<<<<<<<< * * cdef unsigned int nsamples = X.shape[0] */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_model, __pyx_kp_callbacks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_v_model, __pyx_n_s__callbacks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_v_callbacks); __pyx_v_callbacks = __pyx_t_1; __pyx_t_1 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":44 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":48 * callbacks = model.callbacks * * cdef unsigned int nsamples = X.shape[0] # <<<<<<<<<<<<<< @@ -1129,7 +1131,7 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx */ __pyx_v_nsamples = (__pyx_v_X->dimensions[0]); - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":45 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":49 * * cdef unsigned int nsamples = X.shape[0] * cdef unsigned int nfeatures = X.shape[1] # <<<<<<<<<<<<<< @@ -1138,7 +1140,7 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx */ __pyx_v_nfeatures = (__pyx_v_X->dimensions[1]); - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":46 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":50 * cdef unsigned int nsamples = X.shape[0] * cdef unsigned int nfeatures = X.shape[1] * cdef unsigned int nclasses = w.shape[1] # <<<<<<<<<<<<<< @@ -1147,124 +1149,124 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx */ __pyx_v_nclasses = (__pyx_v_w->dimensions[1]); - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":49 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":53 * * # compute norms of the columns of X * cdef np.ndarray[DOUBLE, ndim=1] norm_cols_X = (X**2).sum(axis=0) # <<<<<<<<<<<<<< * * # initial value of the residuals */ - __pyx_t_1 = PyNumber_Power(((PyObject *)__pyx_v_X), __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Power(((PyObject *)__pyx_v_X), __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_kp_sum); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__sum); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_1)); - if (PyDict_SetItem(__pyx_1, __pyx_kp_axis, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__axis), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; - if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_5 = ((PyArrayObject *)__pyx_t_1); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_norm_cols_X, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_12enet_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_norm_cols_X, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_12enet_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_norm_cols_X = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_norm_cols_X.buf = NULL; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_norm_cols_X = __pyx_bstruct_norm_cols_X.strides[0]; __pyx_bshape_0_norm_cols_X = __pyx_bstruct_norm_cols_X.shape[0]; } } + __pyx_t_6 = 0; + __pyx_v_norm_cols_X = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_norm_cols_X = ((PyArrayObject *)__pyx_t_1); - __pyx_t_1 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":52 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":56 * * # initial value of the residuals * cdef np.ndarray[DOUBLE, ndim=1] R = np.empty(nfeatures + nsamples) # <<<<<<<<<<<<<< * R[:nsamples] = y - np.dot(X, w) * R[nsamples:] = - sqrt(beta) * w */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_t_4 = PyLong_FromUnsignedLong((__pyx_v_nfeatures + __pyx_v_nsamples)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyLong_FromUnsignedLong((__pyx_v_nfeatures + __pyx_v_nsamples)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_7 = ((PyArrayObject *)__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_R, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_12enet_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_R = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_R.buf = NULL; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_R = __pyx_bstruct_R.strides[0]; __pyx_bshape_0_R = __pyx_bstruct_R.shape[0]; } } __pyx_t_7 = 0; - __pyx_v_R = ((PyArrayObject *)__pyx_t_4); - __pyx_t_4 = 0; + __pyx_v_R = ((PyArrayObject *)__pyx_t_5); + __pyx_t_5 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":53 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":57 * # initial value of the residuals * cdef np.ndarray[DOUBLE, ndim=1] R = np.empty(nfeatures + nsamples) * R[:nsamples] = y - np.dot(X, w) # <<<<<<<<<<<<<< * R[nsamples:] = - sqrt(beta) * w * */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - __pyx_t_4 = PyObject_GetAttr(__pyx_1, __pyx_kp_dot); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__dot); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_X)); - PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_X)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_X)); __Pyx_GIVEREF(((PyObject *)__pyx_v_X)); __Pyx_INCREF(((PyObject *)__pyx_v_w)); - PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_w)); + PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_w)); __Pyx_GIVEREF(((PyObject *)__pyx_v_w)); - __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Subtract(((PyObject *)__pyx_v_y), __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyNumber_Subtract(((PyObject *)__pyx_v_y), __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PySequence_SetSlice(((PyObject *)__pyx_v_R), 0, __pyx_v_nsamples, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PySequence_SetSlice(((PyObject *)__pyx_v_R), 0, __pyx_v_nsamples, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":54 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":58 * cdef np.ndarray[DOUBLE, ndim=1] R = np.empty(nfeatures + nsamples) * R[:nsamples] = y - np.dot(X, w) * R[nsamples:] = - sqrt(beta) * w # <<<<<<<<<<<<<< * - * cdef float tmp + * cdef double tmp */ - __pyx_t_6 = PyFloat_FromDouble((-sqrt(__pyx_v_beta))); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyNumber_Multiply(__pyx_t_6, ((PyObject *)__pyx_v_w)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyFloat_FromDouble((-sqrt(__pyx_v_beta))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyNumber_Multiply(__pyx_t_5, ((PyObject *)__pyx_v_w)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PySequence_SetSlice(((PyObject *)__pyx_v_R), __pyx_v_nsamples, PY_SSIZE_T_MAX, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PySequence_SetSlice(((PyObject *)__pyx_v_R), __pyx_v_nsamples, PY_SSIZE_T_MAX, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":62 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":66 * cdef unsigned int n_iter * * for callback in callbacks: # <<<<<<<<<<<<<< @@ -1274,137 +1276,165 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx if (PyList_CheckExact(__pyx_v_callbacks) || PyTuple_CheckExact(__pyx_v_callbacks)) { __pyx_t_8 = 0; __pyx_t_1 = __pyx_v_callbacks; __Pyx_INCREF(__pyx_t_1); } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_callbacks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_callbacks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } for (;;) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; } else if (likely(PyTuple_CheckExact(__pyx_t_1))) { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; } else { - __pyx_t_6 = PyIter_Next(__pyx_t_1); - if (!__pyx_t_6) { - if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyIter_Next(__pyx_t_1); + if (!__pyx_t_5) { + if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } - __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_v_callback); - __pyx_v_callback = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_v_callback = __pyx_t_5; + __pyx_t_5 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":63 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":67 * * for callback in callbacks: * callback(0) # Init callback # <<<<<<<<<<<<<< * * goon = True */ - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_0); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - __pyx_t_4 = PyObject_Call(__pyx_v_callback, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_v_callback, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":65 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":69 * callback(0) # Init callback * * goon = True # <<<<<<<<<<<<<< * for n_iter in range(maxit): * for ii in xrange(nfeatures): # Loop over coordinates */ - __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_v_goon); __pyx_v_goon = __pyx_t_1; __pyx_t_1 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":66 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":70 * * goon = True * for n_iter in range(maxit): # <<<<<<<<<<<<<< * for ii in xrange(nfeatures): # Loop over coordinates * w_ii = w[ii] # Store previous value */ - for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_v_maxit; __pyx_t_9+=1) { - __pyx_v_n_iter = __pyx_t_9; + __pyx_t_9 = __pyx_v_maxit; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_n_iter = __pyx_t_10; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":67 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":71 * goon = True * for n_iter in range(maxit): * for ii in xrange(nfeatures): # Loop over coordinates # <<<<<<<<<<<<<< * w_ii = w[ii] # Store previous value * */ - for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_v_nfeatures; __pyx_t_10+=1) { - __pyx_v_ii = __pyx_t_10; + __pyx_t_11 = __pyx_v_nfeatures; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ii = __pyx_t_12; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":68 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":72 * for n_iter in range(maxit): * for ii in xrange(nfeatures): # Loop over coordinates * w_ii = w[ii] # Store previous value # <<<<<<<<<<<<<< * * if w_ii != 0.0: */ - __pyx_t_11 = __pyx_v_ii; - __pyx_v_w_ii = (*__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_11, __pyx_bstride_0_w)); + __pyx_t_13 = __pyx_v_ii; + __pyx_t_14 = -1; + if (unlikely(__pyx_t_13 >= __pyx_bshape_0_w)) __pyx_t_14 = 0; + if (unlikely(__pyx_t_14 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_14); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_v_w_ii = (*__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_13, __pyx_bstride_0_w)); - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":70 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":74 * w_ii = w[ii] # Store previous value * * if w_ii != 0.0: # <<<<<<<<<<<<<< * # R += w_ii * X[:,ii] * for jj in range(nsamples): */ - __pyx_t_12 = (__pyx_v_w_ii != 0.0); - if (__pyx_t_12) { + __pyx_t_15 = (__pyx_v_w_ii != 0.0); + if (__pyx_t_15) { - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":72 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":76 * if w_ii != 0.0: * # R += w_ii * X[:,ii] * for jj in range(nsamples): # <<<<<<<<<<<<<< * R[jj] += w_ii * X[jj,ii] * R[nsamples+ii] += w_ii * sqrt(beta) */ - for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_v_nsamples; __pyx_t_13+=1) { - __pyx_v_jj = __pyx_t_13; + __pyx_t_16 = __pyx_v_nsamples; + for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { + __pyx_v_jj = __pyx_t_17; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":73 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":77 * # R += w_ii * X[:,ii] * for jj in range(nsamples): * R[jj] += w_ii * X[jj,ii] # <<<<<<<<<<<<<< * R[nsamples+ii] += w_ii * sqrt(beta) * */ - __pyx_t_14 = __pyx_v_jj; - __pyx_t_15 = __pyx_v_ii; - __pyx_t_16 = __pyx_v_jj; - *__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_16, __pyx_bstride_0_R) += (__pyx_v_w_ii * (*__Pyx_BufPtrStrided2d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_X.buf, __pyx_t_14, __pyx_bstride_0_X, __pyx_t_15, __pyx_bstride_1_X))); + __pyx_t_18 = __pyx_v_jj; + __pyx_t_19 = __pyx_v_ii; + __pyx_t_14 = -1; + if (unlikely(__pyx_t_18 >= __pyx_bshape_0_X)) __pyx_t_14 = 0; + if (unlikely(__pyx_t_19 >= __pyx_bshape_1_X)) __pyx_t_14 = 1; + if (unlikely(__pyx_t_14 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_14); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_20 = __pyx_v_jj; + __pyx_t_14 = -1; + if (unlikely(__pyx_t_20 >= __pyx_bshape_0_R)) __pyx_t_14 = 0; + if (unlikely(__pyx_t_14 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_14); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_20, __pyx_bstride_0_R) += (__pyx_v_w_ii * (*__Pyx_BufPtrStrided2d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_X.buf, __pyx_t_18, __pyx_bstride_0_X, __pyx_t_19, __pyx_bstride_1_X))); } - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":74 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":78 * for jj in range(nsamples): * R[jj] += w_ii * X[jj,ii] * R[nsamples+ii] += w_ii * sqrt(beta) # <<<<<<<<<<<<<< * * # tmp = (X[:,ii]*R).sum() */ - __pyx_t_13 = (__pyx_v_nsamples + __pyx_v_ii); - *__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_13, __pyx_bstride_0_R) += (__pyx_v_w_ii * sqrt(__pyx_v_beta)); + __pyx_t_16 = (__pyx_v_nsamples + __pyx_v_ii); + __pyx_t_14 = -1; + if (unlikely(__pyx_t_16 >= __pyx_bshape_0_R)) __pyx_t_14 = 0; + if (unlikely(__pyx_t_14 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_14); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_16, __pyx_bstride_0_R) += (__pyx_v_w_ii * sqrt(__pyx_v_beta)); goto __pyx_L12; } __pyx_L12:; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":77 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":81 * * # tmp = (X[:,ii]*R).sum() * tmp = 0.0 # <<<<<<<<<<<<<< @@ -1413,30 +1443,53 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx */ __pyx_v_tmp = 0.0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":78 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":82 * # tmp = (X[:,ii]*R).sum() * tmp = 0.0 * for jj in range(nsamples): # <<<<<<<<<<<<<< * tmp += R[jj] * X[jj,ii] * */ - for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_v_nsamples; __pyx_t_17+=1) { - __pyx_v_jj = __pyx_t_17; + __pyx_t_17 = __pyx_v_nsamples; + for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_17; __pyx_t_21+=1) { + __pyx_v_jj = __pyx_t_21; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":79 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":83 * tmp = 0.0 * for jj in range(nsamples): * tmp += R[jj] * X[jj,ii] # <<<<<<<<<<<<<< * * w[ii] = fsign(tmp) * fmax(fabs(tmp) - alpha, 0) \ */ - __pyx_t_18 = __pyx_v_jj; - __pyx_t_19 = __pyx_v_jj; - __pyx_t_20 = __pyx_v_ii; - __pyx_v_tmp += ((*__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_18, __pyx_bstride_0_R)) * (*__Pyx_BufPtrStrided2d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_X.buf, __pyx_t_19, __pyx_bstride_0_X, __pyx_t_20, __pyx_bstride_1_X))); + __pyx_t_22 = __pyx_v_jj; + __pyx_t_14 = -1; + if (unlikely(__pyx_t_22 >= __pyx_bshape_0_R)) __pyx_t_14 = 0; + if (unlikely(__pyx_t_14 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_14); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_23 = __pyx_v_jj; + __pyx_t_24 = __pyx_v_ii; + __pyx_t_14 = -1; + if (unlikely(__pyx_t_23 >= __pyx_bshape_0_X)) __pyx_t_14 = 0; + if (unlikely(__pyx_t_24 >= __pyx_bshape_1_X)) __pyx_t_14 = 1; + if (unlikely(__pyx_t_14 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_14); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_v_tmp += ((*__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_22, __pyx_bstride_0_R)) * (*__Pyx_BufPtrStrided2d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_X.buf, __pyx_t_23, __pyx_bstride_0_X, __pyx_t_24, __pyx_bstride_1_X))); } - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":82 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":85 + * tmp += R[jj] * X[jj,ii] + * + * w[ii] = fsign(tmp) * fmax(fabs(tmp) - alpha, 0) \ # <<<<<<<<<<<<<< + * / (norm_cols_X[ii] + beta) + * + */ + __pyx_t_2 = (__pyx_f_12enet_cd_fast_fsign(__pyx_v_tmp) * __pyx_f_12enet_cd_fast_fmax((fabs(__pyx_v_tmp) - __pyx_v_alpha), 0)); + + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":86 * * w[ii] = fsign(tmp) * fmax(fabs(tmp) - alpha, 0) \ * / (norm_cols_X[ii] + beta) # <<<<<<<<<<<<<< @@ -1444,8 +1497,19 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx * if w[ii] != 0.0: */ __pyx_t_17 = __pyx_v_ii; + __pyx_t_14 = -1; + if (unlikely(__pyx_t_17 >= __pyx_bshape_0_norm_cols_X)) __pyx_t_14 = 0; + if (unlikely(__pyx_t_14 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_14); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_25 = ((*__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_norm_cols_X.buf, __pyx_t_17, __pyx_bstride_0_norm_cols_X)) + __pyx_v_beta); + if (unlikely(__pyx_t_25 == 0)) { + PyErr_Format(PyExc_ZeroDivisionError, "float division"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":81 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":85 * tmp += R[jj] * X[jj,ii] * * w[ii] = fsign(tmp) * fmax(fabs(tmp) - alpha, 0) \ # <<<<<<<<<<<<<< @@ -1453,59 +1517,103 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx * */ __pyx_t_21 = __pyx_v_ii; - *__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_21, __pyx_bstride_0_w) = ((__pyx_f_12enet_cd_fast_fsign(__pyx_v_tmp) * fmax((fabs(__pyx_v_tmp) - __pyx_v_alpha), 0)) / ((*__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_norm_cols_X.buf, __pyx_t_17, __pyx_bstride_0_norm_cols_X)) + __pyx_v_beta)); + __pyx_t_14 = -1; + if (unlikely(__pyx_t_21 >= __pyx_bshape_0_w)) __pyx_t_14 = 0; + if (unlikely(__pyx_t_14 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_14); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_21, __pyx_bstride_0_w) = (__pyx_t_2 / __pyx_t_25); - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":84 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":88 * / (norm_cols_X[ii] + beta) * * if w[ii] != 0.0: # <<<<<<<<<<<<<< * # R -= w[ii] * X[:,ii] # Update residual * for jj in range(nsamples): */ - __pyx_t_22 = __pyx_v_ii; - __pyx_t_12 = ((*__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_22, __pyx_bstride_0_w)) != 0.0); - if (__pyx_t_12) { + __pyx_t_26 = __pyx_v_ii; + __pyx_t_14 = -1; + if (unlikely(__pyx_t_26 >= __pyx_bshape_0_w)) __pyx_t_14 = 0; + if (unlikely(__pyx_t_14 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_14); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_15 = ((*__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_26, __pyx_bstride_0_w)) != 0.0); + if (__pyx_t_15) { - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":86 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":90 * if w[ii] != 0.0: * # R -= w[ii] * X[:,ii] # Update residual * for jj in range(nsamples): # <<<<<<<<<<<<<< * R[jj] -= w[ii] * X[jj,ii] # Update residual * R[nsamples+ii] -= w[ii] * sqrt(beta) */ - for (__pyx_t_23 = 0; __pyx_t_23 < __pyx_v_nsamples; __pyx_t_23+=1) { - __pyx_v_jj = __pyx_t_23; + __pyx_t_27 = __pyx_v_nsamples; + for (__pyx_t_28 = 0; __pyx_t_28 < __pyx_t_27; __pyx_t_28+=1) { + __pyx_v_jj = __pyx_t_28; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":87 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":91 * # R -= w[ii] * X[:,ii] # Update residual * for jj in range(nsamples): * R[jj] -= w[ii] * X[jj,ii] # Update residual # <<<<<<<<<<<<<< * R[nsamples+ii] -= w[ii] * sqrt(beta) * */ - __pyx_t_24 = __pyx_v_ii; - __pyx_t_25 = __pyx_v_jj; - __pyx_t_26 = __pyx_v_ii; - __pyx_t_27 = __pyx_v_jj; - *__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_27, __pyx_bstride_0_R) -= ((*__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_24, __pyx_bstride_0_w)) * (*__Pyx_BufPtrStrided2d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_X.buf, __pyx_t_25, __pyx_bstride_0_X, __pyx_t_26, __pyx_bstride_1_X))); + __pyx_t_29 = __pyx_v_ii; + __pyx_t_14 = -1; + if (unlikely(__pyx_t_29 >= __pyx_bshape_0_w)) __pyx_t_14 = 0; + if (unlikely(__pyx_t_14 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_14); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_30 = __pyx_v_jj; + __pyx_t_31 = __pyx_v_ii; + __pyx_t_14 = -1; + if (unlikely(__pyx_t_30 >= __pyx_bshape_0_X)) __pyx_t_14 = 0; + if (unlikely(__pyx_t_31 >= __pyx_bshape_1_X)) __pyx_t_14 = 1; + if (unlikely(__pyx_t_14 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_14); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_32 = __pyx_v_jj; + __pyx_t_14 = -1; + if (unlikely(__pyx_t_32 >= __pyx_bshape_0_R)) __pyx_t_14 = 0; + if (unlikely(__pyx_t_14 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_14); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_32, __pyx_bstride_0_R) -= ((*__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_29, __pyx_bstride_0_w)) * (*__Pyx_BufPtrStrided2d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_X.buf, __pyx_t_30, __pyx_bstride_0_X, __pyx_t_31, __pyx_bstride_1_X))); } - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":88 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":92 * for jj in range(nsamples): * R[jj] -= w[ii] * X[jj,ii] # Update residual * R[nsamples+ii] -= w[ii] * sqrt(beta) # <<<<<<<<<<<<<< * * for callback in callbacks: */ - __pyx_t_23 = __pyx_v_ii; + __pyx_t_27 = __pyx_v_ii; + __pyx_t_14 = -1; + if (unlikely(__pyx_t_27 >= __pyx_bshape_0_w)) __pyx_t_14 = 0; + if (unlikely(__pyx_t_14 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_14); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } __pyx_t_28 = (__pyx_v_nsamples + __pyx_v_ii); - *__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_28, __pyx_bstride_0_R) -= ((*__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_23, __pyx_bstride_0_w)) * sqrt(__pyx_v_beta)); + __pyx_t_14 = -1; + if (unlikely(__pyx_t_28 >= __pyx_bshape_0_R)) __pyx_t_14 = 0; + if (unlikely(__pyx_t_14 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_14); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + *__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_28, __pyx_bstride_0_R) -= ((*__Pyx_BufPtrStrided1d(__pyx_t_12enet_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_27, __pyx_bstride_0_w)) * sqrt(__pyx_v_beta)); goto __pyx_L17; } __pyx_L17:; } - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":90 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":94 * R[nsamples+ii] -= w[ii] * sqrt(beta) * * for callback in callbacks: # <<<<<<<<<<<<<< @@ -1515,7 +1623,7 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx if (PyList_CheckExact(__pyx_v_callbacks) || PyTuple_CheckExact(__pyx_v_callbacks)) { __pyx_t_8 = 0; __pyx_t_1 = __pyx_v_callbacks; __Pyx_INCREF(__pyx_t_1); } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_callbacks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_callbacks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); } for (;;) { @@ -1528,7 +1636,7 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx } else { __pyx_t_4 = PyIter_Next(__pyx_t_1); if (!__pyx_t_4) { - if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } __Pyx_GOTREF(__pyx_t_4); @@ -1537,76 +1645,76 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx __pyx_v_callback = __pyx_t_4; __pyx_t_4 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":91 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":95 * * for callback in callbacks: * if not callback(n_iter, X=X, y=y, w=w, alpha=alpha, beta=beta, R=R): # <<<<<<<<<<<<<< * goon *= False * */ - __pyx_t_4 = PyLong_FromUnsignedLong(__pyx_v_n_iter); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyLong_FromUnsignedLong(__pyx_v_n_iter); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_1)); - if (PyDict_SetItem(__pyx_1, __pyx_kp_X, ((PyObject *)__pyx_v_X)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_y, ((PyObject *)__pyx_v_y)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_w, ((PyObject *)__pyx_v_w)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = PyFloat_FromDouble(__pyx_v_alpha); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_1, __pyx_kp_alpha, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyFloat_FromDouble(__pyx_v_beta); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_1, __pyx_kp_beta, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_1, __pyx_kp_R, ((PyObject *)__pyx_v_R)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_v_callback, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_29 = (!__pyx_t_12); - if (__pyx_t_29) { + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__X), ((PyObject *)__pyx_v_X)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__y), ((PyObject *)__pyx_v_y)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__w), ((PyObject *)__pyx_v_w)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_33 = PyFloat_FromDouble(__pyx_v_alpha); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_33); + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__alpha), __pyx_t_33) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; + __pyx_t_33 = PyFloat_FromDouble(__pyx_v_beta); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_33); + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__beta), __pyx_t_33) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__R), ((PyObject *)__pyx_v_R)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_33 = PyEval_CallObjectWithKeywords(__pyx_v_callback, __pyx_t_5, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_33); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_33); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; + __pyx_t_34 = (!__pyx_t_15); + if (__pyx_t_34) { - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":92 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":96 * for callback in callbacks: * if not callback(n_iter, X=X, y=y, w=w, alpha=alpha, beta=beta, R=R): * goon *= False # <<<<<<<<<<<<<< * * if not goon: */ - __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_33 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_33); + __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_goon, __pyx_t_33); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_1 = PyNumber_InPlaceMultiply(__pyx_v_goon, __pyx_t_4); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; __Pyx_DECREF(__pyx_v_goon); - __pyx_v_goon = __pyx_1; - __pyx_1 = 0; + __pyx_v_goon = __pyx_t_4; + __pyx_t_4 = 0; goto __pyx_L22; } __pyx_L22:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":94 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":98 * goon *= False * * if not goon: # <<<<<<<<<<<<<< * break * */ - __pyx_t_29 = __Pyx_PyObject_IsTrue(__pyx_v_goon); if (unlikely(__pyx_t_29 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_12 = (!__pyx_t_29); - if (__pyx_t_12) { + __pyx_t_34 = __Pyx_PyObject_IsTrue(__pyx_v_goon); if (unlikely(__pyx_t_34 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = (!__pyx_t_34); + if (__pyx_t_15) { - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":95 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":99 * * if not goon: * break # <<<<<<<<<<<<<< @@ -1620,7 +1728,7 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx } __pyx_L9_break:; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":97 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":101 * break * * return w # <<<<<<<<<<<<<< @@ -1633,10 +1741,10 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_1); __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_33); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_norm_cols_X); @@ -1661,12 +1769,15 @@ static PyObject *__pyx_pf_12enet_cd_fast_enet_coordinate_descent(PyObject *__pyx __Pyx_XDECREF((PyObject *)__pyx_v_R); __Pyx_DECREF(__pyx_v_callback); __Pyx_DECREF(__pyx_v_goon); + __Pyx_DECREF(__pyx_v_model); + __Pyx_DECREF((PyObject *)__pyx_v_X); + __Pyx_DECREF((PyObject *)__pyx_v_y); __Pyx_XGIVEREF(__pyx_r); - __Pyx_FinishRefcountContext(); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":65 +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":187 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -1688,18 +1799,21 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf int __pyx_v_hasfields; int __pyx_r; int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_t_5; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; int __pyx_t_6; - char *__pyx_t_7; - __Pyx_SetupRefcountContext("__getbuffer__"); + int __pyx_t_7; + int __pyx_t_8; + char *__pyx_t_9; + __Pyx_RefNannySetupContext("__getbuffer__"); if (__pyx_v_info == NULL) return 0; __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); + __Pyx_INCREF((PyObject *)__pyx_v_self); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":71 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":193 * # of flags * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -1708,7 +1822,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_endian_detector = 1; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":72 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":194 * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -1717,7 +1831,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":74 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":196 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -1726,7 +1840,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_ndim = PyArray_NDIM(((PyArrayObject *)__pyx_v_self)); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":76 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":198 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -1736,7 +1850,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); if (__pyx_t_1) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":77 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":199 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< @@ -1748,7 +1862,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":79 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":201 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< @@ -1759,96 +1873,100 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L5:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":81 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":203 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): - * raise ValueError("ndarray is not C contiguous") + * raise ValueError(u"ndarray is not C contiguous") */ - if (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS)) { + __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS); + if (__pyx_t_1) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":82 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":204 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< - * raise ValueError("ndarray is not C contiguous") + * raise ValueError(u"ndarray is not C contiguous") * */ - __pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_C_CONTIGUOUS)); + __pyx_t_2 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_C_CONTIGUOUS)); + __pyx_t_3 = __pyx_t_2; } else { - __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS); + __pyx_t_3 = __pyx_t_1; } - if (__pyx_t_1) { + if (__pyx_t_3) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":83 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":205 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): - * raise ValueError("ndarray is not C contiguous") # <<<<<<<<<<<<<< + * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_INCREF(__pyx_kp_1); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_1); - __Pyx_GIVEREF(__pyx_kp_1); - __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_1)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_1)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":85 - * raise ValueError("ndarray is not C contiguous") + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":207 + * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): - * raise ValueError("ndarray is not Fortran contiguous") + * raise ValueError(u"ndarray is not Fortran contiguous") */ - if (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS)) { + __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS); + if (__pyx_t_3) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":86 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":208 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< - * raise ValueError("ndarray is not Fortran contiguous") + * raise ValueError(u"ndarray is not Fortran contiguous") * */ __pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_F_CONTIGUOUS)); + __pyx_t_2 = __pyx_t_1; } else { - __pyx_t_1 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS); + __pyx_t_2 = __pyx_t_3; } - if (__pyx_t_1) { + if (__pyx_t_2) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":87 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":209 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): - * raise ValueError("ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< + * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __Pyx_INCREF(__pyx_kp_2); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_2); - __Pyx_GIVEREF(__pyx_kp_2); - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __Pyx_Raise(__pyx_t_2, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_2)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_2)); + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":89 - * raise ValueError("ndarray is not Fortran contiguous") + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":211 + * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim @@ -1856,7 +1974,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->buf = PyArray_DATA(((PyArrayObject *)__pyx_v_self)); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":90 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":212 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< @@ -1865,17 +1983,17 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->ndim = __pyx_v_ndim; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":91 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":213 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. This is allocated * # as one block, strides first. */ - __pyx_t_4 = __pyx_v_copy_shape; - if (__pyx_t_4) { + __pyx_t_6 = __pyx_v_copy_shape; + if (__pyx_t_6) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":94 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":216 * # Allocate new buffer for strides and shape info. This is allocated * # as one block, strides first. * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< @@ -1884,7 +2002,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * __pyx_v_ndim) * 2))); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":95 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":217 * # as one block, strides first. * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< @@ -1893,17 +2011,18 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":96 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":218 * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] */ - for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_v_ndim; __pyx_t_4+=1) { - __pyx_v_i = __pyx_t_4; + __pyx_t_6 = __pyx_v_ndim; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":97 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":219 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< @@ -1912,7 +2031,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":98 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":220 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< @@ -1925,7 +2044,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":100 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":222 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -1934,7 +2053,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":101 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":223 * else: * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -1945,7 +2064,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L8:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":102 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":224 * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) * info.shape = <Py_ssize_t*>PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< @@ -1954,7 +2073,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->suboffsets = NULL; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":103 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":225 * info.shape = <Py_ssize_t*>PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< @@ -1963,7 +2082,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(((PyArrayObject *)__pyx_v_self)); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":104 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":226 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< @@ -1972,7 +2091,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(((PyArrayObject *)__pyx_v_self))); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":107 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":229 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< @@ -1981,7 +2100,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_f = NULL; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":108 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":230 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< @@ -1991,7 +2110,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self)->descr)); __pyx_v_descr = ((PyArrayObject *)__pyx_v_self)->descr; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":112 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":234 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< @@ -2000,21 +2119,23 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":114 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":236 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ - if ((!__pyx_v_hasfields)) { - __pyx_t_1 = (!__pyx_v_copy_shape); + __pyx_t_2 = (!__pyx_v_hasfields); + if (__pyx_t_2) { + __pyx_t_3 = (!__pyx_v_copy_shape); + __pyx_t_1 = __pyx_t_3; } else { - __pyx_t_1 = (!__pyx_v_hasfields); + __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":116 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":238 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< @@ -2030,7 +2151,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":119 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":241 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< @@ -2045,7 +2166,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L11:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":121 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":243 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< @@ -2055,7 +2176,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __pyx_t_1 = (!__pyx_v_hasfields); if (__pyx_t_1) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":122 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":244 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< @@ -2064,286 +2185,322 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_t = __pyx_v_descr->type_num; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":123 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":245 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") */ - if ((__pyx_v_descr->byteorder == '>')) { - __pyx_t_1 = __pyx_v_little_endian; + __pyx_t_1 = (__pyx_v_descr->byteorder == '>'); + if (__pyx_t_1) { + __pyx_t_2 = __pyx_v_little_endian; } else { - __pyx_t_1 = (__pyx_v_descr->byteorder == '>'); + __pyx_t_2 = __pyx_t_1; } - if (!__pyx_t_1) { + if (!__pyx_t_2) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":124 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":246 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ - if ((__pyx_v_descr->byteorder == '<')) { - __pyx_t_5 = (!__pyx_v_little_endian); + __pyx_t_1 = (__pyx_v_descr->byteorder == '<'); + if (__pyx_t_1) { + __pyx_t_3 = (!__pyx_v_little_endian); + __pyx_t_8 = __pyx_t_3; } else { - __pyx_t_5 = (__pyx_v_descr->byteorder == '<'); + __pyx_t_8 = __pyx_t_1; } - __pyx_t_6 = __pyx_t_5; + __pyx_t_1 = __pyx_t_8; } else { - __pyx_t_6 = __pyx_t_1; + __pyx_t_1 = __pyx_t_2; } - if (__pyx_t_6) { + if (__pyx_t_1) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":125 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":247 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") # <<<<<<<<<<<<<< + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_INCREF(__pyx_kp_5); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_5); - __Pyx_GIVEREF(__pyx_kp_5); - __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_3)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_3)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L13; } __pyx_L13:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":126 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":248 * (descr.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" */ - switch (__pyx_v_t) { - case NPY_BYTE: - __pyx_v_f = __pyx_k_6; - break; + __pyx_t_1 = (__pyx_v_t == NPY_BYTE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__b; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":127 - * raise ValueError("Non-native byte order not supported") + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":249 + * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" */ - case NPY_UBYTE: - __pyx_v_f = __pyx_k_7; - break; + __pyx_t_1 = (__pyx_v_t == NPY_UBYTE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__B; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":128 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":250 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" */ - case NPY_SHORT: - __pyx_v_f = __pyx_k_8; - break; + __pyx_t_1 = (__pyx_v_t == NPY_SHORT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__h; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":129 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":251 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" */ - case NPY_USHORT: - __pyx_v_f = __pyx_k_9; - break; + __pyx_t_1 = (__pyx_v_t == NPY_USHORT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__H; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":130 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":252 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" */ - case NPY_INT: - __pyx_v_f = __pyx_k_10; - break; + __pyx_t_1 = (__pyx_v_t == NPY_INT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__i; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":131 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":253 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" */ - case NPY_UINT: - __pyx_v_f = __pyx_k_11; - break; + __pyx_t_1 = (__pyx_v_t == NPY_UINT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__I; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":132 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":254 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" */ - case NPY_LONG: - __pyx_v_f = __pyx_k_12; - break; + __pyx_t_1 = (__pyx_v_t == NPY_LONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__l; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":133 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":255 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" */ - case NPY_ULONG: - __pyx_v_f = __pyx_k_13; - break; + __pyx_t_1 = (__pyx_v_t == NPY_ULONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__L; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":134 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":256 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" */ - case NPY_LONGLONG: - __pyx_v_f = __pyx_k_14; - break; + __pyx_t_1 = (__pyx_v_t == NPY_LONGLONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__q; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":135 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":257 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" */ - case NPY_ULONGLONG: - __pyx_v_f = __pyx_k_15; - break; + __pyx_t_1 = (__pyx_v_t == NPY_ULONGLONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Q; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":136 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":258 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" */ - case NPY_FLOAT: - __pyx_v_f = __pyx_k_16; - break; + __pyx_t_1 = (__pyx_v_t == NPY_FLOAT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__f; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":137 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":259 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" */ - case NPY_DOUBLE: - __pyx_v_f = __pyx_k_17; - break; + __pyx_t_1 = (__pyx_v_t == NPY_DOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__d; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":138 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":260 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" */ - case NPY_LONGDOUBLE: - __pyx_v_f = __pyx_k_18; - break; + __pyx_t_1 = (__pyx_v_t == NPY_LONGDOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__g; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":139 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":261 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" */ - case NPY_CFLOAT: - __pyx_v_f = __pyx_k_19; - break; + __pyx_t_1 = (__pyx_v_t == NPY_CFLOAT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Zf; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":140 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":262 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" */ - case NPY_CDOUBLE: - __pyx_v_f = __pyx_k_20; - break; + __pyx_t_1 = (__pyx_v_t == NPY_CDOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Zd; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":141 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":263 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f = "O" * else: */ - case NPY_CLONGDOUBLE: - __pyx_v_f = __pyx_k_21; - break; + __pyx_t_1 = (__pyx_v_t == NPY_CLONGDOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Zg; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":142 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":264 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ - case NPY_OBJECT: - __pyx_v_f = __pyx_k_22; - break; - default: + __pyx_t_1 = (__pyx_v_t == NPY_OBJECT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__O; + goto __pyx_L14; + } + /*else*/ { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":144 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":266 * elif t == NPY_OBJECT: f = "O" * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ - __pyx_t_3 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_23, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __Pyx_Raise(__pyx_t_2, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - break; + __pyx_t_5 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_4), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_L14:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":145 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":267 * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":146 - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":268 + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: @@ -2355,7 +2512,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":148 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":270 * return * else: * info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< @@ -2364,7 +2521,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->format = ((char *)malloc(255)); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":149 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":271 * else: * info.format = <char*>stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< @@ -2373,7 +2530,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ (__pyx_v_info->format[0]) = '^'; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":150 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":272 * info.format = <char*>stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< @@ -2382,17 +2539,17 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_offset = 0; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":153 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":275 * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, * &offset) # <<<<<<<<<<<<<< * f[0] = 0 # Terminate format string * */ - __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_f = __pyx_t_7; + __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_f = __pyx_t_9; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":154 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":276 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< @@ -2406,102 +2563,299 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__"); __pyx_r = -1; __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; goto __pyx_L2; __pyx_L0:; - if (__pyx_v_info->obj == Py_None) { - __Pyx_GOTREF(Py_None); - __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; - } - __pyx_L2:; - __Pyx_XDECREF((PyObject *)__pyx_v_descr); - __Pyx_FinishRefcountContext(); + if (__pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(Py_None); + __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; + } + __pyx_L2:; + __Pyx_XDECREF((PyObject *)__pyx_v_descr); + __Pyx_DECREF((PyObject *)__pyx_v_self); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":278 + * f[0] = 0 # Terminate format string + * + * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) + */ + +static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ +static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { + int __pyx_t_1; + __Pyx_RefNannySetupContext("__releasebuffer__"); + __Pyx_INCREF((PyObject *)__pyx_v_self); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":279 + * + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + */ + __pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self)); + if (__pyx_t_1) { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":280 + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) # <<<<<<<<<<<<<< + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * stdlib.free(info.strides) + */ + free(__pyx_v_info->format); + goto __pyx_L5; + } + __pyx_L5:; + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":281 + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * stdlib.free(info.strides) + * # info.shape was stored after info.strides in the same block + */ + __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); + if (__pyx_t_1) { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":282 + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * stdlib.free(info.strides) # <<<<<<<<<<<<<< + * # info.shape was stored after info.strides in the same block + * + */ + free(__pyx_v_info->strides); + goto __pyx_L6; + } + __pyx_L6:; + + __Pyx_DECREF((PyObject *)__pyx_v_self); + __Pyx_RefNannyFinishContext(); +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":755 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, <void*>a) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1"); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":756 + * + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew2(a, b): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":758 + * return PyArray_MultiIterNew(1, <void*>a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, <void*>a, <void*>b) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2"); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":759 + * + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":761 + * return PyArray_MultiIterNew(2, <void*>a, <void*>b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew3"); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":762 + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":156 - * f[0] = 0 # Terminate format string +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":764 + * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) * - * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< - * if PyArray_HASFIELDS(self): - * stdlib.free(info.format) */ -static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ -static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { - int __pyx_t_1; - int __pyx_t_2; - __Pyx_SetupRefcountContext("__releasebuffer__"); +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4"); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":157 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":765 * - * def __releasebuffer__(ndarray self, Py_buffer* info): - * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< - * stdlib.free(info.format) - * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ - __pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self)); - if (__pyx_t_1) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":158 - * def __releasebuffer__(ndarray self, Py_buffer* info): - * if PyArray_HASFIELDS(self): - * stdlib.free(info.format) # <<<<<<<<<<<<<< - * if sizeof(npy_intp) != sizeof(Py_ssize_t): - * stdlib.free(info.strides) - */ - free(__pyx_v_info->format); - goto __pyx_L5; - } - __pyx_L5:; + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":159 - * if PyArray_HASFIELDS(self): - * stdlib.free(info.format) - * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< - * stdlib.free(info.strides) - * # info.shape was stored after info.strides in the same block +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":767 + * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) + * */ - __pyx_t_2 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); - if (__pyx_t_2) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":160 - * stdlib.free(info.format) - * if sizeof(npy_intp) != sizeof(Py_ssize_t): - * stdlib.free(info.strides) # <<<<<<<<<<<<<< - * # info.shape was stored after info.strides in the same block +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5"); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":768 + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<< * + * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ - free(__pyx_v_info->strides); - goto __pyx_L6; - } - __pyx_L6:; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - __Pyx_FinishRefcountContext(); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; } -/* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":277 - * ctypedef npy_cdouble complex_t +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":770 + * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< * # Recursive utility function used in __getbuffer__ to get format * # string. The new location in the format string is returned. */ -static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { PyArray_Descr *__pyx_v_child; - PyObject *__pyx_v_i; int __pyx_v_endian_detector; int __pyx_v_little_endian; + PyObject *__pyx_v_fields; + PyObject *__pyx_v_childname; PyObject *__pyx_v_new_offset; PyObject *__pyx_v_t; char *__pyx_r; - PyObject *__pyx_1 = 0; Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; @@ -2510,199 +2864,195 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; - char *__pyx_t_9; - __Pyx_SetupRefcountContext("_util_dtypestring"); + int __pyx_t_9; + char *__pyx_t_10; + __Pyx_RefNannySetupContext("_util_dtypestring"); + __Pyx_INCREF((PyObject *)__pyx_v_descr); __pyx_v_child = ((PyArray_Descr *)Py_None); __Pyx_INCREF(Py_None); - __pyx_v_i = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_fields = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_childname = Py_None; __Pyx_INCREF(Py_None); __pyx_v_new_offset = Py_None; __Pyx_INCREF(Py_None); __pyx_v_t = Py_None; __Pyx_INCREF(Py_None); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":284 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":777 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) - * + * cdef tuple fields */ __pyx_v_endian_detector = 1; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":285 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":778 * cdef tuple i * cdef int endian_detector = 1 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<< + * cdef tuple fields * - * for i in descr.fields.itervalues(): */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":287 - * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":781 + * cdef tuple fields * - * for i in descr.fields.itervalues(): # <<<<<<<<<<<<<< - * child = i[0] - * new_offset = i[1] + * for childname in descr.names: # <<<<<<<<<<<<<< + * fields = descr.fields[childname] + * child, new_offset = fields */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_descr->fields, __pyx_kp_itervalues); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { - __pyx_t_1 = 0; __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); + if (likely(((PyObject *)__pyx_v_descr->names) != Py_None)) { + __pyx_t_1 = 0; __pyx_t_2 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_2); } else { - __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { - if (likely(PyList_CheckExact(__pyx_t_2))) { - if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break; - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; - } else if (likely(PyTuple_CheckExact(__pyx_t_2))) { - if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break; - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; - } else { - __pyx_t_3 = PyIter_Next(__pyx_t_2); - if (!__pyx_t_3) { - if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - break; - } - __Pyx_GOTREF(__pyx_t_3); - } - if (!(likely(PyTuple_CheckExact(__pyx_t_3)) || (__pyx_t_3) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected tuple, got %s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_v_i)); - __pyx_v_i = ((PyObject *)__pyx_t_3); + if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; + __Pyx_DECREF(__pyx_v_childname); + __pyx_v_childname = __pyx_t_3; __pyx_t_3 = 0; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":288 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":782 * - * for i in descr.fields.itervalues(): - * child = i[0] # <<<<<<<<<<<<<< - * new_offset = i[1] + * for childname in descr.names: + * fields = descr.fields[childname] # <<<<<<<<<<<<<< + * child, new_offset = fields * */ - __pyx_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_i), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - if (!(__Pyx_TypeTest(__pyx_1, __pyx_ptype_5numpy_dtype))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_v_child)); - __pyx_v_child = ((PyArray_Descr *)__pyx_1); - __pyx_1 = 0; + __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_v_fields)); + __pyx_v_fields = ((PyObject *)__pyx_t_3); + __pyx_t_3 = 0; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":289 - * for i in descr.fields.itervalues(): - * child = i[0] - * new_offset = i[1] # <<<<<<<<<<<<<< + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":783 + * for childname in descr.names: + * fields = descr.fields[childname] + * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ - __pyx_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_i), 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - __Pyx_DECREF(__pyx_v_new_offset); - __pyx_v_new_offset = __pyx_1; - __pyx_1 = 0; + if (likely(((PyObject *)__pyx_v_fields) != Py_None) && likely(PyTuple_GET_SIZE(((PyObject *)__pyx_v_fields)) == 2)) { + PyObject* tuple = ((PyObject *)__pyx_v_fields); + __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3); + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_v_child)); + __pyx_v_child = ((PyArray_Descr *)__pyx_t_3); + __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_v_new_offset); + __pyx_v_new_offset = __pyx_t_4; + __pyx_t_4 = 0; + } else { + __Pyx_UnpackTupleError(((PyObject *)__pyx_v_fields), 2); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":291 - * new_offset = i[1] + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":785 + * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< - * raise RuntimeError("Format string allocated too short, see comment in numpy.pxd") + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ - __pyx_t_3 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":292 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":786 * * if (end - f) - (new_offset - offset[0]) < 15: - * raise RuntimeError("Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __Pyx_INCREF(__pyx_kp_25); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_25); - __Pyx_GIVEREF(__pyx_kp_25); - __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_5)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_5)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":294 - * raise RuntimeError("Format string allocated too short, see comment in numpy.pxd") + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":788 + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") */ - if ((__pyx_v_child->byteorder == '>')) { - __pyx_t_6 = __pyx_v_little_endian; + __pyx_t_6 = (__pyx_v_child->byteorder == '>'); + if (__pyx_t_6) { + __pyx_t_7 = __pyx_v_little_endian; } else { - __pyx_t_6 = (__pyx_v_child->byteorder == '>'); + __pyx_t_7 = __pyx_t_6; } - if (!__pyx_t_6) { + if (!__pyx_t_7) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":295 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":789 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") * # One could encode it in the format string and have Cython */ - if ((__pyx_v_child->byteorder == '<')) { - __pyx_t_7 = (!__pyx_v_little_endian); + __pyx_t_6 = (__pyx_v_child->byteorder == '<'); + if (__pyx_t_6) { + __pyx_t_8 = (!__pyx_v_little_endian); + __pyx_t_9 = __pyx_t_8; } else { - __pyx_t_7 = (__pyx_v_child->byteorder == '<'); + __pyx_t_9 = __pyx_t_6; } - __pyx_t_8 = __pyx_t_7; + __pyx_t_6 = __pyx_t_9; } else { - __pyx_t_8 = __pyx_t_6; + __pyx_t_6 = __pyx_t_7; } - if (__pyx_t_8) { + if (__pyx_t_6) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":296 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":790 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") # <<<<<<<<<<<<<< + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __Pyx_INCREF(__pyx_kp_28); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_28); - __Pyx_GIVEREF(__pyx_kp_28); - __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_3)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_3)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":306 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":800 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< @@ -2710,16 +3060,16 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc * f += 1 */ while (1) { - __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!__pyx_t_8) break; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!__pyx_t_6) break; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":307 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":801 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< @@ -2728,7 +3078,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc */ (__pyx_v_f[0]) = 120; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":308 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":802 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< @@ -2737,7 +3087,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc */ __pyx_v_f += 1; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":309 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":803 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< @@ -2747,7 +3097,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc (__pyx_v_offset[0]) += 1; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":311 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":805 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< @@ -2756,417 +3106,417 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc */ (__pyx_v_offset[0]) += __pyx_v_child->elsize; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":313 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":807 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ - __pyx_t_8 = (!PyDataType_HASFIELDS(__pyx_v_child)); - if (__pyx_t_8) { + __pyx_t_6 = (!PyDataType_HASFIELDS(__pyx_v_child)); + if (__pyx_t_6) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":314 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":808 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: - * raise RuntimeError("Format string allocated too short.") + * raise RuntimeError(u"Format string allocated too short.") */ - __pyx_t_4 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_t); - __pyx_v_t = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_v_t = __pyx_t_3; + __pyx_t_3 = 0; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":315 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":809 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< - * raise RuntimeError("Format string allocated too short.") + * raise RuntimeError(u"Format string allocated too short.") * */ - __pyx_t_8 = ((__pyx_v_end - __pyx_v_f) < 5); - if (__pyx_t_8) { + __pyx_t_6 = ((__pyx_v_end - __pyx_v_f) < 5); + if (__pyx_t_6) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":316 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":810 * t = child.type_num * if end - f < 5: - * raise RuntimeError("Format string allocated too short.") # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __Pyx_INCREF(__pyx_kp_29); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_29); - __Pyx_GIVEREF(__pyx_kp_29); - __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_6)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_6)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_6)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L10; } __pyx_L10:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":319 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":813 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" */ - __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":320 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":814 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" */ - __pyx_t_4 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":321 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":815 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" */ - __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 104; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":322 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":816 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" */ - __pyx_t_4 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":323 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":817 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" */ - __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 105; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":324 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":818 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" */ - __pyx_t_4 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":325 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":819 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" */ - __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 108; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":326 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":820 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" */ - __pyx_t_4 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":327 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":821 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" */ - __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 113; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":328 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":822 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" */ - __pyx_t_4 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":329 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":823 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" */ - __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 102; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":330 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":824 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf */ - __pyx_t_4 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 100; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":331 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":825 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd */ - __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 103; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":332 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":826 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg */ - __pyx_t_4 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 102; __pyx_v_f += 1; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":333 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":827 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" */ - __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f += 1; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":334 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":828 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: */ - __pyx_t_4 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 103; __pyx_v_f += 1; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":335 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":829 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ - __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 79; goto __pyx_L11; } /*else*/ { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":337 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":831 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ - __pyx_t_4 = PyNumber_Remainder(__pyx_kp_30, __pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_4), __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L11:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":338 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":832 * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< * else: * # Cython ignores struct boundary information ("T{...}"), @@ -3176,25 +3526,26 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc } /*else*/ { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":342 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":836 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ - __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_f = __pyx_t_9; + __pyx_t_10 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_f = __pyx_t_10; } __pyx_L9:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":343 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":837 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * + * */ __pyx_r = __pyx_v_f; goto __pyx_L0; @@ -3202,7 +3553,6 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); @@ -3210,11 +3560,152 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc __Pyx_AddTraceback("numpy._util_dtypestring"); __pyx_r = NULL; __pyx_L0:; - __Pyx_DECREF((PyObject *)__pyx_v_child); - __Pyx_DECREF(__pyx_v_i); - __Pyx_DECREF(__pyx_v_new_offset); - __Pyx_DECREF(__pyx_v_t); - __Pyx_FinishRefcountContext(); + __Pyx_DECREF((PyObject *)__pyx_v_child); + __Pyx_DECREF(__pyx_v_fields); + __Pyx_DECREF(__pyx_v_childname); + __Pyx_DECREF(__pyx_v_new_offset); + __Pyx_DECREF(__pyx_v_t); + __Pyx_DECREF((PyObject *)__pyx_v_descr); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":952 + * + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * cdef PyObject* baseptr + * if base is None: + */ + +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { + PyObject *__pyx_v_baseptr; + int __pyx_t_1; + __Pyx_RefNannySetupContext("set_array_base"); + __Pyx_INCREF((PyObject *)__pyx_v_arr); + __Pyx_INCREF(__pyx_v_base); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":954 + * cdef inline void set_array_base(ndarray arr, object base): + * cdef PyObject* baseptr + * if base is None: # <<<<<<<<<<<<<< + * baseptr = NULL + * else: + */ + __pyx_t_1 = (__pyx_v_base == Py_None); + if (__pyx_t_1) { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":955 + * cdef PyObject* baseptr + * if base is None: + * baseptr = NULL # <<<<<<<<<<<<<< + * else: + * Py_INCREF(base) # important to do this before decref below! + */ + __pyx_v_baseptr = NULL; + goto __pyx_L3; + } + /*else*/ { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":957 + * baseptr = NULL + * else: + * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< + * baseptr = <PyObject*>base + * Py_XDECREF(arr.base) + */ + Py_INCREF(__pyx_v_base); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":958 + * else: + * Py_INCREF(base) # important to do this before decref below! + * baseptr = <PyObject*>base # <<<<<<<<<<<<<< + * Py_XDECREF(arr.base) + * arr.base = baseptr + */ + __pyx_v_baseptr = ((PyObject *)__pyx_v_base); + } + __pyx_L3:; + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":959 + * Py_INCREF(base) # important to do this before decref below! + * baseptr = <PyObject*>base + * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< + * arr.base = baseptr + * + */ + Py_XDECREF(__pyx_v_arr->base); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":960 + * baseptr = <PyObject*>base + * Py_XDECREF(arr.base) + * arr.base = baseptr # <<<<<<<<<<<<<< + * + * cdef inline object get_array_base(ndarray arr): + */ + __pyx_v_arr->base = __pyx_v_baseptr; + + __Pyx_DECREF((PyObject *)__pyx_v_arr); + __Pyx_DECREF(__pyx_v_base); + __Pyx_RefNannyFinishContext(); +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":962 + * arr.base = baseptr + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * if arr.base is NULL: + * return None + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_r = NULL; + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base"); + __Pyx_INCREF((PyObject *)__pyx_v_arr); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":963 + * + * cdef inline object get_array_base(ndarray arr): + * if arr.base is NULL: # <<<<<<<<<<<<<< + * return None + * else: + */ + __pyx_t_1 = (__pyx_v_arr->base == NULL); + if (__pyx_t_1) { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":964 + * cdef inline object get_array_base(ndarray arr): + * if arr.base is NULL: + * return None # <<<<<<<<<<<<<< + * else: + * return <object>arr.base + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + goto __pyx_L3; + } + /*else*/ { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":966 + * return None + * else: + * return <object>arr.base # <<<<<<<<<<<<<< + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); + __pyx_r = ((PyObject *)__pyx_v_arr->base); + goto __pyx_L0; + } + __pyx_L3:; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_DECREF((PyObject *)__pyx_v_arr); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -3240,60 +3731,75 @@ static struct PyModuleDef __pyx_moduledef = { #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp___main__, __pyx_k___main__, sizeof(__pyx_k___main__), 1, 1, 1}, - {&__pyx_kp_model, __pyx_k_model, sizeof(__pyx_k_model), 1, 1, 1}, - {&__pyx_kp_X, __pyx_k_X, sizeof(__pyx_k_X), 1, 1, 1}, - {&__pyx_kp_y, __pyx_k_y, sizeof(__pyx_k_y), 1, 1, 1}, - {&__pyx_kp_maxit, __pyx_k_maxit, sizeof(__pyx_k_maxit), 1, 1, 1}, - {&__pyx_kp_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 1, 1, 1}, - {&__pyx_kp_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 1, 1}, - {&__pyx_kp_31, __pyx_k_31, sizeof(__pyx_k_31), 1, 1, 1}, - {&__pyx_kp_32, __pyx_k_32, sizeof(__pyx_k_32), 1, 1, 1}, - {&__pyx_kp_linalg, __pyx_k_linalg, sizeof(__pyx_k_linalg), 0, 1, 1}, - {&__pyx_kp_alpha, __pyx_k_alpha, sizeof(__pyx_k_alpha), 1, 1, 1}, - {&__pyx_kp_beta, __pyx_k_beta, sizeof(__pyx_k_beta), 1, 1, 1}, - {&__pyx_kp_coef_, __pyx_k_coef_, sizeof(__pyx_k_coef_), 1, 1, 1}, - {&__pyx_kp_callbacks, __pyx_k_callbacks, sizeof(__pyx_k_callbacks), 1, 1, 1}, - {&__pyx_kp_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 1, 1, 1}, - {&__pyx_kp_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 1, 1, 1}, - {&__pyx_kp_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 1, 1, 1}, - {&__pyx_kp_dot, __pyx_k_dot, sizeof(__pyx_k_dot), 1, 1, 1}, - {&__pyx_kp_range, __pyx_k_range, sizeof(__pyx_k_range), 1, 1, 1}, - {&__pyx_kp_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 1, 1, 1}, - {&__pyx_kp_w, __pyx_k_w, sizeof(__pyx_k_w), 1, 1, 1}, - {&__pyx_kp_R, __pyx_k_R, sizeof(__pyx_k_R), 1, 1, 1}, - {&__pyx_kp___getbuffer__, __pyx_k___getbuffer__, sizeof(__pyx_k___getbuffer__), 1, 1, 1}, - {&__pyx_kp___releasebuffer__, __pyx_k___releasebuffer__, sizeof(__pyx_k___releasebuffer__), 1, 1, 1}, - {&__pyx_kp_info, __pyx_k_info, sizeof(__pyx_k_info), 1, 1, 1}, - {&__pyx_kp_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 1, 1, 1}, - {&__pyx_kp_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 1, 1, 1}, - {&__pyx_kp_itervalues, __pyx_k_itervalues, sizeof(__pyx_k_itervalues), 1, 1, 1}, - {&__pyx_kp_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 1, 1, 1}, - {&__pyx_kp_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 0}, - {&__pyx_kp_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 0}, - {&__pyx_kp_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 0}, - {&__pyx_kp_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 0}, - {&__pyx_kp_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 0}, - {&__pyx_kp_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 0}, - {&__pyx_kp_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 0}, - {&__pyx_kp_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 0}, - {0, 0, 0, 0, 0, 0} + {&__pyx_kp_u_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 1, 0, 0}, + {&__pyx_n_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 1}, + {&__pyx_kp_u_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 1, 0, 0}, + {&__pyx_kp_u_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 1, 0, 0}, + {&__pyx_kp_u_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 1, 0, 0}, + {&__pyx_kp_u_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 1, 0, 0}, + {&__pyx_kp_u_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 1, 0, 0}, + {&__pyx_n_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 1}, + {&__pyx_n_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 1}, + {&__pyx_kp_u_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 1, 0, 0}, + {&__pyx_n_s__R, __pyx_k__R, sizeof(__pyx_k__R), 0, 0, 1, 1}, + {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1}, + {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, + {&__pyx_n_s__X, __pyx_k__X, sizeof(__pyx_k__X), 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__alpha, __pyx_k__alpha, sizeof(__pyx_k__alpha), 0, 0, 1, 1}, + {&__pyx_n_s__axis, __pyx_k__axis, sizeof(__pyx_k__axis), 0, 0, 1, 1}, + {&__pyx_n_s__base, __pyx_k__base, sizeof(__pyx_k__base), 0, 0, 1, 1}, + {&__pyx_n_s__beta, __pyx_k__beta, sizeof(__pyx_k__beta), 0, 0, 1, 1}, + {&__pyx_n_s__buf, __pyx_k__buf, sizeof(__pyx_k__buf), 0, 0, 1, 1}, + {&__pyx_n_s__byteorder, __pyx_k__byteorder, sizeof(__pyx_k__byteorder), 0, 0, 1, 1}, + {&__pyx_n_s__callbacks, __pyx_k__callbacks, sizeof(__pyx_k__callbacks), 0, 0, 1, 1}, + {&__pyx_n_s__coef_, __pyx_k__coef_, sizeof(__pyx_k__coef_), 0, 0, 1, 1}, + {&__pyx_n_s__descr, __pyx_k__descr, sizeof(__pyx_k__descr), 0, 0, 1, 1}, + {&__pyx_n_s__dot, __pyx_k__dot, sizeof(__pyx_k__dot), 0, 0, 1, 1}, + {&__pyx_n_s__empty, __pyx_k__empty, sizeof(__pyx_k__empty), 0, 0, 1, 1}, + {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1}, + {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1}, + {&__pyx_n_s__itemsize, __pyx_k__itemsize, sizeof(__pyx_k__itemsize), 0, 0, 1, 1}, + {&__pyx_n_s__linalg, __pyx_k__linalg, sizeof(__pyx_k__linalg), 0, 0, 1, 1}, + {&__pyx_n_s__maxit, __pyx_k__maxit, sizeof(__pyx_k__maxit), 0, 0, 1, 1}, + {&__pyx_n_s__model, __pyx_k__model, sizeof(__pyx_k__model), 0, 0, 1, 1}, + {&__pyx_n_s__names, __pyx_k__names, sizeof(__pyx_k__names), 0, 0, 1, 1}, + {&__pyx_n_s__ndim, __pyx_k__ndim, sizeof(__pyx_k__ndim), 0, 0, 1, 1}, + {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1}, + {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, + {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1}, + {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, + {&__pyx_n_s__readonly, __pyx_k__readonly, sizeof(__pyx_k__readonly), 0, 0, 1, 1}, + {&__pyx_n_s__shape, __pyx_k__shape, sizeof(__pyx_k__shape), 0, 0, 1, 1}, + {&__pyx_n_s__strides, __pyx_k__strides, sizeof(__pyx_k__strides), 0, 0, 1, 1}, + {&__pyx_n_s__suboffsets, __pyx_k__suboffsets, sizeof(__pyx_k__suboffsets), 0, 0, 1, 1}, + {&__pyx_n_s__sum, __pyx_k__sum, sizeof(__pyx_k__sum), 0, 0, 1, 1}, + {&__pyx_n_s__type_num, __pyx_k__type_num, sizeof(__pyx_k__type_num), 0, 0, 1, 1}, + {&__pyx_n_s__w, __pyx_k__w, sizeof(__pyx_k__w), 0, 0, 1, 1}, + {&__pyx_n_s__xrange, __pyx_k__xrange, sizeof(__pyx_k__xrange), 0, 0, 1, 1}, + {&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_kp_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_kp_xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_kp_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_kp_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #if PY_MAJOR_VERSION >= 3 + __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitGlobals(void) { - __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; @@ -3307,30 +3813,34 @@ PyMODINIT_FUNC PyInit_enet_cd_fast(void); /*proto*/ PyMODINIT_FUNC PyInit_enet_cd_fast(void) #endif { - PyObject *__pyx_1 = 0; PyObject *__pyx_t_1 = NULL; - #ifdef CYTHON_REFNANNY - void* __pyx_refchk = NULL; - __Pyx_Refnanny = __Pyx_ImportRefcountAPI("refnanny"); - if (!__Pyx_Refnanny) { + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + #if CYTHON_REFNANNY + void* __pyx_refnanny = NULL; + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { PyErr_Clear(); - __Pyx_Refnanny = __Pyx_ImportRefcountAPI("Cython.Runtime.refnanny"); - if (!__Pyx_Refnanny) - Py_FatalError("failed to import refnanny module"); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); } - __pyx_refchk = __Pyx_Refnanny->NewContext("PyMODINIT_FUNC PyInit_enet_cd_fast(void)", __LINE__, __FILE__); + __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_enet_cd_fast(void)", __LINE__, __FILE__); #endif + __pyx_init_filenames(); __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #if PY_MAJOR_VERSION < 3 + __pyx_empty_bytes = PyString_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif /*--- Library function declarations ---*/ - __pyx_init_filenames(); /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif - /*--- Initialize various global constants etc. ---*/ - if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("enet_cd_fast"), __pyx_methods, 0, 0, PYTHON_API_VERSION); @@ -3344,52 +3854,73 @@ PyMODINIT_FUNC PyInit_enet_cd_fast(void) __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + /*--- Initialize various global constants etc. ---*/ + if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_module_is_main_enet_cd_fast) { - if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_kp___main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_skip_dispatch = 0; /*--- Global init code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ /*--- Type import code ---*/ - __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Function import code ---*/ /*--- Execution code ---*/ - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":7 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":9 + * cimport cython * - * cimport numpy as np * import numpy as np # <<<<<<<<<<<<<< * import scipy.linalg as linalg - * cimport cython + * */ - __pyx_1 = __Pyx_Import(__pyx_kp_numpy, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - if (PyObject_SetAttr(__pyx_m, __pyx_kp_np, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/enet_cd_fast.pyx":8 - * cimport numpy as np + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":10 + * * import numpy as np * import scipy.linalg as linalg # <<<<<<<<<<<<<< - * cimport cython * + * cdef extern from "math.h": */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __Pyx_INCREF(__pyx_kp_32); - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_32); - __Pyx_GIVEREF(__pyx_kp_32); - __pyx_1 = __Pyx_Import(__pyx_kp_31, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); + __Pyx_INCREF(((PyObject *)__pyx_n_s_8)); + PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s_8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s_8)); + __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_7), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_kp_linalg, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_1); __pyx_1 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__linalg, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\enet_cd_fast.pyx":1 + * # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # <<<<<<<<<<<<<< + * # License: BSD Style. + * + */ + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_1 = PyObject_GetAttr(__pyx_m, __pyx_n_s_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_9), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/stdlib.pxd":2 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\stdlib.pxd":2 * * cdef extern from "stdlib.h" nogil: # <<<<<<<<<<<<<< * void free(void *ptr) @@ -3397,12 +3928,17 @@ PyMODINIT_FUNC PyInit_enet_cd_fast(void) */ goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_1); __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("enet_cd_fast"); - Py_DECREF(__pyx_m); __pyx_m = 0; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + if (__pyx_m) { + __Pyx_AddTraceback("init enet_cd_fast"); + Py_DECREF(__pyx_m); __pyx_m = 0; + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init enet_cd_fast"); + } __pyx_L0:; - __Pyx_FinishRefcountContext(); + __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else @@ -3543,7 +4079,7 @@ bad: return -1; } -static INLINE int __Pyx_IsLittleEndian(void) { +static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } @@ -3940,7 +4476,7 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha } } -static INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { +static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { buf->buf = NULL; buf->obj = NULL; buf->strides = __Pyx_zeros; @@ -3981,45 +4517,33 @@ fail:; return -1; } -static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } -static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { - if (!type) { +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } - if (obj == Py_None || PyObject_TypeCheck(obj, type)) + if (likely(PyObject_TypeCheck(obj, type))) return 1; - PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s", - Py_TYPE(obj)->tp_name, type->tp_name); + PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", + Py_TYPE(obj)->tp_name, type->tp_name); return 0; } +static void __Pyx_RaiseBufferIndexError(int axis) { + PyErr_Format(PyExc_IndexError, + "Out of bounds on buffer access (axis %d)", axis); +} + -static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); -#if PY_MAJOR_VERSION >= 3 - /* Note: this is a temporary work-around to prevent crashes in Python 3.0 */ - if ((tstate->exc_type != NULL) & (tstate->exc_type != Py_None)) { - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - PyErr_NormalizeException(&type, &value, &tb); - PyErr_NormalizeException(&tmp_type, &tmp_value, &tmp_tb); - tstate->exc_type = 0; - tstate->exc_value = 0; - tstate->exc_traceback = 0; - PyException_SetContext(value, tmp_value); - Py_DECREF(tmp_type); - Py_XDECREF(tmp_tb); - } -#endif - tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; @@ -4031,7 +4555,7 @@ static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *t Py_XDECREF(tmp_tb); } -static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; @@ -4043,6 +4567,56 @@ static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject ** } +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + #if PY_VERSION_HEX < 0x02050000 + "need more than %d value%s to unpack", (int)index, + #else + "need more than %zd value%s to unpack", index, + #endif + (index == 1) ? "" : "s"); +} + +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void) { + PyErr_SetString(PyExc_ValueError, "too many values to unpack"); +} + +static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) { + PyObject *item; + if (!(item = PyIter_Next(iter))) { + if (!PyErr_Occurred()) { + __Pyx_RaiseNeedMoreValuesError(index); + } + } + return item; +} + +static int __Pyx_EndUnpack(PyObject *iter) { + PyObject *item; + if ((item = PyIter_Next(iter))) { + Py_DECREF(item); + __Pyx_RaiseTooManyValuesError(); + return -1; + } + else if (!PyErr_Occurred()) + return 0; + else + return -1; +} + +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else if (PyTuple_GET_SIZE(t) < index) { + __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); + } else { + __Pyx_RaiseTooManyValuesError(); + } +} static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) @@ -4129,6 +4703,157 @@ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { return result; } +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return ::std::complex< float >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return x + y*(__pyx_t_float_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + __pyx_t_float_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float denom = b.real * b.real + b.imag * b.imag; + z.real = (a.real * b.real + a.imag * b.imag) / denom; + z.imag = (a.imag * b.real - a.real * b.imag) / denom; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } +/* + static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) { +#if HAVE_HYPOT + return hypotf(z.real, z.imag); +#else + return sqrtf(z.real*z.real + z.imag*z.imag); +#endif + } +*/ +#endif + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return ::std::complex< double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return x + y*(__pyx_t_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + __pyx_t_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double denom = b.real * b.real + b.imag * b.imag; + z.real = (a.real * b.real + a.imag * b.imag) / denom; + z.imag = (a.imag * b.real - a.real * b.imag) / denom; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } +/* + static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) { +#if HAVE_HYPOT + return hypot(z.real, z.imag); +#else + return sqrt(z.real*z.real + z.imag*z.imag); +#endif + } +*/ +#endif + +#if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { Py_XINCREF(type); Py_XINCREF(value); @@ -4184,6 +4909,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { } #endif } + __Pyx_ErrRestore(type, value, tb); return; raise_error: @@ -4193,24 +4919,62 @@ raise_error: return; } -static INLINE int __Pyx_StrEq(const char *s1, const char *s2) { - while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } - return *s1 == *s2; +#else /* Python 3+ */ + +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (!PyExceptionClass_Check(type)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + + PyErr_SetObject(type, value); + + if (tb) { + PyThreadState *tstate = PyThreadState_GET(); + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } + } + +bad: + return; } +#endif -static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { +static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { + const unsigned char neg_one = (unsigned char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned char)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (unsigned char)-1; - if (unlikely(val < 0)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned char"); - return (unsigned char)-1; + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned char" : + "value too large to convert to unsigned char"); } - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to unsigned char"); return (unsigned char)-1; } return (unsigned char)val; @@ -4218,19 +4982,18 @@ static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } -static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { +static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { + const unsigned short neg_one = (unsigned short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned short)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (unsigned short)-1; - if (unlikely(val < 0)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned short"); - return (unsigned short)-1; + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned short" : + "value too large to convert to unsigned short"); } - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to unsigned short"); return (unsigned short)-1; } return (unsigned short)val; @@ -4238,19 +5001,18 @@ static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } -static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { +static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { + const unsigned int neg_one = (unsigned int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned int)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (unsigned int)-1; - if (unlikely(val < 0)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned int"); - return (unsigned int)-1; + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned int" : + "value too large to convert to unsigned int"); } - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to unsigned int"); return (unsigned int)-1; } return (unsigned int)val; @@ -4258,14 +5020,18 @@ static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } -static INLINE char __Pyx_PyInt_AsChar(PyObject* x) { +static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { + const char neg_one = (char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(char)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (char)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to char"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to char" : + "value too large to convert to char"); + } return (char)-1; } return (char)val; @@ -4273,14 +5039,18 @@ static INLINE char __Pyx_PyInt_AsChar(PyObject* x) { return (char)__Pyx_PyInt_AsLong(x); } -static INLINE short __Pyx_PyInt_AsShort(PyObject* x) { +static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { + const short neg_one = (short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(short)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (short)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to short"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to short" : + "value too large to convert to short"); + } return (short)-1; } return (short)val; @@ -4288,14 +5058,18 @@ static INLINE short __Pyx_PyInt_AsShort(PyObject* x) { return (short)__Pyx_PyInt_AsLong(x); } -static INLINE int __Pyx_PyInt_AsInt(PyObject* x) { +static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { + const int neg_one = (int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (int)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to int"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to int" : + "value too large to convert to int"); + } return (int)-1; } return (int)val; @@ -4303,14 +5077,18 @@ static INLINE int __Pyx_PyInt_AsInt(PyObject* x) { return (int)__Pyx_PyInt_AsLong(x); } -static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { +static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { + const signed char neg_one = (signed char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed char)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (signed char)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to signed char"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed char" : + "value too large to convert to signed char"); + } return (signed char)-1; } return (signed char)val; @@ -4318,14 +5096,18 @@ static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { return (signed char)__Pyx_PyInt_AsSignedLong(x); } -static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { +static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { + const signed short neg_one = (signed short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed short)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (signed short)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to signed short"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed short" : + "value too large to convert to signed short"); + } return (signed short)-1; } return (signed short)val; @@ -4333,14 +5115,18 @@ static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { return (signed short)__Pyx_PyInt_AsSignedLong(x); } -static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { +static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { + const signed int neg_one = (signed int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed int)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (signed int)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to signed int"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed int" : + "value too large to convert to signed int"); + } return (signed int)-1; } return (signed int)val; @@ -4348,11 +5134,13 @@ static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { return (signed int)__Pyx_PyInt_AsSignedLong(x); } -static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { +static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { + const unsigned long neg_one = (unsigned long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); - if (unlikely(val < 0)) { + if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; @@ -4360,13 +5148,17 @@ static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { return (unsigned long)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned long"); - return (unsigned long)-1; + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned long"); + return (unsigned long)-1; + } + return PyLong_AsUnsignedLong(x); + } else { + return PyLong_AsLong(x); } - return PyLong_AsUnsignedLong(x); } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4377,11 +5169,13 @@ static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } } -static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { + const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); - if (unlikely(val < 0)) { + if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; @@ -4389,13 +5183,17 @@ static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) return (unsigned PY_LONG_LONG)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned PY_LONG_LONG"); - return (unsigned PY_LONG_LONG)-1; + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG)-1; + } + return PyLong_AsUnsignedLongLong(x); + } else { + return PyLong_AsLongLong(x); } - return PyLong_AsUnsignedLongLong(x); } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4406,15 +5204,31 @@ static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) } } -static INLINE long __Pyx_PyInt_AsLong(PyObject* x) { +static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { + const long neg_one = (long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long)-1; + } return (long)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - return PyLong_AsLong(x); + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long)-1; + } + return PyLong_AsUnsignedLong(x); + } else { + return PyLong_AsLong(x); + } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4425,15 +5239,31 @@ static INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } } -static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { + const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG)-1; + } return (PY_LONG_LONG)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - return PyLong_AsLongLong(x); + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG)-1; + } + return PyLong_AsUnsignedLongLong(x); + } else { + return PyLong_AsLongLong(x); + } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4444,15 +5274,31 @@ static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } } -static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { +static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { + const signed long neg_one = (signed long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed long"); + return (signed long)-1; + } return (signed long)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - return PyLong_AsLong(x); + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed long"); + return (signed long)-1; + } + return PyLong_AsUnsignedLong(x); + } else { + return PyLong_AsLong(x); + } } else { signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4463,15 +5309,31 @@ static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } } -static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { +static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { + const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed PY_LONG_LONG"); + return (signed PY_LONG_LONG)-1; + } return (signed PY_LONG_LONG)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - return PyLong_AsLongLong(x); + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed PY_LONG_LONG"); + return (signed PY_LONG_LONG)-1; + } + return PyLong_AsUnsignedLongLong(x); + } else { + return PyLong_AsLongLong(x); + } } else { signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4485,11 +5347,12 @@ static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, - long size) + long size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; + char warning[200]; py_module = __Pyx_ImportModule(module_name); if (!py_module) @@ -4514,9 +5377,15 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class module_name, class_name); goto bad; } - if (((PyTypeObject *)result)->tp_basicsize != size) { + if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility", + module_name, class_name); + PyErr_WarnEx(NULL, warning, 0); + } + else if (((PyTypeObject *)result)->tp_basicsize != size) { PyErr_Format(PyExc_ValueError, - "%s.%s does not appear to be the correct type object", + "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } @@ -4558,7 +5427,6 @@ static void __Pyx_AddTraceback(const char *funcname) { PyObject *py_srcfile = 0; PyObject *py_funcname = 0; PyObject *py_globals = 0; - PyObject *empty_string = 0; PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; @@ -4585,12 +5453,6 @@ static void __Pyx_AddTraceback(const char *funcname) { if (!py_funcname) goto bad; py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; - #if PY_MAJOR_VERSION < 3 - empty_string = PyString_FromStringAndSize("", 0); - #else - empty_string = PyBytes_FromStringAndSize("", 0); - #endif - if (!empty_string) goto bad; py_code = PyCode_New( 0, /*int argcount,*/ #if PY_MAJOR_VERSION >= 3 @@ -4599,7 +5461,7 @@ static void __Pyx_AddTraceback(const char *funcname) { 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ - empty_string, /*PyObject *code,*/ + __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ @@ -4608,7 +5470,7 @@ static void __Pyx_AddTraceback(const char *funcname) { py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ __pyx_lineno, /*int firstlineno,*/ - empty_string /*PyObject *lnotab*/ + __pyx_empty_bytes /*PyObject *lnotab*/ ); if (!py_code) goto bad; py_frame = PyFrame_New( @@ -4623,7 +5485,6 @@ static void __Pyx_AddTraceback(const char *funcname) { bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); - Py_XDECREF(empty_string); Py_XDECREF(py_code); Py_XDECREF(py_frame); } @@ -4631,7 +5492,7 @@ bad: static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 - if (t->is_unicode && (!t->is_identifier)) { + if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); @@ -4639,10 +5500,14 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else /* Python 3+ has unicode identifiers */ - if (t->is_identifier || (t->is_unicode && t->intern)) { - *t->p = PyUnicode_InternFromString(t->s); - } else if (t->is_unicode) { - *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } @@ -4656,13 +5521,13 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { /* Type Conversion Functions */ -static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { if (x == Py_True) return 1; else if ((x == Py_False) | (x == Py_None)) return 0; else return PyObject_IsTrue(x); } -static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; @@ -4708,7 +5573,7 @@ static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { return res; } -static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = PyNumber_Index(b); if (!x) return -1; @@ -4717,7 +5582,7 @@ static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { return ival; } -static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); @@ -4731,7 +5596,7 @@ static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { #endif } -static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { +static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) { return (size_t)-1; @@ -4744,3 +5609,4 @@ static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { } +#endif /* Py_PYTHON_H */ diff --git a/scikits/learn/glm/src/enet_cd_fast.pyx b/scikits/learn/glm/src/enet_cd_fast.pyx index 6e2df14ccc09aa21bcfe4aaae7343eb859621bb1..3acea4367852ef22ed7a50be4c61ad1b86c18162 100644 --- a/scikits/learn/glm/src/enet_cd_fast.pyx +++ b/scikits/learn/glm/src/enet_cd_fast.pyx @@ -4,17 +4,21 @@ # $Id$ cimport numpy as np +cimport cython + import numpy as np import scipy.linalg as linalg -cimport cython cdef extern from "math.h": double fabs(double f) double sqrt(double f) double exp(double f) - double fmax(double f1, double f2) double rand() +cdef inline double fmax(double x, double y): + if x > y: return x + return y + cdef inline double fsign(double f): if f == 0: return 0 @@ -25,8 +29,8 @@ cdef inline double fsign(double f): ctypedef np.float64_t DOUBLE -@cython.boundscheck(False) -@cython.wraparound(False) +# @cython.boundscheck(False) +# @cython.wraparound(False) def enet_coordinate_descent(model, np.ndarray[DOUBLE, ndim=2] X, np.ndarray[DOUBLE, ndim=1] y, @@ -36,8 +40,8 @@ def enet_coordinate_descent(model, """ # get the data information into easy vars - cdef float alpha = model.alpha - cdef float beta = model.beta + cdef double alpha = model.alpha + cdef double beta = model.beta cdef np.ndarray[DOUBLE, ndim=1] w = model.coef_ callbacks = model.callbacks @@ -53,8 +57,8 @@ def enet_coordinate_descent(model, R[:nsamples] = y - np.dot(X, w) R[nsamples:] = - sqrt(beta) * w - cdef float tmp - cdef float w_ii + cdef double tmp + cdef double w_ii cdef unsigned int ii cdef unsigned int jj cdef unsigned int n_iter diff --git a/scikits/learn/glm/src/lasso_cd_fast.c b/scikits/learn/glm/src/lasso_cd_fast.c index 8b20151de7dff116ae6ce3b47f5480762e868bac..e3bbaf378254169dddab0af1c7279458b6632441 100644 --- a/scikits/learn/glm/src/lasso_cd_fast.c +++ b/scikits/learn/glm/src/lasso_cd_fast.c @@ -1,11 +1,12 @@ -/* Generated by Cython 0.11.2 on Wed Apr 21 19:48:24 2010 */ +/* Generated by Cython 0.12.1 on Fri Apr 30 10:25:33 2010 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #include "structmember.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. -#endif +#else + #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif @@ -15,7 +16,9 @@ #if PY_VERSION_HEX < 0x02040000 #define METH_COEXIST 0 #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type) + #define PyDict_Contains(d,o) PySequence_Contains(d,o) #endif + #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX @@ -25,7 +28,9 @@ #define PyInt_AsSsize_t(o) PyInt_AsLong(o) #define PyNumber_Index(o) PyNumber_Int(o) #define PyIndex_Check(o) PyNumber_Check(o) + #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #endif + #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) @@ -35,17 +40,17 @@ #define PyType_Modified(t) typedef struct { - void *buf; - PyObject *obj; - Py_ssize_t len; - Py_ssize_t itemsize; - int readonly; - int ndim; - char *format; - Py_ssize_t *shape; - Py_ssize_t *strides; - Py_ssize_t *suboffsets; - void *internal; + void *buf; + PyObject *obj; + Py_ssize_t len; + Py_ssize_t itemsize; + int readonly; + int ndim; + char *format; + Py_ssize_t *shape; + Py_ssize_t *strides; + Py_ssize_t *suboffsets; + void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 @@ -59,22 +64,32 @@ #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #endif + #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #endif + #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif + #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif + #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type - #define PyString_Type PyBytes_Type - #define PyString_CheckExact PyBytes_CheckExact + #define PyString_Type PyUnicode_Type + #define PyString_CheckExact PyUnicode_CheckExact +#else + #define PyBytes_Type PyString_Type + #define PyBytes_CheckExact PyString_CheckExact +#endif + +#if PY_MAJOR_VERSION >= 3 #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) @@ -89,13 +104,17 @@ #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) - #define PyBytes_Type PyString_Type + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) + #endif + #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func) #endif + #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall @@ -109,6 +128,7 @@ #else #define _USE_MATH_DEFINES #endif + #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) @@ -118,6 +138,7 @@ #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif + #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) @@ -133,24 +154,22 @@ #include <math.h> #define __PYX_HAVE_API__lasso_cd_fast #include "stdlib.h" +#include "stdio.h" #include "numpy/arrayobject.h" +#include "numpy/ufuncobject.h" #include "math.h" -#define __PYX_USE_C99_COMPLEX defined(_Complex_I) - -#ifdef __GNUC__ -#define INLINE __inline__ -#elif _WIN32 -#define INLINE __inline -#else -#define INLINE +#ifndef CYTHON_INLINE + #if defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #else + #define CYTHON_INLINE + #endif #endif -typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/ - - - -static int __pyx_skip_dispatch = 0; +typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ /* Type Conversion Predeclarations */ @@ -165,9 +184,12 @@ static int __pyx_skip_dispatch = 0; #define __Pyx_PyBytes_AsString PyBytes_AsString #endif +#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) +#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) __Pyx_PyBytes_AsString(s)) + #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) -static INLINE int __Pyx_PyObject_IsTrue(PyObject*); -static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); #if !defined(T_PYSSIZET) #if PY_VERSION_HEX < 0x02050000 @@ -184,6 +206,40 @@ static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); #endif #endif + +#if !defined(T_ULONGLONG) +#define __Pyx_T_UNSIGNED_INT(x) \ + ((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \ + ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \ + ((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \ + ((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : -1)))) +#else +#define __Pyx_T_UNSIGNED_INT(x) \ + ((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \ + ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \ + ((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \ + ((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : \ + ((sizeof(x) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1))))) +#endif +#if !defined(T_LONGLONG) +#define __Pyx_T_SIGNED_INT(x) \ + ((sizeof(x) == sizeof(char)) ? T_BYTE : \ + ((sizeof(x) == sizeof(short)) ? T_SHORT : \ + ((sizeof(x) == sizeof(int)) ? T_INT : \ + ((sizeof(x) == sizeof(long)) ? T_LONG : -1)))) +#else +#define __Pyx_T_SIGNED_INT(x) \ + ((sizeof(x) == sizeof(char)) ? T_BYTE : \ + ((sizeof(x) == sizeof(short)) ? T_SHORT : \ + ((sizeof(x) == sizeof(int)) ? T_INT : \ + ((sizeof(x) == sizeof(long)) ? T_LONG : \ + ((sizeof(x) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1))))) +#endif + +#define __Pyx_T_FLOATING(x) \ + ((sizeof(x) == sizeof(float)) ? T_FLOAT : \ + ((sizeof(x) == sizeof(double)) ? T_DOUBLE : -1)) + #if !defined(T_SIZET) #if !defined(T_ULONGLONG) #define T_SIZET \ @@ -197,9 +253,9 @@ static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); #endif #endif -static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); -static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) @@ -221,6 +277,7 @@ static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); static PyObject *__pyx_m; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; @@ -228,35 +285,144 @@ static const char *__pyx_filename; static const char **__pyx_f; -#ifdef CYTHON_REFNANNY -typedef struct { - void (*INCREF)(void*, PyObject*, int); - void (*DECREF)(void*, PyObject*, int); - void (*GOTREF)(void*, PyObject*, int); - void (*GIVEREF)(void*, PyObject*, int); - void* (*NewContext)(const char*, int, const char*); - void (*FinishContext)(void**); -} __Pyx_RefnannyAPIStruct; -static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL; -#define __Pyx_ImportRefcountAPI(name) (__Pyx_RefnannyAPIStruct *) PyCObject_Import((char *)name, (char *)"RefnannyAPI") -#define __Pyx_INCREF(r) __Pyx_Refnanny->INCREF(__pyx_refchk, (PyObject *)(r), __LINE__) -#define __Pyx_DECREF(r) __Pyx_Refnanny->DECREF(__pyx_refchk, (PyObject *)(r), __LINE__) -#define __Pyx_GOTREF(r) __Pyx_Refnanny->GOTREF(__pyx_refchk, (PyObject *)(r), __LINE__) -#define __Pyx_GIVEREF(r) __Pyx_Refnanny->GIVEREF(__pyx_refchk, (PyObject *)(r), __LINE__) -#define __Pyx_XDECREF(r) if((r) == NULL) ; else __Pyx_DECREF(r) -#define __Pyx_SetupRefcountContext(name) void* __pyx_refchk = __Pyx_Refnanny->NewContext((name), __LINE__, __FILE__) -#define __Pyx_FinishRefcountContext() __Pyx_Refnanny->FinishContext(&__pyx_refchk) +#if !defined(CYTHON_CCOMPLEX) + #if defined(__cplusplus) + #define CYTHON_CCOMPLEX 1 + #elif defined(_Complex_I) + #define CYTHON_CCOMPLEX 1 + #else + #define CYTHON_CCOMPLEX 0 + #endif +#endif + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #include <complex> + #else + #include <complex.h> + #endif +#endif + +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj +#endif + +typedef npy_int8 __pyx_t_5numpy_int8_t; + +typedef npy_int16 __pyx_t_5numpy_int16_t; + +typedef npy_int32 __pyx_t_5numpy_int32_t; + +typedef npy_int64 __pyx_t_5numpy_int64_t; + +typedef npy_uint8 __pyx_t_5numpy_uint8_t; + +typedef npy_uint16 __pyx_t_5numpy_uint16_t; + +typedef npy_uint32 __pyx_t_5numpy_uint32_t; + +typedef npy_uint64 __pyx_t_5numpy_uint64_t; + +typedef npy_float32 __pyx_t_5numpy_float32_t; + +typedef npy_float64 __pyx_t_5numpy_float64_t; + +typedef npy_long __pyx_t_5numpy_int_t; + +typedef npy_longlong __pyx_t_5numpy_long_t; + +typedef npy_intp __pyx_t_5numpy_intp_t; + +typedef npy_uintp __pyx_t_5numpy_uintp_t; + +typedef npy_ulong __pyx_t_5numpy_uint_t; + +typedef npy_ulonglong __pyx_t_5numpy_ulong_t; + +typedef npy_double __pyx_t_5numpy_float_t; + +typedef npy_double __pyx_t_5numpy_double_t; + +typedef npy_longdouble __pyx_t_5numpy_longdouble_t; + +typedef __pyx_t_5numpy_float64_t __pyx_t_13lasso_cd_fast_DOUBLE; + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< float > __pyx_t_float_complex; + #else + typedef float _Complex __pyx_t_float_complex; + #endif #else -#define __Pyx_INCREF(r) Py_INCREF(r) -#define __Pyx_DECREF(r) Py_DECREF(r) -#define __Pyx_GOTREF(r) -#define __Pyx_GIVEREF(r) -#define __Pyx_XDECREF(r) Py_XDECREF(r) -#define __Pyx_SetupRefcountContext(name) -#define __Pyx_FinishRefcountContext() + typedef struct { float real, imag; } __pyx_t_float_complex; +#endif + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< double > __pyx_t_double_complex; + #else + typedef double _Complex __pyx_t_double_complex; + #endif +#else + typedef struct { double real, imag; } __pyx_t_double_complex; +#endif + +/* Type declarations */ + +typedef npy_cfloat __pyx_t_5numpy_cfloat_t; + +typedef npy_cdouble __pyx_t_5numpy_cdouble_t; + +typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; + +typedef npy_cdouble __pyx_t_5numpy_complex_t; + +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif + +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule((char *)modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); + end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; + } + #define __Pyx_RefNannySetupContext(name) void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) + #define __Pyx_RefNannyFinishContext() __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0) +#else + #define __Pyx_RefNannySetupContext(name) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) #endif /* CYTHON_REFNANNY */ -#define __Pyx_XGIVEREF(r) if((r) == NULL) ; else __Pyx_GIVEREF(r) -#define __Pyx_XGOTREF(r) if((r) == NULL) ; else __Pyx_GOTREF(r) +#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0) +#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0) static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name); /*proto*/ @@ -288,89 +454,26 @@ typedef struct { } __Pyx_BufFmt_StackElem; -static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); -static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) #define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) -static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ - - -static INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { - PyObject *r; - if (!j) return NULL; - r = PyObject_GetItem(o, j); - Py_DECREF(j); - return r; -} - +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -#define __Pyx_GetItemInt_List(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_List_Fast(o, i, size <= sizeof(long)) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -static INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) { - if (likely(o != Py_None)) { - if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { - PyObject *r = PyList_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) { - PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i); - Py_INCREF(r); - return r; - } - } - return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i)); -} - -#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) - -static INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) { - if (likely(o != Py_None)) { - if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) { - PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i); - Py_INCREF(r); - return r; - } - } - return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i)); -} +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void); +static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/ +static int __Pyx_EndUnpack(PyObject *); /*proto*/ -#define __Pyx_GetItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -static INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) { - PyObject *r; - if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) { - r = PyList_GET_ITEM(o, i); - Py_INCREF(r); - } - else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { - r = PyTuple_GET_ITEM(o, i); - Py_INCREF(r); - } - else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) { - r = PySequence_GetItem(o, i); - } - else { - r = __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i)); - } - return r; -} +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ @@ -389,446 +492,337 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ -#if __PYX_USE_C99_COMPLEX - #define __Pyx_REAL_PART(z) __real__(z) - #define __Pyx_IMAG_PART(z) __imag__(z) +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #define __Pyx_CREAL(z) ((z).real()) + #define __Pyx_CIMAG(z) ((z).imag()) + #else + #define __Pyx_CREAL(z) (__real__(z)) + #define __Pyx_CIMAG(z) (__imag__(z)) + #endif #else - #define __Pyx_REAL_PART(z) ((z).real) - #define __Pyx_IMAG_PART(z) ((z).imag) + #define __Pyx_CREAL(z) ((z).real) + #define __Pyx_CIMAG(z) ((z).imag) #endif -#define __pyx_PyObject_from_complex(z) PyComplex_FromDoubles((double)__Pyx_REAL_PART(z), (double)__Pyx_IMAG_PART(z)) - -#if __PYX_USE_C99_COMPLEX - - typedef float _Complex __pyx_t_float_complex; - static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { - return x + y*(__pyx_t_float_complex)_Complex_I; - } - - #define __pyx_t_float_complex_is_zero(a) ((a) == 0) - #define __pyx_t_float_complex_eq(a, b) ((a) == (b)) - #define __pyx_t_float_complex_add(a, b) ((a)+(b)) - #define __pyx_t_float_complex_sub(a, b) ((a)-(b)) - #define __pyx_t_float_complex_mul(a, b) ((a)*(b)) - #define __pyx_t_float_complex_div(a, b) ((a)/(b)) - #define __pyx_t_float_complex_neg(a) (-(a)) - +#if defined(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX + #define __Pyx_SET_CREAL(z,x) ((z).real(x)) + #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) #else - - typedef struct { float real, imag; } __pyx_t_float_complex; - static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { - __pyx_t_float_complex c; c.real = x; c.imag = y; return c; - } - - static INLINE int __pyx_t_float_complex_is_zero(__pyx_t_float_complex a) { - return (a.real == 0) & (a.imag == 0); - } - - static INLINE int __pyx_t_float_complex_eq(__pyx_t_float_complex a, __pyx_t_float_complex b) { - return (a.real == b.real) & (a.imag == b.imag); - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_add(__pyx_t_float_complex a, __pyx_t_float_complex b) { - __pyx_t_float_complex z; - z.real = a.real + b.real; - z.imag = a.imag + b.imag; - return z; - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_sub(__pyx_t_float_complex a, __pyx_t_float_complex b) { - __pyx_t_float_complex z; - z.real = a.real - b.real; - z.imag = a.imag - b.imag; - return z; - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_mul(__pyx_t_float_complex a, __pyx_t_float_complex b) { - __pyx_t_float_complex z; - z.real = a.real * b.real - a.imag * b.imag; - z.imag = a.real * b.imag + a.imag * b.real; - return z; - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_div(__pyx_t_float_complex a, __pyx_t_float_complex b) { - __pyx_t_float_complex z; - float denom = b.real*b.real + b.imag*b.imag; - z.real = (a.real * b.real + a.imag * b.imag) / denom; - z.imag = (a.imag * b.real - a.real * b.imag) / denom; - return z; - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_neg(__pyx_t_float_complex a) { - __pyx_t_float_complex z; - z.real = -a.real; - z.imag = -a.imag; - return z; - } - + #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) + #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) #endif -#if __PYX_USE_C99_COMPLEX - - typedef double _Complex __pyx_t_double_complex; - static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { - return x + y*(__pyx_t_double_complex)_Complex_I; - } - - #define __pyx_t_double_complex_is_zero(a) ((a) == 0) - #define __pyx_t_double_complex_eq(a, b) ((a) == (b)) - #define __pyx_t_double_complex_add(a, b) ((a)+(b)) - #define __pyx_t_double_complex_sub(a, b) ((a)-(b)) - #define __pyx_t_double_complex_mul(a, b) ((a)*(b)) - #define __pyx_t_double_complex_div(a, b) ((a)/(b)) - #define __pyx_t_double_complex_neg(a) (-(a)) - +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); + +#if CYTHON_CCOMPLEX + #define __Pyx_c_eqf(a, b) ((a)==(b)) + #define __Pyx_c_sumf(a, b) ((a)+(b)) + #define __Pyx_c_difff(a, b) ((a)-(b)) + #define __Pyx_c_prodf(a, b) ((a)*(b)) + #define __Pyx_c_quotf(a, b) ((a)/(b)) + #define __Pyx_c_negf(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zerof(z) ((z)==(float)0) + #define __Pyx_c_conjf(z) (::std::conj(z)) + /*#define __Pyx_c_absf(z) (::std::abs(z))*/ + #else + #define __Pyx_c_is_zerof(z) ((z)==0) + #define __Pyx_c_conjf(z) (conjf(z)) + /*#define __Pyx_c_absf(z) (cabsf(z))*/ + #endif #else - - typedef struct { double real, imag; } __pyx_t_double_complex; - static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { - __pyx_t_double_complex c; c.real = x; c.imag = y; return c; - } - - static INLINE int __pyx_t_double_complex_is_zero(__pyx_t_double_complex a) { - return (a.real == 0) & (a.imag == 0); - } - - static INLINE int __pyx_t_double_complex_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) { - return (a.real == b.real) & (a.imag == b.imag); - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_add(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - z.real = a.real + b.real; - z.imag = a.imag + b.imag; - return z; - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_sub(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - z.real = a.real - b.real; - z.imag = a.imag - b.imag; - return z; - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_mul(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - z.real = a.real * b.real - a.imag * b.imag; - z.imag = a.real * b.imag + a.imag * b.real; - return z; - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_div(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - double denom = b.real*b.real + b.imag*b.imag; - z.real = (a.real * b.real + a.imag * b.imag) / denom; - z.imag = (a.imag * b.real - a.real * b.imag) / denom; - return z; - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_neg(__pyx_t_double_complex a) { - __pyx_t_double_complex z; - z.real = -a.real; - z.imag = -a.imag; - return z; - } - + static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); + /*static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex);*/ #endif -#if __PYX_USE_C99_COMPLEX - - typedef long double _Complex __pyx_t_long__double_complex; - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_from_parts(long double x, long double y) { - return x + y*(__pyx_t_long__double_complex)_Complex_I; - } - - #define __pyx_t_long__double_complex_is_zero(a) ((a) == 0) - #define __pyx_t_long__double_complex_eq(a, b) ((a) == (b)) - #define __pyx_t_long__double_complex_add(a, b) ((a)+(b)) - #define __pyx_t_long__double_complex_sub(a, b) ((a)-(b)) - #define __pyx_t_long__double_complex_mul(a, b) ((a)*(b)) - #define __pyx_t_long__double_complex_div(a, b) ((a)/(b)) - #define __pyx_t_long__double_complex_neg(a) (-(a)) - +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); + +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq(a, b) ((a)==(b)) + #define __Pyx_c_sum(a, b) ((a)+(b)) + #define __Pyx_c_diff(a, b) ((a)-(b)) + #define __Pyx_c_prod(a, b) ((a)*(b)) + #define __Pyx_c_quot(a, b) ((a)/(b)) + #define __Pyx_c_neg(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero(z) ((z)==(double)0) + #define __Pyx_c_conj(z) (::std::conj(z)) + /*#define __Pyx_c_abs(z) (::std::abs(z))*/ + #else + #define __Pyx_c_is_zero(z) ((z)==0) + #define __Pyx_c_conj(z) (conj(z)) + /*#define __Pyx_c_abs(z) (cabs(z))*/ + #endif #else - - typedef struct { long double real, imag; } __pyx_t_long__double_complex; - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_from_parts(long double x, long double y) { - __pyx_t_long__double_complex c; c.real = x; c.imag = y; return c; - } - - static INLINE int __pyx_t_long__double_complex_is_zero(__pyx_t_long__double_complex a) { - return (a.real == 0) & (a.imag == 0); - } - - static INLINE int __pyx_t_long__double_complex_eq(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - return (a.real == b.real) & (a.imag == b.imag); - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_add(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - __pyx_t_long__double_complex z; - z.real = a.real + b.real; - z.imag = a.imag + b.imag; - return z; - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_sub(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - __pyx_t_long__double_complex z; - z.real = a.real - b.real; - z.imag = a.imag - b.imag; - return z; - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_mul(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - __pyx_t_long__double_complex z; - z.real = a.real * b.real - a.imag * b.imag; - z.imag = a.real * b.imag + a.imag * b.real; - return z; - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_div(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - __pyx_t_long__double_complex z; - long double denom = b.real*b.real + b.imag*b.imag; - z.real = (a.real * b.real + a.imag * b.imag) / denom; - z.imag = (a.imag * b.real - a.real * b.imag) / denom; - return z; - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_neg(__pyx_t_long__double_complex a) { - __pyx_t_long__double_complex z; - z.real = -a.real; - z.imag = -a.imag; - return z; - } - + static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); + /*static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex);*/ #endif static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static INLINE int __Pyx_StrEq(const char *, const char *); /*proto*/ - -static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); +static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); -static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); +static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); -static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); +static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); -static INLINE char __Pyx_PyInt_AsChar(PyObject *); +static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); -static INLINE short __Pyx_PyInt_AsShort(PyObject *); +static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); -static INLINE int __Pyx_PyInt_AsInt(PyObject *); +static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); -static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); +static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); -static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); +static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); -static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); +static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); -static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); +static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); -static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); -static INLINE long __Pyx_PyInt_AsLong(PyObject *); +static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); -static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); -static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); +static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); -static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); +static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); -static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size); /*proto*/ +static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict); /*proto*/ static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static void __Pyx_AddTraceback(const char *funcname); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ - -/* Type declarations */ - -typedef npy_int8 __pyx_t_5numpy_int8_t; - -typedef npy_int16 __pyx_t_5numpy_int16_t; - -typedef npy_int32 __pyx_t_5numpy_int32_t; - -typedef npy_int64 __pyx_t_5numpy_int64_t; - -typedef npy_uint8 __pyx_t_5numpy_uint8_t; - -typedef npy_uint16 __pyx_t_5numpy_uint16_t; - -typedef npy_uint32 __pyx_t_5numpy_uint32_t; - -typedef npy_uint64 __pyx_t_5numpy_uint64_t; - -typedef npy_float32 __pyx_t_5numpy_float32_t; - -typedef npy_float64 __pyx_t_5numpy_float64_t; - -typedef npy_complex64 __pyx_t_5numpy_complex64_t; - -typedef npy_complex128 __pyx_t_5numpy_complex128_t; - -typedef npy_long __pyx_t_5numpy_int_t; - -typedef npy_longlong __pyx_t_5numpy_long_t; - -typedef npy_ulong __pyx_t_5numpy_uint_t; - -typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - -typedef npy_double __pyx_t_5numpy_float_t; - -typedef npy_double __pyx_t_5numpy_double_t; - -typedef npy_longdouble __pyx_t_5numpy_longdouble_t; - -typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - -typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - -typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - -typedef npy_cdouble __pyx_t_5numpy_complex_t; - -typedef __pyx_t_5numpy_float64_t __pyx_t_13lasso_cd_fast_DOUBLE; /* Module declarations from python_buffer */ +/* Module declarations from python_ref */ + /* Module declarations from stdlib */ +/* Module declarations from stdio */ + /* Module declarations from numpy */ /* Module declarations from numpy */ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; +static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; +static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ +static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *); /*proto*/ /* Module declarations from cython */ /* Module declarations from lasso_cd_fast */ -static INLINE double __pyx_f_13lasso_cd_fast_fsign(double); /*proto*/ +static CYTHON_INLINE double __pyx_f_13lasso_cd_fast_fmax(double, double); /*proto*/ +static CYTHON_INLINE double __pyx_f_13lasso_cd_fast_fsign(double); /*proto*/ static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_13lasso_cd_fast_DOUBLE = { "lasso_cd_fast.DOUBLE", NULL, sizeof(__pyx_t_13lasso_cd_fast_DOUBLE), 'R' }; #define __Pyx_MODULE_NAME "lasso_cd_fast" int __pyx_module_is_main_lasso_cd_fast = 0; /* Implementation of lasso_cd_fast */ -static PyObject *__pyx_int_2; -static PyObject *__pyx_int_0; -static char __pyx_k___main__[] = "__main__"; -static PyObject *__pyx_kp___main__; -static char __pyx_k_model[] = "model"; -static PyObject *__pyx_kp_model; -static char __pyx_k_X[] = "X"; -static PyObject *__pyx_kp_X; -static char __pyx_k_y[] = "y"; -static PyObject *__pyx_kp_y; -static char __pyx_k_maxit[] = "maxit"; -static PyObject *__pyx_kp_maxit; -static char __pyx_k_numpy[] = "numpy"; -static PyObject *__pyx_kp_numpy; -static char __pyx_k_np[] = "np"; -static PyObject *__pyx_kp_np; -static char __pyx_k_31[] = "scipy.linalg"; -static PyObject *__pyx_kp_31; -static char __pyx_k_32[] = "*"; -static PyObject *__pyx_kp_32; -static char __pyx_k_linalg[] = "linalg"; -static PyObject *__pyx_kp_linalg; -static char __pyx_k_alpha[] = "alpha"; -static PyObject *__pyx_kp_alpha; -static char __pyx_k_coef_[] = "coef_"; -static PyObject *__pyx_kp_coef_; -static char __pyx_k_callbacks[] = "callbacks"; -static PyObject *__pyx_kp_callbacks; -static char __pyx_k_sum[] = "sum"; -static PyObject *__pyx_kp_sum; -static char __pyx_k_axis[] = "axis"; -static PyObject *__pyx_kp_axis; -static char __pyx_k_dot[] = "dot"; -static PyObject *__pyx_kp_dot; -static char __pyx_k_range[] = "range"; -static PyObject *__pyx_kp_range; -static char __pyx_k_xrange[] = "xrange"; -static PyObject *__pyx_kp_xrange; -static char __pyx_k_w[] = "w"; -static PyObject *__pyx_kp_w; -static char __pyx_k_R[] = "R"; -static PyObject *__pyx_kp_R; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_xrange; -static PyObject *__pyx_int_15; -static char __pyx_k___getbuffer__[] = "__getbuffer__"; -static PyObject *__pyx_kp___getbuffer__; -static char __pyx_k___releasebuffer__[] = "__releasebuffer__"; -static PyObject *__pyx_kp___releasebuffer__; -static char __pyx_k_info[] = "info"; -static PyObject *__pyx_kp_info; -static char __pyx_k_flags[] = "flags"; -static PyObject *__pyx_kp_flags; -static char __pyx_k_ValueError[] = "ValueError"; -static PyObject *__pyx_kp_ValueError; -static char __pyx_k_itervalues[] = "itervalues"; -static PyObject *__pyx_kp_itervalues; -static char __pyx_k_RuntimeError[] = "RuntimeError"; -static PyObject *__pyx_kp_RuntimeError; -static PyObject *__pyx_kp_1; -static PyObject *__pyx_kp_2; -static PyObject *__pyx_kp_5; -static PyObject *__pyx_kp_23; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_RuntimeError; static char __pyx_k_1[] = "ndarray is not C contiguous"; static char __pyx_k_2[] = "ndarray is not Fortran contiguous"; -static char __pyx_k_3[] = ">"; -static char __pyx_k_4[] = "<"; -static char __pyx_k_5[] = "Non-native byte order not supported"; -static char __pyx_k_6[] = "b"; -static char __pyx_k_7[] = "B"; -static char __pyx_k_8[] = "h"; -static char __pyx_k_9[] = "H"; -static char __pyx_k_10[] = "i"; -static char __pyx_k_11[] = "I"; -static char __pyx_k_12[] = "l"; -static char __pyx_k_13[] = "L"; -static char __pyx_k_14[] = "q"; -static char __pyx_k_15[] = "Q"; -static char __pyx_k_16[] = "f"; -static char __pyx_k_17[] = "d"; -static char __pyx_k_18[] = "g"; -static char __pyx_k_19[] = "Zf"; -static char __pyx_k_20[] = "Zd"; -static char __pyx_k_21[] = "Zg"; -static char __pyx_k_22[] = "O"; -static char __pyx_k_23[] = "unknown dtype code in numpy.pxd (%d)"; -static char __pyx_k_24[] = "^"; -static PyObject *__pyx_kp_25; -static PyObject *__pyx_kp_28; -static PyObject *__pyx_kp_29; -static PyObject *__pyx_kp_30; -static char __pyx_k_25[] = "Format string allocated too short, see comment in numpy.pxd"; -static char __pyx_k_26[] = ">"; -static char __pyx_k_27[] = "<"; -static char __pyx_k_28[] = "Non-native byte order not supported"; -static char __pyx_k_29[] = "Format string allocated too short."; -static char __pyx_k_30[] = "unknown dtype code in numpy.pxd (%d)"; - -/* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":18 +static char __pyx_k_3[] = "Non-native byte order not supported"; +static char __pyx_k_4[] = "unknown dtype code in numpy.pxd (%d)"; +static char __pyx_k_5[] = "Format string allocated too short, see comment in numpy.pxd"; +static char __pyx_k_6[] = "Format string allocated too short."; +static char __pyx_k_7[] = "scipy.linalg"; +static char __pyx_k_8[] = "*"; +static char __pyx_k_9[] = "lasso_coordinate_descent (line 33)"; +static char __pyx_k_10[] = "lasso_coordinate_descent"; +static char __pyx_k__B[] = "B"; +static char __pyx_k__H[] = "H"; +static char __pyx_k__I[] = "I"; +static char __pyx_k__L[] = "L"; +static char __pyx_k__O[] = "O"; +static char __pyx_k__Q[] = "Q"; +static char __pyx_k__R[] = "R"; +static char __pyx_k__X[] = "X"; +static char __pyx_k__b[] = "b"; +static char __pyx_k__d[] = "d"; +static char __pyx_k__f[] = "f"; +static char __pyx_k__g[] = "g"; +static char __pyx_k__h[] = "h"; +static char __pyx_k__i[] = "i"; +static char __pyx_k__l[] = "l"; +static char __pyx_k__q[] = "q"; +static char __pyx_k__w[] = "w"; +static char __pyx_k__y[] = "y"; +static char __pyx_k__Zd[] = "Zd"; +static char __pyx_k__Zf[] = "Zf"; +static char __pyx_k__Zg[] = "Zg"; +static char __pyx_k__np[] = "np"; +static char __pyx_k__buf[] = "buf"; +static char __pyx_k__dot[] = "dot"; +static char __pyx_k__obj[] = "obj"; +static char __pyx_k__sum[] = "sum"; +static char __pyx_k__axis[] = "axis"; +static char __pyx_k__base[] = "base"; +static char __pyx_k__ndim[] = "ndim"; +static char __pyx_k__alpha[] = "alpha"; +static char __pyx_k__coef_[] = "coef_"; +static char __pyx_k__descr[] = "descr"; +static char __pyx_k__maxit[] = "maxit"; +static char __pyx_k__model[] = "model"; +static char __pyx_k__names[] = "names"; +static char __pyx_k__numpy[] = "numpy"; +static char __pyx_k__range[] = "range"; +static char __pyx_k__shape[] = "shape"; +static char __pyx_k__fields[] = "fields"; +static char __pyx_k__format[] = "format"; +static char __pyx_k__linalg[] = "linalg"; +static char __pyx_k__xrange[] = "xrange"; +static char __pyx_k__strides[] = "strides"; +static char __pyx_k____main__[] = "__main__"; +static char __pyx_k____test__[] = "__test__"; +static char __pyx_k__itemsize[] = "itemsize"; +static char __pyx_k__readonly[] = "readonly"; +static char __pyx_k__type_num[] = "type_num"; +static char __pyx_k__byteorder[] = "byteorder"; +static char __pyx_k__callbacks[] = "callbacks"; +static char __pyx_k__ValueError[] = "ValueError"; +static char __pyx_k__suboffsets[] = "suboffsets"; +static char __pyx_k__RuntimeError[] = "RuntimeError"; +static PyObject *__pyx_kp_u_1; +static PyObject *__pyx_n_s_10; +static PyObject *__pyx_kp_u_2; +static PyObject *__pyx_kp_u_3; +static PyObject *__pyx_kp_u_4; +static PyObject *__pyx_kp_u_5; +static PyObject *__pyx_kp_u_6; +static PyObject *__pyx_n_s_7; +static PyObject *__pyx_n_s_8; +static PyObject *__pyx_kp_u_9; +static PyObject *__pyx_n_s__R; +static PyObject *__pyx_n_s__RuntimeError; +static PyObject *__pyx_n_s__ValueError; +static PyObject *__pyx_n_s__X; +static PyObject *__pyx_n_s____main__; +static PyObject *__pyx_n_s____test__; +static PyObject *__pyx_n_s__alpha; +static PyObject *__pyx_n_s__axis; +static PyObject *__pyx_n_s__base; +static PyObject *__pyx_n_s__buf; +static PyObject *__pyx_n_s__byteorder; +static PyObject *__pyx_n_s__callbacks; +static PyObject *__pyx_n_s__coef_; +static PyObject *__pyx_n_s__descr; +static PyObject *__pyx_n_s__dot; +static PyObject *__pyx_n_s__fields; +static PyObject *__pyx_n_s__format; +static PyObject *__pyx_n_s__itemsize; +static PyObject *__pyx_n_s__linalg; +static PyObject *__pyx_n_s__maxit; +static PyObject *__pyx_n_s__model; +static PyObject *__pyx_n_s__names; +static PyObject *__pyx_n_s__ndim; +static PyObject *__pyx_n_s__np; +static PyObject *__pyx_n_s__numpy; +static PyObject *__pyx_n_s__obj; +static PyObject *__pyx_n_s__range; +static PyObject *__pyx_n_s__readonly; +static PyObject *__pyx_n_s__shape; +static PyObject *__pyx_n_s__strides; +static PyObject *__pyx_n_s__suboffsets; +static PyObject *__pyx_n_s__sum; +static PyObject *__pyx_n_s__type_num; +static PyObject *__pyx_n_s__w; +static PyObject *__pyx_n_s__xrange; +static PyObject *__pyx_n_s__y; +static PyObject *__pyx_int_0; +static PyObject *__pyx_int_2; +static PyObject *__pyx_int_15; + +/* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":17 * double rand() * + * cdef inline double fmax(double x, double y): # <<<<<<<<<<<<<< + * if x > y: return x + * return y + */ + +static CYTHON_INLINE double __pyx_f_13lasso_cd_fast_fmax(double __pyx_v_x, double __pyx_v_y) { + double __pyx_r; + int __pyx_t_1; + __Pyx_RefNannySetupContext("fmax"); + + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":18 + * + * cdef inline double fmax(double x, double y): + * if x > y: return x # <<<<<<<<<<<<<< + * return y + * + */ + __pyx_t_1 = (__pyx_v_x > __pyx_v_y); + if (__pyx_t_1) { + __pyx_r = __pyx_v_x; + goto __pyx_L0; + goto __pyx_L3; + } + __pyx_L3:; + + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":19 + * cdef inline double fmax(double x, double y): + * if x > y: return x + * return y # <<<<<<<<<<<<<< + * + * cdef inline double fsign(double f): + */ + __pyx_r = __pyx_v_y; + goto __pyx_L0; + + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":21 + * return y + * * cdef inline double fsign(double f): # <<<<<<<<<<<<<< * if f == 0: * return 0 */ -static INLINE double __pyx_f_13lasso_cd_fast_fsign(double __pyx_v_f) { +static CYTHON_INLINE double __pyx_f_13lasso_cd_fast_fsign(double __pyx_v_f) { double __pyx_r; int __pyx_t_1; - __Pyx_SetupRefcountContext("fsign"); + __Pyx_RefNannySetupContext("fsign"); - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":19 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":22 * * cdef inline double fsign(double f): * if f == 0: # <<<<<<<<<<<<<< @@ -838,7 +832,7 @@ static INLINE double __pyx_f_13lasso_cd_fast_fsign(double __pyx_v_f) { __pyx_t_1 = (__pyx_v_f == 0); if (__pyx_t_1) { - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":20 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":23 * cdef inline double fsign(double f): * if f == 0: * return 0 # <<<<<<<<<<<<<< @@ -850,7 +844,7 @@ static INLINE double __pyx_f_13lasso_cd_fast_fsign(double __pyx_v_f) { goto __pyx_L3; } - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":21 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":24 * if f == 0: * return 0 * elif f > 0: # <<<<<<<<<<<<<< @@ -860,7 +854,7 @@ static INLINE double __pyx_f_13lasso_cd_fast_fsign(double __pyx_v_f) { __pyx_t_1 = (__pyx_v_f > 0); if (__pyx_t_1) { - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":22 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":25 * return 0 * elif f > 0: * return 1.0 # <<<<<<<<<<<<<< @@ -873,7 +867,7 @@ static INLINE double __pyx_f_13lasso_cd_fast_fsign(double __pyx_v_f) { } /*else*/ { - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":24 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":27 * return 1.0 * else: * return -1.0 # <<<<<<<<<<<<<< @@ -887,11 +881,11 @@ static INLINE double __pyx_f_13lasso_cd_fast_fsign(double __pyx_v_f) { __pyx_r = 0; __pyx_L0:; - __Pyx_FinishRefcountContext(); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":30 +/* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":33 * @cython.boundscheck(False) * @cython.wraparound(False) * def lasso_coordinate_descent(model, # <<<<<<<<<<<<<< @@ -906,7 +900,7 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p PyArrayObject *__pyx_v_X = 0; PyArrayObject *__pyx_v_y = 0; unsigned int __pyx_v_maxit; - float __pyx_v_alpha; + double __pyx_v_alpha; PyArrayObject *__pyx_v_w = 0; PyObject *__pyx_v_callbacks; unsigned int __pyx_v_nsamples; @@ -914,8 +908,8 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p unsigned int __pyx_v_nclasses; PyArrayObject *__pyx_v_norm_cols_X = 0; PyArrayObject *__pyx_v_R = 0; - float __pyx_v_tmp; - float __pyx_v_w_ii; + double __pyx_v_tmp; + double __pyx_v_w_ii; unsigned int __pyx_v_ii; unsigned int __pyx_v_jj; unsigned int __pyx_v_n_iter; @@ -939,21 +933,20 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p Py_ssize_t __pyx_bshape_0_X = 0; Py_ssize_t __pyx_bshape_1_X = 0; PyObject *__pyx_r = NULL; - PyObject *__pyx_1 = 0; PyObject *__pyx_t_1 = NULL; - float __pyx_t_2; + double __pyx_t_2; PyArrayObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyArrayObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_5 = NULL; + PyArrayObject *__pyx_t_6 = NULL; PyArrayObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; unsigned int __pyx_t_9; unsigned int __pyx_t_10; unsigned int __pyx_t_11; - int __pyx_t_12; + unsigned int __pyx_t_12; unsigned int __pyx_t_13; - unsigned int __pyx_t_14; + int __pyx_t_14; unsigned int __pyx_t_15; unsigned int __pyx_t_16; unsigned int __pyx_t_17; @@ -962,13 +955,18 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p unsigned int __pyx_t_20; unsigned int __pyx_t_21; unsigned int __pyx_t_22; - unsigned int __pyx_t_23; + __pyx_t_13lasso_cd_fast_DOUBLE __pyx_t_23; unsigned int __pyx_t_24; unsigned int __pyx_t_25; unsigned int __pyx_t_26; - int __pyx_t_27; - static PyObject **__pyx_pyargnames[] = {&__pyx_kp_model,&__pyx_kp_X,&__pyx_kp_y,&__pyx_kp_maxit,0}; - __Pyx_SetupRefcountContext("lasso_coordinate_descent"); + unsigned int __pyx_t_27; + unsigned int __pyx_t_28; + unsigned int __pyx_t_29; + unsigned int __pyx_t_30; + PyObject *__pyx_t_31 = NULL; + int __pyx_t_32; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__model,&__pyx_n_s__X,&__pyx_n_s__y,&__pyx_n_s__maxit,0}; + __Pyx_RefNannySetupContext("lasso_coordinate_descent"); __pyx_self = __pyx_self; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); @@ -983,50 +981,53 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p } switch (PyTuple_GET_SIZE(__pyx_args)) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_model); + values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__model); if (likely(values[0])) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_X); + values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__X); if (likely(values[1])) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("lasso_coordinate_descent", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("lasso_coordinate_descent", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: - values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_y); + values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y); if (likely(values[2])) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("lasso_coordinate_descent", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("lasso_coordinate_descent", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: - values[3] = PyDict_GetItem(__pyx_kwds, __pyx_kp_maxit); + values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__maxit); if (likely(values[3])) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("lasso_coordinate_descent", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("lasso_coordinate_descent", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "lasso_coordinate_descent") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "lasso_coordinate_descent") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __pyx_v_model = values[0]; __pyx_v_X = ((PyArrayObject *)values[1]); __pyx_v_y = ((PyArrayObject *)values[2]); - __pyx_v_maxit = __Pyx_PyInt_AsUnsignedInt(values[3]); if (unlikely((__pyx_v_maxit == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_maxit = __Pyx_PyInt_AsUnsignedInt(values[3]); if (unlikely((__pyx_v_maxit == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { __pyx_v_model = PyTuple_GET_ITEM(__pyx_args, 0); __pyx_v_X = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1)); __pyx_v_y = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2)); - __pyx_v_maxit = __Pyx_PyInt_AsUnsignedInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_maxit == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_maxit = __Pyx_PyInt_AsUnsignedInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_maxit == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("lasso_coordinate_descent", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("lasso_coordinate_descent", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("lasso_cd_fast.lasso_coordinate_descent"); return NULL; __pyx_L4_argument_unpacking_done:; + __Pyx_INCREF(__pyx_v_model); + __Pyx_INCREF((PyObject *)__pyx_v_X); + __Pyx_INCREF((PyObject *)__pyx_v_y); __pyx_v_callbacks = Py_None; __Pyx_INCREF(Py_None); __pyx_v_callback = Py_None; __Pyx_INCREF(Py_None); __pyx_v_goon = Py_None; __Pyx_INCREF(Py_None); @@ -1035,50 +1036,50 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p __pyx_bstruct_R.buf = NULL; __pyx_bstruct_X.buf = NULL; __pyx_bstruct_y.buf = NULL; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_X), __pyx_ptype_5numpy_ndarray, 1, "X", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_X), __pyx_ptype_5numpy_ndarray, 1, "X", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_X, (PyObject*)__pyx_v_X, &__Pyx_TypeInfo_nn___pyx_t_13lasso_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_X, (PyObject*)__pyx_v_X, &__Pyx_TypeInfo_nn___pyx_t_13lasso_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_bstride_0_X = __pyx_bstruct_X.strides[0]; __pyx_bstride_1_X = __pyx_bstruct_X.strides[1]; __pyx_bshape_0_X = __pyx_bstruct_X.shape[0]; __pyx_bshape_1_X = __pyx_bstruct_X.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_y, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_13lasso_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_y, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_13lasso_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_bstride_0_y = __pyx_bstruct_y.strides[0]; __pyx_bshape_0_y = __pyx_bstruct_y.shape[0]; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":39 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":42 * * # get the data information into easy vars - * cdef float alpha = model.alpha # <<<<<<<<<<<<<< + * cdef double alpha = model.alpha # <<<<<<<<<<<<<< * cdef np.ndarray[DOUBLE, ndim=1] w = model.coef_ * callbacks = model.callbacks */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_model, __pyx_kp_alpha); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_v_model, __pyx_n_s__alpha); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_alpha = __pyx_t_2; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":40 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":43 * # get the data information into easy vars - * cdef float alpha = model.alpha + * cdef double alpha = model.alpha * cdef np.ndarray[DOUBLE, ndim=1] w = model.coef_ # <<<<<<<<<<<<<< * callbacks = model.callbacks * */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_model, __pyx_kp_coef_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_v_model, __pyx_n_s__coef_); 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 (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_w, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_nn___pyx_t_13lasso_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_w = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_w.buf = NULL; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_w = __pyx_bstruct_w.strides[0]; __pyx_bshape_0_w = __pyx_bstruct_w.shape[0]; } @@ -1087,20 +1088,20 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p __pyx_v_w = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":41 - * cdef float alpha = model.alpha + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":44 + * cdef double alpha = model.alpha * cdef np.ndarray[DOUBLE, ndim=1] w = model.coef_ * callbacks = model.callbacks # <<<<<<<<<<<<<< * * cdef unsigned int nsamples = X.shape[0] */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_model, __pyx_kp_callbacks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetAttr(__pyx_v_model, __pyx_n_s__callbacks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_v_callbacks); __pyx_v_callbacks = __pyx_t_1; __pyx_t_1 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":43 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":46 * callbacks = model.callbacks * * cdef unsigned int nsamples = X.shape[0] # <<<<<<<<<<<<<< @@ -1109,7 +1110,7 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p */ __pyx_v_nsamples = (__pyx_v_X->dimensions[0]); - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":44 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":47 * * cdef unsigned int nsamples = X.shape[0] * cdef unsigned int nfeatures = X.shape[1] # <<<<<<<<<<<<<< @@ -1118,7 +1119,7 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p */ __pyx_v_nfeatures = (__pyx_v_X->dimensions[1]); - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":45 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":48 * cdef unsigned int nsamples = X.shape[0] * cdef unsigned int nfeatures = X.shape[1] * cdef unsigned int nclasses = w.shape[1] # <<<<<<<<<<<<<< @@ -1127,83 +1128,83 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p */ __pyx_v_nclasses = (__pyx_v_w->dimensions[1]); - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":47 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":50 * cdef unsigned int nclasses = w.shape[1] * * cdef np.ndarray[DOUBLE, ndim=1] norm_cols_X = (X**2).sum(axis=0) # Compute norms of the columns of X # <<<<<<<<<<<<<< * cdef np.ndarray[DOUBLE, ndim=1] R = y - np.dot(X, w) # Init residual * */ - __pyx_t_1 = PyNumber_Power(((PyObject *)__pyx_v_X), __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Power(((PyObject *)__pyx_v_X), __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_kp_sum); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__sum); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_1)); - if (PyDict_SetItem(__pyx_1, __pyx_kp_axis, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__axis), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; - if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_5 = ((PyArrayObject *)__pyx_t_1); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_norm_cols_X, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_13lasso_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_norm_cols_X, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_13lasso_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_norm_cols_X = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_norm_cols_X.buf = NULL; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_norm_cols_X = __pyx_bstruct_norm_cols_X.strides[0]; __pyx_bshape_0_norm_cols_X = __pyx_bstruct_norm_cols_X.shape[0]; } } + __pyx_t_6 = 0; + __pyx_v_norm_cols_X = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_norm_cols_X = ((PyArrayObject *)__pyx_t_1); - __pyx_t_1 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":48 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":51 * * cdef np.ndarray[DOUBLE, ndim=1] norm_cols_X = (X**2).sum(axis=0) # Compute norms of the columns of X * cdef np.ndarray[DOUBLE, ndim=1] R = y - np.dot(X, w) # Init residual # <<<<<<<<<<<<<< * - * cdef float tmp + * cdef double tmp */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_dot); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__dot); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_X)); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_X)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_X)); __Pyx_GIVEREF(((PyObject *)__pyx_v_X)); __Pyx_INCREF(((PyObject *)__pyx_v_w)); - PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_w)); + PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_w)); __Pyx_GIVEREF(((PyObject *)__pyx_v_w)); - __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Subtract(((PyObject *)__pyx_v_y), __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_7 = ((PyArrayObject *)__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyNumber_Subtract(((PyObject *)__pyx_v_y), __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_R, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_13lasso_cd_fast_DOUBLE, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_R = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_R.buf = NULL; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_bstride_0_R = __pyx_bstruct_R.strides[0]; __pyx_bshape_0_R = __pyx_bstruct_R.shape[0]; } } __pyx_t_7 = 0; - __pyx_v_R = ((PyArrayObject *)__pyx_t_4); - __pyx_t_4 = 0; + __pyx_v_R = ((PyArrayObject *)__pyx_t_5); + __pyx_t_5 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":56 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":59 * cdef unsigned int n_iter * * for callback in callbacks: # <<<<<<<<<<<<<< @@ -1211,129 +1212,132 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p * */ if (PyList_CheckExact(__pyx_v_callbacks) || PyTuple_CheckExact(__pyx_v_callbacks)) { - __pyx_t_8 = 0; __pyx_t_4 = __pyx_v_callbacks; __Pyx_INCREF(__pyx_t_4); + __pyx_t_8 = 0; __pyx_t_5 = __pyx_v_callbacks; __Pyx_INCREF(__pyx_t_5); } else { - __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_callbacks); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_callbacks); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); } for (;;) { - if (likely(PyList_CheckExact(__pyx_t_4))) { - if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break; - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; - } else if (likely(PyTuple_CheckExact(__pyx_t_4))) { - if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break; - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; + if (likely(PyList_CheckExact(__pyx_t_5))) { + if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break; + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; + } else if (likely(PyTuple_CheckExact(__pyx_t_5))) { + if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; } else { - __pyx_t_6 = PyIter_Next(__pyx_t_4); - if (!__pyx_t_6) { - if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyIter_Next(__pyx_t_5); + if (!__pyx_t_4) { + if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } - __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_v_callback); - __pyx_v_callback = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_v_callback = __pyx_t_4; + __pyx_t_4 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":57 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":60 * * for callback in callbacks: * callback(0) # Init callback # <<<<<<<<<<<<<< * * goon = True */ - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_0); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - __pyx_t_1 = PyObject_Call(__pyx_v_callback, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_v_callback, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":59 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":62 * callback(0) # Init callback * * goon = True # <<<<<<<<<<<<<< * for n_iter in range(maxit): * for ii in xrange(nfeatures): # Loop over coordinates */ - __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_v_goon); - __pyx_v_goon = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_v_goon = __pyx_t_5; + __pyx_t_5 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":60 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":63 * * goon = True * for n_iter in range(maxit): # <<<<<<<<<<<<<< * for ii in xrange(nfeatures): # Loop over coordinates * w_ii = w[ii] # Store previous value */ - for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_v_maxit; __pyx_t_9+=1) { - __pyx_v_n_iter = __pyx_t_9; + __pyx_t_9 = __pyx_v_maxit; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_n_iter = __pyx_t_10; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":61 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":64 * goon = True * for n_iter in range(maxit): * for ii in xrange(nfeatures): # Loop over coordinates # <<<<<<<<<<<<<< * w_ii = w[ii] # Store previous value * */ - for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_v_nfeatures; __pyx_t_10+=1) { - __pyx_v_ii = __pyx_t_10; + __pyx_t_11 = __pyx_v_nfeatures; + for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { + __pyx_v_ii = __pyx_t_12; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":62 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":65 * for n_iter in range(maxit): * for ii in xrange(nfeatures): # Loop over coordinates * w_ii = w[ii] # Store previous value # <<<<<<<<<<<<<< * * if w_ii != 0.0: */ - __pyx_t_11 = __pyx_v_ii; - __pyx_v_w_ii = (*__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_11, __pyx_bstride_0_w)); + __pyx_t_13 = __pyx_v_ii; + __pyx_v_w_ii = (*__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_13, __pyx_bstride_0_w)); - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":64 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":67 * w_ii = w[ii] # Store previous value * * if w_ii != 0.0: # <<<<<<<<<<<<<< * # R += w_ii * X[:,ii] * for jj in range(nsamples): */ - __pyx_t_12 = (__pyx_v_w_ii != 0.0); - if (__pyx_t_12) { + __pyx_t_14 = (__pyx_v_w_ii != 0.0); + if (__pyx_t_14) { - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":66 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":69 * if w_ii != 0.0: * # R += w_ii * X[:,ii] * for jj in range(nsamples): # <<<<<<<<<<<<<< * R[jj] += w_ii * X[jj, ii] * */ - for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_v_nsamples; __pyx_t_13+=1) { - __pyx_v_jj = __pyx_t_13; + __pyx_t_15 = __pyx_v_nsamples; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_jj = __pyx_t_16; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":67 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":70 * # R += w_ii * X[:,ii] * for jj in range(nsamples): * R[jj] += w_ii * X[jj, ii] # <<<<<<<<<<<<<< * * # tmp = (X[:,ii]*R).sum() */ - __pyx_t_14 = __pyx_v_jj; - __pyx_t_15 = __pyx_v_ii; - __pyx_t_16 = __pyx_v_jj; - *__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_16, __pyx_bstride_0_R) += (__pyx_v_w_ii * (*__Pyx_BufPtrStrided2d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_X.buf, __pyx_t_14, __pyx_bstride_0_X, __pyx_t_15, __pyx_bstride_1_X))); + __pyx_t_17 = __pyx_v_jj; + __pyx_t_18 = __pyx_v_ii; + __pyx_t_19 = __pyx_v_jj; + *__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_19, __pyx_bstride_0_R) += (__pyx_v_w_ii * (*__Pyx_BufPtrStrided2d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_X.buf, __pyx_t_17, __pyx_bstride_0_X, __pyx_t_18, __pyx_bstride_1_X))); } goto __pyx_L12; } __pyx_L12:; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":70 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":73 * * # tmp = (X[:,ii]*R).sum() * tmp = 0.0 # <<<<<<<<<<<<<< @@ -1342,80 +1346,88 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p */ __pyx_v_tmp = 0.0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":71 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":74 * # tmp = (X[:,ii]*R).sum() * tmp = 0.0 * for jj in range(nsamples): # <<<<<<<<<<<<<< * tmp += R[jj] * X[jj, ii] * */ - for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_v_nsamples; __pyx_t_13+=1) { - __pyx_v_jj = __pyx_t_13; + __pyx_t_15 = __pyx_v_nsamples; + for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { + __pyx_v_jj = __pyx_t_16; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":72 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":75 * tmp = 0.0 * for jj in range(nsamples): * tmp += R[jj] * X[jj, ii] # <<<<<<<<<<<<<< * * w[ii] = fsign(tmp) * fmax(fabs(tmp) - alpha, 0) / norm_cols_X[ii] */ - __pyx_t_17 = __pyx_v_jj; - __pyx_t_18 = __pyx_v_jj; - __pyx_t_19 = __pyx_v_ii; - __pyx_v_tmp += ((*__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_17, __pyx_bstride_0_R)) * (*__Pyx_BufPtrStrided2d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_X.buf, __pyx_t_18, __pyx_bstride_0_X, __pyx_t_19, __pyx_bstride_1_X))); + __pyx_t_20 = __pyx_v_jj; + __pyx_t_21 = __pyx_v_jj; + __pyx_t_22 = __pyx_v_ii; + __pyx_v_tmp += ((*__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_20, __pyx_bstride_0_R)) * (*__Pyx_BufPtrStrided2d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_X.buf, __pyx_t_21, __pyx_bstride_0_X, __pyx_t_22, __pyx_bstride_1_X))); } - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":74 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":77 * tmp += R[jj] * X[jj, ii] * * w[ii] = fsign(tmp) * fmax(fabs(tmp) - alpha, 0) / norm_cols_X[ii] # <<<<<<<<<<<<<< * * if w[ii] != 0.0: */ - __pyx_t_13 = __pyx_v_ii; - __pyx_t_20 = __pyx_v_ii; - *__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_20, __pyx_bstride_0_w) = ((__pyx_f_13lasso_cd_fast_fsign(__pyx_v_tmp) * fmax((fabs(__pyx_v_tmp) - __pyx_v_alpha), 0)) / (*__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_norm_cols_X.buf, __pyx_t_13, __pyx_bstride_0_norm_cols_X))); + __pyx_t_2 = (__pyx_f_13lasso_cd_fast_fsign(__pyx_v_tmp) * __pyx_f_13lasso_cd_fast_fmax((fabs(__pyx_v_tmp) - __pyx_v_alpha), 0)); + __pyx_t_15 = __pyx_v_ii; + __pyx_t_23 = (*__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_norm_cols_X.buf, __pyx_t_15, __pyx_bstride_0_norm_cols_X)); + if (unlikely(__pyx_t_23 == 0)) { + PyErr_Format(PyExc_ZeroDivisionError, "float division"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_16 = __pyx_v_ii; + *__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_16, __pyx_bstride_0_w) = (__pyx_t_2 / __pyx_t_23); - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":76 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":79 * w[ii] = fsign(tmp) * fmax(fabs(tmp) - alpha, 0) / norm_cols_X[ii] * * if w[ii] != 0.0: # <<<<<<<<<<<<<< * # R -= w[ii] * X[:,ii] # Update residual * for jj in range(nsamples): */ - __pyx_t_21 = __pyx_v_ii; - __pyx_t_12 = ((*__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_21, __pyx_bstride_0_w)) != 0.0); - if (__pyx_t_12) { + __pyx_t_24 = __pyx_v_ii; + __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_24, __pyx_bstride_0_w)) != 0.0); + if (__pyx_t_14) { - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":78 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":81 * if w[ii] != 0.0: * # R -= w[ii] * X[:,ii] # Update residual * for jj in range(nsamples): # <<<<<<<<<<<<<< * R[jj] -= w[ii] * X[jj, ii] # Update residual * */ - for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_v_nsamples; __pyx_t_22+=1) { - __pyx_v_jj = __pyx_t_22; + __pyx_t_25 = __pyx_v_nsamples; + for (__pyx_t_26 = 0; __pyx_t_26 < __pyx_t_25; __pyx_t_26+=1) { + __pyx_v_jj = __pyx_t_26; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":79 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":82 * # R -= w[ii] * X[:,ii] # Update residual * for jj in range(nsamples): * R[jj] -= w[ii] * X[jj, ii] # Update residual # <<<<<<<<<<<<<< * * for callback in callbacks: */ - __pyx_t_23 = __pyx_v_ii; - __pyx_t_24 = __pyx_v_jj; - __pyx_t_25 = __pyx_v_ii; - __pyx_t_26 = __pyx_v_jj; - *__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_26, __pyx_bstride_0_R) -= ((*__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_23, __pyx_bstride_0_w)) * (*__Pyx_BufPtrStrided2d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_X.buf, __pyx_t_24, __pyx_bstride_0_X, __pyx_t_25, __pyx_bstride_1_X))); + __pyx_t_27 = __pyx_v_ii; + __pyx_t_28 = __pyx_v_jj; + __pyx_t_29 = __pyx_v_ii; + __pyx_t_30 = __pyx_v_jj; + *__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_R.buf, __pyx_t_30, __pyx_bstride_0_R) -= ((*__Pyx_BufPtrStrided1d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_w.buf, __pyx_t_27, __pyx_bstride_0_w)) * (*__Pyx_BufPtrStrided2d(__pyx_t_13lasso_cd_fast_DOUBLE *, __pyx_bstruct_X.buf, __pyx_t_28, __pyx_bstride_0_X, __pyx_t_29, __pyx_bstride_1_X))); } goto __pyx_L17; } __pyx_L17:; } - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":81 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":84 * R[jj] -= w[ii] * X[jj, ii] # Update residual * * for callback in callbacks: # <<<<<<<<<<<<<< @@ -1423,22 +1435,22 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p * goon *= False */ if (PyList_CheckExact(__pyx_v_callbacks) || PyTuple_CheckExact(__pyx_v_callbacks)) { - __pyx_t_8 = 0; __pyx_t_4 = __pyx_v_callbacks; __Pyx_INCREF(__pyx_t_4); + __pyx_t_8 = 0; __pyx_t_5 = __pyx_v_callbacks; __Pyx_INCREF(__pyx_t_5); } else { - __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_callbacks); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_callbacks); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); } for (;;) { - if (likely(PyList_CheckExact(__pyx_t_4))) { - if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break; - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; - } else if (likely(PyTuple_CheckExact(__pyx_t_4))) { - if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break; - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; + if (likely(PyList_CheckExact(__pyx_t_5))) { + if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break; + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; + } else if (likely(PyTuple_CheckExact(__pyx_t_5))) { + if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; } else { - __pyx_t_1 = PyIter_Next(__pyx_t_4); + __pyx_t_1 = PyIter_Next(__pyx_t_5); if (!__pyx_t_1) { - if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } __Pyx_GOTREF(__pyx_t_1); @@ -1447,72 +1459,72 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p __pyx_v_callback = __pyx_t_1; __pyx_t_1 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":82 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":85 * * for callback in callbacks: * if not callback(n_iter, X=X, y=y, w=w, alpha=alpha, R=R): # <<<<<<<<<<<<<< * goon *= False * */ - __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_n_iter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_n_iter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_1)); - if (PyDict_SetItem(__pyx_1, __pyx_kp_X, ((PyObject *)__pyx_v_X)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_y, ((PyObject *)__pyx_v_y)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_1, __pyx_kp_w, ((PyObject *)__pyx_v_w)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_alpha); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_1, __pyx_kp_alpha, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_1, __pyx_kp_R, ((PyObject *)__pyx_v_R)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_v_callback, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_27 = (!__pyx_t_12); - if (__pyx_t_27) { - - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":83 + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__X), ((PyObject *)__pyx_v_X)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__y), ((PyObject *)__pyx_v_y)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__w), ((PyObject *)__pyx_v_w)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_31 = PyFloat_FromDouble(__pyx_v_alpha); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_31); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__alpha), __pyx_t_31) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__R), ((PyObject *)__pyx_v_R)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_31 = PyEval_CallObjectWithKeywords(__pyx_v_callback, __pyx_t_4, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_31); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_31); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; + __pyx_t_32 = (!__pyx_t_14); + if (__pyx_t_32) { + + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":86 * for callback in callbacks: * if not callback(n_iter, X=X, y=y, w=w, alpha=alpha, R=R): * goon *= False # <<<<<<<<<<<<<< * * if not goon: */ - __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_31 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_31); + __pyx_t_1 = PyNumber_InPlaceMultiply(__pyx_v_goon, __pyx_t_31); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_1 = PyNumber_InPlaceMultiply(__pyx_v_goon, __pyx_t_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; __Pyx_DECREF(__pyx_v_goon); - __pyx_v_goon = __pyx_1; - __pyx_1 = 0; + __pyx_v_goon = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L22; } __pyx_L22:; } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":85 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":88 * goon *= False * * if not goon: # <<<<<<<<<<<<<< * break * */ - __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_v_goon); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_12 = (!__pyx_t_27); - if (__pyx_t_12) { + __pyx_t_32 = __Pyx_PyObject_IsTrue(__pyx_v_goon); if (unlikely(__pyx_t_32 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = (!__pyx_t_32); + if (__pyx_t_14) { - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":86 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":89 * * if not goon: * break # <<<<<<<<<<<<<< @@ -1526,7 +1538,7 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p } __pyx_L9_break:; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":88 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":91 * break * * return w # <<<<<<<<<<<<<< @@ -1539,10 +1551,10 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_1); __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_31); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_norm_cols_X); @@ -1567,12 +1579,15 @@ static PyObject *__pyx_pf_13lasso_cd_fast_lasso_coordinate_descent(PyObject *__p __Pyx_XDECREF((PyObject *)__pyx_v_R); __Pyx_DECREF(__pyx_v_callback); __Pyx_DECREF(__pyx_v_goon); + __Pyx_DECREF(__pyx_v_model); + __Pyx_DECREF((PyObject *)__pyx_v_X); + __Pyx_DECREF((PyObject *)__pyx_v_y); __Pyx_XGIVEREF(__pyx_r); - __Pyx_FinishRefcountContext(); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":65 +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":187 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -1594,18 +1609,21 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf int __pyx_v_hasfields; int __pyx_r; int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_t_5; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; int __pyx_t_6; - char *__pyx_t_7; - __Pyx_SetupRefcountContext("__getbuffer__"); + int __pyx_t_7; + int __pyx_t_8; + char *__pyx_t_9; + __Pyx_RefNannySetupContext("__getbuffer__"); if (__pyx_v_info == NULL) return 0; __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); + __Pyx_INCREF((PyObject *)__pyx_v_self); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":71 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":193 * # of flags * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -1614,7 +1632,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_endian_detector = 1; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":72 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":194 * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -1623,7 +1641,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":74 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":196 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -1632,7 +1650,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_ndim = PyArray_NDIM(((PyArrayObject *)__pyx_v_self)); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":76 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":198 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -1642,7 +1660,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); if (__pyx_t_1) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":77 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":199 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< @@ -1654,7 +1672,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":79 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":201 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< @@ -1665,96 +1683,100 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L5:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":81 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":203 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): - * raise ValueError("ndarray is not C contiguous") + * raise ValueError(u"ndarray is not C contiguous") */ - if (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS)) { + __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS); + if (__pyx_t_1) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":82 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":204 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< - * raise ValueError("ndarray is not C contiguous") + * raise ValueError(u"ndarray is not C contiguous") * */ - __pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_C_CONTIGUOUS)); + __pyx_t_2 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_C_CONTIGUOUS)); + __pyx_t_3 = __pyx_t_2; } else { - __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS); + __pyx_t_3 = __pyx_t_1; } - if (__pyx_t_1) { + if (__pyx_t_3) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":83 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":205 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): - * raise ValueError("ndarray is not C contiguous") # <<<<<<<<<<<<<< + * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_INCREF(__pyx_kp_1); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_1); - __Pyx_GIVEREF(__pyx_kp_1); - __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_1)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_1)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":85 - * raise ValueError("ndarray is not C contiguous") + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":207 + * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): - * raise ValueError("ndarray is not Fortran contiguous") + * raise ValueError(u"ndarray is not Fortran contiguous") */ - if (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS)) { + __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS); + if (__pyx_t_3) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":86 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":208 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< - * raise ValueError("ndarray is not Fortran contiguous") + * raise ValueError(u"ndarray is not Fortran contiguous") * */ __pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_F_CONTIGUOUS)); + __pyx_t_2 = __pyx_t_1; } else { - __pyx_t_1 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS); + __pyx_t_2 = __pyx_t_3; } - if (__pyx_t_1) { + if (__pyx_t_2) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":87 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":209 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): - * raise ValueError("ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< + * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __Pyx_INCREF(__pyx_kp_2); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_2); - __Pyx_GIVEREF(__pyx_kp_2); - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __Pyx_Raise(__pyx_t_2, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_2)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_2)); + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":89 - * raise ValueError("ndarray is not Fortran contiguous") + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":211 + * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim @@ -1762,7 +1784,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->buf = PyArray_DATA(((PyArrayObject *)__pyx_v_self)); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":90 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":212 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< @@ -1771,17 +1793,17 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->ndim = __pyx_v_ndim; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":91 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":213 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. This is allocated * # as one block, strides first. */ - __pyx_t_4 = __pyx_v_copy_shape; - if (__pyx_t_4) { + __pyx_t_6 = __pyx_v_copy_shape; + if (__pyx_t_6) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":94 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":216 * # Allocate new buffer for strides and shape info. This is allocated * # as one block, strides first. * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< @@ -1790,7 +1812,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * __pyx_v_ndim) * 2))); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":95 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":217 * # as one block, strides first. * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< @@ -1799,17 +1821,18 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":96 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":218 * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] */ - for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_v_ndim; __pyx_t_4+=1) { - __pyx_v_i = __pyx_t_4; + __pyx_t_6 = __pyx_v_ndim; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":97 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":219 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< @@ -1818,7 +1841,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":98 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":220 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< @@ -1831,7 +1854,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":100 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":222 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -1840,7 +1863,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":101 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":223 * else: * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -1851,7 +1874,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L8:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":102 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":224 * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) * info.shape = <Py_ssize_t*>PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< @@ -1860,7 +1883,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->suboffsets = NULL; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":103 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":225 * info.shape = <Py_ssize_t*>PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< @@ -1869,7 +1892,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(((PyArrayObject *)__pyx_v_self)); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":104 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":226 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< @@ -1878,7 +1901,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(((PyArrayObject *)__pyx_v_self))); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":107 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":229 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< @@ -1887,7 +1910,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_f = NULL; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":108 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":230 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< @@ -1897,7 +1920,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self)->descr)); __pyx_v_descr = ((PyArrayObject *)__pyx_v_self)->descr; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":112 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":234 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< @@ -1906,21 +1929,23 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":114 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":236 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ - if ((!__pyx_v_hasfields)) { - __pyx_t_1 = (!__pyx_v_copy_shape); + __pyx_t_2 = (!__pyx_v_hasfields); + if (__pyx_t_2) { + __pyx_t_3 = (!__pyx_v_copy_shape); + __pyx_t_1 = __pyx_t_3; } else { - __pyx_t_1 = (!__pyx_v_hasfields); + __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":116 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":238 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< @@ -1936,7 +1961,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":119 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":241 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< @@ -1951,7 +1976,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L11:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":121 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":243 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< @@ -1961,7 +1986,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __pyx_t_1 = (!__pyx_v_hasfields); if (__pyx_t_1) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":122 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":244 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< @@ -1970,286 +1995,322 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_t = __pyx_v_descr->type_num; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":123 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":245 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") */ - if ((__pyx_v_descr->byteorder == '>')) { - __pyx_t_1 = __pyx_v_little_endian; + __pyx_t_1 = (__pyx_v_descr->byteorder == '>'); + if (__pyx_t_1) { + __pyx_t_2 = __pyx_v_little_endian; } else { - __pyx_t_1 = (__pyx_v_descr->byteorder == '>'); + __pyx_t_2 = __pyx_t_1; } - if (!__pyx_t_1) { + if (!__pyx_t_2) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":124 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":246 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ - if ((__pyx_v_descr->byteorder == '<')) { - __pyx_t_5 = (!__pyx_v_little_endian); + __pyx_t_1 = (__pyx_v_descr->byteorder == '<'); + if (__pyx_t_1) { + __pyx_t_3 = (!__pyx_v_little_endian); + __pyx_t_8 = __pyx_t_3; } else { - __pyx_t_5 = (__pyx_v_descr->byteorder == '<'); + __pyx_t_8 = __pyx_t_1; } - __pyx_t_6 = __pyx_t_5; + __pyx_t_1 = __pyx_t_8; } else { - __pyx_t_6 = __pyx_t_1; + __pyx_t_1 = __pyx_t_2; } - if (__pyx_t_6) { + if (__pyx_t_1) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":125 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":247 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") # <<<<<<<<<<<<<< + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_INCREF(__pyx_kp_5); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_5); - __Pyx_GIVEREF(__pyx_kp_5); - __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_3)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_3)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L13; } __pyx_L13:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":126 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":248 * (descr.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" */ - switch (__pyx_v_t) { - case NPY_BYTE: - __pyx_v_f = __pyx_k_6; - break; + __pyx_t_1 = (__pyx_v_t == NPY_BYTE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__b; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":127 - * raise ValueError("Non-native byte order not supported") + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":249 + * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" */ - case NPY_UBYTE: - __pyx_v_f = __pyx_k_7; - break; + __pyx_t_1 = (__pyx_v_t == NPY_UBYTE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__B; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":128 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":250 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" */ - case NPY_SHORT: - __pyx_v_f = __pyx_k_8; - break; + __pyx_t_1 = (__pyx_v_t == NPY_SHORT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__h; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":129 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":251 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" */ - case NPY_USHORT: - __pyx_v_f = __pyx_k_9; - break; + __pyx_t_1 = (__pyx_v_t == NPY_USHORT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__H; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":130 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":252 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" */ - case NPY_INT: - __pyx_v_f = __pyx_k_10; - break; + __pyx_t_1 = (__pyx_v_t == NPY_INT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__i; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":131 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":253 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" */ - case NPY_UINT: - __pyx_v_f = __pyx_k_11; - break; + __pyx_t_1 = (__pyx_v_t == NPY_UINT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__I; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":132 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":254 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" */ - case NPY_LONG: - __pyx_v_f = __pyx_k_12; - break; + __pyx_t_1 = (__pyx_v_t == NPY_LONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__l; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":133 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":255 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" */ - case NPY_ULONG: - __pyx_v_f = __pyx_k_13; - break; + __pyx_t_1 = (__pyx_v_t == NPY_ULONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__L; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":134 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":256 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" */ - case NPY_LONGLONG: - __pyx_v_f = __pyx_k_14; - break; + __pyx_t_1 = (__pyx_v_t == NPY_LONGLONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__q; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":135 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":257 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" */ - case NPY_ULONGLONG: - __pyx_v_f = __pyx_k_15; - break; + __pyx_t_1 = (__pyx_v_t == NPY_ULONGLONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Q; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":136 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":258 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" */ - case NPY_FLOAT: - __pyx_v_f = __pyx_k_16; - break; + __pyx_t_1 = (__pyx_v_t == NPY_FLOAT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__f; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":137 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":259 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" */ - case NPY_DOUBLE: - __pyx_v_f = __pyx_k_17; - break; + __pyx_t_1 = (__pyx_v_t == NPY_DOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__d; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":138 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":260 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" */ - case NPY_LONGDOUBLE: - __pyx_v_f = __pyx_k_18; - break; + __pyx_t_1 = (__pyx_v_t == NPY_LONGDOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__g; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":139 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":261 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" */ - case NPY_CFLOAT: - __pyx_v_f = __pyx_k_19; - break; + __pyx_t_1 = (__pyx_v_t == NPY_CFLOAT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Zf; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":140 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":262 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" */ - case NPY_CDOUBLE: - __pyx_v_f = __pyx_k_20; - break; + __pyx_t_1 = (__pyx_v_t == NPY_CDOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Zd; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":141 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":263 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f = "O" * else: */ - case NPY_CLONGDOUBLE: - __pyx_v_f = __pyx_k_21; - break; + __pyx_t_1 = (__pyx_v_t == NPY_CLONGDOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Zg; + goto __pyx_L14; + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":142 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":264 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ - case NPY_OBJECT: - __pyx_v_f = __pyx_k_22; - break; - default: + __pyx_t_1 = (__pyx_v_t == NPY_OBJECT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__O; + goto __pyx_L14; + } + /*else*/ { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":144 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":266 * elif t == NPY_OBJECT: f = "O" * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ - __pyx_t_3 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_23, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __Pyx_Raise(__pyx_t_2, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - break; + __pyx_t_5 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_4), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_L14:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":145 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":267 * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":146 - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":268 + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: @@ -2261,7 +2322,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":148 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":270 * return * else: * info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< @@ -2270,7 +2331,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->format = ((char *)malloc(255)); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":149 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":271 * else: * info.format = <char*>stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< @@ -2279,7 +2340,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ (__pyx_v_info->format[0]) = '^'; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":150 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":272 * info.format = <char*>stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< @@ -2288,17 +2349,17 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_offset = 0; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":153 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":275 * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, * &offset) # <<<<<<<<<<<<<< * f[0] = 0 # Terminate format string * */ - __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_f = __pyx_t_7; + __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_f = __pyx_t_9; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":154 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":276 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< @@ -2312,8 +2373,8 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__"); __pyx_r = -1; __Pyx_GOTREF(__pyx_v_info->obj); @@ -2326,88 +2387,285 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); - __Pyx_FinishRefcountContext(); + __Pyx_DECREF((PyObject *)__pyx_v_self); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":278 + * f[0] = 0 # Terminate format string + * + * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) + */ + +static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ +static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { + int __pyx_t_1; + __Pyx_RefNannySetupContext("__releasebuffer__"); + __Pyx_INCREF((PyObject *)__pyx_v_self); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":279 + * + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + */ + __pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self)); + if (__pyx_t_1) { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":280 + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) # <<<<<<<<<<<<<< + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * stdlib.free(info.strides) + */ + free(__pyx_v_info->format); + goto __pyx_L5; + } + __pyx_L5:; + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":281 + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * stdlib.free(info.strides) + * # info.shape was stored after info.strides in the same block + */ + __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); + if (__pyx_t_1) { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":282 + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * stdlib.free(info.strides) # <<<<<<<<<<<<<< + * # info.shape was stored after info.strides in the same block + * + */ + free(__pyx_v_info->strides); + goto __pyx_L6; + } + __pyx_L6:; + + __Pyx_DECREF((PyObject *)__pyx_v_self); + __Pyx_RefNannyFinishContext(); +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":755 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, <void*>a) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1"); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":756 + * + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew2(a, b): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":758 + * return PyArray_MultiIterNew(1, <void*>a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, <void*>a, <void*>b) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2"); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":759 + * + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":761 + * return PyArray_MultiIterNew(2, <void*>a, <void*>b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew3"); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":762 + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":156 - * f[0] = 0 # Terminate format string +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":764 + * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) * - * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< - * if PyArray_HASFIELDS(self): - * stdlib.free(info.format) */ -static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ -static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { - int __pyx_t_1; - int __pyx_t_2; - __Pyx_SetupRefcountContext("__releasebuffer__"); +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4"); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":157 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":765 * - * def __releasebuffer__(ndarray self, Py_buffer* info): - * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< - * stdlib.free(info.format) - * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ - __pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self)); - if (__pyx_t_1) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":158 - * def __releasebuffer__(ndarray self, Py_buffer* info): - * if PyArray_HASFIELDS(self): - * stdlib.free(info.format) # <<<<<<<<<<<<<< - * if sizeof(npy_intp) != sizeof(Py_ssize_t): - * stdlib.free(info.strides) - */ - free(__pyx_v_info->format); - goto __pyx_L5; - } - __pyx_L5:; + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":159 - * if PyArray_HASFIELDS(self): - * stdlib.free(info.format) - * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< - * stdlib.free(info.strides) - * # info.shape was stored after info.strides in the same block +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":767 + * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) + * */ - __pyx_t_2 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); - if (__pyx_t_2) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":160 - * stdlib.free(info.format) - * if sizeof(npy_intp) != sizeof(Py_ssize_t): - * stdlib.free(info.strides) # <<<<<<<<<<<<<< - * # info.shape was stored after info.strides in the same block +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5"); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":768 + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<< * + * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ - free(__pyx_v_info->strides); - goto __pyx_L6; - } - __pyx_L6:; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - __Pyx_FinishRefcountContext(); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; } -/* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":277 - * ctypedef npy_cdouble complex_t +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":770 + * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< * # Recursive utility function used in __getbuffer__ to get format * # string. The new location in the format string is returned. */ -static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { PyArray_Descr *__pyx_v_child; - PyObject *__pyx_v_i; int __pyx_v_endian_detector; int __pyx_v_little_endian; + PyObject *__pyx_v_fields; + PyObject *__pyx_v_childname; PyObject *__pyx_v_new_offset; PyObject *__pyx_v_t; char *__pyx_r; - PyObject *__pyx_1 = 0; Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; @@ -2416,199 +2674,195 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; - char *__pyx_t_9; - __Pyx_SetupRefcountContext("_util_dtypestring"); + int __pyx_t_9; + char *__pyx_t_10; + __Pyx_RefNannySetupContext("_util_dtypestring"); + __Pyx_INCREF((PyObject *)__pyx_v_descr); __pyx_v_child = ((PyArray_Descr *)Py_None); __Pyx_INCREF(Py_None); - __pyx_v_i = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_fields = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_childname = Py_None; __Pyx_INCREF(Py_None); __pyx_v_new_offset = Py_None; __Pyx_INCREF(Py_None); __pyx_v_t = Py_None; __Pyx_INCREF(Py_None); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":284 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":777 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) - * + * cdef tuple fields */ __pyx_v_endian_detector = 1; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":285 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":778 * cdef tuple i * cdef int endian_detector = 1 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<< + * cdef tuple fields * - * for i in descr.fields.itervalues(): */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":287 - * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":781 + * cdef tuple fields * - * for i in descr.fields.itervalues(): # <<<<<<<<<<<<<< - * child = i[0] - * new_offset = i[1] + * for childname in descr.names: # <<<<<<<<<<<<<< + * fields = descr.fields[childname] + * child, new_offset = fields */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_descr->fields, __pyx_kp_itervalues); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { - __pyx_t_1 = 0; __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); + if (likely(((PyObject *)__pyx_v_descr->names) != Py_None)) { + __pyx_t_1 = 0; __pyx_t_2 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_2); } else { - __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { - if (likely(PyList_CheckExact(__pyx_t_2))) { - if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break; - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; - } else if (likely(PyTuple_CheckExact(__pyx_t_2))) { - if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break; - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; - } else { - __pyx_t_3 = PyIter_Next(__pyx_t_2); - if (!__pyx_t_3) { - if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - break; - } - __Pyx_GOTREF(__pyx_t_3); - } - if (!(likely(PyTuple_CheckExact(__pyx_t_3)) || (__pyx_t_3) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected tuple, got %s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_v_i)); - __pyx_v_i = ((PyObject *)__pyx_t_3); + if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; + __Pyx_DECREF(__pyx_v_childname); + __pyx_v_childname = __pyx_t_3; __pyx_t_3 = 0; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":288 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":782 * - * for i in descr.fields.itervalues(): - * child = i[0] # <<<<<<<<<<<<<< - * new_offset = i[1] + * for childname in descr.names: + * fields = descr.fields[childname] # <<<<<<<<<<<<<< + * child, new_offset = fields * */ - __pyx_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_i), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - if (!(__Pyx_TypeTest(__pyx_1, __pyx_ptype_5numpy_dtype))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_v_child)); - __pyx_v_child = ((PyArray_Descr *)__pyx_1); - __pyx_1 = 0; + __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_v_fields)); + __pyx_v_fields = ((PyObject *)__pyx_t_3); + __pyx_t_3 = 0; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":289 - * for i in descr.fields.itervalues(): - * child = i[0] - * new_offset = i[1] # <<<<<<<<<<<<<< + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":783 + * for childname in descr.names: + * fields = descr.fields[childname] + * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ - __pyx_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_i), 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - __Pyx_DECREF(__pyx_v_new_offset); - __pyx_v_new_offset = __pyx_1; - __pyx_1 = 0; + if (likely(((PyObject *)__pyx_v_fields) != Py_None) && likely(PyTuple_GET_SIZE(((PyObject *)__pyx_v_fields)) == 2)) { + PyObject* tuple = ((PyObject *)__pyx_v_fields); + __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3); + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_v_child)); + __pyx_v_child = ((PyArray_Descr *)__pyx_t_3); + __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_v_new_offset); + __pyx_v_new_offset = __pyx_t_4; + __pyx_t_4 = 0; + } else { + __Pyx_UnpackTupleError(((PyObject *)__pyx_v_fields), 2); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":291 - * new_offset = i[1] + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":785 + * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< - * raise RuntimeError("Format string allocated too short, see comment in numpy.pxd") + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ - __pyx_t_3 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":292 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":786 * * if (end - f) - (new_offset - offset[0]) < 15: - * raise RuntimeError("Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __Pyx_INCREF(__pyx_kp_25); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_25); - __Pyx_GIVEREF(__pyx_kp_25); - __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_5)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_5)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":294 - * raise RuntimeError("Format string allocated too short, see comment in numpy.pxd") + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":788 + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") */ - if ((__pyx_v_child->byteorder == '>')) { - __pyx_t_6 = __pyx_v_little_endian; + __pyx_t_6 = (__pyx_v_child->byteorder == '>'); + if (__pyx_t_6) { + __pyx_t_7 = __pyx_v_little_endian; } else { - __pyx_t_6 = (__pyx_v_child->byteorder == '>'); + __pyx_t_7 = __pyx_t_6; } - if (!__pyx_t_6) { + if (!__pyx_t_7) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":295 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":789 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") * # One could encode it in the format string and have Cython */ - if ((__pyx_v_child->byteorder == '<')) { - __pyx_t_7 = (!__pyx_v_little_endian); + __pyx_t_6 = (__pyx_v_child->byteorder == '<'); + if (__pyx_t_6) { + __pyx_t_8 = (!__pyx_v_little_endian); + __pyx_t_9 = __pyx_t_8; } else { - __pyx_t_7 = (__pyx_v_child->byteorder == '<'); + __pyx_t_9 = __pyx_t_6; } - __pyx_t_8 = __pyx_t_7; + __pyx_t_6 = __pyx_t_9; } else { - __pyx_t_8 = __pyx_t_6; + __pyx_t_6 = __pyx_t_7; } - if (__pyx_t_8) { + if (__pyx_t_6) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":296 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":790 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") # <<<<<<<<<<<<<< + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __Pyx_INCREF(__pyx_kp_28); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_28); - __Pyx_GIVEREF(__pyx_kp_28); - __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_3)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_3)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":306 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":800 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< @@ -2616,16 +2870,16 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc * f += 1 */ while (1) { - __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!__pyx_t_8) break; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!__pyx_t_6) break; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":307 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":801 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< @@ -2634,7 +2888,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc */ (__pyx_v_f[0]) = 120; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":308 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":802 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< @@ -2643,7 +2897,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc */ __pyx_v_f += 1; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":309 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":803 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< @@ -2653,7 +2907,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc (__pyx_v_offset[0]) += 1; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":311 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":805 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< @@ -2662,417 +2916,417 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc */ (__pyx_v_offset[0]) += __pyx_v_child->elsize; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":313 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":807 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ - __pyx_t_8 = (!PyDataType_HASFIELDS(__pyx_v_child)); - if (__pyx_t_8) { + __pyx_t_6 = (!PyDataType_HASFIELDS(__pyx_v_child)); + if (__pyx_t_6) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":314 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":808 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: - * raise RuntimeError("Format string allocated too short.") + * raise RuntimeError(u"Format string allocated too short.") */ - __pyx_t_4 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_t); - __pyx_v_t = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_v_t = __pyx_t_3; + __pyx_t_3 = 0; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":315 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":809 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< - * raise RuntimeError("Format string allocated too short.") + * raise RuntimeError(u"Format string allocated too short.") * */ - __pyx_t_8 = ((__pyx_v_end - __pyx_v_f) < 5); - if (__pyx_t_8) { + __pyx_t_6 = ((__pyx_v_end - __pyx_v_f) < 5); + if (__pyx_t_6) { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":316 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":810 * t = child.type_num * if end - f < 5: - * raise RuntimeError("Format string allocated too short.") # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __Pyx_INCREF(__pyx_kp_29); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_29); - __Pyx_GIVEREF(__pyx_kp_29); - __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_6)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_6)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_6)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L10; } __pyx_L10:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":319 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":813 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" */ - __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":320 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":814 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" */ - __pyx_t_4 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":321 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":815 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" */ - __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 104; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":322 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":816 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" */ - __pyx_t_4 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":323 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":817 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" */ - __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 105; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":324 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":818 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" */ - __pyx_t_4 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":325 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":819 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" */ - __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 108; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":326 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":820 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" */ - __pyx_t_4 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":327 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":821 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" */ - __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 113; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":328 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":822 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" */ - __pyx_t_4 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":329 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":823 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" */ - __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 102; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":330 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":824 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf */ - __pyx_t_4 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 100; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":331 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":825 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd */ - __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 103; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":332 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":826 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg */ - __pyx_t_4 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 102; __pyx_v_f += 1; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":333 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":827 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" */ - __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f += 1; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":334 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":828 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: */ - __pyx_t_4 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 103; __pyx_v_f += 1; goto __pyx_L11; } - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":335 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":829 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ - __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 79; goto __pyx_L11; } /*else*/ { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":337 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":831 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ - __pyx_t_4 = PyNumber_Remainder(__pyx_kp_30, __pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_4), __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L11:; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":338 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":832 * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< * else: * # Cython ignores struct boundary information ("T{...}"), @@ -3082,45 +3336,186 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc } /*else*/ { - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":342 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":836 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ - __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_f = __pyx_t_9; + __pyx_t_10 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_f = __pyx_t_10; } __pyx_L9:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/numpy.pxd":343 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":837 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * + * */ __pyx_r = __pyx_v_f; goto __pyx_L0; - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("numpy._util_dtypestring"); - __pyx_r = NULL; + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("numpy._util_dtypestring"); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF((PyObject *)__pyx_v_child); + __Pyx_DECREF(__pyx_v_fields); + __Pyx_DECREF(__pyx_v_childname); + __Pyx_DECREF(__pyx_v_new_offset); + __Pyx_DECREF(__pyx_v_t); + __Pyx_DECREF((PyObject *)__pyx_v_descr); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":952 + * + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * cdef PyObject* baseptr + * if base is None: + */ + +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { + PyObject *__pyx_v_baseptr; + int __pyx_t_1; + __Pyx_RefNannySetupContext("set_array_base"); + __Pyx_INCREF((PyObject *)__pyx_v_arr); + __Pyx_INCREF(__pyx_v_base); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":954 + * cdef inline void set_array_base(ndarray arr, object base): + * cdef PyObject* baseptr + * if base is None: # <<<<<<<<<<<<<< + * baseptr = NULL + * else: + */ + __pyx_t_1 = (__pyx_v_base == Py_None); + if (__pyx_t_1) { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":955 + * cdef PyObject* baseptr + * if base is None: + * baseptr = NULL # <<<<<<<<<<<<<< + * else: + * Py_INCREF(base) # important to do this before decref below! + */ + __pyx_v_baseptr = NULL; + goto __pyx_L3; + } + /*else*/ { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":957 + * baseptr = NULL + * else: + * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< + * baseptr = <PyObject*>base + * Py_XDECREF(arr.base) + */ + Py_INCREF(__pyx_v_base); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":958 + * else: + * Py_INCREF(base) # important to do this before decref below! + * baseptr = <PyObject*>base # <<<<<<<<<<<<<< + * Py_XDECREF(arr.base) + * arr.base = baseptr + */ + __pyx_v_baseptr = ((PyObject *)__pyx_v_base); + } + __pyx_L3:; + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":959 + * Py_INCREF(base) # important to do this before decref below! + * baseptr = <PyObject*>base + * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< + * arr.base = baseptr + * + */ + Py_XDECREF(__pyx_v_arr->base); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":960 + * baseptr = <PyObject*>base + * Py_XDECREF(arr.base) + * arr.base = baseptr # <<<<<<<<<<<<<< + * + * cdef inline object get_array_base(ndarray arr): + */ + __pyx_v_arr->base = __pyx_v_baseptr; + + __Pyx_DECREF((PyObject *)__pyx_v_arr); + __Pyx_DECREF(__pyx_v_base); + __Pyx_RefNannyFinishContext(); +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":962 + * arr.base = baseptr + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * if arr.base is NULL: + * return None + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_r = NULL; + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base"); + __Pyx_INCREF((PyObject *)__pyx_v_arr); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":963 + * + * cdef inline object get_array_base(ndarray arr): + * if arr.base is NULL: # <<<<<<<<<<<<<< + * return None + * else: + */ + __pyx_t_1 = (__pyx_v_arr->base == NULL); + if (__pyx_t_1) { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":964 + * cdef inline object get_array_base(ndarray arr): + * if arr.base is NULL: + * return None # <<<<<<<<<<<<<< + * else: + * return <object>arr.base + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + goto __pyx_L3; + } + /*else*/ { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":966 + * return None + * else: + * return <object>arr.base # <<<<<<<<<<<<<< + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); + __pyx_r = ((PyObject *)__pyx_v_arr->base); + goto __pyx_L0; + } + __pyx_L3:; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; - __Pyx_DECREF((PyObject *)__pyx_v_child); - __Pyx_DECREF(__pyx_v_i); - __Pyx_DECREF(__pyx_v_new_offset); - __Pyx_DECREF(__pyx_v_t); - __Pyx_FinishRefcountContext(); + __Pyx_DECREF((PyObject *)__pyx_v_arr); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -3146,58 +3541,73 @@ static struct PyModuleDef __pyx_moduledef = { #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp___main__, __pyx_k___main__, sizeof(__pyx_k___main__), 1, 1, 1}, - {&__pyx_kp_model, __pyx_k_model, sizeof(__pyx_k_model), 1, 1, 1}, - {&__pyx_kp_X, __pyx_k_X, sizeof(__pyx_k_X), 1, 1, 1}, - {&__pyx_kp_y, __pyx_k_y, sizeof(__pyx_k_y), 1, 1, 1}, - {&__pyx_kp_maxit, __pyx_k_maxit, sizeof(__pyx_k_maxit), 1, 1, 1}, - {&__pyx_kp_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 1, 1, 1}, - {&__pyx_kp_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 1, 1}, - {&__pyx_kp_31, __pyx_k_31, sizeof(__pyx_k_31), 1, 1, 1}, - {&__pyx_kp_32, __pyx_k_32, sizeof(__pyx_k_32), 1, 1, 1}, - {&__pyx_kp_linalg, __pyx_k_linalg, sizeof(__pyx_k_linalg), 0, 1, 1}, - {&__pyx_kp_alpha, __pyx_k_alpha, sizeof(__pyx_k_alpha), 1, 1, 1}, - {&__pyx_kp_coef_, __pyx_k_coef_, sizeof(__pyx_k_coef_), 1, 1, 1}, - {&__pyx_kp_callbacks, __pyx_k_callbacks, sizeof(__pyx_k_callbacks), 1, 1, 1}, - {&__pyx_kp_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 1, 1, 1}, - {&__pyx_kp_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 1, 1, 1}, - {&__pyx_kp_dot, __pyx_k_dot, sizeof(__pyx_k_dot), 1, 1, 1}, - {&__pyx_kp_range, __pyx_k_range, sizeof(__pyx_k_range), 1, 1, 1}, - {&__pyx_kp_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 1, 1, 1}, - {&__pyx_kp_w, __pyx_k_w, sizeof(__pyx_k_w), 1, 1, 1}, - {&__pyx_kp_R, __pyx_k_R, sizeof(__pyx_k_R), 1, 1, 1}, - {&__pyx_kp___getbuffer__, __pyx_k___getbuffer__, sizeof(__pyx_k___getbuffer__), 1, 1, 1}, - {&__pyx_kp___releasebuffer__, __pyx_k___releasebuffer__, sizeof(__pyx_k___releasebuffer__), 1, 1, 1}, - {&__pyx_kp_info, __pyx_k_info, sizeof(__pyx_k_info), 1, 1, 1}, - {&__pyx_kp_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 1, 1, 1}, - {&__pyx_kp_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 1, 1, 1}, - {&__pyx_kp_itervalues, __pyx_k_itervalues, sizeof(__pyx_k_itervalues), 1, 1, 1}, - {&__pyx_kp_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 1, 1, 1}, - {&__pyx_kp_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 0}, - {&__pyx_kp_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 0}, - {&__pyx_kp_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 0}, - {&__pyx_kp_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 0}, - {&__pyx_kp_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 0}, - {&__pyx_kp_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 0}, - {&__pyx_kp_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 0}, - {&__pyx_kp_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 0}, - {0, 0, 0, 0, 0, 0} + {&__pyx_kp_u_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 1, 0, 0}, + {&__pyx_n_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 1}, + {&__pyx_kp_u_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 1, 0, 0}, + {&__pyx_kp_u_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 1, 0, 0}, + {&__pyx_kp_u_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 1, 0, 0}, + {&__pyx_kp_u_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 1, 0, 0}, + {&__pyx_kp_u_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 1, 0, 0}, + {&__pyx_n_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 1}, + {&__pyx_n_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 1}, + {&__pyx_kp_u_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 1, 0, 0}, + {&__pyx_n_s__R, __pyx_k__R, sizeof(__pyx_k__R), 0, 0, 1, 1}, + {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1}, + {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, + {&__pyx_n_s__X, __pyx_k__X, sizeof(__pyx_k__X), 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__alpha, __pyx_k__alpha, sizeof(__pyx_k__alpha), 0, 0, 1, 1}, + {&__pyx_n_s__axis, __pyx_k__axis, sizeof(__pyx_k__axis), 0, 0, 1, 1}, + {&__pyx_n_s__base, __pyx_k__base, sizeof(__pyx_k__base), 0, 0, 1, 1}, + {&__pyx_n_s__buf, __pyx_k__buf, sizeof(__pyx_k__buf), 0, 0, 1, 1}, + {&__pyx_n_s__byteorder, __pyx_k__byteorder, sizeof(__pyx_k__byteorder), 0, 0, 1, 1}, + {&__pyx_n_s__callbacks, __pyx_k__callbacks, sizeof(__pyx_k__callbacks), 0, 0, 1, 1}, + {&__pyx_n_s__coef_, __pyx_k__coef_, sizeof(__pyx_k__coef_), 0, 0, 1, 1}, + {&__pyx_n_s__descr, __pyx_k__descr, sizeof(__pyx_k__descr), 0, 0, 1, 1}, + {&__pyx_n_s__dot, __pyx_k__dot, sizeof(__pyx_k__dot), 0, 0, 1, 1}, + {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1}, + {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1}, + {&__pyx_n_s__itemsize, __pyx_k__itemsize, sizeof(__pyx_k__itemsize), 0, 0, 1, 1}, + {&__pyx_n_s__linalg, __pyx_k__linalg, sizeof(__pyx_k__linalg), 0, 0, 1, 1}, + {&__pyx_n_s__maxit, __pyx_k__maxit, sizeof(__pyx_k__maxit), 0, 0, 1, 1}, + {&__pyx_n_s__model, __pyx_k__model, sizeof(__pyx_k__model), 0, 0, 1, 1}, + {&__pyx_n_s__names, __pyx_k__names, sizeof(__pyx_k__names), 0, 0, 1, 1}, + {&__pyx_n_s__ndim, __pyx_k__ndim, sizeof(__pyx_k__ndim), 0, 0, 1, 1}, + {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1}, + {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, + {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1}, + {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, + {&__pyx_n_s__readonly, __pyx_k__readonly, sizeof(__pyx_k__readonly), 0, 0, 1, 1}, + {&__pyx_n_s__shape, __pyx_k__shape, sizeof(__pyx_k__shape), 0, 0, 1, 1}, + {&__pyx_n_s__strides, __pyx_k__strides, sizeof(__pyx_k__strides), 0, 0, 1, 1}, + {&__pyx_n_s__suboffsets, __pyx_k__suboffsets, sizeof(__pyx_k__suboffsets), 0, 0, 1, 1}, + {&__pyx_n_s__sum, __pyx_k__sum, sizeof(__pyx_k__sum), 0, 0, 1, 1}, + {&__pyx_n_s__type_num, __pyx_k__type_num, sizeof(__pyx_k__type_num), 0, 0, 1, 1}, + {&__pyx_n_s__w, __pyx_k__w, sizeof(__pyx_k__w), 0, 0, 1, 1}, + {&__pyx_n_s__xrange, __pyx_k__xrange, sizeof(__pyx_k__xrange), 0, 0, 1, 1}, + {&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_kp_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_kp_xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_kp_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_kp_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #if PY_MAJOR_VERSION >= 3 + __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitGlobals(void) { - __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; @@ -3211,30 +3621,34 @@ PyMODINIT_FUNC PyInit_lasso_cd_fast(void); /*proto*/ PyMODINIT_FUNC PyInit_lasso_cd_fast(void) #endif { - PyObject *__pyx_1 = 0; PyObject *__pyx_t_1 = NULL; - #ifdef CYTHON_REFNANNY - void* __pyx_refchk = NULL; - __Pyx_Refnanny = __Pyx_ImportRefcountAPI("refnanny"); - if (!__Pyx_Refnanny) { + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + #if CYTHON_REFNANNY + void* __pyx_refnanny = NULL; + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { PyErr_Clear(); - __Pyx_Refnanny = __Pyx_ImportRefcountAPI("Cython.Runtime.refnanny"); - if (!__Pyx_Refnanny) - Py_FatalError("failed to import refnanny module"); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); } - __pyx_refchk = __Pyx_Refnanny->NewContext("PyMODINIT_FUNC PyInit_lasso_cd_fast(void)", __LINE__, __FILE__); + __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_lasso_cd_fast(void)", __LINE__, __FILE__); #endif + __pyx_init_filenames(); __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #if PY_MAJOR_VERSION < 3 + __pyx_empty_bytes = PyString_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif /*--- Library function declarations ---*/ - __pyx_init_filenames(); /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif - /*--- Initialize various global constants etc. ---*/ - if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("lasso_cd_fast"), __pyx_methods, 0, 0, PYTHON_API_VERSION); @@ -3248,34 +3662,38 @@ PyMODINIT_FUNC PyInit_lasso_cd_fast(void) __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + /*--- Initialize various global constants etc. ---*/ + if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_module_is_main_lasso_cd_fast) { - if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_kp___main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_skip_dispatch = 0; /*--- Global init code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ /*--- Type import code ---*/ - __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Function import code ---*/ /*--- Execution code ---*/ - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":7 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":7 * * cimport numpy as np * import numpy as np # <<<<<<<<<<<<<< * import scipy.linalg as linalg * cimport cython */ - __pyx_1 = __Pyx_Import(__pyx_kp_numpy, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - if (PyObject_SetAttr(__pyx_m, __pyx_kp_np, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/alex/work/src/scikit-learn/trunk/scikits/learn/glm/src/lasso_cd_fast.pyx":8 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":8 * cimport numpy as np * import numpy as np * import scipy.linalg as linalg # <<<<<<<<<<<<<< @@ -3284,16 +3702,33 @@ PyMODINIT_FUNC PyInit_lasso_cd_fast(void) */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __Pyx_INCREF(__pyx_kp_32); - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_32); - __Pyx_GIVEREF(__pyx_kp_32); - __pyx_1 = __Pyx_Import(__pyx_kp_31, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); + __Pyx_INCREF(((PyObject *)__pyx_n_s_8)); + PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s_8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s_8)); + __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_7), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_kp_linalg, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_1); __pyx_1 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__linalg, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\glm\src\lasso_cd_fast.pyx":1 + * # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # <<<<<<<<<<<<<< + * # License: BSD Style. + * + */ + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_1 = PyObject_GetAttr(__pyx_m, __pyx_n_s_10); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_1, "__doc__"); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_kp_u_9), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - /* "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/Cython/Includes/stdlib.pxd":2 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\stdlib.pxd":2 * * cdef extern from "stdlib.h" nogil: # <<<<<<<<<<<<<< * void free(void *ptr) @@ -3301,12 +3736,17 @@ PyMODINIT_FUNC PyInit_lasso_cd_fast(void) */ goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_1); __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("lasso_cd_fast"); - Py_DECREF(__pyx_m); __pyx_m = 0; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + if (__pyx_m) { + __Pyx_AddTraceback("init lasso_cd_fast"); + Py_DECREF(__pyx_m); __pyx_m = 0; + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init lasso_cd_fast"); + } __pyx_L0:; - __Pyx_FinishRefcountContext(); + __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else @@ -3447,7 +3887,7 @@ bad: return -1; } -static INLINE int __Pyx_IsLittleEndian(void) { +static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } @@ -3844,7 +4284,7 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha } } -static INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { +static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { buf->buf = NULL; buf->obj = NULL; buf->strides = __Pyx_zeros; @@ -3885,45 +4325,28 @@ fail:; return -1; } -static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } -static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { - if (!type) { +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } - if (obj == Py_None || PyObject_TypeCheck(obj, type)) + if (likely(PyObject_TypeCheck(obj, type))) return 1; - PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s", - Py_TYPE(obj)->tp_name, type->tp_name); + PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", + Py_TYPE(obj)->tp_name, type->tp_name); return 0; } -static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); -#if PY_MAJOR_VERSION >= 3 - /* Note: this is a temporary work-around to prevent crashes in Python 3.0 */ - if ((tstate->exc_type != NULL) & (tstate->exc_type != Py_None)) { - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - PyErr_NormalizeException(&type, &value, &tb); - PyErr_NormalizeException(&tmp_type, &tmp_value, &tmp_tb); - tstate->exc_type = 0; - tstate->exc_value = 0; - tstate->exc_traceback = 0; - PyException_SetContext(value, tmp_value); - Py_DECREF(tmp_type); - Py_XDECREF(tmp_tb); - } -#endif - tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; @@ -3935,7 +4358,7 @@ static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *t Py_XDECREF(tmp_tb); } -static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; @@ -3947,6 +4370,56 @@ static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject ** } +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + #if PY_VERSION_HEX < 0x02050000 + "need more than %d value%s to unpack", (int)index, + #else + "need more than %zd value%s to unpack", index, + #endif + (index == 1) ? "" : "s"); +} + +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void) { + PyErr_SetString(PyExc_ValueError, "too many values to unpack"); +} + +static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) { + PyObject *item; + if (!(item = PyIter_Next(iter))) { + if (!PyErr_Occurred()) { + __Pyx_RaiseNeedMoreValuesError(index); + } + } + return item; +} + +static int __Pyx_EndUnpack(PyObject *iter) { + PyObject *item; + if ((item = PyIter_Next(iter))) { + Py_DECREF(item); + __Pyx_RaiseTooManyValuesError(); + return -1; + } + else if (!PyErr_Occurred()) + return 0; + else + return -1; +} + +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else if (PyTuple_GET_SIZE(t) < index) { + __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); + } else { + __Pyx_RaiseTooManyValuesError(); + } +} static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) @@ -4033,6 +4506,157 @@ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { return result; } +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return ::std::complex< float >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return x + y*(__pyx_t_float_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + __pyx_t_float_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float denom = b.real * b.real + b.imag * b.imag; + z.real = (a.real * b.real + a.imag * b.imag) / denom; + z.imag = (a.imag * b.real - a.real * b.imag) / denom; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } +/* + static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) { +#if HAVE_HYPOT + return hypotf(z.real, z.imag); +#else + return sqrtf(z.real*z.real + z.imag*z.imag); +#endif + } +*/ +#endif + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return ::std::complex< double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return x + y*(__pyx_t_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + __pyx_t_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double denom = b.real * b.real + b.imag * b.imag; + z.real = (a.real * b.real + a.imag * b.imag) / denom; + z.imag = (a.imag * b.real - a.real * b.imag) / denom; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } +/* + static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) { +#if HAVE_HYPOT + return hypot(z.real, z.imag); +#else + return sqrt(z.real*z.real + z.imag*z.imag); +#endif + } +*/ +#endif + +#if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { Py_XINCREF(type); Py_XINCREF(value); @@ -4088,6 +4712,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { } #endif } + __Pyx_ErrRestore(type, value, tb); return; raise_error: @@ -4097,24 +4722,62 @@ raise_error: return; } -static INLINE int __Pyx_StrEq(const char *s1, const char *s2) { - while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } - return *s1 == *s2; +#else /* Python 3+ */ + +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (!PyExceptionClass_Check(type)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + + PyErr_SetObject(type, value); + + if (tb) { + PyThreadState *tstate = PyThreadState_GET(); + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } + } + +bad: + return; } +#endif -static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { +static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { + const unsigned char neg_one = (unsigned char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned char)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (unsigned char)-1; - if (unlikely(val < 0)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned char"); - return (unsigned char)-1; + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned char" : + "value too large to convert to unsigned char"); } - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to unsigned char"); return (unsigned char)-1; } return (unsigned char)val; @@ -4122,19 +4785,18 @@ static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } -static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { +static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { + const unsigned short neg_one = (unsigned short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned short)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (unsigned short)-1; - if (unlikely(val < 0)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned short"); - return (unsigned short)-1; + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned short" : + "value too large to convert to unsigned short"); } - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to unsigned short"); return (unsigned short)-1; } return (unsigned short)val; @@ -4142,19 +4804,18 @@ static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } -static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { +static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { + const unsigned int neg_one = (unsigned int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned int)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (unsigned int)-1; - if (unlikely(val < 0)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned int"); - return (unsigned int)-1; + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned int" : + "value too large to convert to unsigned int"); } - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to unsigned int"); return (unsigned int)-1; } return (unsigned int)val; @@ -4162,14 +4823,18 @@ static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } -static INLINE char __Pyx_PyInt_AsChar(PyObject* x) { +static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { + const char neg_one = (char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(char)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (char)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to char"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to char" : + "value too large to convert to char"); + } return (char)-1; } return (char)val; @@ -4177,14 +4842,18 @@ static INLINE char __Pyx_PyInt_AsChar(PyObject* x) { return (char)__Pyx_PyInt_AsLong(x); } -static INLINE short __Pyx_PyInt_AsShort(PyObject* x) { +static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { + const short neg_one = (short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(short)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (short)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to short"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to short" : + "value too large to convert to short"); + } return (short)-1; } return (short)val; @@ -4192,14 +4861,18 @@ static INLINE short __Pyx_PyInt_AsShort(PyObject* x) { return (short)__Pyx_PyInt_AsLong(x); } -static INLINE int __Pyx_PyInt_AsInt(PyObject* x) { +static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { + const int neg_one = (int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (int)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to int"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to int" : + "value too large to convert to int"); + } return (int)-1; } return (int)val; @@ -4207,14 +4880,18 @@ static INLINE int __Pyx_PyInt_AsInt(PyObject* x) { return (int)__Pyx_PyInt_AsLong(x); } -static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { +static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { + const signed char neg_one = (signed char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed char)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (signed char)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to signed char"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed char" : + "value too large to convert to signed char"); + } return (signed char)-1; } return (signed char)val; @@ -4222,14 +4899,18 @@ static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { return (signed char)__Pyx_PyInt_AsSignedLong(x); } -static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { +static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { + const signed short neg_one = (signed short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed short)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (signed short)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to signed short"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed short" : + "value too large to convert to signed short"); + } return (signed short)-1; } return (signed short)val; @@ -4237,14 +4918,18 @@ static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { return (signed short)__Pyx_PyInt_AsSignedLong(x); } -static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { +static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { + const signed int neg_one = (signed int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed int)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (signed int)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to signed int"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed int" : + "value too large to convert to signed int"); + } return (signed int)-1; } return (signed int)val; @@ -4252,11 +4937,13 @@ static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { return (signed int)__Pyx_PyInt_AsSignedLong(x); } -static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { +static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { + const unsigned long neg_one = (unsigned long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); - if (unlikely(val < 0)) { + if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; @@ -4264,13 +4951,17 @@ static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { return (unsigned long)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned long"); - return (unsigned long)-1; + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned long"); + return (unsigned long)-1; + } + return PyLong_AsUnsignedLong(x); + } else { + return PyLong_AsLong(x); } - return PyLong_AsUnsignedLong(x); } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4281,11 +4972,13 @@ static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } } -static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { + const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); - if (unlikely(val < 0)) { + if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; @@ -4293,13 +4986,17 @@ static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) return (unsigned PY_LONG_LONG)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned PY_LONG_LONG"); - return (unsigned PY_LONG_LONG)-1; + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG)-1; + } + return PyLong_AsUnsignedLongLong(x); + } else { + return PyLong_AsLongLong(x); } - return PyLong_AsUnsignedLongLong(x); } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4310,15 +5007,31 @@ static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) } } -static INLINE long __Pyx_PyInt_AsLong(PyObject* x) { +static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { + const long neg_one = (long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long)-1; + } return (long)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - return PyLong_AsLong(x); + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long)-1; + } + return PyLong_AsUnsignedLong(x); + } else { + return PyLong_AsLong(x); + } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4329,15 +5042,31 @@ static INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } } -static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { + const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG)-1; + } return (PY_LONG_LONG)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - return PyLong_AsLongLong(x); + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG)-1; + } + return PyLong_AsUnsignedLongLong(x); + } else { + return PyLong_AsLongLong(x); + } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4348,15 +5077,31 @@ static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } } -static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { +static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { + const signed long neg_one = (signed long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed long"); + return (signed long)-1; + } return (signed long)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - return PyLong_AsLong(x); + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed long"); + return (signed long)-1; + } + return PyLong_AsUnsignedLong(x); + } else { + return PyLong_AsLong(x); + } } else { signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4367,15 +5112,31 @@ static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } } -static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { +static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { + const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed PY_LONG_LONG"); + return (signed PY_LONG_LONG)-1; + } return (signed PY_LONG_LONG)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - return PyLong_AsLongLong(x); + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed PY_LONG_LONG"); + return (signed PY_LONG_LONG)-1; + } + return PyLong_AsUnsignedLongLong(x); + } else { + return PyLong_AsLongLong(x); + } } else { signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4389,11 +5150,12 @@ static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, - long size) + long size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; + char warning[200]; py_module = __Pyx_ImportModule(module_name); if (!py_module) @@ -4418,9 +5180,15 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class module_name, class_name); goto bad; } - if (((PyTypeObject *)result)->tp_basicsize != size) { + if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility", + module_name, class_name); + PyErr_WarnEx(NULL, warning, 0); + } + else if (((PyTypeObject *)result)->tp_basicsize != size) { PyErr_Format(PyExc_ValueError, - "%s.%s does not appear to be the correct type object", + "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } @@ -4462,7 +5230,6 @@ static void __Pyx_AddTraceback(const char *funcname) { PyObject *py_srcfile = 0; PyObject *py_funcname = 0; PyObject *py_globals = 0; - PyObject *empty_string = 0; PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; @@ -4489,12 +5256,6 @@ static void __Pyx_AddTraceback(const char *funcname) { if (!py_funcname) goto bad; py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; - #if PY_MAJOR_VERSION < 3 - empty_string = PyString_FromStringAndSize("", 0); - #else - empty_string = PyBytes_FromStringAndSize("", 0); - #endif - if (!empty_string) goto bad; py_code = PyCode_New( 0, /*int argcount,*/ #if PY_MAJOR_VERSION >= 3 @@ -4503,7 +5264,7 @@ static void __Pyx_AddTraceback(const char *funcname) { 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ - empty_string, /*PyObject *code,*/ + __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ @@ -4512,7 +5273,7 @@ static void __Pyx_AddTraceback(const char *funcname) { py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ __pyx_lineno, /*int firstlineno,*/ - empty_string /*PyObject *lnotab*/ + __pyx_empty_bytes /*PyObject *lnotab*/ ); if (!py_code) goto bad; py_frame = PyFrame_New( @@ -4527,7 +5288,6 @@ static void __Pyx_AddTraceback(const char *funcname) { bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); - Py_XDECREF(empty_string); Py_XDECREF(py_code); Py_XDECREF(py_frame); } @@ -4535,7 +5295,7 @@ bad: static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 - if (t->is_unicode && (!t->is_identifier)) { + if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); @@ -4543,10 +5303,14 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else /* Python 3+ has unicode identifiers */ - if (t->is_identifier || (t->is_unicode && t->intern)) { - *t->p = PyUnicode_InternFromString(t->s); - } else if (t->is_unicode) { - *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } @@ -4560,13 +5324,13 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { /* Type Conversion Functions */ -static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { if (x == Py_True) return 1; else if ((x == Py_False) | (x == Py_None)) return 0; else return PyObject_IsTrue(x); } -static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; @@ -4612,7 +5376,7 @@ static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { return res; } -static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = PyNumber_Index(b); if (!x) return -1; @@ -4621,7 +5385,7 @@ static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { return ival; } -static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); @@ -4635,7 +5399,7 @@ static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { #endif } -static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { +static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) { return (size_t)-1; @@ -4648,3 +5412,4 @@ static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { } +#endif /* Py_PYTHON_H */ diff --git a/scikits/learn/glm/src/lasso_cd_fast.pyx b/scikits/learn/glm/src/lasso_cd_fast.pyx index d9726013958f938c07b046bbe2fd36478bbc48fa..67b28b34146a45ba8a4108bb8448063cbad5d797 100644 --- a/scikits/learn/glm/src/lasso_cd_fast.pyx +++ b/scikits/learn/glm/src/lasso_cd_fast.pyx @@ -12,9 +12,12 @@ cdef extern from "math.h": double fabs(double f) double sqrt(double f) double exp(double f) - double fmax(double f1, double f2) double rand() +cdef inline double fmax(double x, double y): + if x > y: return x + return y + cdef inline double fsign(double f): if f == 0: return 0 @@ -36,7 +39,7 @@ def lasso_coordinate_descent(model, """ # get the data information into easy vars - cdef float alpha = model.alpha + cdef double alpha = model.alpha cdef np.ndarray[DOUBLE, ndim=1] w = model.coef_ callbacks = model.callbacks @@ -47,8 +50,8 @@ def lasso_coordinate_descent(model, cdef np.ndarray[DOUBLE, ndim=1] norm_cols_X = (X**2).sum(axis=0) # Compute norms of the columns of X cdef np.ndarray[DOUBLE, ndim=1] R = y - np.dot(X, w) # Init residual - cdef float tmp - cdef float w_ii + cdef double tmp + cdef double w_ii cdef unsigned int ii cdef unsigned int jj cdef unsigned int n_iter diff --git a/scikits/learn/src/liblinear.c b/scikits/learn/src/liblinear.c index 694b378e8357a30c44fa60021a79e3fd77c2e86d..214cca86eafb21ea66991c546356dcaf10dd8566 100644 --- a/scikits/learn/src/liblinear.c +++ b/scikits/learn/src/liblinear.c @@ -1,11 +1,12 @@ -/* Generated by Cython 0.11.2 on Thu Mar 4 17:07:18 2010 */ +/* Generated by Cython 0.12.1 on Fri Apr 30 10:09:33 2010 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #include "structmember.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. -#endif +#else + #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif @@ -15,7 +16,9 @@ #if PY_VERSION_HEX < 0x02040000 #define METH_COEXIST 0 #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type) + #define PyDict_Contains(d,o) PySequence_Contains(d,o) #endif + #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX @@ -25,7 +28,9 @@ #define PyInt_AsSsize_t(o) PyInt_AsLong(o) #define PyNumber_Index(o) PyNumber_Int(o) #define PyIndex_Check(o) PyNumber_Check(o) + #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #endif + #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) @@ -35,17 +40,17 @@ #define PyType_Modified(t) typedef struct { - void *buf; - PyObject *obj; - Py_ssize_t len; - Py_ssize_t itemsize; - int readonly; - int ndim; - char *format; - Py_ssize_t *shape; - Py_ssize_t *strides; - Py_ssize_t *suboffsets; - void *internal; + void *buf; + PyObject *obj; + Py_ssize_t len; + Py_ssize_t itemsize; + int readonly; + int ndim; + char *format; + Py_ssize_t *shape; + Py_ssize_t *strides; + Py_ssize_t *suboffsets; + void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 @@ -59,22 +64,32 @@ #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #endif + #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #endif + #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif + #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif + #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type - #define PyString_Type PyBytes_Type - #define PyString_CheckExact PyBytes_CheckExact + #define PyString_Type PyUnicode_Type + #define PyString_CheckExact PyUnicode_CheckExact +#else + #define PyBytes_Type PyString_Type + #define PyBytes_CheckExact PyString_CheckExact +#endif + +#if PY_MAJOR_VERSION >= 3 #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) @@ -89,13 +104,17 @@ #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) - #define PyBytes_Type PyString_Type + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) + #endif + #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func) #endif + #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall @@ -109,6 +128,7 @@ #else #define _USE_MATH_DEFINES #endif + #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) @@ -118,6 +138,7 @@ #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif + #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) @@ -133,25 +154,23 @@ #include <math.h> #define __PYX_HAVE_API__liblinear #include "stdlib.h" +#include "stdio.h" #include "numpy/arrayobject.h" +#include "numpy/ufuncobject.h" #include "linear.h" #include "liblinear_helper.c" -#define __PYX_USE_C99_COMPLEX defined(_Complex_I) - -#ifdef __GNUC__ -#define INLINE __inline__ -#elif _WIN32 -#define INLINE __inline -#else -#define INLINE +#ifndef CYTHON_INLINE + #if defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #else + #define CYTHON_INLINE + #endif #endif -typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/ - - - -static int __pyx_skip_dispatch = 0; +typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ /* Type Conversion Predeclarations */ @@ -166,9 +185,12 @@ static int __pyx_skip_dispatch = 0; #define __Pyx_PyBytes_AsString PyBytes_AsString #endif +#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) +#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) __Pyx_PyBytes_AsString(s)) + #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) -static INLINE int __Pyx_PyObject_IsTrue(PyObject*); -static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); #if !defined(T_PYSSIZET) #if PY_VERSION_HEX < 0x02050000 @@ -185,6 +207,40 @@ static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); #endif #endif + +#if !defined(T_ULONGLONG) +#define __Pyx_T_UNSIGNED_INT(x) \ + ((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \ + ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \ + ((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \ + ((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : -1)))) +#else +#define __Pyx_T_UNSIGNED_INT(x) \ + ((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \ + ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \ + ((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \ + ((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : \ + ((sizeof(x) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1))))) +#endif +#if !defined(T_LONGLONG) +#define __Pyx_T_SIGNED_INT(x) \ + ((sizeof(x) == sizeof(char)) ? T_BYTE : \ + ((sizeof(x) == sizeof(short)) ? T_SHORT : \ + ((sizeof(x) == sizeof(int)) ? T_INT : \ + ((sizeof(x) == sizeof(long)) ? T_LONG : -1)))) +#else +#define __Pyx_T_SIGNED_INT(x) \ + ((sizeof(x) == sizeof(char)) ? T_BYTE : \ + ((sizeof(x) == sizeof(short)) ? T_SHORT : \ + ((sizeof(x) == sizeof(int)) ? T_INT : \ + ((sizeof(x) == sizeof(long)) ? T_LONG : \ + ((sizeof(x) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1))))) +#endif + +#define __Pyx_T_FLOATING(x) \ + ((sizeof(x) == sizeof(float)) ? T_FLOAT : \ + ((sizeof(x) == sizeof(double)) ? T_DOUBLE : -1)) + #if !defined(T_SIZET) #if !defined(T_ULONGLONG) #define T_SIZET \ @@ -198,9 +254,9 @@ static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); #endif #endif -static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); -static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) @@ -222,44 +278,150 @@ static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); static PyObject *__pyx_m; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; static const char **__pyx_f; -static char __pyx_mdoc[] = "\nWrapper for liblinear\n\nAuthor: fabian.pedregosa@inria.fr\n"; +#if !defined(CYTHON_CCOMPLEX) + #if defined(__cplusplus) + #define CYTHON_CCOMPLEX 1 + #elif defined(_Complex_I) + #define CYTHON_CCOMPLEX 1 + #else + #define CYTHON_CCOMPLEX 0 + #endif +#endif -#ifdef CYTHON_REFNANNY -typedef struct { - void (*INCREF)(void*, PyObject*, int); - void (*DECREF)(void*, PyObject*, int); - void (*GOTREF)(void*, PyObject*, int); - void (*GIVEREF)(void*, PyObject*, int); - void* (*NewContext)(const char*, int, const char*); - void (*FinishContext)(void**); -} __Pyx_RefnannyAPIStruct; -static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL; -#define __Pyx_ImportRefcountAPI(name) (__Pyx_RefnannyAPIStruct *) PyCObject_Import((char *)name, (char *)"RefnannyAPI") -#define __Pyx_INCREF(r) __Pyx_Refnanny->INCREF(__pyx_refchk, (PyObject *)(r), __LINE__) -#define __Pyx_DECREF(r) __Pyx_Refnanny->DECREF(__pyx_refchk, (PyObject *)(r), __LINE__) -#define __Pyx_GOTREF(r) __Pyx_Refnanny->GOTREF(__pyx_refchk, (PyObject *)(r), __LINE__) -#define __Pyx_GIVEREF(r) __Pyx_Refnanny->GIVEREF(__pyx_refchk, (PyObject *)(r), __LINE__) -#define __Pyx_XDECREF(r) if((r) == NULL) ; else __Pyx_DECREF(r) -#define __Pyx_SetupRefcountContext(name) void* __pyx_refchk = __Pyx_Refnanny->NewContext((name), __LINE__, __FILE__) -#define __Pyx_FinishRefcountContext() __Pyx_Refnanny->FinishContext(&__pyx_refchk) +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #include <complex> + #else + #include <complex.h> + #endif +#endif + +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj +#endif + +typedef npy_int8 __pyx_t_5numpy_int8_t; + +typedef npy_int16 __pyx_t_5numpy_int16_t; + +typedef npy_int32 __pyx_t_5numpy_int32_t; + +typedef npy_int64 __pyx_t_5numpy_int64_t; + +typedef npy_uint8 __pyx_t_5numpy_uint8_t; + +typedef npy_uint16 __pyx_t_5numpy_uint16_t; + +typedef npy_uint32 __pyx_t_5numpy_uint32_t; + +typedef npy_uint64 __pyx_t_5numpy_uint64_t; + +typedef npy_float32 __pyx_t_5numpy_float32_t; + +typedef npy_float64 __pyx_t_5numpy_float64_t; + +typedef npy_long __pyx_t_5numpy_int_t; + +typedef npy_longlong __pyx_t_5numpy_long_t; + +typedef npy_intp __pyx_t_5numpy_intp_t; + +typedef npy_uintp __pyx_t_5numpy_uintp_t; + +typedef npy_ulong __pyx_t_5numpy_uint_t; + +typedef npy_ulonglong __pyx_t_5numpy_ulong_t; + +typedef npy_double __pyx_t_5numpy_float_t; + +typedef npy_double __pyx_t_5numpy_double_t; + +typedef npy_longdouble __pyx_t_5numpy_longdouble_t; + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< float > __pyx_t_float_complex; + #else + typedef float _Complex __pyx_t_float_complex; + #endif +#else + typedef struct { float real, imag; } __pyx_t_float_complex; +#endif + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< double > __pyx_t_double_complex; + #else + typedef double _Complex __pyx_t_double_complex; + #endif #else -#define __Pyx_INCREF(r) Py_INCREF(r) -#define __Pyx_DECREF(r) Py_DECREF(r) -#define __Pyx_GOTREF(r) -#define __Pyx_GIVEREF(r) -#define __Pyx_XDECREF(r) Py_XDECREF(r) -#define __Pyx_SetupRefcountContext(name) -#define __Pyx_FinishRefcountContext() + typedef struct { double real, imag; } __pyx_t_double_complex; +#endif + +/* Type declarations */ + +typedef npy_cfloat __pyx_t_5numpy_cfloat_t; + +typedef npy_cdouble __pyx_t_5numpy_cdouble_t; + +typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; + +typedef npy_cdouble __pyx_t_5numpy_complex_t; + +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif + +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule((char *)modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); + end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; + } + #define __Pyx_RefNannySetupContext(name) void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) + #define __Pyx_RefNannyFinishContext() __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0) +#else + #define __Pyx_RefNannySetupContext(name) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) #endif /* CYTHON_REFNANNY */ -#define __Pyx_XGIVEREF(r) if((r) == NULL) ; else __Pyx_GIVEREF(r) -#define __Pyx_XGOTREF(r) if((r) == NULL) ; else __Pyx_GOTREF(r) +#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0) +#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0) static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name); /*proto*/ @@ -291,89 +453,26 @@ typedef struct { } __Pyx_BufFmt_StackElem; -static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); -static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ -static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ - - -static INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { - PyObject *r; - if (!j) return NULL; - r = PyObject_GetItem(o, j); - Py_DECREF(j); - return r; -} - - -#define __Pyx_GetItemInt_List(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_List_Fast(o, i, size <= sizeof(long)) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -static INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) { - if (likely(o != Py_None)) { - if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { - PyObject *r = PyList_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) { - PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i); - Py_INCREF(r); - return r; - } - } - return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i)); -} +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void); -static INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) { - if (likely(o != Py_None)) { - if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) { - PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i); - Py_INCREF(r); - return r; - } - } - return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i)); -} +static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/ +static int __Pyx_EndUnpack(PyObject *); /*proto*/ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -#define __Pyx_GetItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) - -static INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) { - PyObject *r; - if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) { - r = PyList_GET_ITEM(o, i); - Py_INCREF(r); - } - else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { - r = PyTuple_GET_ITEM(o, i); - Py_INCREF(r); - } - else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) { - r = PySequence_GetItem(o, i); - } - else { - r = __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i)); - } - return r; -} +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ @@ -394,318 +493,151 @@ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -#if __PYX_USE_C99_COMPLEX - #define __Pyx_REAL_PART(z) __real__(z) - #define __Pyx_IMAG_PART(z) __imag__(z) +static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp); + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #define __Pyx_CREAL(z) ((z).real()) + #define __Pyx_CIMAG(z) ((z).imag()) + #else + #define __Pyx_CREAL(z) (__real__(z)) + #define __Pyx_CIMAG(z) (__imag__(z)) + #endif #else - #define __Pyx_REAL_PART(z) ((z).real) - #define __Pyx_IMAG_PART(z) ((z).imag) + #define __Pyx_CREAL(z) ((z).real) + #define __Pyx_CIMAG(z) ((z).imag) #endif -#define __pyx_PyObject_from_complex(z) PyComplex_FromDoubles((double)__Pyx_REAL_PART(z), (double)__Pyx_IMAG_PART(z)) - -#if __PYX_USE_C99_COMPLEX - - typedef float _Complex __pyx_t_float_complex; - static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { - return x + y*(__pyx_t_float_complex)_Complex_I; - } - - #define __pyx_t_float_complex_is_zero(a) ((a) == 0) - #define __pyx_t_float_complex_eq(a, b) ((a) == (b)) - #define __pyx_t_float_complex_add(a, b) ((a)+(b)) - #define __pyx_t_float_complex_sub(a, b) ((a)-(b)) - #define __pyx_t_float_complex_mul(a, b) ((a)*(b)) - #define __pyx_t_float_complex_div(a, b) ((a)/(b)) - #define __pyx_t_float_complex_neg(a) (-(a)) - +#if defined(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX + #define __Pyx_SET_CREAL(z,x) ((z).real(x)) + #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) #else - - typedef struct { float real, imag; } __pyx_t_float_complex; - static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { - __pyx_t_float_complex c; c.real = x; c.imag = y; return c; - } - - static INLINE int __pyx_t_float_complex_is_zero(__pyx_t_float_complex a) { - return (a.real == 0) & (a.imag == 0); - } - - static INLINE int __pyx_t_float_complex_eq(__pyx_t_float_complex a, __pyx_t_float_complex b) { - return (a.real == b.real) & (a.imag == b.imag); - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_add(__pyx_t_float_complex a, __pyx_t_float_complex b) { - __pyx_t_float_complex z; - z.real = a.real + b.real; - z.imag = a.imag + b.imag; - return z; - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_sub(__pyx_t_float_complex a, __pyx_t_float_complex b) { - __pyx_t_float_complex z; - z.real = a.real - b.real; - z.imag = a.imag - b.imag; - return z; - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_mul(__pyx_t_float_complex a, __pyx_t_float_complex b) { - __pyx_t_float_complex z; - z.real = a.real * b.real - a.imag * b.imag; - z.imag = a.real * b.imag + a.imag * b.real; - return z; - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_div(__pyx_t_float_complex a, __pyx_t_float_complex b) { - __pyx_t_float_complex z; - float denom = b.real*b.real + b.imag*b.imag; - z.real = (a.real * b.real + a.imag * b.imag) / denom; - z.imag = (a.imag * b.real - a.real * b.imag) / denom; - return z; - } - - static INLINE __pyx_t_float_complex __pyx_t_float_complex_neg(__pyx_t_float_complex a) { - __pyx_t_float_complex z; - z.real = -a.real; - z.imag = -a.imag; - return z; - } - + #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) + #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) #endif -#if __PYX_USE_C99_COMPLEX - - typedef double _Complex __pyx_t_double_complex; - static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { - return x + y*(__pyx_t_double_complex)_Complex_I; - } - - #define __pyx_t_double_complex_is_zero(a) ((a) == 0) - #define __pyx_t_double_complex_eq(a, b) ((a) == (b)) - #define __pyx_t_double_complex_add(a, b) ((a)+(b)) - #define __pyx_t_double_complex_sub(a, b) ((a)-(b)) - #define __pyx_t_double_complex_mul(a, b) ((a)*(b)) - #define __pyx_t_double_complex_div(a, b) ((a)/(b)) - #define __pyx_t_double_complex_neg(a) (-(a)) - +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); + +#if CYTHON_CCOMPLEX + #define __Pyx_c_eqf(a, b) ((a)==(b)) + #define __Pyx_c_sumf(a, b) ((a)+(b)) + #define __Pyx_c_difff(a, b) ((a)-(b)) + #define __Pyx_c_prodf(a, b) ((a)*(b)) + #define __Pyx_c_quotf(a, b) ((a)/(b)) + #define __Pyx_c_negf(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zerof(z) ((z)==(float)0) + #define __Pyx_c_conjf(z) (::std::conj(z)) + /*#define __Pyx_c_absf(z) (::std::abs(z))*/ + #else + #define __Pyx_c_is_zerof(z) ((z)==0) + #define __Pyx_c_conjf(z) (conjf(z)) + /*#define __Pyx_c_absf(z) (cabsf(z))*/ + #endif #else - - typedef struct { double real, imag; } __pyx_t_double_complex; - static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { - __pyx_t_double_complex c; c.real = x; c.imag = y; return c; - } - - static INLINE int __pyx_t_double_complex_is_zero(__pyx_t_double_complex a) { - return (a.real == 0) & (a.imag == 0); - } - - static INLINE int __pyx_t_double_complex_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) { - return (a.real == b.real) & (a.imag == b.imag); - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_add(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - z.real = a.real + b.real; - z.imag = a.imag + b.imag; - return z; - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_sub(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - z.real = a.real - b.real; - z.imag = a.imag - b.imag; - return z; - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_mul(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - z.real = a.real * b.real - a.imag * b.imag; - z.imag = a.real * b.imag + a.imag * b.real; - return z; - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_div(__pyx_t_double_complex a, __pyx_t_double_complex b) { - __pyx_t_double_complex z; - double denom = b.real*b.real + b.imag*b.imag; - z.real = (a.real * b.real + a.imag * b.imag) / denom; - z.imag = (a.imag * b.real - a.real * b.imag) / denom; - return z; - } - - static INLINE __pyx_t_double_complex __pyx_t_double_complex_neg(__pyx_t_double_complex a) { - __pyx_t_double_complex z; - z.real = -a.real; - z.imag = -a.imag; - return z; - } - + static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); + /*static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex);*/ #endif -#if __PYX_USE_C99_COMPLEX - - typedef long double _Complex __pyx_t_long__double_complex; - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_from_parts(long double x, long double y) { - return x + y*(__pyx_t_long__double_complex)_Complex_I; - } - - #define __pyx_t_long__double_complex_is_zero(a) ((a) == 0) - #define __pyx_t_long__double_complex_eq(a, b) ((a) == (b)) - #define __pyx_t_long__double_complex_add(a, b) ((a)+(b)) - #define __pyx_t_long__double_complex_sub(a, b) ((a)-(b)) - #define __pyx_t_long__double_complex_mul(a, b) ((a)*(b)) - #define __pyx_t_long__double_complex_div(a, b) ((a)/(b)) - #define __pyx_t_long__double_complex_neg(a) (-(a)) - +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); + +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq(a, b) ((a)==(b)) + #define __Pyx_c_sum(a, b) ((a)+(b)) + #define __Pyx_c_diff(a, b) ((a)-(b)) + #define __Pyx_c_prod(a, b) ((a)*(b)) + #define __Pyx_c_quot(a, b) ((a)/(b)) + #define __Pyx_c_neg(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero(z) ((z)==(double)0) + #define __Pyx_c_conj(z) (::std::conj(z)) + /*#define __Pyx_c_abs(z) (::std::abs(z))*/ + #else + #define __Pyx_c_is_zero(z) ((z)==0) + #define __Pyx_c_conj(z) (conj(z)) + /*#define __Pyx_c_abs(z) (cabs(z))*/ + #endif #else - - typedef struct { long double real, imag; } __pyx_t_long__double_complex; - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_from_parts(long double x, long double y) { - __pyx_t_long__double_complex c; c.real = x; c.imag = y; return c; - } - - static INLINE int __pyx_t_long__double_complex_is_zero(__pyx_t_long__double_complex a) { - return (a.real == 0) & (a.imag == 0); - } - - static INLINE int __pyx_t_long__double_complex_eq(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - return (a.real == b.real) & (a.imag == b.imag); - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_add(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - __pyx_t_long__double_complex z; - z.real = a.real + b.real; - z.imag = a.imag + b.imag; - return z; - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_sub(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - __pyx_t_long__double_complex z; - z.real = a.real - b.real; - z.imag = a.imag - b.imag; - return z; - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_mul(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - __pyx_t_long__double_complex z; - z.real = a.real * b.real - a.imag * b.imag; - z.imag = a.real * b.imag + a.imag * b.real; - return z; - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_div(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) { - __pyx_t_long__double_complex z; - long double denom = b.real*b.real + b.imag*b.imag; - z.real = (a.real * b.real + a.imag * b.imag) / denom; - z.imag = (a.imag * b.real - a.real * b.imag) / denom; - return z; - } - - static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_neg(__pyx_t_long__double_complex a) { - __pyx_t_long__double_complex z; - z.real = -a.real; - z.imag = -a.imag; - return z; - } - + static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); + /*static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex);*/ #endif -static INLINE int __Pyx_StrEq(const char *, const char *); /*proto*/ - -static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); +static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); -static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); +static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); -static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); +static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); -static INLINE char __Pyx_PyInt_AsChar(PyObject *); +static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); -static INLINE short __Pyx_PyInt_AsShort(PyObject *); +static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); -static INLINE int __Pyx_PyInt_AsInt(PyObject *); +static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); -static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); +static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); -static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); +static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); -static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); +static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); -static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); +static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); -static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); -static INLINE long __Pyx_PyInt_AsLong(PyObject *); +static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); -static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); -static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); +static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); -static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); +static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); -static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size); /*proto*/ +static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict); /*proto*/ static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ static void __Pyx_AddTraceback(const char *funcname); /*proto*/ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ - -/* Type declarations */ - -typedef npy_int8 __pyx_t_5numpy_int8_t; - -typedef npy_int16 __pyx_t_5numpy_int16_t; - -typedef npy_int32 __pyx_t_5numpy_int32_t; - -typedef npy_int64 __pyx_t_5numpy_int64_t; - -typedef npy_uint8 __pyx_t_5numpy_uint8_t; - -typedef npy_uint16 __pyx_t_5numpy_uint16_t; - -typedef npy_uint32 __pyx_t_5numpy_uint32_t; - -typedef npy_uint64 __pyx_t_5numpy_uint64_t; - -typedef npy_float32 __pyx_t_5numpy_float32_t; - -typedef npy_float64 __pyx_t_5numpy_float64_t; - -typedef npy_complex64 __pyx_t_5numpy_complex64_t; - -typedef npy_complex128 __pyx_t_5numpy_complex128_t; - -typedef npy_long __pyx_t_5numpy_int_t; - -typedef npy_longlong __pyx_t_5numpy_long_t; - -typedef npy_ulong __pyx_t_5numpy_uint_t; - -typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - -typedef npy_double __pyx_t_5numpy_float_t; - -typedef npy_double __pyx_t_5numpy_double_t; - -typedef npy_longdouble __pyx_t_5numpy_longdouble_t; - -typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - -typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - -typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - -typedef npy_cdouble __pyx_t_5numpy_complex_t; /* Module declarations from python_buffer */ +/* Module declarations from python_ref */ + /* Module declarations from stdlib */ +/* Module declarations from stdio */ + /* Module declarations from numpy */ /* Module declarations from numpy */ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; +static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; +static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ +static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *); /*proto*/ /* Module declarations from liblinear */ static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "numpy.float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), 'R' }; @@ -714,112 +646,134 @@ static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "numpy.int32_ int __pyx_module_is_main_liblinear = 0; /* Implementation of liblinear */ -static PyObject *__pyx_int_1; -static char __pyx_k___main__[] = "__main__"; -static PyObject *__pyx_kp___main__; -static char __pyx_k_X[] = "X"; -static PyObject *__pyx_kp_X; -static char __pyx_k_Y[] = "Y"; -static PyObject *__pyx_kp_Y; -static char __pyx_k_solver_type[] = "solver_type"; -static PyObject *__pyx_kp_solver_type; -static char __pyx_k_eps[] = "eps"; -static PyObject *__pyx_kp_eps; -static char __pyx_k_bias[] = "bias"; -static PyObject *__pyx_kp_bias; -static char __pyx_k_C[] = "C"; -static PyObject *__pyx_kp_C; -static char __pyx_k_nr_weight[] = "nr_weight"; -static PyObject *__pyx_kp_nr_weight; -static char __pyx_k_weight_label[] = "weight_label"; -static PyObject *__pyx_kp_weight_label; -static char __pyx_k_weight[] = "weight"; -static PyObject *__pyx_kp_weight; -static char __pyx_k_T[] = "T"; -static PyObject *__pyx_kp_T; -static char __pyx_k_coef_[] = "coef_"; -static PyObject *__pyx_kp_coef_; -static char __pyx_k_label[] = "label"; -static PyObject *__pyx_kp_label; -static char __pyx_k_numpy[] = "numpy"; -static PyObject *__pyx_kp_numpy; -static char __pyx_k_np[] = "np"; -static PyObject *__pyx_kp_np; -static char __pyx_k_ValueError[] = "ValueError"; -static PyObject *__pyx_kp_ValueError; -static char __pyx_k_empty[] = "empty"; -static PyObject *__pyx_kp_empty; -static char __pyx_k_dtype[] = "dtype"; -static PyObject *__pyx_kp_dtype; -static char __pyx_k_31[] = "int32"; -static PyObject *__pyx_kp_31; -static char __pyx_k_MemoryError[] = "MemoryError"; -static PyObject *__pyx_kp_MemoryError; -static char __pyx_k_33[] = "float64"; -static PyObject *__pyx_kp_33; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_MemoryError; -static PyObject *__pyx_kp_32; -static char __pyx_k_32[] = "We've run out of of memory"; -static PyObject *__pyx_kp_34; -static char __pyx_k_34[] = "We've run out of of memory"; -static PyObject *__pyx_int_15; -static char __pyx_k___getbuffer__[] = "__getbuffer__"; -static PyObject *__pyx_kp___getbuffer__; -static char __pyx_k___releasebuffer__[] = "__releasebuffer__"; -static PyObject *__pyx_kp___releasebuffer__; -static char __pyx_k_info[] = "info"; -static PyObject *__pyx_kp_info; -static char __pyx_k_flags[] = "flags"; -static PyObject *__pyx_kp_flags; -static char __pyx_k_range[] = "range"; -static PyObject *__pyx_kp_range; -static char __pyx_k_itervalues[] = "itervalues"; -static PyObject *__pyx_kp_itervalues; -static char __pyx_k_RuntimeError[] = "RuntimeError"; -static PyObject *__pyx_kp_RuntimeError; -static PyObject *__pyx_kp_1; -static PyObject *__pyx_kp_2; -static PyObject *__pyx_kp_5; -static PyObject *__pyx_kp_23; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_RuntimeError; -static char __pyx_k_1[] = "ndarray is not C contiguous"; -static char __pyx_k_2[] = "ndarray is not Fortran contiguous"; -static char __pyx_k_3[] = ">"; -static char __pyx_k_4[] = "<"; -static char __pyx_k_5[] = "Non-native byte order not supported"; -static char __pyx_k_6[] = "b"; -static char __pyx_k_7[] = "B"; -static char __pyx_k_8[] = "h"; -static char __pyx_k_9[] = "H"; -static char __pyx_k_10[] = "i"; -static char __pyx_k_11[] = "I"; -static char __pyx_k_12[] = "l"; -static char __pyx_k_13[] = "L"; -static char __pyx_k_14[] = "q"; -static char __pyx_k_15[] = "Q"; -static char __pyx_k_16[] = "f"; -static char __pyx_k_17[] = "d"; -static char __pyx_k_18[] = "g"; -static char __pyx_k_19[] = "Zf"; -static char __pyx_k_20[] = "Zd"; -static char __pyx_k_21[] = "Zg"; -static char __pyx_k_22[] = "O"; -static char __pyx_k_23[] = "unknown dtype code in numpy.pxd (%d)"; -static char __pyx_k_24[] = "^"; -static PyObject *__pyx_kp_25; -static PyObject *__pyx_kp_28; -static PyObject *__pyx_kp_29; -static PyObject *__pyx_kp_30; -static char __pyx_k_25[] = "Format string allocated too short, see comment in numpy.pxd"; -static char __pyx_k_26[] = ">"; -static char __pyx_k_27[] = "<"; -static char __pyx_k_28[] = "Non-native byte order not supported"; -static char __pyx_k_29[] = "Format string allocated too short."; -static char __pyx_k_30[] = "unknown dtype code in numpy.pxd (%d)"; - -/* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":38 +static char __pyx_k_1[] = "We've run out of of memory"; +static char __pyx_k_2[] = "ndarray is not C contiguous"; +static char __pyx_k_3[] = "ndarray is not Fortran contiguous"; +static char __pyx_k_4[] = "Non-native byte order not supported"; +static char __pyx_k_5[] = "unknown dtype code in numpy.pxd (%d)"; +static char __pyx_k_6[] = "Format string allocated too short, see comment in numpy.pxd"; +static char __pyx_k_7[] = "Format string allocated too short."; +static char __pyx_k_8[] = "\nWrapper for liblinear\n\nAuthor: fabian.pedregosa@inria.fr\n"; +static char __pyx_k_9[] = "train_wrap (line 38)"; +static char __pyx_k_10[] = "predict_prob_wrap (line 119)"; +static char __pyx_k__B[] = "B"; +static char __pyx_k__C[] = "C"; +static char __pyx_k__H[] = "H"; +static char __pyx_k__I[] = "I"; +static char __pyx_k__L[] = "L"; +static char __pyx_k__O[] = "O"; +static char __pyx_k__Q[] = "Q"; +static char __pyx_k__T[] = "T"; +static char __pyx_k__X[] = "X"; +static char __pyx_k__Y[] = "Y"; +static char __pyx_k__b[] = "b"; +static char __pyx_k__d[] = "d"; +static char __pyx_k__f[] = "f"; +static char __pyx_k__g[] = "g"; +static char __pyx_k__h[] = "h"; +static char __pyx_k__i[] = "i"; +static char __pyx_k__l[] = "l"; +static char __pyx_k__q[] = "q"; +static char __pyx_k__Zd[] = "Zd"; +static char __pyx_k__Zf[] = "Zf"; +static char __pyx_k__Zg[] = "Zg"; +static char __pyx_k__np[] = "np"; +static char __pyx_k__buf[] = "buf"; +static char __pyx_k__eps[] = "eps"; +static char __pyx_k__obj[] = "obj"; +static char __pyx_k__base[] = "base"; +static char __pyx_k__bias[] = "bias"; +static char __pyx_k__data[] = "data"; +static char __pyx_k__ndim[] = "ndim"; +static char __pyx_k__coef_[] = "coef_"; +static char __pyx_k__descr[] = "descr"; +static char __pyx_k__dtype[] = "dtype"; +static char __pyx_k__empty[] = "empty"; +static char __pyx_k__int32[] = "int32"; +static char __pyx_k__label[] = "label"; +static char __pyx_k__names[] = "names"; +static char __pyx_k__numpy[] = "numpy"; +static char __pyx_k__range[] = "range"; +static char __pyx_k__shape[] = "shape"; +static char __pyx_k__fields[] = "fields"; +static char __pyx_k__format[] = "format"; +static char __pyx_k__weight[] = "weight"; +static char __pyx_k__float64[] = "float64"; +static char __pyx_k__strides[] = "strides"; +static char __pyx_k____main__[] = "__main__"; +static char __pyx_k____test__[] = "__test__"; +static char __pyx_k__itemsize[] = "itemsize"; +static char __pyx_k__readonly[] = "readonly"; +static char __pyx_k__type_num[] = "type_num"; +static char __pyx_k__byteorder[] = "byteorder"; +static char __pyx_k__nr_weight[] = "nr_weight"; +static char __pyx_k__ValueError[] = "ValueError"; +static char __pyx_k__suboffsets[] = "suboffsets"; +static char __pyx_k__train_wrap[] = "train_wrap"; +static char __pyx_k__MemoryError[] = "MemoryError"; +static char __pyx_k__solver_type[] = "solver_type"; +static char __pyx_k__RuntimeError[] = "RuntimeError"; +static char __pyx_k__weight_label[] = "weight_label"; +static char __pyx_k__predict_prob_wrap[] = "predict_prob_wrap"; +static PyObject *__pyx_kp_s_1; +static PyObject *__pyx_kp_u_10; +static PyObject *__pyx_kp_u_2; +static PyObject *__pyx_kp_u_3; +static PyObject *__pyx_kp_u_4; +static PyObject *__pyx_kp_u_5; +static PyObject *__pyx_kp_u_6; +static PyObject *__pyx_kp_u_7; +static PyObject *__pyx_kp_u_9; +static PyObject *__pyx_n_s__C; +static PyObject *__pyx_n_s__MemoryError; +static PyObject *__pyx_n_s__RuntimeError; +static PyObject *__pyx_n_s__T; +static PyObject *__pyx_n_s__ValueError; +static PyObject *__pyx_n_s__X; +static PyObject *__pyx_n_s__Y; +static PyObject *__pyx_n_s____main__; +static PyObject *__pyx_n_s____test__; +static PyObject *__pyx_n_s__base; +static PyObject *__pyx_n_s__bias; +static PyObject *__pyx_n_s__buf; +static PyObject *__pyx_n_s__byteorder; +static PyObject *__pyx_n_s__coef_; +static PyObject *__pyx_n_s__data; +static PyObject *__pyx_n_s__descr; +static PyObject *__pyx_n_s__dtype; +static PyObject *__pyx_n_s__empty; +static PyObject *__pyx_n_s__eps; +static PyObject *__pyx_n_s__fields; +static PyObject *__pyx_n_s__float64; +static PyObject *__pyx_n_s__format; +static PyObject *__pyx_n_s__int32; +static PyObject *__pyx_n_s__itemsize; +static PyObject *__pyx_n_s__label; +static PyObject *__pyx_n_s__names; +static PyObject *__pyx_n_s__ndim; +static PyObject *__pyx_n_s__np; +static PyObject *__pyx_n_s__nr_weight; +static PyObject *__pyx_n_s__numpy; +static PyObject *__pyx_n_s__obj; +static PyObject *__pyx_n_s__predict_prob_wrap; +static PyObject *__pyx_n_s__range; +static PyObject *__pyx_n_s__readonly; +static PyObject *__pyx_n_s__shape; +static PyObject *__pyx_n_s__solver_type; +static PyObject *__pyx_n_s__strides; +static PyObject *__pyx_n_s__suboffsets; +static PyObject *__pyx_n_s__train_wrap; +static PyObject *__pyx_n_s__type_num; +static PyObject *__pyx_n_s__weight; +static PyObject *__pyx_n_s__weight_label; +static PyObject *__pyx_int_1; +static PyObject *__pyx_int_15; + +/* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":38 * * * def train_wrap ( np.ndarray[np.float64_t, ndim=2, mode='c'] X, # <<<<<<<<<<<<<< @@ -871,8 +825,6 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * Py_ssize_t __pyx_bstride_0_label = 0; Py_ssize_t __pyx_bshape_0_label = 0; PyObject *__pyx_r = NULL; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; @@ -883,9 +835,10 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; - PyArrayObject *__pyx_t_11 = NULL; - static PyObject **__pyx_pyargnames[] = {&__pyx_kp_X,&__pyx_kp_Y,&__pyx_kp_solver_type,&__pyx_kp_eps,&__pyx_kp_bias,&__pyx_kp_C,&__pyx_kp_nr_weight,&__pyx_kp_weight_label,&__pyx_kp_weight,0}; - __Pyx_SetupRefcountContext("train_wrap"); + PyObject *__pyx_t_11 = NULL; + PyArrayObject *__pyx_t_12 = NULL; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__X,&__pyx_n_s__Y,&__pyx_n_s__solver_type,&__pyx_n_s__eps,&__pyx_n_s__bias,&__pyx_n_s__C,&__pyx_n_s__nr_weight,&__pyx_n_s__weight_label,&__pyx_n_s__weight,0}; + __Pyx_RefNannySetupContext("train_wrap"); __pyx_self = __pyx_self; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); @@ -905,53 +858,53 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * } switch (PyTuple_GET_SIZE(__pyx_args)) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_X); + values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__X); if (likely(values[0])) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_Y); + values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__Y); if (likely(values[1])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("train_wrap", 1, 9, 9, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: - values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_solver_type); + values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__solver_type); if (likely(values[2])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("train_wrap", 1, 9, 9, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: - values[3] = PyDict_GetItem(__pyx_kwds, __pyx_kp_eps); + values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__eps); if (likely(values[3])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("train_wrap", 1, 9, 9, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: - values[4] = PyDict_GetItem(__pyx_kwds, __pyx_kp_bias); + values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bias); if (likely(values[4])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("train_wrap", 1, 9, 9, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: - values[5] = PyDict_GetItem(__pyx_kwds, __pyx_kp_C); + values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__C); if (likely(values[5])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("train_wrap", 1, 9, 9, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: - values[6] = PyDict_GetItem(__pyx_kwds, __pyx_kp_nr_weight); + values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nr_weight); if (likely(values[6])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("train_wrap", 1, 9, 9, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 7: - values[7] = PyDict_GetItem(__pyx_kwds, __pyx_kp_weight_label); + values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__weight_label); if (likely(values[7])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("train_wrap", 1, 9, 9, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 8: - values[8] = PyDict_GetItem(__pyx_kwds, __pyx_kp_weight); + values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__weight); if (likely(values[8])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("train_wrap", 1, 9, 9, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;} @@ -963,9 +916,9 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * __pyx_v_X = ((PyArrayObject *)values[0]); __pyx_v_Y = ((PyArrayObject *)values[1]); __pyx_v_solver_type = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_solver_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_eps = __pyx_PyFloat_AsDouble(values[3]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_bias = __pyx_PyFloat_AsDouble(values[4]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_C = __pyx_PyFloat_AsDouble(values[5]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_eps = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_eps == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_bias = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_bias == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_C = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_C == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nr_weight = __Pyx_PyInt_AsInt(values[6]); if (unlikely((__pyx_v_nr_weight == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_weight_label = ((PyArrayObject *)values[7]); __pyx_v_weight = ((PyArrayObject *)values[8]); @@ -975,9 +928,9 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * __pyx_v_X = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0)); __pyx_v_Y = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1)); __pyx_v_solver_type = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_solver_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_eps = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_bias = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_C = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 5)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_eps = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_eps == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_bias = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_bias == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_C = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 5)); if (unlikely((__pyx_v_C == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nr_weight = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 6)); if (unlikely((__pyx_v_nr_weight == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_weight_label = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 7)); __pyx_v_weight = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 8)); @@ -989,6 +942,10 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * __Pyx_AddTraceback("liblinear.train_wrap"); return NULL; __pyx_L4_argument_unpacking_done:; + __Pyx_INCREF((PyObject *)__pyx_v_X); + __Pyx_INCREF((PyObject *)__pyx_v_Y); + __Pyx_INCREF((PyObject *)__pyx_v_weight_label); + __Pyx_INCREF((PyObject *)__pyx_v_weight); __pyx_v_w = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_v_label = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_w.buf = NULL; @@ -1026,7 +983,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * __pyx_bstride_0_weight = __pyx_bstruct_weight.strides[0]; __pyx_bshape_0_weight = __pyx_bstruct_weight.shape[0]; - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":52 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":52 * cdef int len_w * * problem = set_problem(X.data, Y.data, X.shape, bias) # <<<<<<<<<<<<<< @@ -1035,7 +992,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * */ __pyx_v_problem = set_problem(__pyx_v_X->data, __pyx_v_Y->data, __pyx_v_X->dimensions, __pyx_v_bias); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":54 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":54 * problem = set_problem(X.data, Y.data, X.shape, bias) * * param = set_parameter(solver_type, eps, C, nr_weight, weight_label.data, weight.data) # <<<<<<<<<<<<<< @@ -1044,7 +1001,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * */ __pyx_v_param = set_parameter(__pyx_v_solver_type, __pyx_v_eps, __pyx_v_C, __pyx_v_nr_weight, __pyx_v_weight_label->data, __pyx_v_weight->data); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":56 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":56 * param = set_parameter(solver_type, eps, C, nr_weight, weight_label.data, weight.data) * * error_msg = check_parameter(problem, param) # <<<<<<<<<<<<<< @@ -1053,7 +1010,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * */ __pyx_v_error_msg = check_parameter(__pyx_v_problem, __pyx_v_param); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":57 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":57 * * error_msg = check_parameter(problem, param) * if error_msg: # <<<<<<<<<<<<<< @@ -1063,7 +1020,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * __pyx_t_1 = (__pyx_v_error_msg != 0); if (__pyx_t_1) { - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":58 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":58 * error_msg = check_parameter(problem, param) * if error_msg: * free_problem(problem) # <<<<<<<<<<<<<< @@ -1072,7 +1029,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * */ free_problem(__pyx_v_problem); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":59 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":59 * if error_msg: * free_problem(problem) * free_parameter(param) # <<<<<<<<<<<<<< @@ -1081,7 +1038,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * */ free_parameter(__pyx_v_param); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":60 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":60 * free_problem(problem) * free_parameter(param) * raise ValueError(error_msg) # <<<<<<<<<<<<<< @@ -1089,15 +1046,15 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * * # early return */ __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_error_msg); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -1105,7 +1062,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * } __pyx_L6:; - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":63 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":63 * * # early return * model = train(problem, param) # <<<<<<<<<<<<<< @@ -1114,7 +1071,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * */ __pyx_v_model = train(__pyx_v_problem, __pyx_v_param); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":66 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":66 * * cdef np.ndarray[np.float64_t, ndim=2, mode='c'] w * cdef int nr_class = get_nr_class(model) # <<<<<<<<<<<<<< @@ -1123,7 +1080,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * */ __pyx_v_nr_class = get_nr_class(__pyx_v_model); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":67 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":67 * cdef np.ndarray[np.float64_t, ndim=2, mode='c'] w * cdef int nr_class = get_nr_class(model) * cdef int nr_feature = get_nr_feature(model) # <<<<<<<<<<<<<< @@ -1132,7 +1089,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * */ __pyx_v_nr_feature = get_nr_feature(__pyx_v_model); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":68 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":68 * cdef int nr_class = get_nr_class(model) * cdef int nr_feature = get_nr_feature(model) * if bias > 0: nr_feature = nr_feature + 1 # <<<<<<<<<<<<<< @@ -1146,7 +1103,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * } __pyx_L7:; - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":69 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":69 * cdef int nr_feature = get_nr_feature(model) * if bias > 0: nr_feature = nr_feature + 1 * if nr_class == 2: # <<<<<<<<<<<<<< @@ -1156,38 +1113,38 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * __pyx_t_1 = (__pyx_v_nr_class == 2); if (__pyx_t_1) { - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":70 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":70 * if bias > 0: nr_feature = nr_feature + 1 * if nr_class == 2: * w = np.empty((1, nr_feature)) # <<<<<<<<<<<<<< * copy_w(w.data, model, nr_feature) * else: */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_t_3 = PyInt_FromLong(__pyx_v_nr_feature); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyInt_FromLong(__pyx_v_nr_feature); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; @@ -1211,7 +1168,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * __pyx_v_w = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":71 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":71 * if nr_class == 2: * w = np.empty((1, nr_feature)) * copy_w(w.data, model, nr_feature) # <<<<<<<<<<<<<< @@ -1223,7 +1180,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * } /*else*/ { - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":73 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":73 * copy_w(w.data, model, nr_feature) * else: * len_w = nr_class * nr_feature # <<<<<<<<<<<<<< @@ -1232,40 +1189,40 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * */ __pyx_v_len_w = (__pyx_v_nr_class * __pyx_v_nr_feature); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":74 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":74 * else: * len_w = nr_class * nr_feature * w = np.empty((nr_class, nr_feature)) # <<<<<<<<<<<<<< * copy_w(w.data, model, len_w) * */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - __pyx_t_4 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_t_3 = PyInt_FromLong(__pyx_v_nr_class); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyInt_FromLong(__pyx_v_nr_feature); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyInt_FromLong(__pyx_v_nr_class); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyInt_FromLong(__pyx_v_nr_feature); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_10)); - PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); + __Pyx_GOTREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_4 = 0; __pyx_t_3 = 0; - __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_10)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_10)); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - if (!(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = ((PyArrayObject *)__pyx_t_10); { __Pyx_BufFmt_StackElem __pyx_stack[1]; @@ -1289,7 +1246,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * __pyx_v_w = ((PyArrayObject *)__pyx_t_10); __pyx_t_10 = 0; - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":75 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":75 * len_w = nr_class * nr_feature * w = np.empty((nr_class, nr_feature)) * copy_w(w.data, model, len_w) # <<<<<<<<<<<<<< @@ -1300,7 +1257,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * } __pyx_L8:; - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":77 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":77 * copy_w(w.data, model, len_w) * * bias = get_bias(model) # <<<<<<<<<<<<<< @@ -1309,45 +1266,45 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * */ __pyx_v_bias = get_bias(__pyx_v_model); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":80 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":80 * * cdef np.ndarray[np.int32_t, ndim=1, mode='c'] label * label = np.empty((nr_class), dtype=np.int32) # <<<<<<<<<<<<<< * copy_label(label.data, model, nr_class) * */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - __pyx_t_10 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_t_2 = PyInt_FromLong(__pyx_v_nr_class); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_1)); - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_2); - __pyx_t_2 = PyObject_GetAttr(__pyx_2, __pyx_kp_31); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = PyInt_FromLong(__pyx_v_nr_class); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_2); __pyx_2 = 0; - if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + __pyx_t_10 = 0; + __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_10)); + __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__int32); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_11 = PyEval_CallObjectWithKeywords(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_10, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; - if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_11 = ((PyArrayObject *)__pyx_t_2); + __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; + if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_bstruct_label); - __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_label, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack); + __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_label, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack); if (unlikely(__pyx_t_6 < 0)) { PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_label, (PyObject*)__pyx_v_label, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) { @@ -1361,12 +1318,12 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * __pyx_bshape_0_label = __pyx_bstruct_label.shape[0]; if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_11 = 0; + __pyx_t_12 = 0; __Pyx_DECREF(((PyObject *)__pyx_v_label)); - __pyx_v_label = ((PyArrayObject *)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_v_label = ((PyArrayObject *)__pyx_t_11); + __pyx_t_11 = 0; - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":81 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":81 * cdef np.ndarray[np.int32_t, ndim=1, mode='c'] label * label = np.empty((nr_class), dtype=np.int32) * copy_label(label.data, model, nr_class) # <<<<<<<<<<<<<< @@ -1375,7 +1332,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * */ copy_label(__pyx_v_label->data, __pyx_v_model, __pyx_v_nr_class); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":84 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":84 * * ### FREE * destroy_model(model) # <<<<<<<<<<<<<< @@ -1384,7 +1341,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * */ destroy_model(__pyx_v_model); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":85 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":85 * ### FREE * destroy_model(model) * free_problem(problem) # <<<<<<<<<<<<<< @@ -1393,7 +1350,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * */ free_problem(__pyx_v_problem); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":86 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":86 * destroy_model(model) * free_problem(problem) * free_parameter(param) # <<<<<<<<<<<<<< @@ -1402,7 +1359,7 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * */ free_parameter(__pyx_v_param); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":89 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":89 * # destroy_param(param) don't call this or it will destroy weight_label and weight * * return w, label, bias # <<<<<<<<<<<<<< @@ -1410,32 +1367,31 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * * def predict_wrap(np.ndarray[np.float64_t, ndim=2, mode='c'] T, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyFloat_FromDouble(__pyx_v_bias); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_11 = PyFloat_FromDouble(__pyx_v_bias); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(((PyObject *)__pyx_v_w)); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_w)); + PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_w)); __Pyx_GIVEREF(((PyObject *)__pyx_v_w)); __Pyx_INCREF(((PyObject *)__pyx_v_label)); - PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_label)); + PyTuple_SET_ITEM(__pyx_t_10, 1, ((PyObject *)__pyx_v_label)); __Pyx_GIVEREF(((PyObject *)__pyx_v_label)); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_r = ((PyObject *)__pyx_t_4); - __pyx_t_4 = 0; + PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_11); + __pyx_t_11 = 0; + __pyx_r = __pyx_t_10; + __pyx_t_10 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_1); - __Pyx_XDECREF(__pyx_2); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_weight); @@ -1458,12 +1414,16 @@ static PyObject *__pyx_pf_9liblinear_train_wrap(PyObject *__pyx_self, PyObject * __pyx_L2:; __Pyx_DECREF((PyObject *)__pyx_v_w); __Pyx_DECREF((PyObject *)__pyx_v_label); + __Pyx_DECREF((PyObject *)__pyx_v_X); + __Pyx_DECREF((PyObject *)__pyx_v_Y); + __Pyx_DECREF((PyObject *)__pyx_v_weight_label); + __Pyx_DECREF((PyObject *)__pyx_v_weight); __Pyx_XGIVEREF(__pyx_r); - __Pyx_FinishRefcountContext(); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":91 +/* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":91 * return w, label, bias * * def predict_wrap(np.ndarray[np.float64_t, ndim=2, mode='c'] T, # <<<<<<<<<<<<<< @@ -1508,19 +1468,19 @@ static PyObject *__pyx_pf_9liblinear_predict_wrap(PyObject *__pyx_self, PyObject Py_ssize_t __pyx_bshape_0_T = 0; Py_ssize_t __pyx_bshape_1_T = 0; PyObject *__pyx_r = NULL; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyArrayObject *__pyx_t_4 = NULL; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyArrayObject *__pyx_t_6 = NULL; + int __pyx_t_7; PyObject *__pyx_t_8 = NULL; - int __pyx_t_9; - static PyObject **__pyx_pyargnames[] = {&__pyx_kp_T,&__pyx_kp_coef_,&__pyx_kp_solver_type,&__pyx_kp_eps,&__pyx_kp_C,&__pyx_kp_weight_label,&__pyx_kp_weight,&__pyx_kp_label,&__pyx_kp_bias,0}; - __Pyx_SetupRefcountContext("predict_wrap"); + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__T,&__pyx_n_s__coef_,&__pyx_n_s__solver_type,&__pyx_n_s__eps,&__pyx_n_s__C,&__pyx_n_s__weight_label,&__pyx_n_s__weight,&__pyx_n_s__label,&__pyx_n_s__bias,0}; + __Pyx_RefNannySetupContext("predict_wrap"); __pyx_self = __pyx_self; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); @@ -1540,53 +1500,53 @@ static PyObject *__pyx_pf_9liblinear_predict_wrap(PyObject *__pyx_self, PyObject } switch (PyTuple_GET_SIZE(__pyx_args)) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_T); + values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__T); if (likely(values[0])) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_coef_); + values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coef_); if (likely(values[1])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_wrap", 1, 9, 9, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: - values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_solver_type); + values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__solver_type); if (likely(values[2])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_wrap", 1, 9, 9, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: - values[3] = PyDict_GetItem(__pyx_kwds, __pyx_kp_eps); + values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__eps); if (likely(values[3])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_wrap", 1, 9, 9, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: - values[4] = PyDict_GetItem(__pyx_kwds, __pyx_kp_C); + values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__C); if (likely(values[4])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_wrap", 1, 9, 9, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: - values[5] = PyDict_GetItem(__pyx_kwds, __pyx_kp_weight_label); + values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__weight_label); if (likely(values[5])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_wrap", 1, 9, 9, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: - values[6] = PyDict_GetItem(__pyx_kwds, __pyx_kp_weight); + values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__weight); if (likely(values[6])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_wrap", 1, 9, 9, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 7: - values[7] = PyDict_GetItem(__pyx_kwds, __pyx_kp_label); + values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__label); if (likely(values[7])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_wrap", 1, 9, 9, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 8: - values[8] = PyDict_GetItem(__pyx_kwds, __pyx_kp_bias); + values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bias); if (likely(values[8])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_wrap", 1, 9, 9, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L3_error;} @@ -1598,24 +1558,24 @@ static PyObject *__pyx_pf_9liblinear_predict_wrap(PyObject *__pyx_self, PyObject __pyx_v_T = ((PyArrayObject *)values[0]); __pyx_v_coef_ = ((PyArrayObject *)values[1]); __pyx_v_solver_type = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_solver_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_eps = __pyx_PyFloat_AsDouble(values[3]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_C = __pyx_PyFloat_AsDouble(values[4]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_eps = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_eps == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_C = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_C == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_weight_label = ((PyArrayObject *)values[5]); __pyx_v_weight = ((PyArrayObject *)values[6]); __pyx_v_label = ((PyArrayObject *)values[7]); - __pyx_v_bias = __pyx_PyFloat_AsDouble(values[8]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_bias = __pyx_PyFloat_AsDouble(values[8]); if (unlikely((__pyx_v_bias == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else if (PyTuple_GET_SIZE(__pyx_args) != 9) { goto __pyx_L5_argtuple_error; } else { __pyx_v_T = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0)); __pyx_v_coef_ = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1)); __pyx_v_solver_type = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_solver_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_eps = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_C = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_eps = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_eps == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_C = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_C == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_weight_label = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 5)); __pyx_v_weight = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 6)); __pyx_v_label = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 7)); - __pyx_v_bias = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 8)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_bias = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 8)); if (unlikely((__pyx_v_bias == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; @@ -1624,6 +1584,11 @@ static PyObject *__pyx_pf_9liblinear_predict_wrap(PyObject *__pyx_self, PyObject __Pyx_AddTraceback("liblinear.predict_wrap"); return NULL; __pyx_L4_argument_unpacking_done:; + __Pyx_INCREF((PyObject *)__pyx_v_T); + __Pyx_INCREF((PyObject *)__pyx_v_coef_); + __Pyx_INCREF((PyObject *)__pyx_v_weight_label); + __Pyx_INCREF((PyObject *)__pyx_v_weight); + __Pyx_INCREF((PyObject *)__pyx_v_label); __pyx_v_dec_values = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_dec_values.buf = NULL; __pyx_bstruct_T.buf = NULL; @@ -1667,7 +1632,7 @@ static PyObject *__pyx_pf_9liblinear_predict_wrap(PyObject *__pyx_self, PyObject __pyx_bstride_0_label = __pyx_bstruct_label.strides[0]; __pyx_bshape_0_label = __pyx_bstruct_label.shape[0]; - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":103 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":103 * cdef model *model * * param = set_parameter(solver_type, eps, C, weight.shape[0], weight_label.data, weight.data) # <<<<<<<<<<<<<< @@ -1676,7 +1641,7 @@ static PyObject *__pyx_pf_9liblinear_predict_wrap(PyObject *__pyx_self, PyObject */ __pyx_v_param = set_parameter(__pyx_v_solver_type, __pyx_v_eps, __pyx_v_C, (__pyx_v_weight->dimensions[0]), __pyx_v_weight_label->data, __pyx_v_weight->data); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":105 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":105 * param = set_parameter(solver_type, eps, C, weight.shape[0], weight_label.data, weight.data) * * model = set_model(param, coef_.data, coef_.shape, label.data, bias) # <<<<<<<<<<<<<< @@ -1685,96 +1650,96 @@ static PyObject *__pyx_pf_9liblinear_predict_wrap(PyObject *__pyx_self, PyObject */ __pyx_v_model = set_model(__pyx_v_param, __pyx_v_coef_->data, __pyx_v_coef_->dimensions, __pyx_v_label->data, __pyx_v_bias); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":107 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":107 * model = set_model(param, coef_.data, coef_.shape, label.data, bias) * * dec_values = np.empty(T.shape[0], dtype=np.int32) # <<<<<<<<<<<<<< * if copy_predict(T.data, model, T.shape, dec_values.data) < 0: * raise MemoryError("We've run out of of memory") */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_t_2 = PyInt_FromLong((__pyx_v_T->dimensions[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyInt_to_py_npy_intp((__pyx_v_T->dimensions[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_1)); - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_2); - __pyx_t_2 = PyObject_GetAttr(__pyx_2, __pyx_kp_31); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_2); __pyx_2 = 0; - if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__int32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; - if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = ((PyArrayObject *)__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_bstruct_dec_values); - __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_dec_values, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack); - if (unlikely(__pyx_t_5 < 0)) { - PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_dec_values, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack); + if (unlikely(__pyx_t_7 < 0)) { + PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_dec_values, (PyObject*)__pyx_v_dec_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 1, 0, __pyx_stack) == -1)) { - Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); + Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { - PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8); + PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } } __pyx_bstride_0_dec_values = __pyx_bstruct_dec_values.strides[0]; __pyx_bshape_0_dec_values = __pyx_bstruct_dec_values.shape[0]; - if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = 0; + __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_v_dec_values)); - __pyx_v_dec_values = ((PyArrayObject *)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_v_dec_values = ((PyArrayObject *)__pyx_t_5); + __pyx_t_5 = 0; - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":108 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":108 * * dec_values = np.empty(T.shape[0], dtype=np.int32) * if copy_predict(T.data, model, T.shape, dec_values.data) < 0: # <<<<<<<<<<<<<< * raise MemoryError("We've run out of of memory") * */ - __pyx_t_9 = (copy_predict(__pyx_v_T->data, __pyx_v_model, __pyx_v_T->dimensions, __pyx_v_dec_values->data) < 0); - if (__pyx_t_9) { + __pyx_t_11 = (copy_predict(__pyx_v_T->data, __pyx_v_model, __pyx_v_T->dimensions, __pyx_v_dec_values->data) < 0); + if (__pyx_t_11) { - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":109 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":109 * dec_values = np.empty(T.shape[0], dtype=np.int32) * if copy_predict(T.data, model, T.shape, dec_values.data) < 0: * raise MemoryError("We've run out of of memory") # <<<<<<<<<<<<<< * * ### FREE */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_INCREF(__pyx_kp_32); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_32); - __Pyx_GIVEREF(__pyx_kp_32); - __pyx_t_3 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_1)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1)); + __pyx_t_1 = PyObject_Call(__pyx_builtin_MemoryError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":112 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":112 * * ### FREE * free_parameter(param) # <<<<<<<<<<<<<< @@ -1783,7 +1748,7 @@ static PyObject *__pyx_pf_9liblinear_predict_wrap(PyObject *__pyx_self, PyObject */ free_parameter(__pyx_v_param); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":113 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":113 * ### FREE * free_parameter(param) * destroy_model(model) # <<<<<<<<<<<<<< @@ -1792,7 +1757,7 @@ static PyObject *__pyx_pf_9liblinear_predict_wrap(PyObject *__pyx_self, PyObject */ destroy_model(__pyx_v_model); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":114 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":114 * free_parameter(param) * destroy_model(model) * return dec_values # <<<<<<<<<<<<<< @@ -1807,11 +1772,11 @@ static PyObject *__pyx_pf_9liblinear_predict_wrap(PyObject *__pyx_self, PyObject __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_1); - __Pyx_XDECREF(__pyx_2); __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_dec_values); @@ -1833,12 +1798,17 @@ static PyObject *__pyx_pf_9liblinear_predict_wrap(PyObject *__pyx_self, PyObject __Pyx_SafeReleaseBuffer(&__pyx_bstruct_T); __pyx_L2:; __Pyx_DECREF((PyObject *)__pyx_v_dec_values); + __Pyx_DECREF((PyObject *)__pyx_v_T); + __Pyx_DECREF((PyObject *)__pyx_v_coef_); + __Pyx_DECREF((PyObject *)__pyx_v_weight_label); + __Pyx_DECREF((PyObject *)__pyx_v_weight); + __Pyx_DECREF((PyObject *)__pyx_v_label); __Pyx_XGIVEREF(__pyx_r); - __Pyx_FinishRefcountContext(); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":119 +/* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":119 * * * def predict_prob_wrap(np.ndarray[np.float64_t, ndim=2, mode='c'] T, # <<<<<<<<<<<<<< @@ -1887,20 +1857,19 @@ static PyObject *__pyx_pf_9liblinear_predict_prob_wrap(PyObject *__pyx_self, PyO Py_ssize_t __pyx_bshape_0_T = 0; Py_ssize_t __pyx_bshape_1_T = 0; PyObject *__pyx_r = NULL; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyArrayObject *__pyx_t_5 = NULL; - int __pyx_t_6; - PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_5 = NULL; + PyArrayObject *__pyx_t_6 = NULL; + int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - int __pyx_t_10; - static PyObject **__pyx_pyargnames[] = {&__pyx_kp_T,&__pyx_kp_coef_,&__pyx_kp_solver_type,&__pyx_kp_eps,&__pyx_kp_C,&__pyx_kp_weight_label,&__pyx_kp_weight,&__pyx_kp_label,&__pyx_kp_bias,0}; - __Pyx_SetupRefcountContext("predict_prob_wrap"); + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__T,&__pyx_n_s__coef_,&__pyx_n_s__solver_type,&__pyx_n_s__eps,&__pyx_n_s__C,&__pyx_n_s__weight_label,&__pyx_n_s__weight,&__pyx_n_s__label,&__pyx_n_s__bias,0}; + __Pyx_RefNannySetupContext("predict_prob_wrap"); __pyx_self = __pyx_self; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); @@ -1920,53 +1889,53 @@ static PyObject *__pyx_pf_9liblinear_predict_prob_wrap(PyObject *__pyx_self, PyO } switch (PyTuple_GET_SIZE(__pyx_args)) { case 0: - values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_T); + values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__T); if (likely(values[0])) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_coef_); + values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coef_); if (likely(values[1])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_prob_wrap", 1, 9, 9, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: - values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_solver_type); + values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__solver_type); if (likely(values[2])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_prob_wrap", 1, 9, 9, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: - values[3] = PyDict_GetItem(__pyx_kwds, __pyx_kp_eps); + values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__eps); if (likely(values[3])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_prob_wrap", 1, 9, 9, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: - values[4] = PyDict_GetItem(__pyx_kwds, __pyx_kp_C); + values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__C); if (likely(values[4])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_prob_wrap", 1, 9, 9, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: - values[5] = PyDict_GetItem(__pyx_kwds, __pyx_kp_weight_label); + values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__weight_label); if (likely(values[5])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_prob_wrap", 1, 9, 9, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: - values[6] = PyDict_GetItem(__pyx_kwds, __pyx_kp_weight); + values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__weight); if (likely(values[6])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_prob_wrap", 1, 9, 9, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 7: - values[7] = PyDict_GetItem(__pyx_kwds, __pyx_kp_label); + values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__label); if (likely(values[7])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_prob_wrap", 1, 9, 9, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 8: - values[8] = PyDict_GetItem(__pyx_kwds, __pyx_kp_bias); + values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bias); if (likely(values[8])) kw_args--; else { __Pyx_RaiseArgtupleInvalid("predict_prob_wrap", 1, 9, 9, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;} @@ -1978,24 +1947,24 @@ static PyObject *__pyx_pf_9liblinear_predict_prob_wrap(PyObject *__pyx_self, PyO __pyx_v_T = ((PyArrayObject *)values[0]); __pyx_v_coef_ = ((PyArrayObject *)values[1]); __pyx_v_solver_type = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_solver_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_eps = __pyx_PyFloat_AsDouble(values[3]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_C = __pyx_PyFloat_AsDouble(values[4]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_eps = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_eps == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_C = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_C == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_weight_label = ((PyArrayObject *)values[5]); __pyx_v_weight = ((PyArrayObject *)values[6]); __pyx_v_label = ((PyArrayObject *)values[7]); - __pyx_v_bias = __pyx_PyFloat_AsDouble(values[8]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_bias = __pyx_PyFloat_AsDouble(values[8]); if (unlikely((__pyx_v_bias == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else if (PyTuple_GET_SIZE(__pyx_args) != 9) { goto __pyx_L5_argtuple_error; } else { __pyx_v_T = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0)); __pyx_v_coef_ = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1)); __pyx_v_solver_type = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_solver_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_eps = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_C = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_eps = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_eps == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_C = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_C == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_weight_label = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 5)); __pyx_v_weight = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 6)); __pyx_v_label = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 7)); - __pyx_v_bias = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 8)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_bias = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 8)); if (unlikely((__pyx_v_bias == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; @@ -2004,6 +1973,11 @@ static PyObject *__pyx_pf_9liblinear_predict_prob_wrap(PyObject *__pyx_self, PyO __Pyx_AddTraceback("liblinear.predict_prob_wrap"); return NULL; __pyx_L4_argument_unpacking_done:; + __Pyx_INCREF((PyObject *)__pyx_v_T); + __Pyx_INCREF((PyObject *)__pyx_v_coef_); + __Pyx_INCREF((PyObject *)__pyx_v_weight_label); + __Pyx_INCREF((PyObject *)__pyx_v_weight); + __Pyx_INCREF((PyObject *)__pyx_v_label); __pyx_v_dec_values = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_dec_values.buf = NULL; __pyx_bstruct_T.buf = NULL; @@ -2047,7 +2021,7 @@ static PyObject *__pyx_pf_9liblinear_predict_prob_wrap(PyObject *__pyx_self, PyO __pyx_bstride_0_label = __pyx_bstruct_label.strides[0]; __pyx_bshape_0_label = __pyx_bstruct_label.shape[0]; - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":156 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":156 * cdef model *model * * param = set_parameter(solver_type, eps, C, weight.shape[0], weight_label.data, weight.data) # <<<<<<<<<<<<<< @@ -2056,7 +2030,7 @@ static PyObject *__pyx_pf_9liblinear_predict_prob_wrap(PyObject *__pyx_self, PyO */ __pyx_v_param = set_parameter(__pyx_v_solver_type, __pyx_v_eps, __pyx_v_C, (__pyx_v_weight->dimensions[0]), __pyx_v_weight_label->data, __pyx_v_weight->data); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":158 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":158 * param = set_parameter(solver_type, eps, C, weight.shape[0], weight_label.data, weight.data) * * model = set_model(param, coef_.data, coef_.shape, label.data, bias) # <<<<<<<<<<<<<< @@ -2065,7 +2039,7 @@ static PyObject *__pyx_pf_9liblinear_predict_prob_wrap(PyObject *__pyx_self, PyO */ __pyx_v_model = set_model(__pyx_v_param, __pyx_v_coef_->data, __pyx_v_coef_->dimensions, __pyx_v_label->data, __pyx_v_bias); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":160 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":160 * model = set_model(param, coef_.data, coef_.shape, label.data, bias) * * cdef int nr_class = get_nr_class(model) # <<<<<<<<<<<<<< @@ -2074,106 +2048,106 @@ static PyObject *__pyx_pf_9liblinear_predict_prob_wrap(PyObject *__pyx_self, PyO */ __pyx_v_nr_class = get_nr_class(__pyx_v_model); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":161 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":161 * * cdef int nr_class = get_nr_class(model) * dec_values = np.empty((T.shape[0], nr_class), dtype=np.float64) # <<<<<<<<<<<<<< * if copy_prob_predict(T.data, model, T.shape, dec_values.data) < 0: * raise MemoryError("We've run out of of memory") */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_t_2 = PyInt_FromLong((__pyx_v_T->dimensions[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyInt_to_py_npy_intp((__pyx_v_T->dimensions[0])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyInt_FromLong(__pyx_v_nr_class); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_2 = 0; + __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_1)); - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_2); - __pyx_t_4 = PyObject_GetAttr(__pyx_2, __pyx_kp_33); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_2); __pyx_2 = 0; - if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; - if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_5 = ((PyArrayObject *)__pyx_t_4); + if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_bstruct_dec_values); - __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_dec_values, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 2, 0, __pyx_stack); - if (unlikely(__pyx_t_6 < 0)) { - PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); + __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_dec_values, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 2, 0, __pyx_stack); + if (unlikely(__pyx_t_7 < 0)) { + PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_dec_values, (PyObject*)__pyx_v_dec_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_C_CONTIGUOUS, 2, 0, __pyx_stack) == -1)) { - Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); + Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); __Pyx_RaiseBufferFallbackError(); } else { - PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9); + PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10); } } __pyx_bstride_0_dec_values = __pyx_bstruct_dec_values.strides[0]; __pyx_bstride_1_dec_values = __pyx_bstruct_dec_values.strides[1]; __pyx_bshape_0_dec_values = __pyx_bstruct_dec_values.shape[0]; __pyx_bshape_1_dec_values = __pyx_bstruct_dec_values.shape[1]; - if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = 0; + __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_v_dec_values)); - __pyx_v_dec_values = ((PyArrayObject *)__pyx_t_4); - __pyx_t_4 = 0; + __pyx_v_dec_values = ((PyArrayObject *)__pyx_t_5); + __pyx_t_5 = 0; - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":162 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":162 * cdef int nr_class = get_nr_class(model) * dec_values = np.empty((T.shape[0], nr_class), dtype=np.float64) * if copy_prob_predict(T.data, model, T.shape, dec_values.data) < 0: # <<<<<<<<<<<<<< * raise MemoryError("We've run out of of memory") * */ - __pyx_t_10 = (copy_prob_predict(__pyx_v_T->data, __pyx_v_model, __pyx_v_T->dimensions, __pyx_v_dec_values->data) < 0); - if (__pyx_t_10) { + __pyx_t_11 = (copy_prob_predict(__pyx_v_T->data, __pyx_v_model, __pyx_v_T->dimensions, __pyx_v_dec_values->data) < 0); + if (__pyx_t_11) { - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":163 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":163 * dec_values = np.empty((T.shape[0], nr_class), dtype=np.float64) * if copy_prob_predict(T.data, model, T.shape, dec_values.data) < 0: * raise MemoryError("We've run out of of memory") # <<<<<<<<<<<<<< * * ### FREE */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __Pyx_INCREF(__pyx_kp_34); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_34); - __Pyx_GIVEREF(__pyx_kp_34); - __pyx_t_3 = PyObject_Call(__pyx_builtin_MemoryError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_kp_s_1)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1)); + __pyx_t_4 = PyObject_Call(__pyx_builtin_MemoryError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":166 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":166 * * ### FREE * free_parameter(param) # <<<<<<<<<<<<<< @@ -2182,7 +2156,7 @@ static PyObject *__pyx_pf_9liblinear_predict_prob_wrap(PyObject *__pyx_self, PyO */ free_parameter(__pyx_v_param); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":167 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":167 * ### FREE * free_parameter(param) * destroy_model(model) # <<<<<<<<<<<<<< @@ -2191,7 +2165,7 @@ static PyObject *__pyx_pf_9liblinear_predict_prob_wrap(PyObject *__pyx_self, PyO */ destroy_model(__pyx_v_model); - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":169 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":169 * destroy_model(model) * * return dec_values # <<<<<<<<<<<<<< @@ -2204,12 +2178,11 @@ static PyObject *__pyx_pf_9liblinear_predict_prob_wrap(PyObject *__pyx_self, PyO __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_1); - __Pyx_XDECREF(__pyx_2); __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_bstruct_dec_values); @@ -2231,12 +2204,17 @@ static PyObject *__pyx_pf_9liblinear_predict_prob_wrap(PyObject *__pyx_self, PyO __Pyx_SafeReleaseBuffer(&__pyx_bstruct_T); __pyx_L2:; __Pyx_DECREF((PyObject *)__pyx_v_dec_values); + __Pyx_DECREF((PyObject *)__pyx_v_T); + __Pyx_DECREF((PyObject *)__pyx_v_coef_); + __Pyx_DECREF((PyObject *)__pyx_v_weight_label); + __Pyx_DECREF((PyObject *)__pyx_v_weight); + __Pyx_DECREF((PyObject *)__pyx_v_label); __Pyx_XGIVEREF(__pyx_r); - __Pyx_FinishRefcountContext(); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":65 +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":187 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -2258,18 +2236,21 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf int __pyx_v_hasfields; int __pyx_r; int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_t_5; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; int __pyx_t_6; - char *__pyx_t_7; - __Pyx_SetupRefcountContext("__getbuffer__"); + int __pyx_t_7; + int __pyx_t_8; + char *__pyx_t_9; + __Pyx_RefNannySetupContext("__getbuffer__"); if (__pyx_v_info == NULL) return 0; __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); + __Pyx_INCREF((PyObject *)__pyx_v_self); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":71 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":193 * # of flags * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -2278,7 +2259,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_endian_detector = 1; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":72 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":194 * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -2287,7 +2268,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":74 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":196 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -2296,7 +2277,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_ndim = PyArray_NDIM(((PyArrayObject *)__pyx_v_self)); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":76 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":198 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -2306,7 +2287,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); if (__pyx_t_1) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":77 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":199 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< @@ -2318,7 +2299,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":79 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":201 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< @@ -2329,96 +2310,100 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L5:; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":81 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":203 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): - * raise ValueError("ndarray is not C contiguous") + * raise ValueError(u"ndarray is not C contiguous") */ - if (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS)) { + __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS); + if (__pyx_t_1) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":82 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":204 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< - * raise ValueError("ndarray is not C contiguous") + * raise ValueError(u"ndarray is not C contiguous") * */ - __pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_C_CONTIGUOUS)); + __pyx_t_2 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_C_CONTIGUOUS)); + __pyx_t_3 = __pyx_t_2; } else { - __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS); + __pyx_t_3 = __pyx_t_1; } - if (__pyx_t_1) { + if (__pyx_t_3) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":83 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":205 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): - * raise ValueError("ndarray is not C contiguous") # <<<<<<<<<<<<<< + * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_INCREF(__pyx_kp_1); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_1); - __Pyx_GIVEREF(__pyx_kp_1); - __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_2)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_2)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":85 - * raise ValueError("ndarray is not C contiguous") + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":207 + * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): - * raise ValueError("ndarray is not Fortran contiguous") + * raise ValueError(u"ndarray is not Fortran contiguous") */ - if (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS)) { + __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS); + if (__pyx_t_3) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":86 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":208 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< - * raise ValueError("ndarray is not Fortran contiguous") + * raise ValueError(u"ndarray is not Fortran contiguous") * */ __pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_F_CONTIGUOUS)); + __pyx_t_2 = __pyx_t_1; } else { - __pyx_t_1 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS); + __pyx_t_2 = __pyx_t_3; } - if (__pyx_t_1) { + if (__pyx_t_2) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":87 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":209 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): - * raise ValueError("ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< + * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __Pyx_INCREF(__pyx_kp_2); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_2); - __Pyx_GIVEREF(__pyx_kp_2); - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __Pyx_Raise(__pyx_t_2, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_3)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_3)); + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":89 - * raise ValueError("ndarray is not Fortran contiguous") + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":211 + * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim @@ -2426,7 +2411,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->buf = PyArray_DATA(((PyArrayObject *)__pyx_v_self)); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":90 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":212 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< @@ -2435,17 +2420,17 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->ndim = __pyx_v_ndim; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":91 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":213 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. This is allocated * # as one block, strides first. */ - __pyx_t_4 = __pyx_v_copy_shape; - if (__pyx_t_4) { + __pyx_t_6 = __pyx_v_copy_shape; + if (__pyx_t_6) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":94 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":216 * # Allocate new buffer for strides and shape info. This is allocated * # as one block, strides first. * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< @@ -2454,7 +2439,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * __pyx_v_ndim) * 2))); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":95 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":217 * # as one block, strides first. * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< @@ -2463,17 +2448,18 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":96 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":218 * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] */ - for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_v_ndim; __pyx_t_4+=1) { - __pyx_v_i = __pyx_t_4; + __pyx_t_6 = __pyx_v_ndim; + for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":97 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":219 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< @@ -2482,7 +2468,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":98 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":220 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< @@ -2495,7 +2481,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":100 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":222 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -2504,7 +2490,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":101 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":223 * else: * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -2515,7 +2501,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L8:; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":102 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":224 * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) * info.shape = <Py_ssize_t*>PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< @@ -2524,7 +2510,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->suboffsets = NULL; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":103 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":225 * info.shape = <Py_ssize_t*>PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< @@ -2533,7 +2519,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(((PyArrayObject *)__pyx_v_self)); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":104 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":226 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< @@ -2542,7 +2528,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(((PyArrayObject *)__pyx_v_self))); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":107 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":229 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< @@ -2551,7 +2537,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_f = NULL; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":108 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":230 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< @@ -2561,7 +2547,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self)->descr)); __pyx_v_descr = ((PyArrayObject *)__pyx_v_self)->descr; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":112 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":234 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< @@ -2570,21 +2556,23 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":114 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":236 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< * # do not call releasebuffer * info.obj = None */ - if ((!__pyx_v_hasfields)) { - __pyx_t_1 = (!__pyx_v_copy_shape); + __pyx_t_2 = (!__pyx_v_hasfields); + if (__pyx_t_2) { + __pyx_t_3 = (!__pyx_v_copy_shape); + __pyx_t_1 = __pyx_t_3; } else { - __pyx_t_1 = (!__pyx_v_hasfields); + __pyx_t_1 = __pyx_t_2; } if (__pyx_t_1) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":116 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":238 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< @@ -2600,7 +2588,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":119 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":241 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< @@ -2615,7 +2603,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L11:; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":121 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":243 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< @@ -2625,7 +2613,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __pyx_t_1 = (!__pyx_v_hasfields); if (__pyx_t_1) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":122 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":244 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< @@ -2634,286 +2622,322 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_t = __pyx_v_descr->type_num; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":123 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":245 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") */ - if ((__pyx_v_descr->byteorder == '>')) { - __pyx_t_1 = __pyx_v_little_endian; + __pyx_t_1 = (__pyx_v_descr->byteorder == '>'); + if (__pyx_t_1) { + __pyx_t_2 = __pyx_v_little_endian; } else { - __pyx_t_1 = (__pyx_v_descr->byteorder == '>'); + __pyx_t_2 = __pyx_t_1; } - if (!__pyx_t_1) { + if (!__pyx_t_2) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":124 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":246 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ - if ((__pyx_v_descr->byteorder == '<')) { - __pyx_t_5 = (!__pyx_v_little_endian); + __pyx_t_1 = (__pyx_v_descr->byteorder == '<'); + if (__pyx_t_1) { + __pyx_t_3 = (!__pyx_v_little_endian); + __pyx_t_8 = __pyx_t_3; } else { - __pyx_t_5 = (__pyx_v_descr->byteorder == '<'); + __pyx_t_8 = __pyx_t_1; } - __pyx_t_6 = __pyx_t_5; + __pyx_t_1 = __pyx_t_8; } else { - __pyx_t_6 = __pyx_t_1; + __pyx_t_1 = __pyx_t_2; } - if (__pyx_t_6) { + if (__pyx_t_1) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":125 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":247 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") # <<<<<<<<<<<<<< + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_INCREF(__pyx_kp_5); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_5); - __Pyx_GIVEREF(__pyx_kp_5); - __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_4)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_4)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L13; } __pyx_L13:; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":126 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":248 * (descr.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" */ - switch (__pyx_v_t) { - case NPY_BYTE: - __pyx_v_f = __pyx_k_6; - break; + __pyx_t_1 = (__pyx_v_t == NPY_BYTE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__b; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":127 - * raise ValueError("Non-native byte order not supported") + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":249 + * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" */ - case NPY_UBYTE: - __pyx_v_f = __pyx_k_7; - break; + __pyx_t_1 = (__pyx_v_t == NPY_UBYTE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__B; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":128 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":250 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" */ - case NPY_SHORT: - __pyx_v_f = __pyx_k_8; - break; + __pyx_t_1 = (__pyx_v_t == NPY_SHORT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__h; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":129 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":251 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" */ - case NPY_USHORT: - __pyx_v_f = __pyx_k_9; - break; + __pyx_t_1 = (__pyx_v_t == NPY_USHORT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__H; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":130 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":252 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" */ - case NPY_INT: - __pyx_v_f = __pyx_k_10; - break; + __pyx_t_1 = (__pyx_v_t == NPY_INT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__i; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":131 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":253 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" */ - case NPY_UINT: - __pyx_v_f = __pyx_k_11; - break; + __pyx_t_1 = (__pyx_v_t == NPY_UINT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__I; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":132 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":254 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" */ - case NPY_LONG: - __pyx_v_f = __pyx_k_12; - break; + __pyx_t_1 = (__pyx_v_t == NPY_LONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__l; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":133 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":255 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" */ - case NPY_ULONG: - __pyx_v_f = __pyx_k_13; - break; + __pyx_t_1 = (__pyx_v_t == NPY_ULONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__L; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":134 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":256 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" */ - case NPY_LONGLONG: - __pyx_v_f = __pyx_k_14; - break; + __pyx_t_1 = (__pyx_v_t == NPY_LONGLONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__q; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":135 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":257 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" */ - case NPY_ULONGLONG: - __pyx_v_f = __pyx_k_15; - break; + __pyx_t_1 = (__pyx_v_t == NPY_ULONGLONG); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Q; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":136 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":258 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" */ - case NPY_FLOAT: - __pyx_v_f = __pyx_k_16; - break; + __pyx_t_1 = (__pyx_v_t == NPY_FLOAT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__f; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":137 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":259 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" */ - case NPY_DOUBLE: - __pyx_v_f = __pyx_k_17; - break; + __pyx_t_1 = (__pyx_v_t == NPY_DOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__d; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":138 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":260 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" */ - case NPY_LONGDOUBLE: - __pyx_v_f = __pyx_k_18; - break; + __pyx_t_1 = (__pyx_v_t == NPY_LONGDOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__g; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":139 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":261 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" */ - case NPY_CFLOAT: - __pyx_v_f = __pyx_k_19; - break; + __pyx_t_1 = (__pyx_v_t == NPY_CFLOAT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Zf; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":140 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":262 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" */ - case NPY_CDOUBLE: - __pyx_v_f = __pyx_k_20; - break; + __pyx_t_1 = (__pyx_v_t == NPY_CDOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Zd; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":141 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":263 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f = "O" * else: */ - case NPY_CLONGDOUBLE: - __pyx_v_f = __pyx_k_21; - break; + __pyx_t_1 = (__pyx_v_t == NPY_CLONGDOUBLE); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__Zg; + goto __pyx_L14; + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":142 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":264 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ - case NPY_OBJECT: - __pyx_v_f = __pyx_k_22; - break; - default: + __pyx_t_1 = (__pyx_v_t == NPY_OBJECT); + if (__pyx_t_1) { + __pyx_v_f = __pyx_k__O; + goto __pyx_L14; + } + /*else*/ { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":144 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":266 * elif t == NPY_OBJECT: f = "O" * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ - __pyx_t_3 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyNumber_Remainder(__pyx_kp_23, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __Pyx_Raise(__pyx_t_2, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - break; + __pyx_t_5 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_5), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_L14:; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":145 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":267 * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":146 - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":268 + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: @@ -2925,7 +2949,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":148 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":270 * return * else: * info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< @@ -2934,7 +2958,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->format = ((char *)malloc(255)); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":149 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":271 * else: * info.format = <char*>stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< @@ -2943,7 +2967,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ (__pyx_v_info->format[0]) = '^'; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":150 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":272 * info.format = <char*>stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< @@ -2952,17 +2976,17 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_offset = 0; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":153 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":275 * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, * &offset) # <<<<<<<<<<<<<< * f[0] = 0 # Terminate format string * */ - __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_f = __pyx_t_7; + __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_f = __pyx_t_9; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":154 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":276 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< @@ -2973,105 +2997,302 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L12:; - __pyx_r = 0; + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("numpy.ndarray.__getbuffer__"); + __pyx_r = -1; + __Pyx_GOTREF(__pyx_v_info->obj); + __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; + goto __pyx_L2; + __pyx_L0:; + if (__pyx_v_info->obj == Py_None) { + __Pyx_GOTREF(Py_None); + __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; + } + __pyx_L2:; + __Pyx_XDECREF((PyObject *)__pyx_v_descr); + __Pyx_DECREF((PyObject *)__pyx_v_self); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":278 + * f[0] = 0 # Terminate format string + * + * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) + */ + +static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ +static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { + int __pyx_t_1; + __Pyx_RefNannySetupContext("__releasebuffer__"); + __Pyx_INCREF((PyObject *)__pyx_v_self); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":279 + * + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + */ + __pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self)); + if (__pyx_t_1) { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":280 + * def __releasebuffer__(ndarray self, Py_buffer* info): + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) # <<<<<<<<<<<<<< + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * stdlib.free(info.strides) + */ + free(__pyx_v_info->format); + goto __pyx_L5; + } + __pyx_L5:; + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":281 + * if PyArray_HASFIELDS(self): + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< + * stdlib.free(info.strides) + * # info.shape was stored after info.strides in the same block + */ + __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); + if (__pyx_t_1) { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":282 + * stdlib.free(info.format) + * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * stdlib.free(info.strides) # <<<<<<<<<<<<<< + * # info.shape was stored after info.strides in the same block + * + */ + free(__pyx_v_info->strides); + goto __pyx_L6; + } + __pyx_L6:; + + __Pyx_DECREF((PyObject *)__pyx_v_self); + __Pyx_RefNannyFinishContext(); +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":755 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, <void*>a) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1"); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":756 + * + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew2(a, b): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":758 + * return PyArray_MultiIterNew(1, <void*>a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, <void*>a, <void*>b) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2"); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":759 + * + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":761 + * return PyArray_MultiIterNew(2, <void*>a, <void*>b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew3"); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":762 + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("numpy.ndarray.__getbuffer__"); - __pyx_r = -1; - __Pyx_GOTREF(__pyx_v_info->obj); - __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL; - goto __pyx_L2; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3"); + __pyx_r = 0; __pyx_L0:; - if (__pyx_v_info->obj == Py_None) { - __Pyx_GOTREF(Py_None); - __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL; - } - __pyx_L2:; - __Pyx_XDECREF((PyObject *)__pyx_v_descr); - __Pyx_FinishRefcountContext(); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":156 - * f[0] = 0 # Terminate format string +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":764 + * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) * - * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< - * if PyArray_HASFIELDS(self): - * stdlib.free(info.format) */ -static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ -static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { - int __pyx_t_1; - int __pyx_t_2; - __Pyx_SetupRefcountContext("__releasebuffer__"); +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4"); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":157 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":765 * - * def __releasebuffer__(ndarray self, Py_buffer* info): - * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< - * stdlib.free(info.format) - * if sizeof(npy_intp) != sizeof(Py_ssize_t): + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ - __pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self)); - if (__pyx_t_1) { + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":158 - * def __releasebuffer__(ndarray self, Py_buffer* info): - * if PyArray_HASFIELDS(self): - * stdlib.free(info.format) # <<<<<<<<<<<<<< - * if sizeof(npy_intp) != sizeof(Py_ssize_t): - * stdlib.free(info.strides) - */ - free(__pyx_v_info->format); - goto __pyx_L5; - } - __pyx_L5:; + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":159 - * if PyArray_HASFIELDS(self): - * stdlib.free(info.format) - * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< - * stdlib.free(info.strides) - * # info.shape was stored after info.strides in the same block +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":767 + * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) + * */ - __pyx_t_2 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); - if (__pyx_t_2) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":160 - * stdlib.free(info.format) - * if sizeof(npy_intp) != sizeof(Py_ssize_t): - * stdlib.free(info.strides) # <<<<<<<<<<<<<< - * # info.shape was stored after info.strides in the same block +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5"); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":768 + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<< * + * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ - free(__pyx_v_info->strides); - goto __pyx_L6; - } - __pyx_L6:; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - __Pyx_FinishRefcountContext(); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5"); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; } -/* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":277 - * ctypedef npy_cdouble complex_t +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":770 + * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< * # Recursive utility function used in __getbuffer__ to get format * # string. The new location in the format string is returned. */ -static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { PyArray_Descr *__pyx_v_child; - PyObject *__pyx_v_i; int __pyx_v_endian_detector; int __pyx_v_little_endian; + PyObject *__pyx_v_fields; + PyObject *__pyx_v_childname; PyObject *__pyx_v_new_offset; PyObject *__pyx_v_t; char *__pyx_r; - PyObject *__pyx_1 = 0; Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; @@ -3080,199 +3301,195 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; - char *__pyx_t_9; - __Pyx_SetupRefcountContext("_util_dtypestring"); + int __pyx_t_9; + char *__pyx_t_10; + __Pyx_RefNannySetupContext("_util_dtypestring"); + __Pyx_INCREF((PyObject *)__pyx_v_descr); __pyx_v_child = ((PyArray_Descr *)Py_None); __Pyx_INCREF(Py_None); - __pyx_v_i = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_fields = ((PyObject *)Py_None); __Pyx_INCREF(Py_None); + __pyx_v_childname = Py_None; __Pyx_INCREF(Py_None); __pyx_v_new_offset = Py_None; __Pyx_INCREF(Py_None); __pyx_v_t = Py_None; __Pyx_INCREF(Py_None); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":284 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":777 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) - * + * cdef tuple fields */ __pyx_v_endian_detector = 1; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":285 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":778 * cdef tuple i * cdef int endian_detector = 1 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<< + * cdef tuple fields * - * for i in descr.fields.itervalues(): */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":287 - * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":781 + * cdef tuple fields * - * for i in descr.fields.itervalues(): # <<<<<<<<<<<<<< - * child = i[0] - * new_offset = i[1] + * for childname in descr.names: # <<<<<<<<<<<<<< + * fields = descr.fields[childname] + * child, new_offset = fields */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_descr->fields, __pyx_kp_itervalues); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { - __pyx_t_1 = 0; __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); + if (likely(((PyObject *)__pyx_v_descr->names) != Py_None)) { + __pyx_t_1 = 0; __pyx_t_2 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_2); } else { - __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { - if (likely(PyList_CheckExact(__pyx_t_2))) { - if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break; - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; - } else if (likely(PyTuple_CheckExact(__pyx_t_2))) { - if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break; - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; - } else { - __pyx_t_3 = PyIter_Next(__pyx_t_2); - if (!__pyx_t_3) { - if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - break; - } - __Pyx_GOTREF(__pyx_t_3); - } - if (!(likely(PyTuple_CheckExact(__pyx_t_3)) || (__pyx_t_3) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected tuple, got %s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_v_i)); - __pyx_v_i = ((PyObject *)__pyx_t_3); + if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; + __Pyx_DECREF(__pyx_v_childname); + __pyx_v_childname = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":288 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":782 * - * for i in descr.fields.itervalues(): - * child = i[0] # <<<<<<<<<<<<<< - * new_offset = i[1] + * for childname in descr.names: + * fields = descr.fields[childname] # <<<<<<<<<<<<<< + * child, new_offset = fields * */ - __pyx_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_i), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - if (!(__Pyx_TypeTest(__pyx_1, __pyx_ptype_5numpy_dtype))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_v_child)); - __pyx_v_child = ((PyArray_Descr *)__pyx_1); - __pyx_1 = 0; + __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_v_fields)); + __pyx_v_fields = ((PyObject *)__pyx_t_3); + __pyx_t_3 = 0; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":289 - * for i in descr.fields.itervalues(): - * child = i[0] - * new_offset = i[1] # <<<<<<<<<<<<<< + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":783 + * for childname in descr.names: + * fields = descr.fields[childname] + * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ - __pyx_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_i), 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - __Pyx_DECREF(__pyx_v_new_offset); - __pyx_v_new_offset = __pyx_1; - __pyx_1 = 0; + if (likely(((PyObject *)__pyx_v_fields) != Py_None) && likely(PyTuple_GET_SIZE(((PyObject *)__pyx_v_fields)) == 2)) { + PyObject* tuple = ((PyObject *)__pyx_v_fields); + __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3); + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_v_child)); + __pyx_v_child = ((PyArray_Descr *)__pyx_t_3); + __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_v_new_offset); + __pyx_v_new_offset = __pyx_t_4; + __pyx_t_4 = 0; + } else { + __Pyx_UnpackTupleError(((PyObject *)__pyx_v_fields), 2); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":291 - * new_offset = i[1] + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":785 + * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< - * raise RuntimeError("Format string allocated too short, see comment in numpy.pxd") + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ - __pyx_t_3 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":292 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":786 * * if (end - f) - (new_offset - offset[0]) < 15: - * raise RuntimeError("Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == '>' and little_endian) or */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __Pyx_INCREF(__pyx_kp_25); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_25); - __Pyx_GIVEREF(__pyx_kp_25); - __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_6)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_6)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_6)); + __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":294 - * raise RuntimeError("Format string allocated too short, see comment in numpy.pxd") + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":788 + * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") */ - if ((__pyx_v_child->byteorder == '>')) { - __pyx_t_6 = __pyx_v_little_endian; + __pyx_t_6 = (__pyx_v_child->byteorder == '>'); + if (__pyx_t_6) { + __pyx_t_7 = __pyx_v_little_endian; } else { - __pyx_t_6 = (__pyx_v_child->byteorder == '>'); + __pyx_t_7 = __pyx_t_6; } - if (!__pyx_t_6) { + if (!__pyx_t_7) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":295 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":789 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< - * raise ValueError("Non-native byte order not supported") + * raise ValueError(u"Non-native byte order not supported") * # One could encode it in the format string and have Cython */ - if ((__pyx_v_child->byteorder == '<')) { - __pyx_t_7 = (!__pyx_v_little_endian); + __pyx_t_6 = (__pyx_v_child->byteorder == '<'); + if (__pyx_t_6) { + __pyx_t_8 = (!__pyx_v_little_endian); + __pyx_t_9 = __pyx_t_8; } else { - __pyx_t_7 = (__pyx_v_child->byteorder == '<'); + __pyx_t_9 = __pyx_t_6; } - __pyx_t_8 = __pyx_t_7; + __pyx_t_6 = __pyx_t_9; } else { - __pyx_t_8 = __pyx_t_6; + __pyx_t_6 = __pyx_t_7; } - if (__pyx_t_8) { + if (__pyx_t_6) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":296 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":790 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' and not little_endian)): - * raise ValueError("Non-native byte order not supported") # <<<<<<<<<<<<<< + * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __Pyx_INCREF(__pyx_kp_28); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_28); - __Pyx_GIVEREF(__pyx_kp_28); - __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_4)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_4)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":306 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":800 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< @@ -3280,16 +3497,16 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc * f += 1 */ while (1) { - __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!__pyx_t_8) break; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!__pyx_t_6) break; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":307 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":801 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< @@ -3298,7 +3515,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc */ (__pyx_v_f[0]) = 120; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":308 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":802 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< @@ -3307,7 +3524,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc */ __pyx_v_f += 1; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":309 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":803 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< @@ -3317,7 +3534,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc (__pyx_v_offset[0]) += 1; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":311 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":805 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< @@ -3326,417 +3543,417 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc */ (__pyx_v_offset[0]) += __pyx_v_child->elsize; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":313 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":807 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ - __pyx_t_8 = (!PyDataType_HASFIELDS(__pyx_v_child)); - if (__pyx_t_8) { + __pyx_t_6 = (!PyDataType_HASFIELDS(__pyx_v_child)); + if (__pyx_t_6) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":314 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":808 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: - * raise RuntimeError("Format string allocated too short.") + * raise RuntimeError(u"Format string allocated too short.") */ - __pyx_t_4 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_v_t); - __pyx_v_t = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_v_t = __pyx_t_3; + __pyx_t_3 = 0; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":315 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":809 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< - * raise RuntimeError("Format string allocated too short.") + * raise RuntimeError(u"Format string allocated too short.") * */ - __pyx_t_8 = ((__pyx_v_end - __pyx_v_f) < 5); - if (__pyx_t_8) { + __pyx_t_6 = ((__pyx_v_end - __pyx_v_f) < 5); + if (__pyx_t_6) { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":316 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":810 * t = child.type_num * if end - f < 5: - * raise RuntimeError("Format string allocated too short.") # <<<<<<<<<<<<<< + * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __Pyx_INCREF(__pyx_kp_29); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_29); - __Pyx_GIVEREF(__pyx_kp_29); - __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(((PyObject *)__pyx_kp_u_7)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_7)); + __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_7)); + __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L10; } __pyx_L10:; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":319 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":813 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" */ - __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":320 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":814 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" */ - __pyx_t_4 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":321 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":815 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" */ - __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 104; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":322 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":816 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" */ - __pyx_t_4 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":323 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":817 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" */ - __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 105; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":324 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":818 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" */ - __pyx_t_4 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":325 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":819 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" */ - __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 108; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":326 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":820 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" */ - __pyx_t_4 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":327 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":821 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" */ - __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 113; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":328 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":822 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" */ - __pyx_t_4 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":329 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":823 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" */ - __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 102; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":330 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":824 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf */ - __pyx_t_4 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 100; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":331 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":825 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd */ - __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 103; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":332 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":826 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg */ - __pyx_t_4 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 102; __pyx_v_f += 1; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":333 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":827 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" */ - __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 100; __pyx_v_f += 1; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":334 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":828 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: */ - __pyx_t_4 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_8) { + if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 103; __pyx_v_f += 1; goto __pyx_L11; } - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":335 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":829 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ - __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_8) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { (__pyx_v_f[0]) = 79; goto __pyx_L11; } /*else*/ { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":337 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":831 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ - __pyx_t_4 = PyNumber_Remainder(__pyx_kp_30, __pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_5), __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L11:; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":338 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":832 * else: - * raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) + * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< * else: * # Cython ignores struct boundary information ("T{...}"), @@ -3746,25 +3963,26 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc } /*else*/ { - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":342 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":836 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ - __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_f = __pyx_t_9; + __pyx_t_10 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_f = __pyx_t_10; } __pyx_L9:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/numpy.pxd":343 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":837 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * + * */ __pyx_r = __pyx_v_f; goto __pyx_L0; @@ -3772,7 +3990,6 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); @@ -3780,11 +3997,152 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc __Pyx_AddTraceback("numpy._util_dtypestring"); __pyx_r = NULL; __pyx_L0:; - __Pyx_DECREF((PyObject *)__pyx_v_child); - __Pyx_DECREF(__pyx_v_i); - __Pyx_DECREF(__pyx_v_new_offset); - __Pyx_DECREF(__pyx_v_t); - __Pyx_FinishRefcountContext(); + __Pyx_DECREF((PyObject *)__pyx_v_child); + __Pyx_DECREF(__pyx_v_fields); + __Pyx_DECREF(__pyx_v_childname); + __Pyx_DECREF(__pyx_v_new_offset); + __Pyx_DECREF(__pyx_v_t); + __Pyx_DECREF((PyObject *)__pyx_v_descr); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":952 + * + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * cdef PyObject* baseptr + * if base is None: + */ + +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { + PyObject *__pyx_v_baseptr; + int __pyx_t_1; + __Pyx_RefNannySetupContext("set_array_base"); + __Pyx_INCREF((PyObject *)__pyx_v_arr); + __Pyx_INCREF(__pyx_v_base); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":954 + * cdef inline void set_array_base(ndarray arr, object base): + * cdef PyObject* baseptr + * if base is None: # <<<<<<<<<<<<<< + * baseptr = NULL + * else: + */ + __pyx_t_1 = (__pyx_v_base == Py_None); + if (__pyx_t_1) { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":955 + * cdef PyObject* baseptr + * if base is None: + * baseptr = NULL # <<<<<<<<<<<<<< + * else: + * Py_INCREF(base) # important to do this before decref below! + */ + __pyx_v_baseptr = NULL; + goto __pyx_L3; + } + /*else*/ { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":957 + * baseptr = NULL + * else: + * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< + * baseptr = <PyObject*>base + * Py_XDECREF(arr.base) + */ + Py_INCREF(__pyx_v_base); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":958 + * else: + * Py_INCREF(base) # important to do this before decref below! + * baseptr = <PyObject*>base # <<<<<<<<<<<<<< + * Py_XDECREF(arr.base) + * arr.base = baseptr + */ + __pyx_v_baseptr = ((PyObject *)__pyx_v_base); + } + __pyx_L3:; + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":959 + * Py_INCREF(base) # important to do this before decref below! + * baseptr = <PyObject*>base + * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< + * arr.base = baseptr + * + */ + Py_XDECREF(__pyx_v_arr->base); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":960 + * baseptr = <PyObject*>base + * Py_XDECREF(arr.base) + * arr.base = baseptr # <<<<<<<<<<<<<< + * + * cdef inline object get_array_base(ndarray arr): + */ + __pyx_v_arr->base = __pyx_v_baseptr; + + __Pyx_DECREF((PyObject *)__pyx_v_arr); + __Pyx_DECREF(__pyx_v_base); + __Pyx_RefNannyFinishContext(); +} + +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":962 + * arr.base = baseptr + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * if arr.base is NULL: + * return None + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_r = NULL; + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base"); + __Pyx_INCREF((PyObject *)__pyx_v_arr); + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":963 + * + * cdef inline object get_array_base(ndarray arr): + * if arr.base is NULL: # <<<<<<<<<<<<<< + * return None + * else: + */ + __pyx_t_1 = (__pyx_v_arr->base == NULL); + if (__pyx_t_1) { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":964 + * cdef inline object get_array_base(ndarray arr): + * if arr.base is NULL: + * return None # <<<<<<<<<<<<<< + * else: + * return <object>arr.base + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_None); + __pyx_r = Py_None; + goto __pyx_L0; + goto __pyx_L3; + } + /*else*/ { + + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":966 + * return None + * else: + * return <object>arr.base # <<<<<<<<<<<<<< + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); + __pyx_r = ((PyObject *)__pyx_v_arr->base); + goto __pyx_L0; + } + __pyx_L3:; + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __pyx_L0:; + __Pyx_DECREF((PyObject *)__pyx_v_arr); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -3801,7 +4159,7 @@ static void __pyx_init_filenames(void); /*proto*/ static struct PyModuleDef __pyx_moduledef = { PyModuleDef_HEAD_INIT, __Pyx_NAMESTR("liblinear"), - __Pyx_DOCSTR(__pyx_mdoc), /* m_doc */ + __Pyx_DOCSTR(__pyx_k_8), /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ @@ -3812,60 +4170,73 @@ static struct PyModuleDef __pyx_moduledef = { #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp___main__, __pyx_k___main__, sizeof(__pyx_k___main__), 1, 1, 1}, - {&__pyx_kp_X, __pyx_k_X, sizeof(__pyx_k_X), 1, 1, 1}, - {&__pyx_kp_Y, __pyx_k_Y, sizeof(__pyx_k_Y), 1, 1, 1}, - {&__pyx_kp_solver_type, __pyx_k_solver_type, sizeof(__pyx_k_solver_type), 1, 1, 1}, - {&__pyx_kp_eps, __pyx_k_eps, sizeof(__pyx_k_eps), 1, 1, 1}, - {&__pyx_kp_bias, __pyx_k_bias, sizeof(__pyx_k_bias), 1, 1, 1}, - {&__pyx_kp_C, __pyx_k_C, sizeof(__pyx_k_C), 1, 1, 1}, - {&__pyx_kp_nr_weight, __pyx_k_nr_weight, sizeof(__pyx_k_nr_weight), 1, 1, 1}, - {&__pyx_kp_weight_label, __pyx_k_weight_label, sizeof(__pyx_k_weight_label), 1, 1, 1}, - {&__pyx_kp_weight, __pyx_k_weight, sizeof(__pyx_k_weight), 1, 1, 1}, - {&__pyx_kp_T, __pyx_k_T, sizeof(__pyx_k_T), 1, 1, 1}, - {&__pyx_kp_coef_, __pyx_k_coef_, sizeof(__pyx_k_coef_), 1, 1, 1}, - {&__pyx_kp_label, __pyx_k_label, sizeof(__pyx_k_label), 1, 1, 1}, - {&__pyx_kp_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 1, 1, 1}, - {&__pyx_kp_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 1, 1}, - {&__pyx_kp_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 1, 1, 1}, - {&__pyx_kp_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 1, 1, 1}, - {&__pyx_kp_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 1, 1, 1}, - {&__pyx_kp_31, __pyx_k_31, sizeof(__pyx_k_31), 1, 1, 1}, - {&__pyx_kp_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 1, 1, 1}, - {&__pyx_kp_33, __pyx_k_33, sizeof(__pyx_k_33), 1, 1, 1}, - {&__pyx_kp_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 0}, - {&__pyx_kp_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 0}, - {&__pyx_kp___getbuffer__, __pyx_k___getbuffer__, sizeof(__pyx_k___getbuffer__), 1, 1, 1}, - {&__pyx_kp___releasebuffer__, __pyx_k___releasebuffer__, sizeof(__pyx_k___releasebuffer__), 1, 1, 1}, - {&__pyx_kp_info, __pyx_k_info, sizeof(__pyx_k_info), 1, 1, 1}, - {&__pyx_kp_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 1, 1, 1}, - {&__pyx_kp_range, __pyx_k_range, sizeof(__pyx_k_range), 1, 1, 1}, - {&__pyx_kp_itervalues, __pyx_k_itervalues, sizeof(__pyx_k_itervalues), 1, 1, 1}, - {&__pyx_kp_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 1, 1, 1}, - {&__pyx_kp_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 0}, - {&__pyx_kp_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 0}, - {&__pyx_kp_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 0}, - {&__pyx_kp_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 0}, - {&__pyx_kp_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 0}, - {&__pyx_kp_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 0}, - {&__pyx_kp_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 0}, - {&__pyx_kp_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 0}, - {0, 0, 0, 0, 0, 0} + {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, + {&__pyx_kp_u_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 1, 0, 0}, + {&__pyx_kp_u_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 1, 0, 0}, + {&__pyx_kp_u_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 1, 0, 0}, + {&__pyx_kp_u_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 1, 0, 0}, + {&__pyx_kp_u_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 1, 0, 0}, + {&__pyx_kp_u_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 1, 0, 0}, + {&__pyx_kp_u_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 1, 0, 0}, + {&__pyx_kp_u_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 1, 0, 0}, + {&__pyx_n_s__C, __pyx_k__C, sizeof(__pyx_k__C), 0, 0, 1, 1}, + {&__pyx_n_s__MemoryError, __pyx_k__MemoryError, sizeof(__pyx_k__MemoryError), 0, 0, 1, 1}, + {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1}, + {&__pyx_n_s__T, __pyx_k__T, sizeof(__pyx_k__T), 0, 0, 1, 1}, + {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, + {&__pyx_n_s__X, __pyx_k__X, sizeof(__pyx_k__X), 0, 0, 1, 1}, + {&__pyx_n_s__Y, __pyx_k__Y, sizeof(__pyx_k__Y), 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__base, __pyx_k__base, sizeof(__pyx_k__base), 0, 0, 1, 1}, + {&__pyx_n_s__bias, __pyx_k__bias, sizeof(__pyx_k__bias), 0, 0, 1, 1}, + {&__pyx_n_s__buf, __pyx_k__buf, sizeof(__pyx_k__buf), 0, 0, 1, 1}, + {&__pyx_n_s__byteorder, __pyx_k__byteorder, sizeof(__pyx_k__byteorder), 0, 0, 1, 1}, + {&__pyx_n_s__coef_, __pyx_k__coef_, sizeof(__pyx_k__coef_), 0, 0, 1, 1}, + {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1}, + {&__pyx_n_s__descr, __pyx_k__descr, sizeof(__pyx_k__descr), 0, 0, 1, 1}, + {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1}, + {&__pyx_n_s__empty, __pyx_k__empty, sizeof(__pyx_k__empty), 0, 0, 1, 1}, + {&__pyx_n_s__eps, __pyx_k__eps, sizeof(__pyx_k__eps), 0, 0, 1, 1}, + {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1}, + {&__pyx_n_s__float64, __pyx_k__float64, sizeof(__pyx_k__float64), 0, 0, 1, 1}, + {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1}, + {&__pyx_n_s__int32, __pyx_k__int32, sizeof(__pyx_k__int32), 0, 0, 1, 1}, + {&__pyx_n_s__itemsize, __pyx_k__itemsize, sizeof(__pyx_k__itemsize), 0, 0, 1, 1}, + {&__pyx_n_s__label, __pyx_k__label, sizeof(__pyx_k__label), 0, 0, 1, 1}, + {&__pyx_n_s__names, __pyx_k__names, sizeof(__pyx_k__names), 0, 0, 1, 1}, + {&__pyx_n_s__ndim, __pyx_k__ndim, sizeof(__pyx_k__ndim), 0, 0, 1, 1}, + {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1}, + {&__pyx_n_s__nr_weight, __pyx_k__nr_weight, sizeof(__pyx_k__nr_weight), 0, 0, 1, 1}, + {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1}, + {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1}, + {&__pyx_n_s__predict_prob_wrap, __pyx_k__predict_prob_wrap, sizeof(__pyx_k__predict_prob_wrap), 0, 0, 1, 1}, + {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, + {&__pyx_n_s__readonly, __pyx_k__readonly, sizeof(__pyx_k__readonly), 0, 0, 1, 1}, + {&__pyx_n_s__shape, __pyx_k__shape, sizeof(__pyx_k__shape), 0, 0, 1, 1}, + {&__pyx_n_s__solver_type, __pyx_k__solver_type, sizeof(__pyx_k__solver_type), 0, 0, 1, 1}, + {&__pyx_n_s__strides, __pyx_k__strides, sizeof(__pyx_k__strides), 0, 0, 1, 1}, + {&__pyx_n_s__suboffsets, __pyx_k__suboffsets, sizeof(__pyx_k__suboffsets), 0, 0, 1, 1}, + {&__pyx_n_s__train_wrap, __pyx_k__train_wrap, sizeof(__pyx_k__train_wrap), 0, 0, 1, 1}, + {&__pyx_n_s__type_num, __pyx_k__type_num, sizeof(__pyx_k__type_num), 0, 0, 1, 1}, + {&__pyx_n_s__weight, __pyx_k__weight, sizeof(__pyx_k__weight), 0, 0, 1, 1}, + {&__pyx_n_s__weight_label, __pyx_k__weight_label, sizeof(__pyx_k__weight_label), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_kp_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_MemoryError = __Pyx_GetName(__pyx_b, __pyx_kp_MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_kp_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_kp_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_MemoryError = __Pyx_GetName(__pyx_b, __pyx_n_s__MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitGlobals(void) { + if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; @@ -3879,32 +4250,37 @@ PyMODINIT_FUNC PyInit_liblinear(void); /*proto*/ PyMODINIT_FUNC PyInit_liblinear(void) #endif { - PyObject *__pyx_1 = 0; - #ifdef CYTHON_REFNANNY - void* __pyx_refchk = NULL; - __Pyx_Refnanny = __Pyx_ImportRefcountAPI("refnanny"); - if (!__Pyx_Refnanny) { + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + #if CYTHON_REFNANNY + void* __pyx_refnanny = NULL; + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); + if (!__Pyx_RefNanny) { PyErr_Clear(); - __Pyx_Refnanny = __Pyx_ImportRefcountAPI("Cython.Runtime.refnanny"); - if (!__Pyx_Refnanny) - Py_FatalError("failed to import refnanny module"); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); } - __pyx_refchk = __Pyx_Refnanny->NewContext("PyMODINIT_FUNC PyInit_liblinear(void)", __LINE__, __FILE__); + __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_liblinear(void)", __LINE__, __FILE__); #endif + __pyx_init_filenames(); __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #if PY_MAJOR_VERSION < 3 + __pyx_empty_bytes = PyString_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif /*--- Library function declarations ---*/ - __pyx_init_filenames(); /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif - /*--- Initialize various global constants etc. ---*/ - if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 - __pyx_m = Py_InitModule4(__Pyx_NAMESTR("liblinear"), __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION); + __pyx_m = Py_InitModule4(__Pyx_NAMESTR("liblinear"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_8), 0, PYTHON_API_VERSION); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif @@ -3915,34 +4291,62 @@ PyMODINIT_FUNC PyInit_liblinear(void) __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + /*--- Initialize various global constants etc. ---*/ + if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_module_is_main_liblinear) { - if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_kp___main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_skip_dispatch = 0; /*--- Global init code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ /*--- Type import code ---*/ - __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Function import code ---*/ /*--- Execution code ---*/ - /* "/home/fabian/dev/scikit-learn-svn/scikits/learn/src/liblinear.pyx":7 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":7 * """ * * import numpy as np # <<<<<<<<<<<<<< * cimport numpy as np * */ - __pyx_1 = __Pyx_Import(__pyx_kp_numpy, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_1); - if (PyObject_SetAttr(__pyx_m, __pyx_kp_np, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\liblinear.pyx":1 + * """ # <<<<<<<<<<<<<< + * Wrapper for liblinear + * + */ + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__train_wrap); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_2, "__doc__"); + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_9), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__predict_prob_wrap); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_10), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "/usr/lib/pymodules/python2.6/Cython/Includes/stdlib.pxd":2 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\stdlib.pxd":2 * * cdef extern from "stdlib.h" nogil: # <<<<<<<<<<<<<< * void free(void *ptr) @@ -3950,11 +4354,17 @@ PyMODINIT_FUNC PyInit_liblinear(void) */ goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_1); - __Pyx_AddTraceback("liblinear"); - Py_DECREF(__pyx_m); __pyx_m = 0; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + if (__pyx_m) { + __Pyx_AddTraceback("init liblinear"); + Py_DECREF(__pyx_m); __pyx_m = 0; + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init liblinear"); + } __pyx_L0:; - __Pyx_FinishRefcountContext(); + __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else @@ -4095,7 +4505,7 @@ bad: return -1; } -static INLINE int __Pyx_IsLittleEndian(void) { +static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } @@ -4492,7 +4902,7 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha } } -static INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { +static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { buf->buf = NULL; buf->obj = NULL; buf->strides = __Pyx_zeros; @@ -4533,21 +4943,21 @@ fail:; return -1; } -static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } -static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { - if (!type) { +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } - if (obj == Py_None || PyObject_TypeCheck(obj, type)) + if (likely(PyObject_TypeCheck(obj, type))) return 1; - PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s", - Py_TYPE(obj)->tp_name, type->tp_name); + PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", + Py_TYPE(obj)->tp_name, type->tp_name); return 0; } @@ -4557,27 +4967,10 @@ static void __Pyx_RaiseBufferFallbackError(void) { } -static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); -#if PY_MAJOR_VERSION >= 3 - /* Note: this is a temporary work-around to prevent crashes in Python 3.0 */ - if ((tstate->exc_type != NULL) & (tstate->exc_type != Py_None)) { - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - PyErr_NormalizeException(&type, &value, &tb); - PyErr_NormalizeException(&tmp_type, &tmp_value, &tmp_tb); - tstate->exc_type = 0; - tstate->exc_value = 0; - tstate->exc_traceback = 0; - PyException_SetContext(value, tmp_value); - Py_DECREF(tmp_type); - Py_XDECREF(tmp_tb); - } -#endif - tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; @@ -4589,7 +4982,7 @@ static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *t Py_XDECREF(tmp_tb); } -static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; @@ -4601,6 +4994,56 @@ static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject ** } +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + #if PY_VERSION_HEX < 0x02050000 + "need more than %d value%s to unpack", (int)index, + #else + "need more than %zd value%s to unpack", index, + #endif + (index == 1) ? "" : "s"); +} + +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void) { + PyErr_SetString(PyExc_ValueError, "too many values to unpack"); +} + +static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) { + PyObject *item; + if (!(item = PyIter_Next(iter))) { + if (!PyErr_Occurred()) { + __Pyx_RaiseNeedMoreValuesError(index); + } + } + return item; +} + +static int __Pyx_EndUnpack(PyObject *iter) { + PyObject *item; + if ((item = PyIter_Next(iter))) { + Py_DECREF(item); + __Pyx_RaiseTooManyValuesError(); + return -1; + } + else if (!PyErr_Occurred()) + return 0; + else + return -1; +} + +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else if (PyTuple_GET_SIZE(t) < index) { + __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); + } else { + __Pyx_RaiseTooManyValuesError(); + } +} static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) @@ -4687,6 +5130,7 @@ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { return result; } +#if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { Py_XINCREF(type); Py_XINCREF(value); @@ -4742,6 +5186,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { } #endif } + __Pyx_ErrRestore(type, value, tb); return; raise_error: @@ -4751,24 +5196,230 @@ raise_error: return; } -static INLINE int __Pyx_StrEq(const char *s1, const char *s2) { - while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } - return *s1 == *s2; +#else /* Python 3+ */ + +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (!PyExceptionClass_Check(type)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + + PyErr_SetObject(type, value); + + if (tb) { + PyThreadState *tstate = PyThreadState_GET(); + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } + } + +bad: + return; +} +#endif + +static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp val) { + const npy_intp neg_one = (npy_intp)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(npy_intp) < sizeof(long)) { + return PyInt_FromLong((long)val); + } else if (sizeof(npy_intp) == sizeof(long)) { + if (is_unsigned) + return PyLong_FromUnsignedLong((unsigned long)val); + else + return PyInt_FromLong((long)val); + } else { /* (sizeof(npy_intp) > sizeof(long)) */ + if (is_unsigned) + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val); + else + return PyLong_FromLongLong((PY_LONG_LONG)val); + } } -static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return ::std::complex< float >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return x + y*(__pyx_t_float_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + __pyx_t_float_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float denom = b.real * b.real + b.imag * b.imag; + z.real = (a.real * b.real + a.imag * b.imag) / denom; + z.imag = (a.imag * b.real - a.real * b.imag) / denom; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } +/* + static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) { +#if HAVE_HYPOT + return hypotf(z.real, z.imag); +#else + return sqrtf(z.real*z.real + z.imag*z.imag); +#endif + } +*/ +#endif + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return ::std::complex< double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return x + y*(__pyx_t_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + __pyx_t_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double denom = b.real * b.real + b.imag * b.imag; + z.real = (a.real * b.real + a.imag * b.imag) / denom; + z.imag = (a.imag * b.real - a.real * b.imag) / denom; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } +/* + static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) { +#if HAVE_HYPOT + return hypot(z.real, z.imag); +#else + return sqrt(z.real*z.real + z.imag*z.imag); +#endif + } +*/ +#endif + +static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { + const unsigned char neg_one = (unsigned char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned char)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (unsigned char)-1; - if (unlikely(val < 0)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned char"); - return (unsigned char)-1; + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned char" : + "value too large to convert to unsigned char"); } - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to unsigned char"); return (unsigned char)-1; } return (unsigned char)val; @@ -4776,19 +5427,18 @@ static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } -static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { +static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { + const unsigned short neg_one = (unsigned short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned short)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (unsigned short)-1; - if (unlikely(val < 0)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned short"); - return (unsigned short)-1; + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned short" : + "value too large to convert to unsigned short"); } - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to unsigned short"); return (unsigned short)-1; } return (unsigned short)val; @@ -4796,19 +5446,18 @@ static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } -static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { +static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { + const unsigned int neg_one = (unsigned int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(unsigned int)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (unsigned int)-1; - if (unlikely(val < 0)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned int"); - return (unsigned int)-1; + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned int" : + "value too large to convert to unsigned int"); } - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to unsigned int"); return (unsigned int)-1; } return (unsigned int)val; @@ -4816,14 +5465,18 @@ static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } -static INLINE char __Pyx_PyInt_AsChar(PyObject* x) { +static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { + const char neg_one = (char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(char)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (char)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to char"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to char" : + "value too large to convert to char"); + } return (char)-1; } return (char)val; @@ -4831,14 +5484,18 @@ static INLINE char __Pyx_PyInt_AsChar(PyObject* x) { return (char)__Pyx_PyInt_AsLong(x); } -static INLINE short __Pyx_PyInt_AsShort(PyObject* x) { +static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { + const short neg_one = (short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(short)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (short)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to short"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to short" : + "value too large to convert to short"); + } return (short)-1; } return (short)val; @@ -4846,14 +5503,18 @@ static INLINE short __Pyx_PyInt_AsShort(PyObject* x) { return (short)__Pyx_PyInt_AsLong(x); } -static INLINE int __Pyx_PyInt_AsInt(PyObject* x) { +static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { + const int neg_one = (int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(int)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (int)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to int"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to int" : + "value too large to convert to int"); + } return (int)-1; } return (int)val; @@ -4861,14 +5522,18 @@ static INLINE int __Pyx_PyInt_AsInt(PyObject* x) { return (int)__Pyx_PyInt_AsLong(x); } -static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { +static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { + const signed char neg_one = (signed char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed char)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (signed char)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to signed char"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed char" : + "value too large to convert to signed char"); + } return (signed char)-1; } return (signed char)val; @@ -4876,14 +5541,18 @@ static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { return (signed char)__Pyx_PyInt_AsSignedLong(x); } -static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { +static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { + const signed short neg_one = (signed short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed short)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (signed short)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to signed short"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed short" : + "value too large to convert to signed short"); + } return (signed short)-1; } return (signed short)val; @@ -4891,14 +5560,18 @@ static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { return (signed short)__Pyx_PyInt_AsSignedLong(x); } -static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { +static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { + const signed int neg_one = (signed int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { long val = __Pyx_PyInt_AsLong(x); if (unlikely(val != (long)(signed int)val)) { - if (unlikely(val == -1 && PyErr_Occurred())) - return (signed int)-1; - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to signed int"); + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed int" : + "value too large to convert to signed int"); + } return (signed int)-1; } return (signed int)val; @@ -4906,11 +5579,13 @@ static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { return (signed int)__Pyx_PyInt_AsSignedLong(x); } -static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { +static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { + const unsigned long neg_one = (unsigned long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); - if (unlikely(val < 0)) { + if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long)-1; @@ -4918,13 +5593,17 @@ static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { return (unsigned long)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned long"); - return (unsigned long)-1; + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned long"); + return (unsigned long)-1; + } + return PyLong_AsUnsignedLong(x); + } else { + return PyLong_AsLong(x); } - return PyLong_AsUnsignedLong(x); } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4935,11 +5614,13 @@ static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } } -static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { + const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); - if (unlikely(val < 0)) { + if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned PY_LONG_LONG"); return (unsigned PY_LONG_LONG)-1; @@ -4947,13 +5628,17 @@ static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) return (unsigned PY_LONG_LONG)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned PY_LONG_LONG"); - return (unsigned PY_LONG_LONG)-1; + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG)-1; + } + return PyLong_AsUnsignedLongLong(x); + } else { + return PyLong_AsLongLong(x); } - return PyLong_AsUnsignedLongLong(x); } else { unsigned PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4964,15 +5649,31 @@ static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) } } -static INLINE long __Pyx_PyInt_AsLong(PyObject* x) { +static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { + const long neg_one = (long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long)-1; + } return (long)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - return PyLong_AsLong(x); + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long)-1; + } + return PyLong_AsUnsignedLong(x); + } else { + return PyLong_AsLong(x); + } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -4983,15 +5684,31 @@ static INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } } -static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { + const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG)-1; + } return (PY_LONG_LONG)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - return PyLong_AsLongLong(x); + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG)-1; + } + return PyLong_AsUnsignedLongLong(x); + } else { + return PyLong_AsLongLong(x); + } } else { PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -5002,15 +5719,31 @@ static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } } -static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { +static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { + const signed long neg_one = (signed long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed long"); + return (signed long)-1; + } return (signed long)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - return PyLong_AsLong(x); + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed long"); + return (signed long)-1; + } + return PyLong_AsUnsignedLong(x); + } else { + return PyLong_AsLong(x); + } } else { signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -5021,15 +5754,31 @@ static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } } -static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { +static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { + const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) { + if (likely(PyInt_Check(x))) { long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed PY_LONG_LONG"); + return (signed PY_LONG_LONG)-1; + } return (signed PY_LONG_LONG)val; } else #endif - if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) { - return PyLong_AsLongLong(x); + if (likely(PyLong_Check(x))) { + if (is_unsigned) { + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed PY_LONG_LONG"); + return (signed PY_LONG_LONG)-1; + } + return PyLong_AsUnsignedLongLong(x); + } else { + return PyLong_AsLongLong(x); + } } else { signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); @@ -5043,11 +5792,12 @@ static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, - long size) + long size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; + char warning[200]; py_module = __Pyx_ImportModule(module_name); if (!py_module) @@ -5072,9 +5822,15 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class module_name, class_name); goto bad; } - if (((PyTypeObject *)result)->tp_basicsize != size) { + if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility", + module_name, class_name); + PyErr_WarnEx(NULL, warning, 0); + } + else if (((PyTypeObject *)result)->tp_basicsize != size) { PyErr_Format(PyExc_ValueError, - "%s.%s does not appear to be the correct type object", + "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } @@ -5116,7 +5872,6 @@ static void __Pyx_AddTraceback(const char *funcname) { PyObject *py_srcfile = 0; PyObject *py_funcname = 0; PyObject *py_globals = 0; - PyObject *empty_string = 0; PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; @@ -5143,12 +5898,6 @@ static void __Pyx_AddTraceback(const char *funcname) { if (!py_funcname) goto bad; py_globals = PyModule_GetDict(__pyx_m); if (!py_globals) goto bad; - #if PY_MAJOR_VERSION < 3 - empty_string = PyString_FromStringAndSize("", 0); - #else - empty_string = PyBytes_FromStringAndSize("", 0); - #endif - if (!empty_string) goto bad; py_code = PyCode_New( 0, /*int argcount,*/ #if PY_MAJOR_VERSION >= 3 @@ -5157,7 +5906,7 @@ static void __Pyx_AddTraceback(const char *funcname) { 0, /*int nlocals,*/ 0, /*int stacksize,*/ 0, /*int flags,*/ - empty_string, /*PyObject *code,*/ + __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ @@ -5166,7 +5915,7 @@ static void __Pyx_AddTraceback(const char *funcname) { py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ __pyx_lineno, /*int firstlineno,*/ - empty_string /*PyObject *lnotab*/ + __pyx_empty_bytes /*PyObject *lnotab*/ ); if (!py_code) goto bad; py_frame = PyFrame_New( @@ -5181,7 +5930,6 @@ static void __Pyx_AddTraceback(const char *funcname) { bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); - Py_XDECREF(empty_string); Py_XDECREF(py_code); Py_XDECREF(py_frame); } @@ -5189,7 +5937,7 @@ bad: static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 - if (t->is_unicode && (!t->is_identifier)) { + if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); @@ -5197,10 +5945,14 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else /* Python 3+ has unicode identifiers */ - if (t->is_identifier || (t->is_unicode && t->intern)) { - *t->p = PyUnicode_InternFromString(t->s); - } else if (t->is_unicode) { - *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } @@ -5214,13 +5966,13 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { /* Type Conversion Functions */ -static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { if (x == Py_True) return 1; else if ((x == Py_False) | (x == Py_None)) return 0; else return PyObject_IsTrue(x); } -static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; @@ -5266,7 +6018,7 @@ static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { return res; } -static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = PyNumber_Index(b); if (!x) return -1; @@ -5275,7 +6027,7 @@ static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { return ival; } -static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); @@ -5289,7 +6041,7 @@ static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { #endif } -static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { +static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) { return (size_t)-1; @@ -5302,3 +6054,4 @@ static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { } +#endif /* Py_PYTHON_H */ diff --git a/scikits/learn/src/liblinear_helper.c b/scikits/learn/src/liblinear_helper.c index 49ee29438e2b7414db7f959a42cc92557aae94dd..cf67880e4343c3072351ed018e161263a4d72918 100644 --- a/scikits/learn/src/liblinear_helper.c +++ b/scikits/learn/src/liblinear_helper.c @@ -142,7 +142,7 @@ struct model * set_model(struct parameter *param, char *coef, npy_intp *dims, char *label, double bias) { npy_int len_w = dims[0] * dims[1]; - int m = (int) dims[0]; + int m = (int) dims[0], k = (int) dims[1]; struct model *model; if (m == 1) m = 2; /* liblinear collapses the weight vector in the case of two classes */ @@ -153,7 +153,6 @@ struct model * set_model(struct parameter *param, char *coef, npy_intp *dims, memcpy(model->label, label, m * sizeof(int)); memcpy(model->w, coef, len_w * sizeof(double)); - int k = (int) dims[1]; model->nr_feature = bias > 0 ? k - 1 : k; model->nr_class = m; @@ -190,8 +189,8 @@ int copy_predict(char *train, struct model *model, npy_intp *train_dims, { int *t = (int *) dec_values; register int i, n; - n = train_dims[0]; struct feature_node **train_nodes; + n = train_dims[0]; train_nodes = dense_to_sparse((double *) train, train_dims); if (train_nodes == NULL) return -1; @@ -209,12 +208,12 @@ int copy_prob_predict(char *predict, struct model *model, npy_intp *predict_dims char *dec_values) { double *t = (double *) dec_values; + struct feature_node **predict_nodes; register int i; double temp; int n, m; n = predict_dims[0]; m = model->nr_class; - struct feature_node **predict_nodes; predict_nodes = dense_to_sparse((double *) predict, predict_dims); if (predict_nodes == NULL) return -1; diff --git a/scikits/learn/src/libsvm.c b/scikits/learn/src/libsvm.c index 17fb936b428d98ad06b15e7e9cef4eb9295b40ff..8ea04b4840880fb560f5ce551e1e733139e8ea65 100644 --- a/scikits/learn/src/libsvm.c +++ b/scikits/learn/src/libsvm.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.12 on Tue Apr 27 19:58:59 2010 */ +/* Generated by Cython 0.12.1 on Fri Apr 30 10:09:33 2010 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -6,6 +6,7 @@ #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #else + #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif @@ -17,6 +18,7 @@ #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type) #define PyDict_Contains(d,o) PySequence_Contains(d,o) #endif + #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX @@ -26,7 +28,9 @@ #define PyInt_AsSsize_t(o) PyInt_AsLong(o) #define PyNumber_Index(o) PyNumber_Int(o) #define PyIndex_Check(o) PyNumber_Check(o) + #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #endif + #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) @@ -36,17 +40,17 @@ #define PyType_Modified(t) typedef struct { - void *buf; - PyObject *obj; - Py_ssize_t len; - Py_ssize_t itemsize; - int readonly; - int ndim; - char *format; - Py_ssize_t *shape; - Py_ssize_t *strides; - Py_ssize_t *suboffsets; - void *internal; + void *buf; + PyObject *obj; + Py_ssize_t len; + Py_ssize_t itemsize; + int readonly; + int ndim; + char *format; + Py_ssize_t *shape; + Py_ssize_t *strides; + Py_ssize_t *suboffsets; + void *internal; } Py_buffer; #define PyBUF_SIMPLE 0 @@ -60,18 +64,22 @@ #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #endif + #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #endif + #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 #endif + #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif + #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyString_Type PyUnicode_Type @@ -80,6 +88,7 @@ #define PyBytes_Type PyString_Type #define PyBytes_CheckExact PyString_CheckExact #endif + #if PY_MAJOR_VERSION >= 3 #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) @@ -99,10 +108,13 @@ #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) + #endif + #if PY_MAJOR_VERSION >= 3 #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func) #endif + #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall @@ -116,6 +128,7 @@ #else #define _USE_MATH_DEFINES #endif + #if PY_VERSION_HEX < 0x02050000 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) @@ -125,6 +138,7 @@ #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) #endif + #if PY_VERSION_HEX < 0x02050000 #define __Pyx_NAMESTR(n) ((char *)(n)) #define __Pyx_DOCSTR(n) ((char *)(n)) @@ -146,12 +160,14 @@ #include "svm.h" #include "libsvm_helper.c" -#ifdef __GNUC__ -#define INLINE __inline__ -#elif _WIN32 -#define INLINE __inline -#else -#define INLINE +#ifndef CYTHON_INLINE + #if defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #else + #define CYTHON_INLINE + #endif #endif typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ @@ -173,8 +189,8 @@ typedef struct {PyObject **p; char *s; const long n; const char* encoding; const #define __Pyx_PyBytes_AsUString(s) ((unsigned char*) __Pyx_PyBytes_AsString(s)) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) -static INLINE int __Pyx_PyObject_IsTrue(PyObject*); -static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); #if !defined(T_PYSSIZET) #if PY_VERSION_HEX < 0x02050000 @@ -238,9 +254,9 @@ static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); #endif #endif -static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); -static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) @@ -288,6 +304,11 @@ static const char **__pyx_f; #endif #endif +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj +#endif + typedef npy_int8 __pyx_t_5numpy_int8_t; typedef npy_int16 __pyx_t_5numpy_int16_t; @@ -432,26 +453,26 @@ typedef struct { } __Pyx_BufFmt_StackElem; -static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); -static INLINE long __Pyx_div_long(long, long); /* proto */ +static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */ -static INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ -static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -static INLINE void __Pyx_RaiseTooManyValuesError(void); +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void); static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/ static int __Pyx_EndUnpack(PyObject *); /*proto*/ -static INLINE void __Pyx_RaiseNoneNotIterableError(void); +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/ @@ -474,7 +495,7 @@ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp); +static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp); #if CYTHON_CCOMPLEX #ifdef __cplusplus @@ -497,15 +518,7 @@ static INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp); #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) #endif -#if CYTHON_CCOMPLEX - #ifdef __cplusplus - static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); - #else - static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); - #endif -#else - static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); -#endif +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); #if CYTHON_CCOMPLEX #define __Pyx_c_eqf(a, b) ((a)==(b)) @@ -524,26 +537,18 @@ static INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp); /*#define __Pyx_c_absf(z) (cabsf(z))*/ #endif #else - static INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); - static INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); - static INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); - static INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); - static INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); - static INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); - static INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); - static INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); - /*static INLINE float __Pyx_c_absf(__pyx_t_float_complex);*/ + static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); + /*static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex);*/ #endif -#if CYTHON_CCOMPLEX - #ifdef __cplusplus - static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); - #else - static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); - #endif -#else - static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); -#endif +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); #if CYTHON_CCOMPLEX #define __Pyx_c_eq(a, b) ((a)==(b)) @@ -562,48 +567,48 @@ static INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp); /*#define __Pyx_c_abs(z) (cabs(z))*/ #endif #else - static INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); - static INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); - static INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); - static INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); - static INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); - static INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); - static INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); - static INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); - /*static INLINE double __Pyx_c_abs(__pyx_t_double_complex);*/ + static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); + /*static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex);*/ #endif -static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); +static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); -static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); +static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); -static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); +static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); -static INLINE char __Pyx_PyInt_AsChar(PyObject *); +static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); -static INLINE short __Pyx_PyInt_AsShort(PyObject *); +static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); -static INLINE int __Pyx_PyInt_AsInt(PyObject *); +static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); -static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); +static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); -static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); +static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); -static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); +static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); -static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); +static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); -static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); -static INLINE long __Pyx_PyInt_AsLong(PyObject *); +static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); -static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); -static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); +static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); -static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); +static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); -static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size); /*proto*/ +static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict); /*proto*/ static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ @@ -627,14 +632,14 @@ static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; -static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *); /*proto*/ -static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *, PyObject *); /*proto*/ -static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *, PyObject *, PyObject *); /*proto*/ -static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ -static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ -static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ -static INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *, PyObject *); /*proto*/ -static INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *, PyObject *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *); /*proto*/ /* Module declarations from libsvm */ static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "numpy.float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), 'R' }; @@ -809,7 +814,7 @@ static PyObject *__pyx_n_s__weight_label; static PyObject *__pyx_int_0; static PyObject *__pyx_int_15; -/* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":85 +/* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":85 * # Wrapper functions * * def train_wrap ( np.ndarray[np.float64_t, ndim=2, mode='c'] X, # <<<<<<<<<<<<<< @@ -1070,10 +1075,10 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __pyx_v_svm_type = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_svm_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_kernel_type = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_kernel_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_degree = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_degree == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_gamma = __pyx_PyFloat_AsDouble(values[5]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_coef0 = __pyx_PyFloat_AsDouble(values[6]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_eps = __pyx_PyFloat_AsDouble(values[7]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_C = __pyx_PyFloat_AsDouble(values[8]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_gamma = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_gamma == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_coef0 = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_coef0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_eps = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_eps == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_C = __pyx_PyFloat_AsDouble(values[8]); if (unlikely((__pyx_v_C == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nr_weight = __Pyx_PyInt_AsInt(values[9]); if (unlikely((__pyx_v_nr_weight == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_SV = ((PyArrayObject *)values[10]); __pyx_v_sv_coef = ((PyArrayObject *)values[11]); @@ -1081,9 +1086,9 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __pyx_v_weight_label = ((PyArrayObject *)values[13]); __pyx_v_weight = ((PyArrayObject *)values[14]); __pyx_v_nclass_SV = ((PyArrayObject *)values[15]); - __pyx_v_nu = __pyx_PyFloat_AsDouble(values[16]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_cache_size = __pyx_PyFloat_AsDouble(values[17]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_p = __pyx_PyFloat_AsDouble(values[18]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_nu = __pyx_PyFloat_AsDouble(values[16]); if (unlikely((__pyx_v_nu == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_cache_size = __pyx_PyFloat_AsDouble(values[17]); if (unlikely((__pyx_v_cache_size == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_p = __pyx_PyFloat_AsDouble(values[18]); if (unlikely((__pyx_v_p == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_shrinking = __Pyx_PyInt_AsInt(values[19]); if (unlikely((__pyx_v_shrinking == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_probability = __Pyx_PyInt_AsInt(values[20]); if (unlikely((__pyx_v_probability == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else if (PyTuple_GET_SIZE(__pyx_args) != 21) { @@ -1094,10 +1099,10 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __pyx_v_svm_type = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_svm_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_kernel_type = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_kernel_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_degree = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_degree == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_gamma = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 5)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_coef0 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 6)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_eps = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 7)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_C = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 8)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_gamma = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 5)); if (unlikely((__pyx_v_gamma == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_coef0 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 6)); if (unlikely((__pyx_v_coef0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_eps = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 7)); if (unlikely((__pyx_v_eps == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_C = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 8)); if (unlikely((__pyx_v_C == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nr_weight = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 9)); if (unlikely((__pyx_v_nr_weight == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_SV = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 10)); __pyx_v_sv_coef = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 11)); @@ -1105,9 +1110,9 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __pyx_v_weight_label = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 13)); __pyx_v_weight = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 14)); __pyx_v_nclass_SV = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 15)); - __pyx_v_nu = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 16)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_cache_size = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 17)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_p = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 18)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_nu = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 16)); if (unlikely((__pyx_v_nu == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_cache_size = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 17)); if (unlikely((__pyx_v_cache_size == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_p = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 18)); if (unlikely((__pyx_v_p == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_shrinking = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 19)); if (unlikely((__pyx_v_shrinking == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_probability = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 20)); if (unlikely((__pyx_v_probability == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } @@ -1197,7 +1202,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __pyx_bstride_0_nclass_SV = __pyx_bstruct_nclass_SV.strides[0]; __pyx_bshape_0_nclass_SV = __pyx_bstruct_nclass_SV.shape[0]; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":130 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":130 * * # set libsvm problem * problem = set_problem(X.data, Y.data, X.shape) # <<<<<<<<<<<<<< @@ -1206,7 +1211,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ __pyx_v_problem = set_problem(__pyx_v_X->data, __pyx_v_Y->data, __pyx_v_X->dimensions); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":136 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":136 * coef0, nu, cache_size, * C, eps, p, shrinking, probability, * nr_weight, weight_label.data, weight.data) # <<<<<<<<<<<<<< @@ -1215,7 +1220,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ __pyx_v_param = set_parameter(__pyx_v_svm_type, __pyx_v_kernel_type, __pyx_v_degree, __pyx_v_gamma, __pyx_v_coef0, __pyx_v_nu, __pyx_v_cache_size, __pyx_v_C, __pyx_v_eps, __pyx_v_p, __pyx_v_shrinking, __pyx_v_probability, __pyx_v_nr_weight, __pyx_v_weight_label->data, __pyx_v_weight->data); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":139 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":139 * * # check parameters * if (param == NULL or problem == NULL): # <<<<<<<<<<<<<< @@ -1231,7 +1236,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p } if (__pyx_t_3) { - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":140 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":140 * # check parameters * if (param == NULL or problem == NULL): * raise MemoryError("Seems we've run out of of memory") # <<<<<<<<<<<<<< @@ -1253,7 +1258,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p } __pyx_L6:; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":141 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":141 * if (param == NULL or problem == NULL): * raise MemoryError("Seems we've run out of of memory") * error_msg = svm_check_parameter(problem, param); # <<<<<<<<<<<<<< @@ -1262,7 +1267,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ __pyx_v_error_msg = svm_check_parameter(__pyx_v_problem, __pyx_v_param); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":142 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":142 * raise MemoryError("Seems we've run out of of memory") * error_msg = svm_check_parameter(problem, param); * if error_msg: # <<<<<<<<<<<<<< @@ -1272,7 +1277,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __pyx_t_3 = (__pyx_v_error_msg != 0); if (__pyx_t_3) { - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":143 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":143 * error_msg = svm_check_parameter(problem, param); * if error_msg: * free_problem(problem) # <<<<<<<<<<<<<< @@ -1281,7 +1286,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ free_problem(__pyx_v_problem); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":144 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":144 * if error_msg: * free_problem(problem) * free_param(param) # <<<<<<<<<<<<<< @@ -1290,7 +1295,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ free_param(__pyx_v_param); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":145 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":145 * free_problem(problem) * free_param(param) * raise ValueError(error_msg) # <<<<<<<<<<<<<< @@ -1298,11 +1303,11 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p * # call svm_train, this does the real work */ __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_error_msg); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); @@ -1314,7 +1319,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p } __pyx_L7:; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":148 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":148 * * # call svm_train, this does the real work * model = svm_train(problem, param) # <<<<<<<<<<<<<< @@ -1323,7 +1328,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ __pyx_v_model = svm_train(__pyx_v_problem, __pyx_v_param); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":150 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":150 * model = svm_train(problem, param) * * cdef int SV_len = get_l(model) # <<<<<<<<<<<<<< @@ -1332,7 +1337,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ __pyx_v_SV_len = get_l(__pyx_v_model); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":151 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":151 * * cdef int SV_len = get_l(model) * cdef int nr = get_nr(model) # <<<<<<<<<<<<<< @@ -1341,7 +1346,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ __pyx_v_nr = get_nr(__pyx_v_model); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":156 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":156 * # we create a new array instead of resizing, otherwise * # it would not erase previous information * sv_coef.resize((nr-1, SV_len), refcheck=False) # <<<<<<<<<<<<<< @@ -1380,7 +1385,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":157 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":157 * # it would not erase previous information * sv_coef.resize((nr-1, SV_len), refcheck=False) * copy_sv_coef(sv_coef.data, model, sv_coef.strides) # <<<<<<<<<<<<<< @@ -1389,7 +1394,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ copy_sv_coef(__pyx_v_sv_coef->data, __pyx_v_model, __pyx_v_sv_coef->strides); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":161 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":161 * # copy model.rho into the intercept * # the intercept is just model.rho but with sign changed * intercept.resize(nr*(nr-1)/2, refcheck=False) # <<<<<<<<<<<<<< @@ -1418,7 +1423,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":162 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":162 * # the intercept is just model.rho but with sign changed * intercept.resize(nr*(nr-1)/2, refcheck=False) * copy_intercept(intercept.data, model, intercept.shape) # <<<<<<<<<<<<<< @@ -1427,7 +1432,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ copy_intercept(__pyx_v_intercept->data, __pyx_v_model, __pyx_v_intercept->dimensions); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":166 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":166 * # copy model.SV * # we erase any previous information in SV * SV.resize((0,0), refcheck=False) # <<<<<<<<<<<<<< @@ -1462,7 +1467,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":167 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":167 * # we erase any previous information in SV * SV.resize((0,0), refcheck=False) * SV.resize((SV_len, X.shape[1]), refcheck=False) # <<<<<<<<<<<<<< @@ -1501,7 +1506,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":168 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":168 * SV.resize((0,0), refcheck=False) * SV.resize((SV_len, X.shape[1]), refcheck=False) * copy_SV(SV.data, model, SV.shape) # <<<<<<<<<<<<<< @@ -1510,7 +1515,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ copy_SV(__pyx_v_SV->data, __pyx_v_model, __pyx_v_SV->dimensions); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":172 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":172 * # copy model.nSV * # TODO: do only in classification * nclass_SV.resize(nr, refcheck=False) # <<<<<<<<<<<<<< @@ -1539,7 +1544,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":173 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":173 * # TODO: do only in classification * nclass_SV.resize(nr, refcheck=False) * copy_nSV(nclass_SV.data, model) # <<<<<<<<<<<<<< @@ -1548,7 +1553,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ copy_nSV(__pyx_v_nclass_SV->data, __pyx_v_model); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":177 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":177 * # copy label * cdef np.ndarray[np.int32_t, ndim=1, mode='c'] label * label = np.empty((nr), dtype=np.int32) # <<<<<<<<<<<<<< @@ -1605,7 +1610,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __pyx_v_label = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":178 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":178 * cdef np.ndarray[np.int32_t, ndim=1, mode='c'] label * label = np.empty((nr), dtype=np.int32) * copy_label(label.data, model) # <<<<<<<<<<<<<< @@ -1614,7 +1619,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ copy_label(__pyx_v_label->data, __pyx_v_model); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":183 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":183 * cdef np.ndarray[np.float64_t, ndim=1, mode='c'] probA * cdef np.ndarray[np.float64_t, ndim=1, mode='c'] probB * if probability != 0: # <<<<<<<<<<<<<< @@ -1624,7 +1629,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __pyx_t_3 = (__pyx_v_probability != 0); if (__pyx_t_3) { - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":185 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":185 * if probability != 0: * # this is only valid for SVC * probA = np.empty(nr*(nr-1)/2, dtype=np.float64) # <<<<<<<<<<<<<< @@ -1681,7 +1686,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __pyx_v_probA = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":186 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":186 * # this is only valid for SVC * probA = np.empty(nr*(nr-1)/2, dtype=np.float64) * probB = np.empty(nr*(nr-1)/2, dtype=np.float64) # <<<<<<<<<<<<<< @@ -1738,7 +1743,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p __pyx_v_probB = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":187 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":187 * probA = np.empty(nr*(nr-1)/2, dtype=np.float64) * probB = np.empty(nr*(nr-1)/2, dtype=np.float64) * copy_probA(probA.data, model, probA.shape) # <<<<<<<<<<<<<< @@ -1747,7 +1752,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ copy_probA(__pyx_v_probA->data, __pyx_v_model, __pyx_v_probA->dimensions); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":188 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":188 * probB = np.empty(nr*(nr-1)/2, dtype=np.float64) * copy_probA(probA.data, model, probA.shape) * copy_probB(probB.data, model, probB.shape) # <<<<<<<<<<<<<< @@ -1759,7 +1764,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p } __pyx_L8:; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":190 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":190 * copy_probB(probB.data, model, probB.shape) * * free_model(model) # <<<<<<<<<<<<<< @@ -1768,7 +1773,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ free_model(__pyx_v_model); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":191 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":191 * * free_model(model) * free_problem(problem) # <<<<<<<<<<<<<< @@ -1777,7 +1782,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ free_problem(__pyx_v_problem); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":192 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":192 * free_model(model) * free_problem(problem) * free_param(param) # <<<<<<<<<<<<<< @@ -1786,7 +1791,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p */ free_param(__pyx_v_param); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":194 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":194 * free_param(param) * * return label, probA, probB # <<<<<<<<<<<<<< @@ -1863,7 +1868,7 @@ static PyObject *__pyx_pf_6libsvm_train_wrap(PyObject *__pyx_self, PyObject *__p return __pyx_r; } -/* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":197 +/* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":197 * * * def predict_from_model_wrap(np.ndarray[np.float64_t, ndim=2, mode='c'] T, # <<<<<<<<<<<<<< @@ -2130,16 +2135,16 @@ static PyObject *__pyx_pf_6libsvm_predict_from_model_wrap(PyObject *__pyx_self, __pyx_v_svm_type = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_svm_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_kernel_type = __Pyx_PyInt_AsInt(values[5]); if (unlikely((__pyx_v_kernel_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_degree = __Pyx_PyInt_AsInt(values[6]); if (unlikely((__pyx_v_degree == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_gamma = __pyx_PyFloat_AsDouble(values[7]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_coef0 = __pyx_PyFloat_AsDouble(values[8]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_eps = __pyx_PyFloat_AsDouble(values[9]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_C = __pyx_PyFloat_AsDouble(values[10]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_gamma = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_gamma == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_coef0 = __pyx_PyFloat_AsDouble(values[8]); if (unlikely((__pyx_v_coef0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_eps = __pyx_PyFloat_AsDouble(values[9]); if (unlikely((__pyx_v_eps == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_C = __pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_C == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nr_weight = __Pyx_PyInt_AsInt(values[11]); if (unlikely((__pyx_v_nr_weight == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_weight_label = ((PyArrayObject *)values[12]); __pyx_v_weight = ((PyArrayObject *)values[13]); - __pyx_v_nu = __pyx_PyFloat_AsDouble(values[14]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_cache_size = __pyx_PyFloat_AsDouble(values[15]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_p = __pyx_PyFloat_AsDouble(values[16]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_nu = __pyx_PyFloat_AsDouble(values[14]); if (unlikely((__pyx_v_nu == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_cache_size = __pyx_PyFloat_AsDouble(values[15]); if (unlikely((__pyx_v_cache_size == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_p = __pyx_PyFloat_AsDouble(values[16]); if (unlikely((__pyx_v_p == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_shrinking = __Pyx_PyInt_AsInt(values[17]); if (unlikely((__pyx_v_shrinking == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_probability = __Pyx_PyInt_AsInt(values[18]); if (unlikely((__pyx_v_probability == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nSV = ((PyArrayObject *)values[19]); @@ -2156,16 +2161,16 @@ static PyObject *__pyx_pf_6libsvm_predict_from_model_wrap(PyObject *__pyx_self, __pyx_v_svm_type = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_svm_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_kernel_type = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 5)); if (unlikely((__pyx_v_kernel_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_degree = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 6)); if (unlikely((__pyx_v_degree == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_gamma = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 7)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_coef0 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 8)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_eps = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 9)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_C = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 10)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_gamma = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 7)); if (unlikely((__pyx_v_gamma == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_coef0 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 8)); if (unlikely((__pyx_v_coef0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_eps = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 9)); if (unlikely((__pyx_v_eps == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_C = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 10)); if (unlikely((__pyx_v_C == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nr_weight = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 11)); if (unlikely((__pyx_v_nr_weight == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_weight_label = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 12)); __pyx_v_weight = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 13)); - __pyx_v_nu = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 14)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_cache_size = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 15)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_p = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 16)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_nu = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 14)); if (unlikely((__pyx_v_nu == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_cache_size = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 15)); if (unlikely((__pyx_v_cache_size == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_p = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 16)); if (unlikely((__pyx_v_p == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_shrinking = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 17)); if (unlikely((__pyx_v_shrinking == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_probability = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 18)); if (unlikely((__pyx_v_probability == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nSV = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 19)); @@ -2273,7 +2278,7 @@ static PyObject *__pyx_pf_6libsvm_predict_from_model_wrap(PyObject *__pyx_self, __pyx_bstride_0_probB = __pyx_bstruct_probB.strides[0]; __pyx_bshape_0_probB = __pyx_bstruct_probB.shape[0]; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":244 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":244 * coef0, nu, cache_size, C, eps, p, shrinking, * probability, nr_weight, weight_label.data, * weight.data) # <<<<<<<<<<<<<< @@ -2282,7 +2287,7 @@ static PyObject *__pyx_pf_6libsvm_predict_from_model_wrap(PyObject *__pyx_self, */ __pyx_v_param = set_parameter(__pyx_v_svm_type, __pyx_v_kernel_type, __pyx_v_degree, __pyx_v_gamma, __pyx_v_coef0, __pyx_v_nu, __pyx_v_cache_size, __pyx_v_C, __pyx_v_eps, __pyx_v_p, __pyx_v_shrinking, __pyx_v_probability, __pyx_v_nr_weight, __pyx_v_weight_label->data, __pyx_v_weight->data); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":248 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":248 * model = set_model(param, nSV.shape[0], SV.data, SV.shape, * sv_coef.strides, sv_coef.data, intercept.data, * nSV.data, label.data, probA.data, probB.data) # <<<<<<<<<<<<<< @@ -2291,7 +2296,7 @@ static PyObject *__pyx_pf_6libsvm_predict_from_model_wrap(PyObject *__pyx_self, */ __pyx_v_model = set_model(__pyx_v_param, (__pyx_v_nSV->dimensions[0]), __pyx_v_SV->data, __pyx_v_SV->dimensions, __pyx_v_sv_coef->strides, __pyx_v_sv_coef->data, __pyx_v_intercept->data, __pyx_v_nSV->data, __pyx_v_label->data, __pyx_v_probA->data, __pyx_v_probB->data); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":250 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":250 * nSV.data, label.data, probA.data, probB.data) * #TODO: use check_model * dec_values = np.empty(T.shape[0]) # <<<<<<<<<<<<<< @@ -2338,7 +2343,7 @@ static PyObject *__pyx_pf_6libsvm_predict_from_model_wrap(PyObject *__pyx_self, __pyx_v_dec_values = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":251 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":251 * #TODO: use check_model * dec_values = np.empty(T.shape[0]) * if copy_predict(T.data, model, T.shape, dec_values.data) < 0: # <<<<<<<<<<<<<< @@ -2348,7 +2353,7 @@ static PyObject *__pyx_pf_6libsvm_predict_from_model_wrap(PyObject *__pyx_self, __pyx_t_9 = (copy_predict(__pyx_v_T->data, __pyx_v_model, __pyx_v_T->dimensions, __pyx_v_dec_values->data) < 0); if (__pyx_t_9) { - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":252 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":252 * dec_values = np.empty(T.shape[0]) * if copy_predict(T.data, model, T.shape, dec_values.data) < 0: * raise MemoryError("We've run out of of memory") # <<<<<<<<<<<<<< @@ -2370,7 +2375,7 @@ static PyObject *__pyx_pf_6libsvm_predict_from_model_wrap(PyObject *__pyx_self, } __pyx_L6:; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":254 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":254 * raise MemoryError("We've run out of of memory") * # free model and param * free_model_SV(model) # <<<<<<<<<<<<<< @@ -2379,7 +2384,7 @@ static PyObject *__pyx_pf_6libsvm_predict_from_model_wrap(PyObject *__pyx_self, */ free_model_SV(__pyx_v_model); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":255 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":255 * # free model and param * free_model_SV(model) * free_model(model) # <<<<<<<<<<<<<< @@ -2388,7 +2393,7 @@ static PyObject *__pyx_pf_6libsvm_predict_from_model_wrap(PyObject *__pyx_self, */ free_model(__pyx_v_model); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":256 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":256 * free_model_SV(model) * free_model(model) * free_param(param) # <<<<<<<<<<<<<< @@ -2397,7 +2402,7 @@ static PyObject *__pyx_pf_6libsvm_predict_from_model_wrap(PyObject *__pyx_self, */ free_param(__pyx_v_param); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":257 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":257 * free_model(model) * free_param(param) * return dec_values # <<<<<<<<<<<<<< @@ -2461,7 +2466,7 @@ static PyObject *__pyx_pf_6libsvm_predict_from_model_wrap(PyObject *__pyx_self, return __pyx_r; } -/* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":260 +/* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":260 * * * def predict_prob_from_model_wrap(np.ndarray[np.float64_t, ndim=2, mode='c'] T, # <<<<<<<<<<<<<< @@ -2733,16 +2738,16 @@ static PyObject *__pyx_pf_6libsvm_predict_prob_from_model_wrap(PyObject *__pyx_s __pyx_v_svm_type = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_svm_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_kernel_type = __Pyx_PyInt_AsInt(values[5]); if (unlikely((__pyx_v_kernel_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_degree = __Pyx_PyInt_AsInt(values[6]); if (unlikely((__pyx_v_degree == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_gamma = __pyx_PyFloat_AsDouble(values[7]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_coef0 = __pyx_PyFloat_AsDouble(values[8]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_eps = __pyx_PyFloat_AsDouble(values[9]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_C = __pyx_PyFloat_AsDouble(values[10]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_gamma = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_gamma == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_coef0 = __pyx_PyFloat_AsDouble(values[8]); if (unlikely((__pyx_v_coef0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_eps = __pyx_PyFloat_AsDouble(values[9]); if (unlikely((__pyx_v_eps == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_C = __pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_C == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nr_weight = __Pyx_PyInt_AsInt(values[11]); if (unlikely((__pyx_v_nr_weight == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_weight_label = ((PyArrayObject *)values[12]); __pyx_v_weight = ((PyArrayObject *)values[13]); - __pyx_v_nu = __pyx_PyFloat_AsDouble(values[14]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_cache_size = __pyx_PyFloat_AsDouble(values[15]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_p = __pyx_PyFloat_AsDouble(values[16]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_nu = __pyx_PyFloat_AsDouble(values[14]); if (unlikely((__pyx_v_nu == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_cache_size = __pyx_PyFloat_AsDouble(values[15]); if (unlikely((__pyx_v_cache_size == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_p = __pyx_PyFloat_AsDouble(values[16]); if (unlikely((__pyx_v_p == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_shrinking = __Pyx_PyInt_AsInt(values[17]); if (unlikely((__pyx_v_shrinking == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_probability = __Pyx_PyInt_AsInt(values[18]); if (unlikely((__pyx_v_probability == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nSV = ((PyArrayObject *)values[19]); @@ -2759,16 +2764,16 @@ static PyObject *__pyx_pf_6libsvm_predict_prob_from_model_wrap(PyObject *__pyx_s __pyx_v_svm_type = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_svm_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_kernel_type = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 5)); if (unlikely((__pyx_v_kernel_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_degree = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 6)); if (unlikely((__pyx_v_degree == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_gamma = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 7)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_coef0 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 8)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_eps = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 9)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_C = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 10)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_gamma = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 7)); if (unlikely((__pyx_v_gamma == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_coef0 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 8)); if (unlikely((__pyx_v_coef0 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_eps = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 9)); if (unlikely((__pyx_v_eps == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_C = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 10)); if (unlikely((__pyx_v_C == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nr_weight = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 11)); if (unlikely((__pyx_v_nr_weight == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_weight_label = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 12)); __pyx_v_weight = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 13)); - __pyx_v_nu = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 14)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_cache_size = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 15)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_v_p = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 16)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_nu = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 14)); if (unlikely((__pyx_v_nu == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_cache_size = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 15)); if (unlikely((__pyx_v_cache_size == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_p = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 16)); if (unlikely((__pyx_v_p == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_shrinking = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 17)); if (unlikely((__pyx_v_shrinking == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_probability = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 18)); if (unlikely((__pyx_v_probability == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_nSV = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 19)); @@ -2876,7 +2881,7 @@ static PyObject *__pyx_pf_6libsvm_predict_prob_from_model_wrap(PyObject *__pyx_s __pyx_bstride_0_probB = __pyx_bstruct_probB.strides[0]; __pyx_bshape_0_probB = __pyx_bstruct_probB.shape[0]; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":307 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":307 * coef0, nu, cache_size, C, eps, p, shrinking, * probability, nr_weight, weight_label.data, * weight.data) # <<<<<<<<<<<<<< @@ -2885,7 +2890,7 @@ static PyObject *__pyx_pf_6libsvm_predict_prob_from_model_wrap(PyObject *__pyx_s */ __pyx_v_param = set_parameter(__pyx_v_svm_type, __pyx_v_kernel_type, __pyx_v_degree, __pyx_v_gamma, __pyx_v_coef0, __pyx_v_nu, __pyx_v_cache_size, __pyx_v_C, __pyx_v_eps, __pyx_v_p, __pyx_v_shrinking, __pyx_v_probability, __pyx_v_nr_weight, __pyx_v_weight_label->data, __pyx_v_weight->data); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":310 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":310 * model = set_model(param, nSV.shape[0], SV.data, SV.shape, sv_coef.strides, * sv_coef.data, intercept.data, nSV.data, label.data, * probA.data, probB.data) # <<<<<<<<<<<<<< @@ -2894,7 +2899,7 @@ static PyObject *__pyx_pf_6libsvm_predict_prob_from_model_wrap(PyObject *__pyx_s */ __pyx_v_model = set_model(__pyx_v_param, (__pyx_v_nSV->dimensions[0]), __pyx_v_SV->data, __pyx_v_SV->dimensions, __pyx_v_sv_coef->strides, __pyx_v_sv_coef->data, __pyx_v_intercept->data, __pyx_v_nSV->data, __pyx_v_label->data, __pyx_v_probA->data, __pyx_v_probB->data); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":312 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":312 * probA.data, probB.data) * * cdef int nr = get_nr(model) # <<<<<<<<<<<<<< @@ -2903,7 +2908,7 @@ static PyObject *__pyx_pf_6libsvm_predict_prob_from_model_wrap(PyObject *__pyx_s */ __pyx_v_nr = get_nr(__pyx_v_model); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":313 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":313 * * cdef int nr = get_nr(model) * dec_values = np.empty((T.shape[0], nr), dtype=np.float64) # <<<<<<<<<<<<<< @@ -2970,7 +2975,7 @@ static PyObject *__pyx_pf_6libsvm_predict_prob_from_model_wrap(PyObject *__pyx_s __pyx_v_dec_values = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":314 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":314 * cdef int nr = get_nr(model) * dec_values = np.empty((T.shape[0], nr), dtype=np.float64) * if copy_predict_proba(T.data, model, T.shape, dec_values.data) < 0: # <<<<<<<<<<<<<< @@ -2980,7 +2985,7 @@ static PyObject *__pyx_pf_6libsvm_predict_prob_from_model_wrap(PyObject *__pyx_s __pyx_t_11 = (copy_predict_proba(__pyx_v_T->data, __pyx_v_model, __pyx_v_T->dimensions, __pyx_v_dec_values->data) < 0); if (__pyx_t_11) { - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":315 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":315 * dec_values = np.empty((T.shape[0], nr), dtype=np.float64) * if copy_predict_proba(T.data, model, T.shape, dec_values.data) < 0: * raise MemoryError("We've run out of of memory") # <<<<<<<<<<<<<< @@ -3002,7 +3007,7 @@ static PyObject *__pyx_pf_6libsvm_predict_prob_from_model_wrap(PyObject *__pyx_s } __pyx_L6:; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":317 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":317 * raise MemoryError("We've run out of of memory") * # free model and param * free_model_SV(model) # <<<<<<<<<<<<<< @@ -3011,7 +3016,7 @@ static PyObject *__pyx_pf_6libsvm_predict_prob_from_model_wrap(PyObject *__pyx_s */ free_model_SV(__pyx_v_model); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":318 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":318 * # free model and param * free_model_SV(model) * free_model(model) # <<<<<<<<<<<<<< @@ -3020,7 +3025,7 @@ static PyObject *__pyx_pf_6libsvm_predict_prob_from_model_wrap(PyObject *__pyx_s */ free_model(__pyx_v_model); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":319 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":319 * free_model_SV(model) * free_model(model) * free_param(param) # <<<<<<<<<<<<<< @@ -3028,7 +3033,7 @@ static PyObject *__pyx_pf_6libsvm_predict_prob_from_model_wrap(PyObject *__pyx_s */ free_param(__pyx_v_param); - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":320 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":320 * free_model(model) * free_param(param) * return dec_values # <<<<<<<<<<<<<< @@ -3092,7 +3097,7 @@ static PyObject *__pyx_pf_6libsvm_predict_prob_from_model_wrap(PyObject *__pyx_s return __pyx_r; } -/* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":187 +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":187 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -3128,7 +3133,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __Pyx_GIVEREF(__pyx_v_info->obj); __Pyx_INCREF((PyObject *)__pyx_v_self); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":193 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":193 * # of flags * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -3137,7 +3142,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_endian_detector = 1; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":194 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":194 * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -3146,7 +3151,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":196 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":196 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -3155,7 +3160,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_ndim = PyArray_NDIM(((PyArrayObject *)__pyx_v_self)); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":198 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":198 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -3165,7 +3170,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); if (__pyx_t_1) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":199 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":199 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< @@ -3177,7 +3182,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":201 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":201 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< @@ -3188,7 +3193,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L5:; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":203 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":203 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -3198,7 +3203,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS); if (__pyx_t_1) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":204 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":204 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< @@ -3212,7 +3217,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } if (__pyx_t_3) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":205 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":205 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< @@ -3234,7 +3239,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L6:; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":207 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":207 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -3244,7 +3249,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS); if (__pyx_t_3) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":208 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":208 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< @@ -3258,7 +3263,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } if (__pyx_t_2) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":209 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":209 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< @@ -3280,7 +3285,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L7:; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":211 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":211 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< @@ -3289,7 +3294,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->buf = PyArray_DATA(((PyArrayObject *)__pyx_v_self)); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":212 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":212 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< @@ -3298,7 +3303,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->ndim = __pyx_v_ndim; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":213 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":213 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< @@ -3308,7 +3313,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __pyx_t_6 = __pyx_v_copy_shape; if (__pyx_t_6) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":216 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":216 * # Allocate new buffer for strides and shape info. This is allocated * # as one block, strides first. * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< @@ -3317,7 +3322,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * __pyx_v_ndim) * 2))); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":217 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":217 * # as one block, strides first. * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< @@ -3326,7 +3331,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":218 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":218 * info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< @@ -3337,7 +3342,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":219 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":219 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< @@ -3346,7 +3351,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":220 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":220 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< @@ -3359,7 +3364,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":222 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":222 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -3368,7 +3373,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":223 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":223 * else: * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -3379,7 +3384,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L8:; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":224 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":224 * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) * info.shape = <Py_ssize_t*>PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< @@ -3388,7 +3393,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->suboffsets = NULL; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":225 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":225 * info.shape = <Py_ssize_t*>PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< @@ -3397,7 +3402,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(((PyArrayObject *)__pyx_v_self)); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":226 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":226 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< @@ -3406,7 +3411,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(((PyArrayObject *)__pyx_v_self))); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":229 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":229 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< @@ -3415,7 +3420,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_f = NULL; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":230 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":230 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< @@ -3425,7 +3430,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self)->descr)); __pyx_v_descr = ((PyArrayObject *)__pyx_v_self)->descr; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":234 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":234 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< @@ -3434,7 +3439,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":236 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":236 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< @@ -3450,7 +3455,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } if (__pyx_t_1) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":238 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":238 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< @@ -3466,7 +3471,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":241 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":241 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< @@ -3481,7 +3486,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L11:; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":243 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":243 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< @@ -3491,7 +3496,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __pyx_t_1 = (!__pyx_v_hasfields); if (__pyx_t_1) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":244 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":244 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< @@ -3500,7 +3505,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_t = __pyx_v_descr->type_num; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":245 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":245 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< @@ -3515,7 +3520,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } if (!__pyx_t_2) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":246 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":246 * t = descr.type_num * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< @@ -3535,7 +3540,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } if (__pyx_t_1) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":247 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":247 * if ((descr.byteorder == '>' and little_endian) or * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< @@ -3557,7 +3562,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L13:; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":248 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":248 * (descr.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< @@ -3570,7 +3575,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":249 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":249 * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< @@ -3583,7 +3588,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":250 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":250 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< @@ -3596,7 +3601,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":251 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":251 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< @@ -3609,7 +3614,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":252 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":252 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< @@ -3622,7 +3627,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":253 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":253 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< @@ -3635,7 +3640,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":254 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":254 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< @@ -3648,7 +3653,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":255 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":255 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< @@ -3661,7 +3666,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":256 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":256 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< @@ -3674,7 +3679,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":257 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":257 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< @@ -3687,7 +3692,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":258 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":258 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< @@ -3700,7 +3705,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":259 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":259 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< @@ -3713,7 +3718,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":260 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":260 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< @@ -3726,7 +3731,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":261 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":261 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< @@ -3739,7 +3744,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":262 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":262 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< @@ -3752,7 +3757,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":263 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":263 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< @@ -3765,7 +3770,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf goto __pyx_L14; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":264 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":264 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< @@ -3779,7 +3784,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":266 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":266 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< @@ -3805,7 +3810,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } __pyx_L14:; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":267 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":267 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< @@ -3814,7 +3819,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->format = __pyx_v_f; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":268 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":268 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< @@ -3827,7 +3832,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf } /*else*/ { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":270 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":270 * return * else: * info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< @@ -3836,7 +3841,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_info->format = ((char *)malloc(255)); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":271 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":271 * else: * info.format = <char*>stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<< @@ -3845,7 +3850,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ (__pyx_v_info->format[0]) = '^'; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":272 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":272 * info.format = <char*>stdlib.malloc(_buffer_format_string_len) * info.format[0] = '^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< @@ -3854,7 +3859,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf */ __pyx_v_offset = 0; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":275 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":275 * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, * &offset) # <<<<<<<<<<<<<< @@ -3864,7 +3869,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_9; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":276 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":276 * info.format + _buffer_format_string_len, * &offset) * f[0] = 0 # Terminate format string # <<<<<<<<<<<<<< @@ -3897,7 +3902,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buf return __pyx_r; } -/* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":278 +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":278 * f[0] = 0 # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< @@ -3911,7 +3916,7 @@ static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, P __Pyx_RefNannySetupContext("__releasebuffer__"); __Pyx_INCREF((PyObject *)__pyx_v_self); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":279 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":279 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< @@ -3921,7 +3926,7 @@ static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, P __pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self)); if (__pyx_t_1) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":280 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":280 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< @@ -3933,7 +3938,7 @@ static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, P } __pyx_L5:; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":281 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":281 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -3943,7 +3948,7 @@ static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, P __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t))); if (__pyx_t_1) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":282 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":282 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< @@ -3959,7 +3964,7 @@ static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, P __Pyx_RefNannyFinishContext(); } -/* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":755 +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":755 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -3967,12 +3972,12 @@ static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, P * */ -static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1"); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":756 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":756 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<< @@ -3998,7 +4003,7 @@ static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a return __pyx_r; } -/* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":758 +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":758 * return PyArray_MultiIterNew(1, <void*>a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -4006,12 +4011,12 @@ static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a * */ -static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2"); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":759 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":759 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<< @@ -4037,7 +4042,7 @@ static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a return __pyx_r; } -/* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":761 +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":761 * return PyArray_MultiIterNew(2, <void*>a, <void*>b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -4045,12 +4050,12 @@ static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a * */ -static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3"); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":762 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":762 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<< @@ -4076,7 +4081,7 @@ static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a return __pyx_r; } -/* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":764 +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":764 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -4084,12 +4089,12 @@ static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a * */ -static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4"); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":765 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":765 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<< @@ -4115,7 +4120,7 @@ static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a return __pyx_r; } -/* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":767 +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":767 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -4123,12 +4128,12 @@ static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a * */ -static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5"); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":768 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":768 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<< @@ -4154,7 +4159,7 @@ static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a return __pyx_r; } -/* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":770 +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":770 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< @@ -4162,7 +4167,7 @@ static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a * # string. The new location in the format string is returned. */ -static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { +static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { PyArray_Descr *__pyx_v_child; int __pyx_v_endian_detector; int __pyx_v_little_endian; @@ -4189,7 +4194,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc __pyx_v_new_offset = Py_None; __Pyx_INCREF(Py_None); __pyx_v_t = Py_None; __Pyx_INCREF(Py_None); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":777 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":777 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -4198,7 +4203,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc */ __pyx_v_endian_detector = 1; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":778 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":778 * cdef tuple i * cdef int endian_detector = 1 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -4207,7 +4212,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":781 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":781 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< @@ -4226,7 +4231,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc __pyx_v_childname = __pyx_t_3; __pyx_t_3 = 0; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":782 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":782 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< @@ -4240,7 +4245,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc __pyx_v_fields = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":783 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":783 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< @@ -4263,7 +4268,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":785 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":785 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< @@ -4288,7 +4293,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":786 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":786 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< @@ -4310,7 +4315,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc } __pyx_L5:; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":788 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":788 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<< @@ -4325,7 +4330,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc } if (!__pyx_t_7) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":789 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":789 * * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<< @@ -4345,7 +4350,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc } if (__pyx_t_6) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":790 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":790 * if ((child.byteorder == '>' and little_endian) or * (child.byteorder == '<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< @@ -4367,7 +4372,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc } __pyx_L6:; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":800 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":800 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< @@ -4384,7 +4389,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_6) break; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":801 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":801 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< @@ -4393,7 +4398,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc */ (__pyx_v_f[0]) = 120; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":802 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":802 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< @@ -4402,7 +4407,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc */ __pyx_v_f += 1; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":803 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":803 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< @@ -4412,7 +4417,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc (__pyx_v_offset[0]) += 1; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":805 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":805 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< @@ -4421,7 +4426,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc */ (__pyx_v_offset[0]) += __pyx_v_child->elsize; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":807 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":807 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< @@ -4431,7 +4436,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc __pyx_t_6 = (!PyDataType_HASFIELDS(__pyx_v_child)); if (__pyx_t_6) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":808 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":808 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< @@ -4444,7 +4449,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc __pyx_v_t = __pyx_t_3; __pyx_t_3 = 0; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":809 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":809 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< @@ -4454,7 +4459,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc __pyx_t_6 = ((__pyx_v_end - __pyx_v_f) < 5); if (__pyx_t_6) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":810 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":810 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< @@ -4476,7 +4481,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc } __pyx_L10:; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":813 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":813 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< @@ -4495,7 +4500,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":814 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":814 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< @@ -4514,7 +4519,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":815 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":815 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< @@ -4533,7 +4538,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":816 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":816 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< @@ -4552,7 +4557,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":817 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":817 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< @@ -4571,7 +4576,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":818 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":818 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< @@ -4590,7 +4595,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":819 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":819 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< @@ -4609,7 +4614,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":820 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":820 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< @@ -4628,7 +4633,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":821 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":821 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< @@ -4647,7 +4652,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":822 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":822 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< @@ -4666,7 +4671,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":823 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":823 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< @@ -4685,7 +4690,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":824 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":824 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< @@ -4704,7 +4709,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":825 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":825 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< @@ -4723,7 +4728,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":826 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":826 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< @@ -4744,7 +4749,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":827 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":827 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< @@ -4765,7 +4770,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":828 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":828 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< @@ -4786,7 +4791,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc goto __pyx_L11; } - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":829 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":829 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< @@ -4806,7 +4811,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc } /*else*/ { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":831 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":831 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< @@ -4829,7 +4834,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc } __pyx_L11:; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":832 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":832 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< @@ -4841,7 +4846,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc } /*else*/ { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":836 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":836 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< @@ -4855,7 +4860,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":837 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":837 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< @@ -4885,7 +4890,7 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc return __pyx_r; } -/* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":952 +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":952 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -4893,14 +4898,14 @@ static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_desc * if base is None: */ -static INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { PyObject *__pyx_v_baseptr; int __pyx_t_1; __Pyx_RefNannySetupContext("set_array_base"); __Pyx_INCREF((PyObject *)__pyx_v_arr); __Pyx_INCREF(__pyx_v_base); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":954 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":954 * cdef inline void set_array_base(ndarray arr, object base): * cdef PyObject* baseptr * if base is None: # <<<<<<<<<<<<<< @@ -4910,7 +4915,7 @@ static INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyO __pyx_t_1 = (__pyx_v_base == Py_None); if (__pyx_t_1) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":955 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":955 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< @@ -4922,7 +4927,7 @@ static INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyO } /*else*/ { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":957 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":957 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< @@ -4931,7 +4936,7 @@ static INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyO */ Py_INCREF(__pyx_v_base); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":958 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":958 * else: * Py_INCREF(base) # important to do this before decref below! * baseptr = <PyObject*>base # <<<<<<<<<<<<<< @@ -4942,7 +4947,7 @@ static INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyO } __pyx_L3:; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":959 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":959 * Py_INCREF(base) # important to do this before decref below! * baseptr = <PyObject*>base * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< @@ -4951,7 +4956,7 @@ static INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyO */ Py_XDECREF(__pyx_v_arr->base); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":960 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":960 * baseptr = <PyObject*>base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< @@ -4965,7 +4970,7 @@ static INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyO __Pyx_RefNannyFinishContext(); } -/* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":962 +/* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":962 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -4973,13 +4978,13 @@ static INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyO * return None */ -static INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { PyObject *__pyx_r = NULL; int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base"); __Pyx_INCREF((PyObject *)__pyx_v_arr); - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":963 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":963 * * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: # <<<<<<<<<<<<<< @@ -4989,7 +4994,7 @@ static INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr __pyx_t_1 = (__pyx_v_arr->base == NULL); if (__pyx_t_1) { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":964 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":964 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< @@ -5004,7 +5009,7 @@ static INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr } /*else*/ { - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":966 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\numpy.pxd":966 * return None * else: * return <object>arr.base # <<<<<<<<<<<<<< @@ -5199,15 +5204,15 @@ PyMODINIT_FUNC PyInit_libsvm(void) /*--- Function export code ---*/ /*--- Type init code ---*/ /*--- Type import code ---*/ - __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject)); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject)); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject)); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Function import code ---*/ /*--- Execution code ---*/ - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":41 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":41 * """ * * import numpy as np # <<<<<<<<<<<<<< @@ -5219,7 +5224,7 @@ PyMODINIT_FUNC PyInit_libsvm(void) if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/Users/fabian/dev/scikit-learn/scikits/learn/src/libsvm.pyx":1 + /* "c:\msys\1.0\home\Administrator\dev\scikit-learn\scikits\learn\src\libsvm.pyx":1 * """ # <<<<<<<<<<<<<< * Binding for libsvm[1] * --------------------- @@ -5250,7 +5255,7 @@ PyMODINIT_FUNC PyInit_libsvm(void) if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/stdlib.pxd":2 + /* "c:\Python26\lib\site-packages\cython-0.12.1-py2.6-win32.egg\Cython\Includes\stdlib.pxd":2 * * cdef extern from "stdlib.h" nogil: # <<<<<<<<<<<<<< * void free(void *ptr) @@ -5409,7 +5414,7 @@ bad: return -1; } -static INLINE int __Pyx_IsLittleEndian(void) { +static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { unsigned int n = 1; return *(unsigned char*)(&n) != 0; } @@ -5806,7 +5811,7 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha } } -static INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { +static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { buf->buf = NULL; buf->obj = NULL; buf->strides = __Pyx_zeros; @@ -5847,20 +5852,20 @@ fail:; return -1; } -static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (info->buf == NULL) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } -static INLINE long __Pyx_div_long(long a, long b) { +static CYTHON_INLINE long __Pyx_div_long(long a, long b) { long q = a / b; long r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } -static INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; @@ -5878,7 +5883,7 @@ static void __Pyx_RaiseBufferFallbackError(void) { } -static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); @@ -5893,7 +5898,7 @@ static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *t Py_XDECREF(tmp_tb); } -static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; @@ -5905,7 +5910,7 @@ static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject ** } -static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, #if PY_VERSION_HEX < 0x02050000 "need more than %d value%s to unpack", (int)index, @@ -5915,7 +5920,7 @@ static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { (index == 1) ? "" : "s"); } -static INLINE void __Pyx_RaiseTooManyValuesError(void) { +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void) { PyErr_SetString(PyExc_ValueError, "too many values to unpack"); } @@ -5942,7 +5947,7 @@ static int __Pyx_EndUnpack(PyObject *iter) { return -1; } -static INLINE void __Pyx_RaiseNoneNotIterableError(void) { +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } @@ -6151,7 +6156,7 @@ bad: } #endif -static INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp val) { +static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp val) { const npy_intp neg_one = (npy_intp)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(npy_intp) < sizeof(long)) { @@ -6171,70 +6176,70 @@ static INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp val) { #if CYTHON_CCOMPLEX #ifdef __cplusplus - static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return ::std::complex< float >(x, y); } #else - static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return x + y*(__pyx_t_float_complex)_Complex_I; } #endif #else - static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { __pyx_t_float_complex z; - z.real = x; - z.imag = y; - return z; + z.real = x; + z.imag = y; + return z; } #endif #if CYTHON_CCOMPLEX #else - static INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) { return (a.real == b.real) && (a.imag == b.imag); } - static INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } - static INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) { + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } - static INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } - static INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } - static INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) { + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = -a.real; z.imag = -a.imag; return z; } - static INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) { + static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } - static INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) { + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = a.real; z.imag = -a.imag; return z; } /* - static INLINE float __Pyx_c_absf(__pyx_t_float_complex z) { + static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) { #if HAVE_HYPOT return hypotf(z.real, z.imag); #else @@ -6246,70 +6251,70 @@ static INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp val) { #if CYTHON_CCOMPLEX #ifdef __cplusplus - static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return ::std::complex< double >(x, y); } #else - static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return x + y*(__pyx_t_double_complex)_Complex_I; } #endif #else - static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { __pyx_t_double_complex z; - z.real = x; - z.imag = y; - return z; + z.real = x; + z.imag = y; + return z; } #endif #if CYTHON_CCOMPLEX #else - static INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) { + static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) { return (a.real == b.real) && (a.imag == b.imag); } - static INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) { + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } - static INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) { + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } - static INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) { + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } - static INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double denom = b.real * b.real + b.imag * b.imag; z.real = (a.real * b.real + a.imag * b.imag) / denom; z.imag = (a.imag * b.real - a.real * b.imag) / denom; return z; } - static INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) { + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = -a.real; z.imag = -a.imag; return z; } - static INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) { + static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } - static INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) { + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = a.real; z.imag = -a.imag; return z; } /* - static INLINE double __Pyx_c_abs(__pyx_t_double_complex z) { + static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) { #if HAVE_HYPOT return hypot(z.real, z.imag); #else @@ -6319,7 +6324,7 @@ static INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp val) { */ #endif -static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { +static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { const unsigned char neg_one = (unsigned char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned char) < sizeof(long)) { @@ -6338,7 +6343,7 @@ static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); } -static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { +static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { const unsigned short neg_one = (unsigned short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned short) < sizeof(long)) { @@ -6357,7 +6362,7 @@ static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } -static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { +static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { const unsigned int neg_one = (unsigned int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(unsigned int) < sizeof(long)) { @@ -6376,7 +6381,7 @@ static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } -static INLINE char __Pyx_PyInt_AsChar(PyObject* x) { +static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { const char neg_one = (char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(char) < sizeof(long)) { @@ -6395,7 +6400,7 @@ static INLINE char __Pyx_PyInt_AsChar(PyObject* x) { return (char)__Pyx_PyInt_AsLong(x); } -static INLINE short __Pyx_PyInt_AsShort(PyObject* x) { +static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { const short neg_one = (short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(short) < sizeof(long)) { @@ -6414,7 +6419,7 @@ static INLINE short __Pyx_PyInt_AsShort(PyObject* x) { return (short)__Pyx_PyInt_AsLong(x); } -static INLINE int __Pyx_PyInt_AsInt(PyObject* x) { +static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { const int neg_one = (int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(int) < sizeof(long)) { @@ -6433,7 +6438,7 @@ static INLINE int __Pyx_PyInt_AsInt(PyObject* x) { return (int)__Pyx_PyInt_AsLong(x); } -static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { +static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { const signed char neg_one = (signed char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed char) < sizeof(long)) { @@ -6452,7 +6457,7 @@ static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { return (signed char)__Pyx_PyInt_AsSignedLong(x); } -static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { +static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { const signed short neg_one = (signed short)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed short) < sizeof(long)) { @@ -6471,7 +6476,7 @@ static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { return (signed short)__Pyx_PyInt_AsSignedLong(x); } -static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { +static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { const signed int neg_one = (signed int)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; if (sizeof(signed int) < sizeof(long)) { @@ -6490,7 +6495,7 @@ static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { return (signed int)__Pyx_PyInt_AsSignedLong(x); } -static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { +static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { const unsigned long neg_one = (unsigned long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 @@ -6525,7 +6530,7 @@ static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { } } -static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 @@ -6560,7 +6565,7 @@ static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) } } -static INLINE long __Pyx_PyInt_AsLong(PyObject* x) { +static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { const long neg_one = (long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 @@ -6595,7 +6600,7 @@ static INLINE long __Pyx_PyInt_AsLong(PyObject* x) { } } -static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 @@ -6630,7 +6635,7 @@ static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { } } -static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { +static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { const signed long neg_one = (signed long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 @@ -6665,7 +6670,7 @@ static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { } } -static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { +static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_VERSION_HEX < 0x03000000 @@ -6703,11 +6708,12 @@ static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, - long size) + long size, int strict) { PyObject *py_module = 0; PyObject *result = 0; PyObject *py_name = 0; + char warning[200]; py_module = __Pyx_ImportModule(module_name); if (!py_module) @@ -6732,9 +6738,15 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class module_name, class_name); goto bad; } - if (((PyTypeObject *)result)->tp_basicsize != size) { + if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility", + module_name, class_name); + PyErr_WarnEx(NULL, warning, 0); + } + else if (((PyTypeObject *)result)->tp_basicsize != size) { PyErr_Format(PyExc_ValueError, - "%s.%s does not appear to be the correct type object", + "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } @@ -6870,13 +6882,13 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { /* Type Conversion Functions */ -static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { if (x == Py_True) return 1; else if ((x == Py_False) | (x == Py_None)) return 0; else return PyObject_IsTrue(x); } -static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; @@ -6922,7 +6934,7 @@ static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { return res; } -static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject* x = PyNumber_Index(b); if (!x) return -1; @@ -6931,7 +6943,7 @@ static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { return ival; } -static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) return PyInt_FromLong((long)ival); @@ -6945,7 +6957,7 @@ static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { #endif } -static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { +static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) { return (size_t)-1; diff --git a/scikits/learn/src/libsvm_helper.c b/scikits/learn/src/libsvm_helper.c index 136d997f07cc42657130c08c199a4fcbaacf3634..f6540e97b47a9fd53635e039be0f90767bd73df1 100644 --- a/scikits/learn/src/libsvm_helper.c +++ b/scikits/learn/src/libsvm_helper.c @@ -151,14 +151,16 @@ struct svm_problem * set_problem(char *X,char *Y, npy_intp *dims) * TODO: check that malloc was successful. */ struct svm_model *set_model(struct svm_parameter *param, int nr_class, - char *SV, npy_intp *SV_dims, npy_intp *sv_coef_strides, + char *SV, npy_intp *SV_dims, + npy_intp *sv_coef_strides, char *sv_coef, char *rho, char *nSV, char *label, char *probA, char *probB) { - int i; - char *t = sv_coef; - int m = nr_class*(nr_class-1)/2; struct svm_model *model; + char *t = sv_coef; + int i, m; + + m = nr_class*(nr_class-1)/2; model = (struct svm_model *) malloc(sizeof(struct svm_model)); model->nSV = (int *) malloc(nr_class * sizeof(int)); @@ -322,8 +324,8 @@ int copy_predict(char *predict, struct svm_model *model, npy_intp *predict_dims, { double *t = (double *) dec_values; register int i, n; - n = predict_dims[0]; struct svm_node **predict_nodes; + n = predict_dims[0]; predict_nodes = dense_to_sparse((double *) predict, predict_dims); if (predict_nodes == NULL) return -1; @@ -341,9 +343,9 @@ int copy_predict_proba(char *predict, struct svm_model *model, npy_intp *predict { register int i; int n, m; + struct svm_node **predict_nodes; n = predict_dims[0]; m = model->nr_class; - struct svm_node **predict_nodes; predict_nodes = dense_to_sparse((double *) predict, predict_dims); if (predict_nodes == NULL) return -1; @@ -364,8 +366,8 @@ int copy_predict_proba(char *predict, struct svm_model *model, npy_intp *predict */ int free_problem(struct svm_problem *problem) { - if (problem == NULL) return -1; register int i; + if (problem == NULL) return -1; for (i=problem->l-1; i>=0; --i) free (problem->x[i]); free (problem->x); return 0;