From numpy-svn at scipy.org Fri Mar 2 11:49:04 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Fri, 2 Mar 2007 10:49:04 -0600 (CST) Subject: [Numpy-svn] r3568 - trunk/numpy/distutils/fcompiler Message-ID: <20070302164904.893D239C36B@new.scipy.org> Author: pearu Date: 2007-03-02 10:49:00 -0600 (Fri, 02 Mar 2007) New Revision: 3568 Modified: trunk/numpy/distutils/fcompiler/ibm.py Log: Applying info from Hans-Joachim Ehlers to improve xlf compiler support (on AIX using lslpp to determine compiler version). Modified: trunk/numpy/distutils/fcompiler/ibm.py =================================================================== --- trunk/numpy/distutils/fcompiler/ibm.py 2007-02-28 23:52:12 UTC (rev 3567) +++ trunk/numpy/distutils/fcompiler/ibm.py 2007-03-02 16:49:00 UTC (rev 3568) @@ -3,6 +3,7 @@ import sys from numpy.distutils.fcompiler import FCompiler +from numpy.distutils.exec_command import exec_command, find_executable from distutils import log class IbmFCompiler(FCompiler): @@ -23,19 +24,18 @@ def get_version(self,*args,**kwds): version = FCompiler.get_version(self,*args,**kwds) - if version is None: - # Let's try version_cmd without -qversion flag that - # xlf versions <=8.x don't have. - version_cmd = self.version_cmd - orig_version_cmd = version_cmd[:] - if '-qversion' in version_cmd: - version_cmd.remove('-qversion') - version = FCompiler.get_version(self,*args,**kwds) - if version is None: - version_cmd[:] = orig_version_cmd + if version is None and sys.platform.startswith('aix'): + # use lslpp to find out xlf version + lslpp = find_executable('lslpp') + xlf = find_executable('xlf') + if os.path.exists(xlf) and os.path.exists(lslpp): + s,o = exec_command(lslpp + ' -Lc xlfcmp') + m = re.search('xlfcmp:(?P\d+([.]\d+)+)', o) + if m: version = m.group('version') xlf_dir = '/etc/opt/ibmcmp/xlf' if version is None and os.path.isdir(xlf_dir): + # linux: # If the output of xlf does not contain version info # (that's the case with xlf 8.1, for instance) then # let's try another method: From numpy-svn at scipy.org Sun Mar 4 05:47:13 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Sun, 4 Mar 2007 04:47:13 -0600 (CST) Subject: [Numpy-svn] r3569 - trunk/numpy/distutils Message-ID: <20070304104713.6381C39C0C3@new.scipy.org> Author: timl Date: 2007-03-04 04:47:08 -0600 (Sun, 04 Mar 2007) New Revision: 3569 Modified: trunk/numpy/distutils/misc_util.py Log: add a delete flag to make_svn_version_py to allow the __svn_version.py to not be deleted Modified: trunk/numpy/distutils/misc_util.py =================================================================== --- trunk/numpy/distutils/misc_util.py 2007-03-02 16:49:00 UTC (rev 3568) +++ trunk/numpy/distutils/misc_util.py 2007-03-04 10:47:08 UTC (rev 3569) @@ -1304,7 +1304,7 @@ return version - def make_svn_version_py(self): + def make_svn_version_py(self, delete=True): """ Generate package __svn_version__.py file from SVN revision number, it will be removed after python exits but will be available when sdist, etc commands are executed. @@ -1326,10 +1326,12 @@ import atexit def rm_file(f=target,p=self.info): - try: os.remove(f); p('removed '+f) - except OSError: pass - try: os.remove(f+'c'); p('removed '+f+'c') - except OSError: pass + if delete: + try: os.remove(f); p('removed '+f) + except OSError: pass + try: os.remove(f+'c'); p('removed '+f+'c') + except OSError: pass + atexit.register(rm_file) return target From numpy-svn at scipy.org Mon Mar 5 01:04:06 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Mon, 5 Mar 2007 00:04:06 -0600 (CST) Subject: [Numpy-svn] r3570 - trunk/numpy/testing Message-ID: <20070305060406.6C3A839C096@new.scipy.org> Author: timl Date: 2007-03-05 00:03:54 -0600 (Mon, 05 Mar 2007) New Revision: 3570 Modified: trunk/numpy/testing/numpytest.py Log: fix bug with test_suite being called incorrectly Modified: trunk/numpy/testing/numpytest.py =================================================================== --- trunk/numpy/testing/numpytest.py 2007-03-04 10:47:08 UTC (rev 3569) +++ trunk/numpy/testing/numpytest.py 2007-03-05 06:03:54 UTC (rev 3570) @@ -398,7 +398,7 @@ mstr = self._module_str suite_list = [] if hasattr(test_module,'test_suite'): - suite_list.extend(test_module.test_suite(level)._tests) + suite_list.extend(test_module.test_suite._tests) for name in dir(test_module): obj = getattr(test_module, name) if type(obj) is not type(unittest.TestCase) \ From numpy-svn at scipy.org Mon Mar 5 01:06:21 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Mon, 5 Mar 2007 00:06:21 -0600 (CST) Subject: [Numpy-svn] r3571 - trunk/numpy/testing Message-ID: <20070305060621.43D0E39C096@new.scipy.org> Author: timl Date: 2007-03-05 00:06:12 -0600 (Mon, 05 Mar 2007) New Revision: 3571 Modified: trunk/numpy/testing/numpytest.py Log: scratch that last one. my bad Modified: trunk/numpy/testing/numpytest.py =================================================================== --- trunk/numpy/testing/numpytest.py 2007-03-05 06:03:54 UTC (rev 3570) +++ trunk/numpy/testing/numpytest.py 2007-03-05 06:06:12 UTC (rev 3571) @@ -398,7 +398,7 @@ mstr = self._module_str suite_list = [] if hasattr(test_module,'test_suite'): - suite_list.extend(test_module.test_suite._tests) + suite_list.extend(test_module.test_suite(level)._tests) for name in dir(test_module): obj = getattr(test_module, name) if type(obj) is not type(unittest.TestCase) \ From numpy-svn at scipy.org Wed Mar 7 14:12:30 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Wed, 7 Mar 2007 13:12:30 -0600 (CST) Subject: [Numpy-svn] r3572 - trunk/numpy/linalg Message-ID: <20070307191230.DE45A39C0A3@new.scipy.org> Author: oliphant Date: 2007-03-07 13:12:26 -0600 (Wed, 07 Mar 2007) New Revision: 3572 Modified: trunk/numpy/linalg/lapack_litemodule.c Log: Fix problem 64-bit linalg.qr problem. Modified: trunk/numpy/linalg/lapack_litemodule.c =================================================================== --- trunk/numpy/linalg/lapack_litemodule.c 2007-03-05 06:06:12 UTC (rev 3571) +++ trunk/numpy/linalg/lapack_litemodule.c 2007-03-07 19:12:26 UTC (rev 3572) @@ -520,7 +520,7 @@ int lda; int info; - TRY(PyArg_ParseTuple(args,"llOlOOll",&m,&n,&a,&lda,&tau,&work,&lwork,&info)); + TRY(PyArg_ParseTuple(args,"iiOiOOii",&m,&n,&a,&lda,&tau,&work,&lwork,&info)); /* check objects and convert to right storage order */ TRY(check_object(a,PyArray_DOUBLE,"a","PyArray_DOUBLE","dgeqrf")); @@ -531,7 +531,7 @@ FNAME(dgeqrf)(&m, &n, DDATA(a), &lda, DDATA(tau), DDATA(work), &lwork, &info); - return Py_BuildValue("{s:l,s:l,s:l,s:l,s:l,s:l}","dgeqrf_", + return Py_BuildValue("{s:i,s:i,s:i,s:i,s:i,s:i}","dgeqrf_", lapack_lite_status__,"m",m,"n",n,"lda",lda, "lwork",lwork,"info",info); } @@ -546,14 +546,14 @@ int lda; int info; - TRY(PyArg_ParseTuple(args,"lllOlOOll", &m, &n, &k, &a, &lda, &tau, &work, &lwork, &info)); + TRY(PyArg_ParseTuple(args,"iiiOiOOii", &m, &n, &k, &a, &lda, &tau, &work, &lwork, &info)); TRY(check_object(a,PyArray_DOUBLE,"a","PyArray_DOUBLE","dorgqr")); TRY(check_object(tau,PyArray_DOUBLE,"tau","PyArray_DOUBLE","dorgqr")); TRY(check_object(work,PyArray_DOUBLE,"work","PyArray_DOUBLE","dorgqr")); lapack_lite_status__ = \ FNAME(dorgqr)(&m, &n, &k, DDATA(a), &lda, DDATA(tau), DDATA(work), &lwork, &info); - return Py_BuildValue("{s:l,s:l}","dorgqr_",lapack_lite_status__, + return Py_BuildValue("{s:i,s:i}","dorgqr_",lapack_lite_status__, "info",info); } @@ -778,7 +778,7 @@ int lda; int info; - TRY(PyArg_ParseTuple(args,"lllOlOOll", &m, &n, &k, &a, &lda, &tau, &work, &lwork, &info)); + TRY(PyArg_ParseTuple(args,"iiiOiOOii", &m, &n, &k, &a, &lda, &tau, &work, &lwork, &info)); TRY(check_object(a,PyArray_CDOUBLE,"a","PyArray_CDOUBLE","zungqr")); TRY(check_object(tau,PyArray_CDOUBLE,"tau","PyArray_CDOUBLE","zungqr")); TRY(check_object(work,PyArray_CDOUBLE,"work","PyArray_CDOUBLE","zungqr")); @@ -788,7 +788,7 @@ FNAME(zungqr)(&m, &n, &k, ZDATA(a), &lda, ZDATA(tau), ZDATA(work), &lwork, &info); - return Py_BuildValue("{s:l,s:l}","zungqr_",lapack_lite_status__, + return Py_BuildValue("{s:i,s:i}","zungqr_",lapack_lite_status__, "info",info); } From numpy-svn at scipy.org Mon Mar 12 13:07:28 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Mon, 12 Mar 2007 12:07:28 -0500 (CDT) Subject: [Numpy-svn] r3573 - trunk/numpy/core/tests Message-ID: <20070312170728.15DF339C032@new.scipy.org> Author: stefan Date: 2007-03-12 12:07:19 -0500 (Mon, 12 Mar 2007) New Revision: 3573 Modified: trunk/numpy/core/tests/test_regression.py Log: Add test for ticket #449. Modified: trunk/numpy/core/tests/test_regression.py =================================================================== --- trunk/numpy/core/tests/test_regression.py 2007-03-07 19:12:26 UTC (rev 3572) +++ trunk/numpy/core/tests/test_regression.py 2007-03-12 17:07:19 UTC (rev 3573) @@ -608,7 +608,7 @@ todivide = N.array([2.0, 0.5, 0.25]) assert_equal(N.subtract.reduce(tosubtract), -10) assert_equal(N.divide.reduce(todivide), 16.0) - assert_array_equal(N.subtract.accumulate(tosubtract), + assert_array_equal(N.subtract.accumulate(tosubtract), N.array([0, -1, -3, -6, -10])) assert_array_equal(N.divide.accumulate(todivide), N.array([2., 4., 16.])) @@ -622,6 +622,12 @@ self.failUnlessRaises(AssertionError,N.convolve,[],[1]) self.failUnlessRaises(AssertionError,N.convolve,[1],[]) + def check_multidim_byteswap(self, level=rlevel): + """Ticket #449""" + r=N.array([(1,(0,1,2))], dtype="i2,3i2") + assert_array_equal(r.byteswap(), + N.array([(256,(0,256,512))],r.dtype)) + def check_string_NULL(self, level=rlevel): """Changeset 3557""" assert_equal(N.array("a\x00\x0b\x0c\x00").item(), From numpy-svn at scipy.org Wed Mar 14 11:48:04 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Wed, 14 Mar 2007 10:48:04 -0500 (CDT) Subject: [Numpy-svn] r3574 - trunk/numpy/doc/swig Message-ID: <20070314154804.8416139C08E@new.scipy.org> Author: wfspotz at sandia.gov Date: 2007-03-14 10:47:12 -0500 (Wed, 14 Mar 2007) New Revision: 3574 Added: trunk/numpy/doc/swig/numpy_swig.html trunk/numpy/doc/swig/numpy_swig.txt Removed: trunk/numpy/doc/swig/HelperFunctions.txt Modified: trunk/numpy/doc/swig/Makefile trunk/numpy/doc/swig/README trunk/numpy/doc/swig/Series.i trunk/numpy/doc/swig/numpy.i trunk/numpy/doc/swig/series.cxx trunk/numpy/doc/swig/series.h trunk/numpy/doc/swig/setup.py trunk/numpy/doc/swig/testSeries.py Log: In numpy.i: * I consolidated several macros TYPEMAP_IN1 TYPEMAP_IN2 TYPEMAP_INPLACE1 TYPEMAP_INPLACE2 TYPEMAP_ARGOUT1 TYPEMAP_ARGOUT2 into a single macros, %numpy_typemaps(). This makes expanding the typemaps for a given data type much easier. * The %numpy_typemaps() macro is now expanded for:: signed char unsigned char short unsigned short int unsigned int long unsigned long long long unsigned long long float double PyObject char * I changed the ARGOUT typemaps to check for multiple output arguments, and form a tuple if necessary. * Updated the code to work with released numpy versions 0.9.6, 0.9.8, 1.0 and 1.0.1. * Upgraded the dimension arrays to use type npy_intp. I also added documentation: numpy_swig.txt is a numpy.i users guide in restructured text format; numpy_swig.html is the same content in HTML. The Makefile can produce this with 'make html', assuming docutils is installed. The series.h and series.cxx files have been refactored to use macros to generate repetitive code for different types. All the supported types have tests for all of the non-ARGOUT typemaps. ARGOUT typemap tests still need to be written. Deleted: trunk/numpy/doc/swig/HelperFunctions.txt =================================================================== --- trunk/numpy/doc/swig/HelperFunctions.txt 2007-03-12 17:07:19 UTC (rev 3573) +++ trunk/numpy/doc/swig/HelperFunctions.txt 2007-03-14 15:47:12 UTC (rev 3574) @@ -1,104 +0,0 @@ -/*********************************************************************** - Helper functions from numpy.i, translated by John Hunter -************************************************************************/ - -#define is_array(a) ((a) && PyArray_Check((PyArrayObject *)a)) -#define array_type(a) (int)(((PyArrayObject *)a)->descr->type_num) -#define array_dimensions(a) (((PyArrayObject *)a)->nd) -#define array_size(a,i) (((PyArrayObject *)a)->dimensions[i]) -#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS(a)) - -/* Given a PyObject, return a string describing its type. - */ -char* pytype_string(PyObject* py_obj) - -/* Given a Numeric typecode, return a string describing the type. - */ -char* typecode_string(int typecode) - -/* Make sure input has correct numeric type. Allow character and byte - * to match. Also allow int and long to match. - */ -int type_match(int actual_type, int desired_type) - -/* Given a PyObject pointer, cast it to a PyArrayObject pointer if - * legal. If not, set the python error string appropriately and - * return NULL. - */ -PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode) - -/* Convert the given PyObject to a Numeric array with the given - * typecode. On Success, return a valid PyArrayObject* with the - * correct type. On failure, the python error string will be set and - * the routine returns NULL. - */ -PyArrayObject* obj_to_array_allow_conversion(PyObject* input, int typecode, - int* is_new_object) - -/* Given a PyArrayObject, check to see if it is contiguous. If so, - * return the input pointer and flag it as not a new object. If it is - * not contiguous, create a new PyArrayObject using the original data, - * flag it as a new object and return the pointer. - */ -PyArrayObject* make_contiguous(PyArrayObject* ary, int* is_new_object, - int min_dims, int max_dims) - -/* Convert a given PyObject to a contiguous PyArrayObject of the - * specified type. If the input object is not a contiguous - * PyArrayObject, a new one will be created and the new object flag - * will be set. - */ -PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input, - int typecode, - int* is_new_object) - -/* Test whether a python object is contiguous. If array is - * contiguous, return 1. Otherwise, set the python error string and - * return 0. - */ -int require_contiguous(PyArrayObject* ary) - -/* Require the given PyArrayObject to have a specified number of - * dimensions. If the array has the specified number of dimensions, - * return 1. Otherwise, set the python error string and return 0. - */ -int require_dimensions(PyArrayObject* ary, int exact_dimensions) - -/* Require the given PyArrayObject to have one of a list of specified - * number of dimensions. If the array has one of the specified number - * of dimensions, return 1. Otherwise, set the python error string - * and return 0. - */ -int require_dimensions_n(PyArrayObject* ary, int* exact_dimensions, int n) - -/* Require the given PyArrayObject to have a specified shape. If the - * array has the specified shape, return 1. Otherwise, set the python - * error string and return 0. - */ -int require_size(PyArrayObject* ary, int* size, int n) - -/*********************************************************************** - Helper functions from Anna Omelchenko and Michel Sanner -************************************************************************/ - -/******************************************************************** - The following function tries to create a contiguous numeric array of type - typecode from a Python object. Works for list, tuples and numeric arrays. - - obj: Numeric array , Python object - typecode: data type PyArray_{ CHAR, UBYTE, SBYTE, SHORT, INT, LONG, FLOAT, - DOUBLE, CFLOAT, CDOUBLE } - expectnd: required number of dimensions. Used for checking. Ignored if <=0. - expectdims: array of expected extends. Used for checking. Ignored if <=0. - - Raises ValueError exceptions if: - - the PyArray_ContiguousFromObject fails - - the array has a bad shape - - the extent of a given dimension doesn't match the specified extent. -If obj is a contiguous PyArrayObject then a reference is returned; -If op is PyObject sequence object(list, tuple) then a new PyArrayObject is created - and returned. -********************************************************************/ - -static PyArrayObject *contiguous_typed_array(PyObject *obj, int typecode, - int expectnd, int *expectdims) Modified: trunk/numpy/doc/swig/Makefile =================================================================== --- trunk/numpy/doc/swig/Makefile 2007-03-12 17:07:19 UTC (rev 3573) +++ trunk/numpy/doc/swig/Makefile 2007-03-14 15:47:12 UTC (rev 3574) @@ -1,3 +1,4 @@ +# SWIG INTERFACES = Series.i WRAPPERS = $(INTERFACES:.i=_wrap.cxx) PROXIES = $(INTERFACES:.i=.py ) @@ -2,2 +3,12 @@ +# ReStructured Text +RST2HTML = rst2html.py +RFLAGS = --generator --time --no-xml-declaration + +# Web pages that need to be made +WEB_PAGES = numpy_swig.html + +# List all of the subdirectories here for recursive make +SUBDIRS = + all: $(WRAPPERS) series.cxx series.h @@ -8,7 +19,14 @@ %_wrap.cxx: %.i numpy.i series.h swig -c++ -python $< +html: $(WEB_PAGES) + +%.html: %.txt + $(RST2HTML) $(RFLAGS) $< $@ + clean: $(RM) -r build $(RM) $(WRAPPERS) $(RM) $(PROXIES) + +.PHONY : html clean Modified: trunk/numpy/doc/swig/README =================================================================== --- trunk/numpy/doc/swig/README 2007-03-12 17:07:19 UTC (rev 3573) +++ trunk/numpy/doc/swig/README 2007-03-14 15:47:12 UTC (rev 3574) @@ -1,16 +1,15 @@ Notes for the swig_numpy/new directory ====================================== -This set of files is for developing and testing file numpy.i, which -is intended to be a set of typemaps for helping SWIG interface between -C and C++ code that uses C arrays and the python module Numeric (also -known informally as NumPy, also to be replaced in the future with -scipy_core). It is ultimately hoped that numpy.i will be included -as part of the SWIG and/or SciPy distribution(s). +This set of files is for developing and testing file numpy.i, which is +intended to be a set of typemaps for helping SWIG interface between C +and C++ code that uses C arrays and the python module NumPy. It is +ultimately hoped that numpy.i will be included as part of the SWIG +distribution. In the spirit of "writing your tests first", I will begin by describing the tests, as they are a good example of what we are trying -to do with numpy.i. The files related to testing are +to do with numpy.i. The files related to testing are:: series.h series.cxx @@ -18,34 +17,34 @@ The series.h header file contains prototypes for functions that illustrate the wrapping issues we wish to address. Right now, this -consists of functions with argument signatures of the form +consists of functions with argument signatures of the form:: (type* IN_ARRAY1, int DIM1) (type* IN_ARRAY2, int DIM1, int DIM2) (type* INPLACE_ARRAY1, int DIM1) + (type* INPLACE_ARRAY2, int DIM1, int DIM2) which take a pointer to an array of type "type", whose length is specified by the integer(s) DIM1 (and DIM2). The objective for the IN_ARRAY signatures is for SWIG to generate python wrappers that take a container that constitutes a valid -argument to the Numeric.array constructor, and can be used to build an +argument to the numpy array constructor, and can be used to build an array of type "type". Currently, types "char", "unsigned char", "signed char", "short", "int", "long", "float", "double" and "PyObject" are supported, although only the types "short", "int", "long", "float" and "double" are tested. The objective for the INPLACE_ARRAY signatures is for SWIG to generate -python wrappers that accept a Numeric array of any of the above-listed +python wrappers that accept a numpy array of any of the above-listed types. The source file series.cxx contains the actual implementations of the functions described in series.h. The python script testSeries.py tests the resulting python wrappers using the unittest module. -The SWIG interface file Series.i is used to generate the wrapper -code. It is pretty short, but everything in it is important. The -SWIG_FILE_WITH_INIT macro allows numpy.i to be used with multiple +The SWIG interface file Series.i is used to generate the wrapper code. +The SWIG_FILE_WITH_INIT macro allows numpy.i to be used with multiple python modules. If it is specified, then the %init block found in Series.i is required. The other things done in Series.i are the inclusion of the series.h and numpy.i files, and the "%apply" @@ -55,10 +54,10 @@ a _Series extension module and a Series python module. The Makefile automates everything, setting up the dependencies, calling swig to generate the wrappers, and calling setup.py to compile the wrapper -code and generate the shared object. Targets "all" (default) and -"clean" ar supported. +code and generate the shared object. Targets "all" (default), +"clean" and "html" (generate HTML documentation) are supported. -To build and test the code, simply execute from the shell, +To build and test the code, simply execute from the shell:: $ make $ testSeries.py @@ -66,57 +65,15 @@ ================================================================================ ToDo -==== +---- - * Tests for the (INPLACE_ARRAY2, DIM1, DIM2) nedd to be added to - series.h, series.cxx and testSeries.py. + * Support for complex data types should be added. Currently swig + dies with a syntax error when the %numpy_typemaps macro isused + with complex types. - * Support for complex data types should be added. Currently the - macro substitution doesn't seem to like the two words you need to - specify "complex double", etc. - - * ARGOUT typemaps need to be implemented and tested. I stalled on - this because SWIG implements a new method for aggregating output - arguments; it has changed from a tuple to a list and requires - importing a different SWIG library file. I didn't particularly - want to spend time trying to support both approaches, and I ended - up not finishing a typemap for either. - - -Notes Bill: - -The numpy.i file currently defines typemaps of the form - - (type* IN_ARRAY1, int DIM1) - (type* IN_ARRAY2, int DIM1, int DIM2) - (type* INPLACE_ARRAY1, int DIM1) - (type* INPLACE_ARRAY2, int DIM1, int DIM2) - -and has the beginnings of typemaps of the form - - (type* ARGOUT_ARRAY[ANY]) - (type* ARGOUT_ARRAY[ANY][ANY]) - -where "type" is almost any type supported by Numeric (I have had -trouble with complex), the "1" suffix can be used with any dimension -array as long as DIM1 reflects the total size, and the "2" suffix is -for explicitly 2-dimensional arrays. IN_ARRAYs can be any reasonable -container that can be used to construct a Numeric array. -INPLACE_ARRAYs must be Numeric arrays. - -I hit a snag with the ARGOUT typemaps, because the swig libraries have -changed and I did not know the best way to proceed. Basically, the old -way produced a tuple on the LHS if needed and the new way produces a -list. I forget why swig made the change, but the actual swig library -file you import changed because of it and I didn't feel like spending -time trying to support both approaches. - -So the ARGOUT typemaps need to be finished, functions that would use -them need to be added to series.{h,cxx} and tests for the resulting -python interface need to be added to testSeries.py. - -Most of the functions I deal with cannot use the ARGOUT typemaps -anyway, because they usually involve input arrays that share the same -dimension arguments as the output arrays, which will require a special -approach. So I don't have a lot of motivation there . . . but it -definitely needs to be done before any kind of release. + * Better ARGOUT typemaps need to be implemented and tested. I + stalled on this because SWIG implements a new method for + aggregating output arguments; it has changed from a tuple to a + list and requires importing a different SWIG library file. I + didn't particularly want to spend time trying to support both + approaches, and I ended up not finishing a typemap for either. Modified: trunk/numpy/doc/swig/Series.i =================================================================== --- trunk/numpy/doc/swig/Series.i 2007-03-12 17:07:19 UTC (rev 3573) +++ trunk/numpy/doc/swig/Series.i 2007-03-14 15:47:12 UTC (rev 3574) @@ -1,3 +1,4 @@ +// -*- c++ -*- %module Series %{ @@ -5,27 +6,124 @@ #include "series.h" %} -/* Get the Numeric typemaps */ +// Get the Numeric typemaps %include "numpy.i" %init %{ import_array(); %} -/* Apply the Numeric typemaps for 1D input arrays */ -%apply (short* IN_ARRAY1, int DIM1) {(short* series, int size)}; -%apply (int* IN_ARRAY1, int DIM1) {(int* series, int size)}; -%apply (long* IN_ARRAY1, int DIM1) {(long* series, int size)}; -%apply (float* IN_ARRAY1, int DIM1) {(float* series, int size)}; -%apply (double* IN_ARRAY1, int DIM1) {(double* series, int size)}; +// Apply the Numeric typemaps for 1D input arrays +%apply (signed char* IN_ARRAY1, int DIM1) + {(signed char* series, int size)}; +%apply (unsigned char* IN_ARRAY1, int DIM1) + {(unsigned char* series, int size)}; +%apply (short* IN_ARRAY1, int DIM1) + {(short* series, int size)}; +%apply (unsigned short* IN_ARRAY1, int DIM1) + {(unsigned short* series, int size)}; +%apply (int* IN_ARRAY1, int DIM1) + {(int* series, int size)}; +%apply (unsigned int* IN_ARRAY1, int DIM1) + {(unsigned int* series, int size)}; +%apply (long* IN_ARRAY1, int DIM1) + {(long* series, int size)}; +%apply (unsigned long* IN_ARRAY1, int DIM1) + {(unsigned long* series, int size)}; +%apply (long long* IN_ARRAY1, int DIM1) + {(long long* series, int size)}; +%apply (unsigned long long* IN_ARRAY1, int DIM1) + {(unsigned long long* series, int size)}; +%apply (float* IN_ARRAY1, int DIM1) + {(float* series, int size)}; +%apply (double* IN_ARRAY1, int DIM1) + {(double* series, int size)}; +%apply (long double* IN_ARRAY1, int DIM1) + {(long double* series, int size)}; -/* Apply the Numeric typemaps for 2D input arrays */ -%apply (int* IN_ARRAY2, int DIM1, int DIM2) {(int* matrix, int rows, int cols)}; -%apply (double* IN_ARRAY2, int DIM1, int DIM2) {(double* matrix, int rows, int cols)}; +// Apply the Numeric typemaps for 1D input/output arrays +%apply (signed char* INPLACE_ARRAY1, int DIM1) + {(signed char* array, int size)}; +%apply (unsigned char* INPLACE_ARRAY1, int DIM1) + {(unsigned char* array, int size)}; +%apply (short* INPLACE_ARRAY1, int DIM1) + {(short* array, int size)}; +%apply (unsigned short* INPLACE_ARRAY1, int DIM1) + {(unsigned short* array, int size)}; +%apply (int* INPLACE_ARRAY1, int DIM1) + {(int* array, int size)}; +%apply (unsigned int* INPLACE_ARRAY1, int DIM1) + {(unsigned int* array, int size)}; +%apply (long* INPLACE_ARRAY1, int DIM1) + {(long* array, int size)}; +%apply (unsigned long* INPLACE_ARRAY1, int DIM1) + {(unsigned long* array, int size)}; +%apply (long long* INPLACE_ARRAY1, int DIM1) + {(long long* array, int size)}; +%apply (unsigned long long* INPLACE_ARRAY1, int DIM1) + {(unsigned long long* array, int size)}; +%apply (float* INPLACE_ARRAY1, int DIM1) + {(float* array, int size)}; +%apply (double* INPLACE_ARRAY1, int DIM1) + {(double* array, int size)}; +%apply (long double* INPLACE_ARRAY1, int DIM1) + {(long double* array, int size)}; -/* Apply the Numeric typemaps for 1D input/output arrays */ -%apply (int* INPLACE_ARRAY1, int DIM1) {(int* array, int size)}; -%apply (double* INPLACE_ARRAY1, int DIM1) {(double* array, int size)}; +// Apply the Numeric typemaps for 2D input arrays +%apply (signed char* IN_ARRAY2, int DIM1, int DIM2) + {(signed char* matrix, int rows, int cols)}; +%apply (unsigned char* IN_ARRAY2, int DIM1, int DIM2) + {(unsigned char* matrix, int rows, int cols)}; +%apply (short* IN_ARRAY2, int DIM1, int DIM2) + {(short* matrix, int rows, int cols)}; +%apply (unsigned short* IN_ARRAY2, int DIM1, int DIM2) + {(unsigned short* matrix, int rows, int cols)}; +%apply (int* IN_ARRAY2, int DIM1, int DIM2) + {(int* matrix, int rows, int cols)}; +%apply (unsigned int* IN_ARRAY2, int DIM1, int DIM2) + {(unsigned int* matrix, int rows, int cols)}; +%apply (long* IN_ARRAY2, int DIM1, int DIM2) + {(long* matrix, int rows, int cols)}; +%apply (unsigned long* IN_ARRAY2, int DIM1, int DIM2) + {(unsigned long* matrix, int rows, int cols)}; +%apply (long long* IN_ARRAY2, int DIM1, int DIM2) + {(long long* matrix, int rows, int cols)}; +%apply (unsigned long long* IN_ARRAY2, int DIM1, int DIM2) + {(unsigned long long* matrix, int rows, int cols)}; +%apply (float* IN_ARRAY2, int DIM1, int DIM2) + {(float* matrix, int rows, int cols)}; +%apply (double* IN_ARRAY2, int DIM1, int DIM2) + {(double* matrix, int rows, int cols)}; +%apply (long double* IN_ARRAY2, int DIM1, int DIM2) + {(long double* matrix, int rows, int cols)}; -/* Include the header file to be wrapped */ +// Apply the Numeric typemaps for 2D input/output arrays +%apply (signed char* INPLACE_ARRAY2, int DIM1, int DIM2) + {(signed char* array, int rows, int cols)}; +%apply (unsigned char* INPLACE_ARRAY2, int DIM1, int DIM2) + {(unsigned char* array, int rows, int cols)}; +%apply (short* INPLACE_ARRAY2, int DIM1, int DIM2) + {(short* array, int rows, int cols)}; +%apply (unsigned short* INPLACE_ARRAY2, int DIM1, int DIM2) + {(unsigned short* array, int rows, int cols)}; +%apply (int* INPLACE_ARRAY2, int DIM1, int DIM2) + {(int* array, int rows, int cols)}; +%apply (unsigned int* INPLACE_ARRAY2, int DIM1, int DIM2) + {(unsigned int* array, int rows, int cols)}; +%apply (long* INPLACE_ARRAY2, int DIM1, int DIM2) + {(long* array, int rows, int cols)}; +%apply (unsigned long* INPLACE_ARRAY2, int DIM1, int DIM2) + {(unsigned long* array, int rows, int cols)}; +%apply (long long* INPLACE_ARRAY2, int DIM1, int DIM2) + {(long long* array, int rows, int cols)}; +%apply (unsigned long long* INPLACE_ARRAY2, int DIM1, int DIM2) + {(unsigned long long* array, int rows, int cols)}; +%apply (float* INPLACE_ARRAY2, int DIM1, int DIM2) + {(float* array, int rows, int cols)}; +%apply (double* INPLACE_ARRAY2, int DIM1, int DIM2) + {(double* array, int rows, int cols)}; +%apply (long double* INPLACE_ARRAY2, int DIM1, int DIM2) + {(long double* array, int rows, int cols)}; + +// Include the header file to be wrapped %include "series.h" Modified: trunk/numpy/doc/swig/numpy.i =================================================================== --- trunk/numpy/doc/swig/numpy.i 2007-03-12 17:07:19 UTC (rev 3573) +++ trunk/numpy/doc/swig/numpy.i 2007-03-14 15:47:12 UTC (rev 3574) @@ -6,10 +6,11 @@ #include "stdio.h" #include -/* The following code originally appeared in enthought/kiva/agg/src/numeric.i, - * author unknown. It was translated from C++ to C by John Hunter. Bill - * Spotz has modified it slightly to fix some minor bugs, add some comments - * and some functionality. +/* The following code originally appeared in + * enthought/kiva/agg/src/numeric.i, author unknown. It was + * translated from C++ to C by John Hunter. Bill Spotz has modified + * it slightly to fix some minor bugs, upgrade to numpy (all + * versions), add some comments and some functionality. */ /* Macros to extract array attributes. @@ -20,6 +21,37 @@ #define array_size(a,i) (((PyArrayObject *)a)->dimensions[i]) #define array_is_contiguous(a) (PyArray_ISCONTIGUOUS(a)) +/* Support older NumPy data type names +*/ +#if NDARRAY_VERSION < 0x01000000 +#define NPY_BOOL PyArray_BOOL +#define NPY_BYTE PyArray_BYTE +#define NPY_UBYTE PyArray_UBYTE +#define NPY_SHORT PyArray_SHORT +#define NPY_USHORT PyArray_USHORT +#define NPY_INT PyArray_INT +#define NPY_UINT PyArray_UINT +#define NPY_LONG PyArray_LONG +#define NPY_ULONG PyArray_ULONG +#define NPY_LONGLONG PyArray_LONGLONG +#define NPY_ULONGLONG PyArray_ULONGLONG +#define NPY_FLOAT PyArray_FLOAT +#define NPY_DOUBLE PyArray_DOUBLE +#define NPY_LONGDOUBLE PyArray_LONGDOUBLE +#define NPY_CFLOAT PyArray_CFLOAT +#define NPY_CDOUBLE PyArray_CDOUBLE +#define NPY_CLONGDOUBLE PyArray_CLONGDOUBLE +#define NPY_OBJECT PyArray_OBJECT +#define NPY_STRING PyArray_STRING +#define NPY_UNICODE PyArray_UNICODE +#define NPY_VOID PyArray_VOID +#define NPY_NTYPES PyArray_NTYPES +#define NPY_NOTYPE PyArray_NOTYPE +#define NPY_CHAR PyArray_CHAR +#define NPY_USERDEF PyArray_USERDEF +#define npy_intp intp +#endif + /* Given a PyObject, return a string describing its type. */ char* pytype_string(PyObject* py_obj) { @@ -38,13 +70,18 @@ return "unkown type"; } -/* Given a Numeric typecode, return a string describing the type. +/* Given a NumPy typecode, return a string describing the type. */ char* typecode_string(int typecode) { - char* type_names[20] = {"char","unsigned byte","byte","short", - "unsigned short","int","unsigned int","long", - "float","double","complex float","complex double", - "object","ntype","unkown"}; + static char* type_names[24] = {"bool", "byte", "unsigned byte", + "short", "unsigned short", "int", + "unsigned int", "long", "unsigned long", + "long long", "unsigned long long", + "float", "double", "long double", + "complex float", "complex double", + "complex long double", "object", + "string", "unicode", "void", "ntypes", + "notype", "char"}; return type_names[typecode]; } @@ -57,45 +94,43 @@ /* Given a PyObject pointer, cast it to a PyArrayObject pointer if * legal. If not, set the python error string appropriately and - * return NULL./ + * return NULL. */ PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode) { PyArrayObject* ary = NULL; - if (is_array(input) && (typecode == PyArray_NOTYPE || - PyArray_EquivTypenums(array_type(input), - typecode))) { - ary = (PyArrayObject*) input; - } - else if is_array(input) { - char* desired_type = typecode_string(typecode); - char* actual_type = typecode_string(array_type(input)); - PyErr_Format(PyExc_TypeError, - "Array of type '%s' required. Array of type '%s' given", - desired_type, actual_type); - ary = NULL; - } - else { - char * desired_type = typecode_string(typecode); - char * actual_type = pytype_string(input); - PyErr_Format(PyExc_TypeError, - "Array of type '%s' required. A %s was given", - desired_type, actual_type); - ary = NULL; - } + if (is_array(input) && (typecode == NPY_NOTYPE || + type_match(array_type(input), typecode))) { + ary = (PyArrayObject*) input; + } + else if is_array(input) { + char* desired_type = typecode_string(typecode); + char* actual_type = typecode_string(array_type(input)); + PyErr_Format(PyExc_TypeError, + "Array of type '%s' required. Array of type '%s' given", + desired_type, actual_type); + ary = NULL; + } + else { + char * desired_type = typecode_string(typecode); + char * actual_type = pytype_string(input); + PyErr_Format(PyExc_TypeError, + "Array of type '%s' required. A %s was given", + desired_type, actual_type); + ary = NULL; + } return ary; } -/* Convert the given PyObject to a Numeric array with the given +/* Convert the given PyObject to a NumPy array with the given * typecode. On Success, return a valid PyArrayObject* with the * correct type. On failure, the python error string will be set and * the routine returns NULL. */ PyArrayObject* obj_to_array_allow_conversion(PyObject* input, int typecode, - int* is_new_object) -{ + int* is_new_object) { PyArrayObject* ary = NULL; PyObject* py_obj; - if (is_array(input) && (typecode == PyArray_NOTYPE || type_match(array_type(input),typecode))) { + if (is_array(input) && (typecode == NPY_NOTYPE || type_match(array_type(input),typecode))) { ary = (PyArrayObject*) input; *is_new_object = 0; } @@ -114,8 +149,7 @@ * flag it as a new object and return the pointer. */ PyArrayObject* make_contiguous(PyArrayObject* ary, int* is_new_object, - int min_dims, int max_dims) -{ + int min_dims, int max_dims) { PyArrayObject* result; if (array_is_contiguous(ary)) { result = ary; @@ -216,7 +250,7 @@ * array has the specified shape, return 1. Otherwise, set the python * error string and return 0. */ -int require_size(PyArrayObject* ary, int* size, int n) { +int require_size(PyArrayObject* ary, npy_intp* size, int n) { int i; int success = 1; int len; @@ -253,236 +287,202 @@ } return success; } -/* End John Hunter translation (with modifications by Bill Spotz) */ +/* End John Hunter translation (with modifications by Bill Spotz) + */ %} -/* TYPEMAP_IN macros +/* %numpy_typemaps() macro * - * This family of typemaps allows pure input C arguments of the form + * This macro defines a family of typemaps that allow pure input C + * arguments of the form * - * (type* IN_ARRAY1, int DIM1) - * (type* IN_ARRAY2, int DIM1, int DIM2) + * (TYPE* IN_ARRAY1, int DIM1) + * (TYPE* IN_ARRAY2, int DIM1, int DIM2) + * (TYPE* INPLACE_ARRAY1, int DIM1) + * (TYPE* INPLACE_ARRAY2, int DIM1, int DIM2) + * (TYPE* ARGOUT_ARRAY1[ANY]) + * (TYPE* ARGOUT_ARRAY2[ANY][ANY]) * - * where "type" is any type supported by the Numeric module, to be - * called in python with an argument list of a single array (or any - * python object that can be passed to the Numeric.array constructor - * to produce an arrayof te specified shape). This can be applied to - * a existing functions using the %apply directive: + * where "TYPE" is any type supported by the NumPy module. In python, + * the dimensions will not need to be specified. The IN_ARRAYs can be + * a numpy array or any sequence that can be converted to a numpy + * array of the specified type. The INPLACE_ARRAYs must be numpy + * arrays of the appropriate type. The ARGOUT_ARRAYs will be returned + * as numpy arrays of the appropriate type. + + * These typemaps can be applied to existing functions using the + * %apply directive: * - * %apply (double* IN_ARRAY1, int DIM1) {double* series, int length} - * %apply (double* IN_ARRAY2, int DIM1, int DIM2) {double* mx, int rows, int cols} + * %apply (double* IN_ARRAY1, int DIM1) {double* series, int length}; * double sum(double* series, int length); + * + * %apply (double* IN_ARRAY2, int DIM1, int DIM2) {double* mx, int rows, int cols}; * double max(double* mx, int rows, int cols); * - * or with + * %apply (double* INPLACE_ARRAY1, int DIM1) {double* series, int length}; + * void negate(double* series, int length); * + * %apply (double* INPLACE_ARRAY2, int DIM1, int DIM2) {double* mx, int rows, int cols}; + * void normalize(double* mx, int rows, int cols); + * + * %apply (double* ARGOUT_ARRAY1[ANY] {double series, int length}; + * void negate(double* series, int length); + * + * %apply (double* ARGOUT_ARRAY2[ANY][ANY]) {double* mx, int rows, int cols}; + * void normalize(double* mx, int rows, int cols); + * + * or directly with + * * double sum(double* IN_ARRAY1, int DIM1); * double max(double* IN_ARRAY2, int DIM1, int DIM2); + * void sum(double* INPLACE_ARRAY1, int DIM1); + * void sum(double* INPLACE_ARRAY2, int DIM1, int DIM2); + * void sum(double* ARGOUT_ARRAY1[ANY]); + * void sum(double* ARGOUT_ARRAY2[ANY][ANY]); */ -/* One dimensional input arrays */ -%define TYPEMAP_IN1(type,typecode) -%typemap(in) (type* IN_ARRAY1, int DIM1) - (PyArrayObject* array=NULL, int is_new_object) { - int size[1] = {-1}; - array = obj_to_array_contiguous_allow_conversion($input, typecode, &is_new_object); - if (!array || !require_dimensions(array,1) || !require_size(array,size,1)) SWIG_fail; - $1 = (type*) array->data; - $2 = array->dimensions[0]; +%define %numpy_typemaps(TYPE, TYPECODE) + +/* Typemap suite for (TYPE* IN_ARRAY1, int DIM1) + */ +%typemap(in) (TYPE* IN_ARRAY1, int DIM1) + (PyArrayObject* array=NULL, int is_new_object=0) { + array = obj_to_array_contiguous_allow_conversion($input, TYPECODE, &is_new_object); + npy_intp size[1] = {-1}; + if (!array || !require_dimensions(array, 1) || !require_size(array, size, 1)) SWIG_fail; + $1 = (TYPE*) array->data; + $2 = (int) array->dimensions[0]; } -%typemap(freearg) (type* IN_ARRAY1, int DIM1) { +%typemap(freearg) (TYPE* IN_ARRAY1, int DIM1) { if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); } -%enddef -/* Define concrete examples of the TYPEMAP_IN1 macros */ -TYPEMAP_IN1(char, PyArray_CHAR ) -TYPEMAP_IN1(unsigned char, PyArray_UBYTE ) -TYPEMAP_IN1(signed char, PyArray_SBYTE ) -TYPEMAP_IN1(short, PyArray_SHORT ) -TYPEMAP_IN1(int, PyArray_INT ) -TYPEMAP_IN1(long, PyArray_LONG ) -TYPEMAP_IN1(float, PyArray_FLOAT ) -TYPEMAP_IN1(double, PyArray_DOUBLE) -TYPEMAP_IN1(PyObject, PyArray_OBJECT) - -#undef TYPEMAP_IN1 - - /* Two dimensional input arrays */ -%define TYPEMAP_IN2(type,typecode) - %typemap(in) (type* IN_ARRAY2, int DIM1, int DIM2) - (PyArrayObject* array=NULL, int is_new_object) { - int size[2] = {-1,-1}; - array = obj_to_array_contiguous_allow_conversion($input, typecode, &is_new_object); - if (!array || !require_dimensions(array,2) || !require_size(array,size,1)) SWIG_fail; - $1 = (type*) array->data; - $2 = array->dimensions[0]; - $3 = array->dimensions[1]; +/* Typemap suite for (TYPE* IN_ARRAY2, int DIM1, int DIM2) + */ +%typemap(in) (TYPE* IN_ARRAY2, int DIM1, int DIM2) + (PyArrayObject* array=NULL, int is_new_object=0) { + array = obj_to_array_contiguous_allow_conversion($input, TYPECODE, &is_new_object); + npy_intp size[2] = {-1,-1}; + if (!array || !require_dimensions(array, 2) || !require_size(array, size, 1)) SWIG_fail; + $1 = (TYPE*) array->data; + $2 = (int) array->dimensions[0]; + $3 = (int) array->dimensions[1]; } -%typemap(freearg) (type* IN_ARRAY2, int DIM1, int DIM2) { +%typemap(freearg) (TYPE* IN_ARRAY2, int DIM1, int DIM2) { if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); } -%enddef -/* Define concrete examples of the TYPEMAP_IN2 macros */ -TYPEMAP_IN2(char, PyArray_CHAR ) -TYPEMAP_IN2(unsigned char, PyArray_UBYTE ) -TYPEMAP_IN2(signed char, PyArray_SBYTE ) -TYPEMAP_IN2(short, PyArray_SHORT ) -TYPEMAP_IN2(int, PyArray_INT ) -TYPEMAP_IN2(long, PyArray_LONG ) -TYPEMAP_IN2(float, PyArray_FLOAT ) -TYPEMAP_IN2(double, PyArray_DOUBLE) -TYPEMAP_IN2(PyObject, PyArray_OBJECT) - -#undef TYPEMAP_IN2 - -/* TYPEMAP_INPLACE macros - * - * This family of typemaps allows input/output C arguments of the form - * - * (type* INPLACE_ARRAY1, int DIM1) - * (type* INPLACE_ARRAY2, int DIM1, int DIM2) - * - * where "type" is any type supported by the Numeric module, to be - * called in python with an argument list of a single contiguous - * Numeric array. This can be applied to an existing function using - * the %apply directive: - * - * %apply (double* INPLACE_ARRAY1, int DIM1) {double* series, int length} - * %apply (double* INPLACE_ARRAY2, int DIM1, int DIM2) {double* mx, int rows, int cols} - * void negate(double* series, int length); - * void normalize(double* mx, int rows, int cols); - * - * - * or with - * - * void sum(double* INPLACE_ARRAY1, int DIM1); - * void sum(double* INPLACE_ARRAY2, int DIM1, int DIM2); +/* Typemap suite for (TYPE* INPLACE_ARRAY1, int DIM1) */ - - /* One dimensional input/output arrays */ -%define TYPEMAP_INPLACE1(type,typecode) -%typemap(in) (type* INPLACE_ARRAY1, int DIM1) (PyArrayObject* temp=NULL) { - int i; - temp = obj_to_array_no_conversion($input,typecode); +%typemap(in) (TYPE* INPLACE_ARRAY1, int DIM1) (PyArrayObject* temp=NULL) { + temp = obj_to_array_no_conversion($input, TYPECODE); if (!temp || !require_contiguous(temp)) SWIG_fail; - $1 = (type*) temp->data; + $1 = (TYPE*) temp->data; $2 = 1; - for (i=0; ind; ++i) $2 *= temp->dimensions[i]; + for (int i=0; ind; ++i) $2 *= temp->dimensions[i]; } -%enddef -/* Define concrete examples of the TYPEMAP_INPLACE1 macro */ -TYPEMAP_INPLACE1(char, PyArray_CHAR ) -TYPEMAP_INPLACE1(unsigned char, PyArray_UBYTE ) -TYPEMAP_INPLACE1(signed char, PyArray_SBYTE ) -TYPEMAP_INPLACE1(short, PyArray_SHORT ) -TYPEMAP_INPLACE1(int, PyArray_INT ) -TYPEMAP_INPLACE1(long, PyArray_LONG ) -TYPEMAP_INPLACE1(float, PyArray_FLOAT ) -TYPEMAP_INPLACE1(double, PyArray_DOUBLE) -TYPEMAP_INPLACE1(PyObject, PyArray_OBJECT) - -#undef TYPEMAP_INPLACE1 - - /* Two dimensional input/output arrays */ -%define TYPEMAP_INPLACE2(type,typecode) - %typemap(in) (type* INPLACE_ARRAY2, int DIM1, int DIM2) (PyArrayObject* temp=NULL) { - temp = obj_to_array_no_conversion($input,typecode); +/* Typemap suite for (TYPE* INPLACE_ARRAY2, int DIM1, int DIM2) + */ +%typemap(in) (TYPE* INPLACE_ARRAY2, int DIM1, int DIM2) (PyArrayObject* temp=NULL) { + temp = obj_to_array_no_conversion($input, TYPECODE); if (!temp || !require_contiguous(temp)) SWIG_fail; - $1 = (type*) temp->data; - $2 = temp->dimensions[0]; - $3 = temp->dimensions[1]; + $1 = (TYPE*) temp->data; + $2 = (int) temp->dimensions[0]; + $3 = (int) temp->dimensions[1]; } -%enddef -/* Define concrete examples of the TYPEMAP_INPLACE2 macro */ -TYPEMAP_INPLACE2(char, PyArray_CHAR ) -TYPEMAP_INPLACE2(unsigned char, PyArray_UBYTE ) -TYPEMAP_INPLACE2(signed char, PyArray_SBYTE ) -TYPEMAP_INPLACE2(short, PyArray_SHORT ) -TYPEMAP_INPLACE2(int, PyArray_INT ) -TYPEMAP_INPLACE2(long, PyArray_LONG ) -TYPEMAP_INPLACE2(float, PyArray_FLOAT ) -TYPEMAP_INPLACE2(double, PyArray_DOUBLE) -TYPEMAP_INPLACE2(PyObject, PyArray_OBJECT) +/* Typemap suite for (TYPE ARGOUT_ARRAY1[ANY]) + */ +%typemap(in,numinputs=0) (TYPE ARGOUT_ARRAY1[ANY]) { + $1 = (TYPE*) malloc($1_dim0*sizeof(TYPE)); + if (!$1) { + PyErr_SetString(PyExc_RuntimeError, "Failed to allocate memory"); + SWIG_fail; + } +} +%typemap(argout) (TYPE ARGOUT_ARRAY1[ANY]) { + PyObject * obj = NULL; + npy_intp dimensions[1] = { $1_dim0 }; + PyObject* outArray = PyArray_FromDimsAndData(1, dimensions, TYPECODE, (char*)$1); + if ($result == Py_None) { + Py_DECREF($result); + $result = outArray; + } + else { + if (!PyTuple_Check($result)) $result = Py_BuildValue("(O)", $result); + obj = Py_Build_Value("(O)", outArray); + $result = PySequence_Concat($result, obj); + } +} -#undef TYPEMAP_INPLACE2 - -/* TYPEMAP_ARGOUT macros - * - * This family of typemaps allows output C arguments of the form - * - * (type* ARGOUT_ARRAY[ANY]) - * (type* ARGOUT_ARRAY[ANY][ANY]) - * - * where "type" is any type supported by the Numeric module, to be - * called in python with an argument list of a single contiguous - * Numeric array. This can be applied to an existing function using - * the %apply directive: - * - * %apply (double* ARGOUT_ARRAY[ANY] {double series, int length} - * %apply (double* ARGOUT_ARRAY[ANY][ANY]) {double* mx, int rows, int cols} - * void negate(double* series, int length); - * void normalize(double* mx, int rows, int cols); - * - * - * or with - * - * void sum(double* ARGOUT_ARRAY[ANY]); - * void sum(double* ARGOUT_ARRAY[ANY][ANY]); +/* Typemap suite for (TYPE ARGOUT_ARRAY2[ANY][ANY]) */ - - /* One dimensional input/output arrays */ -%define TYPEMAP_ARGOUT1(type,typecode) -%typemap(in,numinputs=0) type ARGOUT_ARRAY[ANY] { - $1 = (type*) malloc($1_dim0*sizeof(type)); +%typemap(in,numinputs=0) (TYPE ARGOUT_ARRAY2[ANY][ANY]) { + $1 = (TYPE*) malloc($1_dim0 * $1_dim1 * sizeof(TYPE)); if (!$1) { PyErr_SetString(PyExc_RuntimeError, "Failed to allocate memory"); SWIG_fail; } } -%typemap(argout) ARGOUT_ARRAY[ANY] { - int dimensions[1] = {$1_dim0}; - PyObject* outArray = PyArray_FromDimsAndData(1, dimensions, typecode, (char*)$1); +%typemap(argout) (TYPE ARGOUT_ARRAY1[ANY][ANY]) { + PyObject * obj = NULL; + npy_intp dimensions[2] = { $1_dim0, $1_dim1 }; + PyObject* outArray = PyArray_FromDimsAndData(1, dimensions, TYPECODE, (char*)$1); + if ($result == Py_None) { + Py_DECREF($result); + $result = outArray; + } + else { + if (!PyTuple_Check($result)) $result = Py_BuildValue("(O)", $result); + obj = Py_Build_Value("(O)", outArray); + $result = PySequence_Concat($result, obj); + } } -%enddef -/* Define concrete examples of the TYPEMAP_ARGOUT1 macro */ -TYPEMAP_ARGOUT1(char, PyArray_CHAR ) -TYPEMAP_ARGOUT1(unsigned char, PyArray_UBYTE ) -TYPEMAP_ARGOUT1(signed char, PyArray_SBYTE ) -TYPEMAP_ARGOUT1(short, PyArray_SHORT ) -TYPEMAP_ARGOUT1(int, PyArray_INT ) -TYPEMAP_ARGOUT1(long, PyArray_LONG ) -TYPEMAP_ARGOUT1(float, PyArray_FLOAT ) -TYPEMAP_ARGOUT1(double, PyArray_DOUBLE) -TYPEMAP_ARGOUT1(PyObject, PyArray_OBJECT) +%enddef /* %numpy_typemaps() macro */ -#undef TYPEMAP_ARGOUT1 - /* Two dimensional input/output arrays */ -%define TYPEMAP_ARGOUT2(type,typecode) - %typemap(in) (type* ARGOUT_ARRAY2, int DIM1, int DIM2) (PyArrayObject* temp=NULL) { - temp = obj_to_array_no_conversion($input,typecode); - if (!temp || !require_contiguous(temp)) SWIG_fail; - $1 = (type*) temp->data; - $2 = temp->dimensions[0]; - $3 = temp->dimensions[1]; -} -%enddef +/* Concrete instances of the %numpy_typemaps() macro: Each invocation + * below applies all of the typemaps above to the specified data type. + */ +%numpy_typemaps(signed char, NPY_BYTE ) /**/ +%numpy_typemaps(unsigned char, NPY_UBYTE ) /**/ +%numpy_typemaps(short, NPY_SHORT ) /**/ +%numpy_typemaps(unsigned short, NPY_USHORT ) /**/ +%numpy_typemaps(int, NPY_INT ) /**/ +%numpy_typemaps(unsigned int, NPY_UINT ) /**/ +%numpy_typemaps(long, NPY_LONG ) /**/ +%numpy_typemaps(unsigned long, NPY_ULONG ) /**/ +%numpy_typemaps(long long, NPY_LONGLONG ) /**/ +%numpy_typemaps(unsigned long long, NPY_ULONGLONG) /**/ +%numpy_typemaps(float, NPY_FLOAT ) /**/ +%numpy_typemaps(double, NPY_DOUBLE ) /**/ +%numpy_typemaps(PyObject, NPY_OBJECT ) +%numpy_typemaps(char, NPY_CHAR ) -/* Define concrete examples of the TYPEMAP_ARGOUT2 macro */ -TYPEMAP_ARGOUT2(char, PyArray_CHAR ) -TYPEMAP_ARGOUT2(unsigned char, PyArray_UBYTE ) -TYPEMAP_ARGOUT2(signed char, PyArray_SBYTE ) -TYPEMAP_ARGOUT2(short, PyArray_SHORT ) -TYPEMAP_ARGOUT2(int, PyArray_INT ) -TYPEMAP_ARGOUT2(long, PyArray_LONG ) -TYPEMAP_ARGOUT2(float, PyArray_FLOAT ) -TYPEMAP_ARGOUT2(double, PyArray_DOUBLE) -TYPEMAP_ARGOUT2(PyObject, PyArray_OBJECT) +/* *************************************************************** + * The follow macro expansion does not work, because C++ bool is 4 + * bytes and NPY_BOOL is 1 byte + */ +/*%numpy_typemaps(bool, NPY_BOOL) + */ -#undef TYPEMAP_ARGOUT2 +/* *************************************************************** + * On my Mac, I get the following warning for this macro expansion: + * 'swig/python detected a memory leak of type 'long double *', no destructor found.' + */ +/*%numpy_typemaps(long double, NPY_LONGDOUBLE) + */ + +/* *************************************************************** + * Swig complains about a syntax error for the following macros + * expansions: + */ +/*%numpy_typemaps(complex float, NPY_CFLOAT ) + */ +/*%numpy_typemaps(complex double, NPY_CDOUBLE ) + */ +/*%numpy_typemaps(complex long double, NPY_CLONGDOUBLE) + */ Added: trunk/numpy/doc/swig/numpy_swig.html =================================================================== --- trunk/numpy/doc/swig/numpy_swig.html 2007-03-12 17:07:19 UTC (rev 3573) +++ trunk/numpy/doc/swig/numpy_swig.html 2007-03-14 15:47:12 UTC (rev 3574) @@ -0,0 +1,604 @@ + + + + + +numpy.i: a SWIG Interface File for NumPy + + + + + +
+

numpy.i: a SWIG Interface File for NumPy

+ +++ + + + + + + + +
Author:Bill Spotz
Institution:Sandia National Laboratories
Date:10 March, 2007
+
+

Introduction

+

The Simple Wrapper and Interface Generator (or SWIG) is a powerful tool for generating wrapper +code for interfacing to a wide variety of scripting languages. +SWIG can parse header files, and using only the code prototypes, +create an interface to the target language. But SWIG is not +omnipotent. For example, it cannot know from the prototype:

+
+double rms(double* seq, int n);
+
+

what exactly seq is. Is it a single value to be altered in-place? +Is it an array, and if so what is its length? Is it input-only? +Output-only? Input-output? SWIG cannot determine these details, +and does not attempt to do so.

+

Making an educated guess, humans can conclude that this is probably a +routine that takes an input-only array of length n of double +values called seq and returns the root mean square. The default +behavior of SWIG, however, will be to create a wrapper function +that compiles, but is nearly impossible to use from the scripting +language in the way the C routine was intended.

+

For python, the preferred way of handling +contiguous (or technically, strided) blocks of homogeneous data is +with the module NumPy, which provides full +object-oriented access to arrays of data. Therefore, the most logical +python interface for the rms function would be:

+
+def rms(seq):
+
+

where seq would be a NumPy array of double values, and its +length n would be extracted from seq internally before being +passed to the C routine. Even better, since NumPy supports +construction of arrays from arbitrary python sequences, seq +itself could be a nearly arbitrary sequence (so long as each element +can be converted to a double) and the wrapper code would +internally convert it to a NumPy array before extracting its data +and length.

+

SWIG allows these types of conversions to be defined via a +mechanism called typemaps. This document provides information on how +to use numpy.i, a SWIG interface file that defines a series of +typemaps intended to make the type of array-related conversions +described above relatively simple to implement. For example, suppose +that the rms function prototype defined above was in a header file +named rms.h. To obtain the python interface discussed above, your +SWIG interface file would need the following:

+
+%{
+#include "rms.h"
+%}
+%include "numpy.i"
+%apply (double* IN_ARRAY1, int DIM1) {(double* seq, int n)};
+%include "rms.h"
+
+

Typemaps are keyed off a list of one or more function arguments, +either by type or by type and name. We will refer to such lists as +signatures. One of the many typemaps defined by numpy.i is used +above and has the signature (double* IN_ARRAY1, int DIM1). The +argument names are intended to suggest that the double* argument +is an input array of one dimension and that the int represents +that dimension. This is precisely the pattern in the rms +prototype.

+

Hopefully, no actual prototypes to be wrapped will have the names +IN_ARRAY1 and DIM1. We use the %apply directive to apply +the typemap for one-dimensional input arrays of type double to the +actual prototype used by rms. Using numpy.i effectively, +therefore, requires knowing what typemaps are available and what they +do.

+
+
+

Using numpy.i

+

The numpy.i file is currently located in the numpy/docs/swig +sub-directory under the numpy installation directory. Typically, +you will want to copy it to the directory where you are developing +your wrappers.

+

A simple module that only uses a single SWIG interface file should +include the following:

+
+%{
+#define SWIG_FILE_WITH_INIT
+%}
+%include "numpy.i"
+%init %{
+import_array();
+%}
+
+

Only one interface file should call import_array(). If you have +more than one SWIG interface file, then subsequent files should not +#define SWIG_FILE_WITH_INIT and should not call +import_array().

+
+
+

Available Typemaps

+

The typemap directives provided by numpy.i for arrays of different +data types, say double and int, are identical to one another +except for the C and NumPy type specifications. The typemaps are +therefore implemented via a macro:

+
+%numpy_typemaps(TYPE, TYPECODE)
+
+

that can be invoked for appropriate (TYPE, TYPECODE) pairs. For +example:

+
+%numpy_typemaps(double, NPY_DOUBLE)
+%numpy_typemaps(int,    NPY_INT   )
+
+

The numpy.i interface file uses the %numpy_typemaps macro to +implement typemaps for the following C-types:

+
+
    +
  • signed char
  • +
  • unsigned char
  • +
  • short
  • +
  • unsigned short
  • +
  • int
  • +
  • unsigned int
  • +
  • long
  • +
  • unsigned long
  • +
  • long long
  • +
  • unsigned long long
  • +
  • float
  • +
  • double
  • +
  • PyObject
  • +
  • char
  • +
+
+

Note that C++ type bool is not supported in the list above. NumPy +bools are a single byte, while the C++ bool is four bytes (at +least on my system). Therefore:

+
+%numpy_typemaps(bool, NPY_BOOL)
+
+

will result in typemaps that will produce code that reference +improper data lengths. You can implement the following macro +expansion:

+
+%numpy_typemaps(bool, NPY_UINT)
+
+

to fix the data length problem, and Input Arrays will work fine, +but In-place Arrays will fail type-checking.

+

In the following descriptions, we reference a generic TYPE, which +could be any of the C-types listed above.

+
+

Input Arrays

+

Input arrays are defined as arrays of data that are passed into a +routine but are not altered in-place or returned to the user. The +python input array is therefore allowed to be almost any python +sequence (such as a list) that can be converted to the requested type +of array. The input array signatures are

+
+
    +
  • (TYPE* IN_ARRAY1, int DIM1)
  • +
  • (TYPE* IN_ARRAY2, int DIM1, int DIM2)
  • +
+
+
+
+

In-place Arrays

+

In-place arrays are defined as arrays that are modified in-place. The +input values may or may not be used, but the values at the time the +function returns are significant. The provided python argument must +therefore be a NumPy array of the required type. The in-place +signatures are

+
+
    +
  • (TYPE* INPLACE_ARRAY1, int DIM1)
  • +
  • (TYPE* INPLACE_ARRAY2, int DIM1, int DIM2)
  • +
+
+
+
+

Argout Arrays

+

Argout arrays are arrays that appear in the input arguments in C, but +are in fact output arrays. This pattern occurs often when there is +more than one output variable and the single return argument is +therefore not sufficient. In python, the convential way to return +multiple arguments is to pack them into a tuple and return the tuple. +This is what the argout typemaps do. If a wrapped function that uses +argout these argout typemaps has more than one return argument, they +are so packed. The python user does not pass these arrays in, they +simply get returned. The argout signatures are

+
+
    +
  • (TYPE ARGOUT_ARRAY1[ANY])
  • +
  • (TYPE ARGOUT_ARRAY2[ANY][ANY])
  • +
+
+
+
+
+

Helper Functions

+

The numpy.i file containes several macros and routines that it +uses internally to build its typemaps. However, these functions may +be useful elsewhere in your interface file.

+
+

Macros

+
+
+
is_array(a)
+
Evaluates as true if a is non-NULL and can be cast to a +PyArrayObject*.
+
array_type(a)
+
Evaluates to the integer data type code of a, assuming a can +be cast to a PyArrayObject*.
+
array_dimensions(a)
+
Evaluates to the integer number of dimensions of a, assuming +a can be cast to a PyArrayObject*.
+
array_size(a,i)
+
Evaluates to the i-th dimension size of a, assuming a +can be cast to a PyArrayObject*.
+
array_is_contiguous(a)
+
Evaluates as true if a is a contiguous array. Equivalent to +(PyArray_ISCONTIGUOUS(a)).
+
+
+
+
+

Routines

+
+
+
char* pytype_string(PyObject* py_obj)
+
Given a PyObject*, return a string describing its type.
+
char* typecode_string(int typecode)
+
Given a NumPy integer typecode, return a string describing the type.
+
int type_match(int actual_type, int desired_type)
+
Make sure input has correct NumPy type. Allow character and +byte to match. Also allow int and long to match.
+
PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode)
+
Given a PyObject*, cast it to a PyArrayObject* if legal. +If not, set the python error string appropriately and return +NULL.
+
PyArrayObject* obj_to_array_allow_conversion(PyObject* input, int typecode, int* is_new_object)
+
Convert the given PyObject* to a NumPy array with the given +typecode. On Success, return a valid PyArrayObject* with the +correct type. On failure, the python error string will be set and +the routine returns NULL.
+
PyArrayObject* make_contiguous(PyArrayObject* ary, int* is_new_object, int min_dims, int max_dims)
+
Given a PyArrayObject*, check to see if it is contiguous. If +so, return the input pointer and flag it as not a new object. If +it is not contiguous, create a new PyArrayObject* using the +original data, flag it as a new object and return the pointer.
+
PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input, int typecode, int* is_new_object)
+
Convert a given PyObject* to a contiguous PyArrayObject* +of the specified type. If the input object is not a contiguous +PyArrayObject*, a new one will be created and the new object +flag will be set.
+
int require_contiguous(PyArrayObject* ary)
+
Test whether a PyArrayObject* is contiguous. If array is +contiguous, return 1. Otherwise, set the python error string and +return 0.
+
int require_dimensions(PyArrayObject* ary, int exact_dimensions)
+
Require the given PyArrayObject* to have a specified number of +dimensions. If the array has the specified number of dimensions, +return 1. Otherwise, set the python error string and return 0.
+
int require_dimensions_n(PyArrayObject* ary, int* exact_dimensions, int n)
+
Require the given PyArrayObject* to have one of a list of +specified number of dimensions. If the array has one of the +specified number of dimensions, return 1. Otherwise, set the +python error string and return 0.
+
int require_size(PyArrayObject* ary, int* size, int n)
+
Require the given PyArrayObject* to have a specified shape. +If the array has the specified shape, return 1. Otherwise, set +the python error string and return 0.
+
static PyArrayObject *contiguous_typed_array(PyObject *obj, int typecode, int expectnd, int *expectdims)
+
This function tries to create a contiguous NumPy array of type +typecode from an arbitrary python object obj. This should +work for any sequence object. The argument expectnd is the +expected number of dimensions, ignored if <= 0. The argument +expectdims is an array of expected dimensions, ignored if <= +0. This routine raises a ValueError exception if the +underlying PyArray_ContiguousFromObject routine fails, if the +array has a bad shape, if the extent of a given dimension doesn't +match the specified extent. If obj is a contiguous +PyArrayObject* then a reference is returned; if obj is a +python sequence, then a new PyArrayObject* is created and +returned.
+
+
+
+
+
+

Acknowledgements

+

Many people have worked to glue SWIG and NumPy (and its +predecessors Numeric and numarray) together. The effort to +standardize this work into numpy.i began at the 2005 SciPy +Conference with a conversation between Fernando Perez and myself. +Fernando collected helper functions and typemaps from Michael Hunter, +Anna Omelchenko and Michael Sanner. Their work has made this end +result possible.

+
+
+ + + Added: trunk/numpy/doc/swig/numpy_swig.txt =================================================================== --- trunk/numpy/doc/swig/numpy_swig.txt 2007-03-12 17:07:19 UTC (rev 3573) +++ trunk/numpy/doc/swig/numpy_swig.txt 2007-03-14 15:47:12 UTC (rev 3574) @@ -0,0 +1,319 @@ +======================================== +numpy.i: a SWIG Interface File for NumPy +======================================== + +:Author: Bill Spotz +:Institution: Sandia National Laboratories +:Date: 10 March, 2007 + +Introduction +============ + +The Simple Wrapper and Interface Generator (or `SWIG +`_) is a powerful tool for generating wrapper +code for interfacing to a wide variety of scripting languages. +`SWIG`_ can parse header files, and using only the code prototypes, +create an interface to the target language. But `SWIG`_ is not +omnipotent. For example, it cannot know from the prototype:: + + double rms(double* seq, int n); + +what exactly ``seq`` is. Is it a single value to be altered in-place? +Is it an array, and if so what is its length? Is it input-only? +Output-only? Input-output? `SWIG`_ cannot determine these details, +and does not attempt to do so. + +Making an educated guess, humans can conclude that this is probably a +routine that takes an input-only array of length ``n`` of ``double`` +values called ``seq`` and returns the root mean square. The default +behavior of `SWIG`_, however, will be to create a wrapper function +that compiles, but is nearly impossible to use from the scripting +language in the way the C routine was intended. + +For `python `_, the preferred way of handling +contiguous (or technically, *strided*) blocks of homogeneous data is +with the module `NumPy `_, which provides full +object-oriented access to arrays of data. Therefore, the most logical +python interface for the ``rms`` function would be:: + + def rms(seq): + +where ``seq`` would be a `NumPy`_ array of ``double`` values, and its +length ``n`` would be extracted from ``seq`` internally before being +passed to the C routine. Even better, since `NumPy`_ supports +construction of arrays from arbitrary `python`_ sequences, ``seq`` +itself could be a nearly arbitrary sequence (so long as each element +can be converted to a ``double``) and the wrapper code would +internally convert it to a `NumPy`_ array before extracting its data +and length. + +`SWIG`_ allows these types of conversions to be defined via a +mechanism called typemaps. This document provides information on how +to use ``numpy.i``, a `SWIG`_ interface file that defines a series of +typemaps intended to make the type of array-related conversions +described above relatively simple to implement. For example, suppose +that the ``rms`` function prototype defined above was in a header file +named ``rms.h``. To obtain the python interface discussed above, your +`SWIG`_ interface file would need the following:: + + %{ + #include "rms.h" + %} + %include "numpy.i" + %apply (double* IN_ARRAY1, int DIM1) {(double* seq, int n)}; + %include "rms.h" + +Typemaps are keyed off a list of one or more function arguments, +either by type or by type and name. We will refer to such lists as +*signatures*. One of the many typemaps defined by ``numpy.i`` is used +above and has the signature ``(double* IN_ARRAY1, int DIM1)``. The +argument names are intended to suggest that the ``double*`` argument +is an input array of one dimension and that the ``int`` represents +that dimension. This is precisely the pattern in the ``rms`` +prototype. + +Hopefully, no actual prototypes to be wrapped will have the names +``IN_ARRAY1`` and ``DIM1``. We use the ``%apply`` directive to apply +the typemap for one-dimensional input arrays of type ``double`` to the +actual prototype used by ``rms``. Using ``numpy.i`` effectively, +therefore, requires knowing what typemaps are available and what they +do. + +Using numpy.i +============= + +The ``numpy.i`` file is currently located in the ``numpy/docs/swig`` +sub-directory under the ``numpy`` installation directory. Typically, +you will want to copy it to the directory where you are developing +your wrappers. + +A simple module that only uses a single `SWIG`_ interface file should +include the following:: + + %{ + #define SWIG_FILE_WITH_INIT + %} + %include "numpy.i" + %init %{ + import_array(); + %} + +Only one interface file should call ``import_array()``. If you have +more than one `SWIG`_ interface file, then subsequent files should not +``#define SWIG_FILE_WITH_INIT`` and should not call +``import_array()``. + +Available Typemaps +================== + +The typemap directives provided by ``numpy.i`` for arrays of different +data types, say ``double`` and ``int``, are identical to one another +except for the C and `NumPy`_ type specifications. The typemaps are +therefore implemented via a macro:: + + %numpy_typemaps(TYPE, TYPECODE) + +that can be invoked for appropriate ``(TYPE, TYPECODE)`` pairs. For +example:: + + %numpy_typemaps(double, NPY_DOUBLE) + %numpy_typemaps(int, NPY_INT ) + +The ``numpy.i`` interface file uses the ``%numpy_typemaps`` macro to +implement typemaps for the following C-types: + + * ``signed char`` + * ``unsigned char`` + * ``short`` + * ``unsigned short`` + * ``int`` + * ``unsigned int`` + * ``long`` + * ``unsigned long`` + * ``long long`` + * ``unsigned long long`` + * ``float`` + * ``double`` + * ``PyObject`` + * ``char`` + +Note that C++ type ``bool`` is not supported in the list above. NumPy +bools are a single byte, while the C++ ``bool`` is four bytes (at +least on my system). Therefore:: + + %numpy_typemaps(bool, NPY_BOOL) + +will result in typemaps that will produce code that reference +improper data lengths. You can implement the following macro +expansion:: + + %numpy_typemaps(bool, NPY_UINT) + +to fix the data length problem, and `Input Arrays`_ will work fine, +but `In-place Arrays`_ will fail type-checking. + +In the following descriptions, we reference a generic ``TYPE``, which +could be any of the C-types listed above. + +Input Arrays +------------ + +Input arrays are defined as arrays of data that are passed into a +routine but are not altered in-place or returned to the user. The +python input array is therefore allowed to be almost any python +sequence (such as a list) that can be converted to the requested type +of array. The input array signatures are + + * ``(TYPE* IN_ARRAY1, int DIM1)`` + * ``(TYPE* IN_ARRAY2, int DIM1, int DIM2)`` + +In-place Arrays +--------------- + +In-place arrays are defined as arrays that are modified in-place. The +input values may or may not be used, but the values at the time the +function returns are significant. The provided python argument must +therefore be a `NumPy`_ array of the required type. The in-place +signatures are + + * ``(TYPE* INPLACE_ARRAY1, int DIM1)`` + * ``(TYPE* INPLACE_ARRAY2, int DIM1, int DIM2)`` + +Argout Arrays +------------- + +Argout arrays are arrays that appear in the input arguments in C, but +are in fact output arrays. This pattern occurs often when there is +more than one output variable and the single return argument is +therefore not sufficient. In python, the convential way to return +multiple arguments is to pack them into a tuple and return the tuple. +This is what the argout typemaps do. If a wrapped function that uses +argout these argout typemaps has more than one return argument, they +are so packed. The python user does not pass these arrays in, they +simply get returned. The argout signatures are + + * ``(TYPE ARGOUT_ARRAY1[ANY])`` + * ``(TYPE ARGOUT_ARRAY2[ANY][ANY])`` + +Helper Functions +================ + +The ``numpy.i`` file containes several macros and routines that it +uses internally to build its typemaps. However, these functions may +be useful elsewhere in your interface file. + +Macros +------ + + **is_array(a)** + Evaluates as true if ``a`` is non-``NULL`` and can be cast to a + ``PyArrayObject*``. + + **array_type(a)** + Evaluates to the integer data type code of ``a``, assuming ``a`` can + be cast to a ``PyArrayObject*``. + + **array_dimensions(a)** + Evaluates to the integer number of dimensions of ``a``, assuming + ``a`` can be cast to a ``PyArrayObject*``. + + **array_size(a,i)** + Evaluates to the ``i``-th dimension size of ``a``, assuming ``a`` + can be cast to a ``PyArrayObject*``. + + **array_is_contiguous(a)** + Evaluates as true if ``a`` is a contiguous array. Equivalent to + ``(PyArray_ISCONTIGUOUS(a))``. + +Routines +-------- + + **char* pytype_string(PyObject* py_obj)** + Given a ``PyObject*``, return a string describing its type. + + + **char* typecode_string(int typecode)** + Given a `NumPy`_ integer typecode, return a string describing the type. + + + **int type_match(int actual_type, int desired_type)** + Make sure input has correct `NumPy`_ type. Allow character and + byte to match. Also allow int and long to match. + + + **PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode)** + Given a ``PyObject*``, cast it to a ``PyArrayObject*`` if legal. + If not, set the python error string appropriately and return + ``NULL``. + + + **PyArrayObject* obj_to_array_allow_conversion(PyObject* input, int typecode, int* is_new_object)** + Convert the given ``PyObject*`` to a `NumPy`_ array with the given + typecode. On Success, return a valid ``PyArrayObject*`` with the + correct type. On failure, the python error string will be set and + the routine returns ``NULL``. + + + **PyArrayObject* make_contiguous(PyArrayObject* ary, int* is_new_object, int min_dims, int max_dims)** + Given a ``PyArrayObject*``, check to see if it is contiguous. If + so, return the input pointer and flag it as not a new object. If + it is not contiguous, create a new ``PyArrayObject*`` using the + original data, flag it as a new object and return the pointer. + + + **PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input, int typecode, int* is_new_object)** + Convert a given ``PyObject*`` to a contiguous ``PyArrayObject*`` + of the specified type. If the input object is not a contiguous + ``PyArrayObject*``, a new one will be created and the new object + flag will be set. + + + **int require_contiguous(PyArrayObject* ary)** + Test whether a ``PyArrayObject*`` is contiguous. If array is + contiguous, return 1. Otherwise, set the python error string and + return 0. + + + **int require_dimensions(PyArrayObject* ary, int exact_dimensions)** + Require the given ``PyArrayObject*`` to have a specified number of + dimensions. If the array has the specified number of dimensions, + return 1. Otherwise, set the python error string and return 0. + + + **int require_dimensions_n(PyArrayObject* ary, int* exact_dimensions, int n)** + Require the given ``PyArrayObject*`` to have one of a list of + specified number of dimensions. If the array has one of the + specified number of dimensions, return 1. Otherwise, set the + python error string and return 0. + + + **int require_size(PyArrayObject* ary, int* size, int n)** + Require the given ``PyArrayObject*`` to have a specified shape. + If the array has the specified shape, return 1. Otherwise, set + the python error string and return 0. + + + **static PyArrayObject *contiguous_typed_array(PyObject *obj, int typecode, int expectnd, int *expectdims)** + This function tries to create a contiguous `NumPy`_ array of type + typecode from an arbitrary python object ``obj``. This should + work for any sequence object. The argument ``expectnd`` is the + expected number of dimensions, ignored if <= 0. The argument + ``expectdims`` is an array of expected dimensions, ignored if <= + 0. This routine raises a ``ValueError`` exception if the + underlying ``PyArray_ContiguousFromObject`` routine fails, if the + array has a bad shape, if the extent of a given dimension doesn't + match the specified extent. If ``obj`` is a contiguous + ``PyArrayObject*`` then a reference is returned; if ``obj`` is a + python sequence, then a new ``PyArrayObject*`` is created and + returned. + +Acknowledgements +================ + +Many people have worked to glue `SWIG`_ and `NumPy`_ (and its +predecessors Numeric and numarray) together. The effort to +standardize this work into ``numpy.i`` began at the 2005 SciPy +Conference with a conversation between Fernando Perez and myself. +Fernando collected helper functions and typemaps from Michael Hunter, +Anna Omelchenko and Michael Sanner. Their work has made this end +result possible. Modified: trunk/numpy/doc/swig/series.cxx =================================================================== --- trunk/numpy/doc/swig/series.cxx 2007-03-12 17:07:19 UTC (rev 3573) +++ trunk/numpy/doc/swig/series.cxx 2007-03-14 15:47:12 UTC (rev 3574) @@ -3,143 +3,68 @@ #include #include "series.h" -// *** One Dimensional Arrays *** - -// Functions that take 1D arrays of type SHORT as input -short shortSum(short* series, int size) { - short result = 0; - for (int i=0; i result) result = matrix[index]; \ + } \ + } \ + return result; \ +} \ +\ +void SNAME ## Floor(TYPE * array, int rows, int cols, TYPE floor) { \ + int i, j, index; \ + for (j=0; j result) result = matrix[index]; - } - } - return result; -} - -void intFloor(int* matrix, int rows, int cols, int floor) { - int i, j, index; - for (j=0; j result) result = matrix[index]; - } - } - return result; -} - -void doubleFloor(double* matrix, int rows, int cols, double floor) { - int i, j, index; - for (j=0; j Author: wfspotz at sandia.gov Date: 2007-03-14 14:57:23 -0500 (Wed, 14 Mar 2007) New Revision: 3575 Modified: trunk/numpy/doc/swig/README trunk/numpy/doc/swig/Series.i trunk/numpy/doc/swig/numpy.i trunk/numpy/doc/swig/numpy_swig.html trunk/numpy/doc/swig/numpy_swig.txt trunk/numpy/doc/swig/series.cxx trunk/numpy/doc/swig/series.h trunk/numpy/doc/swig/testSeries.py Log: Added typemap signatures where the dimensions come before the data pointer Modified: trunk/numpy/doc/swig/README =================================================================== --- trunk/numpy/doc/swig/README 2007-03-14 15:47:12 UTC (rev 3574) +++ trunk/numpy/doc/swig/README 2007-03-14 19:57:23 UTC (rev 3575) @@ -1,4 +1,4 @@ -Notes for the swig_numpy/new directory +Notes for the numpy/doc/swig directory ====================================== This set of files is for developing and testing file numpy.i, which is @@ -21,8 +21,12 @@ (type* IN_ARRAY1, int DIM1) (type* IN_ARRAY2, int DIM1, int DIM2) + (int DIM1, type* IN_ARRAY1)`` + (int DIM1, int DIM2, type* IN_ARRAY2)`` (type* INPLACE_ARRAY1, int DIM1) (type* INPLACE_ARRAY2, int DIM1, int DIM2) + (int DIM1, type* INPLACE_ARRAY1) + (int DIM1, int DIM2, type* INPLACE_ARRAY2) which take a pointer to an array of type "type", whose length is specified by the integer(s) DIM1 (and DIM2). @@ -30,10 +34,10 @@ The objective for the IN_ARRAY signatures is for SWIG to generate python wrappers that take a container that constitutes a valid argument to the numpy array constructor, and can be used to build an -array of type "type". Currently, types "char", "unsigned char", -"signed char", "short", "int", "long", "float", "double" and -"PyObject" are supported, although only the types "short", "int", -"long", "float" and "double" are tested. +array of type "type". Currently, types "signed char", "unsigned +char", "short", "unsigned short", "int", "unsigned int", "long", +"unsigned long", "long long", "unsigned long long", "float", "double", +"PyObject" and "char" are supported and tested. The objective for the INPLACE_ARRAY signatures is for SWIG to generate python wrappers that accept a numpy array of any of the above-listed Modified: trunk/numpy/doc/swig/Series.i =================================================================== --- trunk/numpy/doc/swig/Series.i 2007-03-14 15:47:12 UTC (rev 3574) +++ trunk/numpy/doc/swig/Series.i 2007-03-14 19:57:23 UTC (rev 3575) @@ -6,124 +6,38 @@ #include "series.h" %} -// Get the Numeric typemaps +// Get the NumPy typemaps %include "numpy.i" %init %{ import_array(); %} -// Apply the Numeric typemaps for 1D input arrays -%apply (signed char* IN_ARRAY1, int DIM1) - {(signed char* series, int size)}; -%apply (unsigned char* IN_ARRAY1, int DIM1) - {(unsigned char* series, int size)}; -%apply (short* IN_ARRAY1, int DIM1) - {(short* series, int size)}; -%apply (unsigned short* IN_ARRAY1, int DIM1) - {(unsigned short* series, int size)}; -%apply (int* IN_ARRAY1, int DIM1) - {(int* series, int size)}; -%apply (unsigned int* IN_ARRAY1, int DIM1) - {(unsigned int* series, int size)}; -%apply (long* IN_ARRAY1, int DIM1) - {(long* series, int size)}; -%apply (unsigned long* IN_ARRAY1, int DIM1) - {(unsigned long* series, int size)}; -%apply (long long* IN_ARRAY1, int DIM1) - {(long long* series, int size)}; -%apply (unsigned long long* IN_ARRAY1, int DIM1) - {(unsigned long long* series, int size)}; -%apply (float* IN_ARRAY1, int DIM1) - {(float* series, int size)}; -%apply (double* IN_ARRAY1, int DIM1) - {(double* series, int size)}; -%apply (long double* IN_ARRAY1, int DIM1) - {(long double* series, int size)}; +%define %apply_numpy_typemaps(TYPE) -// Apply the Numeric typemaps for 1D input/output arrays -%apply (signed char* INPLACE_ARRAY1, int DIM1) - {(signed char* array, int size)}; -%apply (unsigned char* INPLACE_ARRAY1, int DIM1) - {(unsigned char* array, int size)}; -%apply (short* INPLACE_ARRAY1, int DIM1) - {(short* array, int size)}; -%apply (unsigned short* INPLACE_ARRAY1, int DIM1) - {(unsigned short* array, int size)}; -%apply (int* INPLACE_ARRAY1, int DIM1) - {(int* array, int size)}; -%apply (unsigned int* INPLACE_ARRAY1, int DIM1) - {(unsigned int* array, int size)}; -%apply (long* INPLACE_ARRAY1, int DIM1) - {(long* array, int size)}; -%apply (unsigned long* INPLACE_ARRAY1, int DIM1) - {(unsigned long* array, int size)}; -%apply (long long* INPLACE_ARRAY1, int DIM1) - {(long long* array, int size)}; -%apply (unsigned long long* INPLACE_ARRAY1, int DIM1) - {(unsigned long long* array, int size)}; -%apply (float* INPLACE_ARRAY1, int DIM1) - {(float* array, int size)}; -%apply (double* INPLACE_ARRAY1, int DIM1) - {(double* array, int size)}; -%apply (long double* INPLACE_ARRAY1, int DIM1) - {(long double* array, int size)}; +%apply (TYPE* IN_ARRAY1, int DIM1) {(TYPE* series, int size)}; +%apply (TYPE* IN_ARRAY2, int DIM1, int DIM2) {(TYPE* matrix, int rows, int cols)}; +%apply (TYPE* INPLACE_ARRAY1, int DIM1) {(TYPE* array, int size)}; +%apply (TYPE* INPLACE_ARRAY2, int DIM1, int DIM2) {(TYPE* array, int rows, int cols)}; +%apply (int DIM1, TYPE* IN_ARRAY1) {(int size, TYPE* series)}; +%apply (int DIM1, int DIM2, TYPE* IN_ARRAY2) {(int rows, int cols, TYPE* matrix)}; +%apply (int DIM1, TYPE* INPLACE_ARRAY1) {(int size, TYPE* array)}; +%apply (int DIM1, int DIM2, TYPE* INPLACE_ARRAY2) {(int rows, int cols, TYPE* array)}; -// Apply the Numeric typemaps for 2D input arrays -%apply (signed char* IN_ARRAY2, int DIM1, int DIM2) - {(signed char* matrix, int rows, int cols)}; -%apply (unsigned char* IN_ARRAY2, int DIM1, int DIM2) - {(unsigned char* matrix, int rows, int cols)}; -%apply (short* IN_ARRAY2, int DIM1, int DIM2) - {(short* matrix, int rows, int cols)}; -%apply (unsigned short* IN_ARRAY2, int DIM1, int DIM2) - {(unsigned short* matrix, int rows, int cols)}; -%apply (int* IN_ARRAY2, int DIM1, int DIM2) - {(int* matrix, int rows, int cols)}; -%apply (unsigned int* IN_ARRAY2, int DIM1, int DIM2) - {(unsigned int* matrix, int rows, int cols)}; -%apply (long* IN_ARRAY2, int DIM1, int DIM2) - {(long* matrix, int rows, int cols)}; -%apply (unsigned long* IN_ARRAY2, int DIM1, int DIM2) - {(unsigned long* matrix, int rows, int cols)}; -%apply (long long* IN_ARRAY2, int DIM1, int DIM2) - {(long long* matrix, int rows, int cols)}; -%apply (unsigned long long* IN_ARRAY2, int DIM1, int DIM2) - {(unsigned long long* matrix, int rows, int cols)}; -%apply (float* IN_ARRAY2, int DIM1, int DIM2) - {(float* matrix, int rows, int cols)}; -%apply (double* IN_ARRAY2, int DIM1, int DIM2) - {(double* matrix, int rows, int cols)}; -%apply (long double* IN_ARRAY2, int DIM1, int DIM2) - {(long double* matrix, int rows, int cols)}; +%enddef /* %apply_numpy_typemaps() macro */ -// Apply the Numeric typemaps for 2D input/output arrays -%apply (signed char* INPLACE_ARRAY2, int DIM1, int DIM2) - {(signed char* array, int rows, int cols)}; -%apply (unsigned char* INPLACE_ARRAY2, int DIM1, int DIM2) - {(unsigned char* array, int rows, int cols)}; -%apply (short* INPLACE_ARRAY2, int DIM1, int DIM2) - {(short* array, int rows, int cols)}; -%apply (unsigned short* INPLACE_ARRAY2, int DIM1, int DIM2) - {(unsigned short* array, int rows, int cols)}; -%apply (int* INPLACE_ARRAY2, int DIM1, int DIM2) - {(int* array, int rows, int cols)}; -%apply (unsigned int* INPLACE_ARRAY2, int DIM1, int DIM2) - {(unsigned int* array, int rows, int cols)}; -%apply (long* INPLACE_ARRAY2, int DIM1, int DIM2) - {(long* array, int rows, int cols)}; -%apply (unsigned long* INPLACE_ARRAY2, int DIM1, int DIM2) - {(unsigned long* array, int rows, int cols)}; -%apply (long long* INPLACE_ARRAY2, int DIM1, int DIM2) - {(long long* array, int rows, int cols)}; -%apply (unsigned long long* INPLACE_ARRAY2, int DIM1, int DIM2) - {(unsigned long long* array, int rows, int cols)}; -%apply (float* INPLACE_ARRAY2, int DIM1, int DIM2) - {(float* array, int rows, int cols)}; -%apply (double* INPLACE_ARRAY2, int DIM1, int DIM2) - {(double* array, int rows, int cols)}; -%apply (long double* INPLACE_ARRAY2, int DIM1, int DIM2) - {(long double* array, int rows, int cols)}; +%apply_numpy_typemaps(signed char ) +%apply_numpy_typemaps(unsigned char ) +%apply_numpy_typemaps(short ) +%apply_numpy_typemaps(unsigned short ) +%apply_numpy_typemaps(int ) +%apply_numpy_typemaps(unsigned int ) +%apply_numpy_typemaps(long ) +%apply_numpy_typemaps(unsigned long ) +%apply_numpy_typemaps(long long ) +%apply_numpy_typemaps(unsigned long long) +%apply_numpy_typemaps(float ) +%apply_numpy_typemaps(double ) // Include the header file to be wrapped %include "series.h" Modified: trunk/numpy/doc/swig/numpy.i =================================================================== --- trunk/numpy/doc/swig/numpy.i 2007-03-14 15:47:12 UTC (rev 3574) +++ trunk/numpy/doc/swig/numpy.i 2007-03-14 19:57:23 UTC (rev 3575) @@ -304,6 +304,10 @@ * (TYPE* ARGOUT_ARRAY1[ANY]) * (TYPE* ARGOUT_ARRAY2[ANY][ANY]) * + * (int DIM1, TYPE* IN_ARRAY1) + * (int DIM1, int DIM2, TYPE* IN_ARRAY2) + * (int DIM1, TYPE* INPLACE_ARRAY1) + * * where "TYPE" is any type supported by the NumPy module. In python, * the dimensions will not need to be specified. The IN_ARRAYs can be * a numpy array or any sequence that can be converted to a numpy @@ -314,32 +318,45 @@ * These typemaps can be applied to existing functions using the * %apply directive: * - * %apply (double* IN_ARRAY1, int DIM1) {double* series, int length}; - * double sum(double* series, int length); + * %apply (double* IN_ARRAY1, int DIM1) {(double* series, int length)}; + * double prod(double* series, int length); * - * %apply (double* IN_ARRAY2, int DIM1, int DIM2) {double* mx, int rows, int cols}; + * %apply (double* IN_ARRAY2, int DIM1, int DIM2) {(double* mx, int rows, int cols)}; * double max(double* mx, int rows, int cols); * - * %apply (double* INPLACE_ARRAY1, int DIM1) {double* series, int length}; - * void negate(double* series, int length); + * %apply (double* INPLACE_ARRAY1, int DIM1) {(double* series, int length)}; + * void ones(double* series, int length); * - * %apply (double* INPLACE_ARRAY2, int DIM1, int DIM2) {double* mx, int rows, int cols}; - * void normalize(double* mx, int rows, int cols); + * %apply (double* INPLACE_ARRAY2, int DIM1, int DIM2) {(double* mx, int rows, int cols)}; + * void floor(double* mx, int rows, int cols); * - * %apply (double* ARGOUT_ARRAY1[ANY] {double series, int length}; + * %apply (double* ARGOUT_ARRAY1[ANY] {(double series, int length)}; * void negate(double* series, int length); * - * %apply (double* ARGOUT_ARRAY2[ANY][ANY]) {double* mx, int rows, int cols}; + * %apply (double* ARGOUT_ARRAY2[ANY][ANY]) {(double* mx, int rows, int cols)}; * void normalize(double* mx, int rows, int cols); * + * %apply (int DIM1, double* IN_ARRAY1) {(int length, double* series)} + * double sum(int length, double* series) + * + * %apply (int DIM1, int DIM2, double* IN_ARRAY2) {(int rows, int cols, double* matrix)} + * double min(int length, double* series) + * + * %apply (int DIM1, double* INPLACE_ARRAY1) {(int length, double* series)} + * double zeros(int length, double* series) + * * or directly with * - * double sum(double* IN_ARRAY1, int DIM1); + * double prod(double* IN_ARRAY1, int DIM1); * double max(double* IN_ARRAY2, int DIM1, int DIM2); - * void sum(double* INPLACE_ARRAY1, int DIM1); - * void sum(double* INPLACE_ARRAY2, int DIM1, int DIM2); - * void sum(double* ARGOUT_ARRAY1[ANY]); - * void sum(double* ARGOUT_ARRAY2[ANY][ANY]); + * void ones(double* INPLACE_ARRAY1, int DIM1); + * void floor(double* INPLACE_ARRAY2, int DIM1, int DIM2); + * void negate(double* ARGOUT_ARRAY1[ANY]); + * void normalize(double* ARGOUT_ARRAY2[ANY][ANY]); + * + * double sum(int DIM1, double* IN_ARRAY1) + * double min(int DIM1, int DIM2, double* IN_ARRAY2) + * void zeros(int DIM1, double* INPLACE_ARRAY1) */ %define %numpy_typemaps(TYPE, TYPECODE) @@ -441,6 +458,55 @@ } } +/* Typemap suite for (int DIM1, TYPE* IN_ARRAY1) + */ +%typemap(in) (int DIM1, TYPE* IN_ARRAY1) + (PyArrayObject* array=NULL, int is_new_object=0) { + array = obj_to_array_contiguous_allow_conversion($input, TYPECODE, &is_new_object); + npy_intp size[1] = {-1}; + if (!array || !require_dimensions(array, 1) || !require_size(array, size, 1)) SWIG_fail; + $1 = (int) array->dimensions[0]; + $2 = (TYPE*) array->data; +} +%typemap(freearg) (int DIM1, TYPE* IN_ARRAY1) { + if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); +} + +/* Typemap suite for (int DIM1, int DIM2, TYPE* IN_ARRAY2) + */ +%typemap(in) (int DIM1, int DIM2, TYPE* IN_ARRAY2) + (PyArrayObject* array=NULL, int is_new_object=0) { + array = obj_to_array_contiguous_allow_conversion($input, TYPECODE, &is_new_object); + npy_intp size[2] = {-1,-1}; + if (!array || !require_dimensions(array, 2) || !require_size(array, size, 1)) SWIG_fail; + $1 = (int) array->dimensions[0]; + $2 = (int) array->dimensions[1]; + $3 = (TYPE*) array->data; +} +%typemap(freearg) (int DIM1, int DIM2, TYPE* IN_ARRAY2) { + if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); +} + +/* Typemap suite for (int DIM1, TYPE* INPLACE_ARRAY1) + */ +%typemap(in) (int DIM1, TYPE* INPLACE_ARRAY1) (PyArrayObject* temp=NULL) { + temp = obj_to_array_no_conversion($input, TYPECODE); + if (!temp || !require_contiguous(temp)) SWIG_fail; + $1 = 1; + for (int i=0; ind; ++i) $1 *= temp->dimensions[i]; + $2 = (TYPE*) temp->data; +} + +/* Typemap suite for (int DIM1, int DIM2, TYPE* INPLACE_ARRAY2) + */ +%typemap(in) (int DIM1, int DIM2, TYPE* INPLACE_ARRAY2) (PyArrayObject* temp=NULL) { + temp = obj_to_array_no_conversion($input, TYPECODE); + if (!temp || !require_contiguous(temp)) SWIG_fail; + $1 = (int) temp->dimensions[0]; + $2 = (int) temp->dimensions[1]; + $3 = (TYPE*) temp->data; +} + %enddef /* %numpy_typemaps() macro */ Modified: trunk/numpy/doc/swig/numpy_swig.html =================================================================== --- trunk/numpy/doc/swig/numpy_swig.html 2007-03-14 15:47:12 UTC (rev 3574) +++ trunk/numpy/doc/swig/numpy_swig.html 2007-03-14 19:57:23 UTC (rev 3575) @@ -351,9 +351,16 @@ SWIG interface file would need the following:

 %{
+#define SWIG_FILE_WITH_INIT
 #include "rms.h"
 %}
+
 %include "numpy.i"
+
+%init %{
+import_array();
+%}
+
 %apply (double* IN_ARRAY1, int DIM1) {(double* seq, int n)};
 %include "rms.h"
 
@@ -365,19 +372,30 @@ is an input array of one dimension and that the int represents that dimension. This is precisely the pattern in the rms prototype.

-

Hopefully, no actual prototypes to be wrapped will have the names +

Most likely, no actual prototypes to be wrapped will have the names IN_ARRAY1 and DIM1. We use the %apply directive to apply the typemap for one-dimensional input arrays of type double to the actual prototype used by rms. Using numpy.i effectively, therefore, requires knowing what typemaps are available and what they do.

+

Note that if the C function signature was in a different order:

+
+double rms(int n, double* seq);
+
+

that SWIG would not match the typemap signature given above with +the argument list for rms. Fortunately, numpy.i has a set of +typemaps with the data pointer given last:

+
+%apply (int DIM1, double* IN_ARRAY1) {(int n, double* seq)};
+

Using numpy.i

The numpy.i file is currently located in the numpy/docs/swig sub-directory under the numpy installation directory. Typically, you will want to copy it to the directory where you are developing -your wrappers.

+your wrappers. If it is ever adopted by SWIG developers, then it +will be installed in a standard place where SWIG can find it.

A simple module that only uses a single SWIG interface file should include the following:

@@ -389,17 +407,22 @@
 import_array();
 %}
 
-

Only one interface file should call import_array(). If you have -more than one SWIG interface file, then subsequent files should not -#define SWIG_FILE_WITH_INIT and should not call -import_array().

+

Within a compiled python module, import_array() should only get +called once. This could be in a C/C++ file that you have written and +is linked to the module. If this is the case, then none of your +interface files should #define SWIG_FILE_WITH_INIT or call +import_array(). Or, this initialization call could be in a +wrapper file generated by SWIG from an interface file that has the +%init block as above. If this is the case, and you have more than +one SWIG interface file, then only one interface file should +#define SWIG_FILE_WITH_INIT and call import_array().

Available Typemaps

The typemap directives provided by numpy.i for arrays of different data types, say double and int, are identical to one another except for the C and NumPy type specifications. The typemaps are -therefore implemented via a macro:

+therefore implemented (typically behind the scenes) via a macro:

 %numpy_typemaps(TYPE, TYPECODE)
 
@@ -442,7 +465,7 @@ %numpy_typemaps(bool, NPY_UINT)

to fix the data length problem, and Input Arrays will work fine, -but In-place Arrays will fail type-checking.

+but In-place Arrays might fail type-checking.

In the following descriptions, we reference a generic TYPE, which could be any of the C-types listed above.

@@ -456,6 +479,8 @@
  • (TYPE* IN_ARRAY1, int DIM1)
  • (TYPE* IN_ARRAY2, int DIM1, int DIM2)
  • +
  • (int DIM1, TYPE* IN_ARRAY1)
  • +
  • (int DIM1, int DIM2, TYPE* IN_ARRAY2)
@@ -470,6 +495,8 @@
  • (TYPE* INPLACE_ARRAY1, int DIM1)
  • (TYPE* INPLACE_ARRAY2, int DIM1, int DIM2)
  • +
  • (int DIM1, TYPE* INPLACE_ARRAY1)
  • +
  • (int DIM1, int DIM2, TYPE* INPLACE_ARRAY2)
@@ -481,9 +508,9 @@ therefore not sufficient. In python, the convential way to return multiple arguments is to pack them into a tuple and return the tuple. This is what the argout typemaps do. If a wrapped function that uses -argout these argout typemaps has more than one return argument, they -are so packed. The python user does not pass these arrays in, they -simply get returned. The argout signatures are

+these argout typemaps has more than one return argument, they are so +packed. The python user does not pass these arrays in, they simply +get returned. The argout signatures are

  • (TYPE ARGOUT_ARRAY1[ANY])
  • @@ -596,7 +623,7 @@ Modified: trunk/numpy/doc/swig/numpy_swig.txt =================================================================== --- trunk/numpy/doc/swig/numpy_swig.txt 2007-03-14 15:47:12 UTC (rev 3574) +++ trunk/numpy/doc/swig/numpy_swig.txt 2007-03-14 19:57:23 UTC (rev 3575) @@ -57,9 +57,16 @@ `SWIG`_ interface file would need the following:: %{ + #define SWIG_FILE_WITH_INIT #include "rms.h" %} + %include "numpy.i" + + %init %{ + import_array(); + %} + %apply (double* IN_ARRAY1, int DIM1) {(double* seq, int n)}; %include "rms.h" @@ -72,20 +79,31 @@ that dimension. This is precisely the pattern in the ``rms`` prototype. -Hopefully, no actual prototypes to be wrapped will have the names +Most likely, no actual prototypes to be wrapped will have the names ``IN_ARRAY1`` and ``DIM1``. We use the ``%apply`` directive to apply the typemap for one-dimensional input arrays of type ``double`` to the actual prototype used by ``rms``. Using ``numpy.i`` effectively, therefore, requires knowing what typemaps are available and what they do. +Note that if the C function signature was in a different order:: + + double rms(int n, double* seq); + +that `SWIG`_ would not match the typemap signature given above with +the argument list for ``rms``. Fortunately, ``numpy.i`` has a set of +typemaps with the data pointer given last:: + + %apply (int DIM1, double* IN_ARRAY1) {(int n, double* seq)}; + Using numpy.i ============= The ``numpy.i`` file is currently located in the ``numpy/docs/swig`` sub-directory under the ``numpy`` installation directory. Typically, you will want to copy it to the directory where you are developing -your wrappers. +your wrappers. If it is ever adopted by `SWIG`_ developers, then it +will be installed in a standard place where `SWIG`_ can find it. A simple module that only uses a single `SWIG`_ interface file should include the following:: @@ -98,10 +116,15 @@ import_array(); %} -Only one interface file should call ``import_array()``. If you have -more than one `SWIG`_ interface file, then subsequent files should not -``#define SWIG_FILE_WITH_INIT`` and should not call -``import_array()``. +Within a compiled python module, ``import_array()`` should only get +called once. This could be in a C/C++ file that you have written and +is linked to the module. If this is the case, then none of your +interface files should ``#define SWIG_FILE_WITH_INIT`` or call +``import_array()``. Or, this initialization call could be in a +wrapper file generated by `SWIG`_ from an interface file that has the +``%init`` block as above. If this is the case, and you have more than +one `SWIG`_ interface file, then only one interface file should +``#define SWIG_FILE_WITH_INIT`` and call ``import_array()``. Available Typemaps ================== @@ -109,7 +132,7 @@ The typemap directives provided by ``numpy.i`` for arrays of different data types, say ``double`` and ``int``, are identical to one another except for the C and `NumPy`_ type specifications. The typemaps are -therefore implemented via a macro:: +therefore implemented (typically behind the scenes) via a macro:: %numpy_typemaps(TYPE, TYPECODE) @@ -150,7 +173,7 @@ %numpy_typemaps(bool, NPY_UINT) to fix the data length problem, and `Input Arrays`_ will work fine, -but `In-place Arrays`_ will fail type-checking. +but `In-place Arrays`_ might fail type-checking. In the following descriptions, we reference a generic ``TYPE``, which could be any of the C-types listed above. @@ -166,6 +189,8 @@ * ``(TYPE* IN_ARRAY1, int DIM1)`` * ``(TYPE* IN_ARRAY2, int DIM1, int DIM2)`` + * ``(int DIM1, TYPE* IN_ARRAY1)`` + * ``(int DIM1, int DIM2, TYPE* IN_ARRAY2)`` In-place Arrays --------------- @@ -178,6 +203,8 @@ * ``(TYPE* INPLACE_ARRAY1, int DIM1)`` * ``(TYPE* INPLACE_ARRAY2, int DIM1, int DIM2)`` + * ``(int DIM1, TYPE* INPLACE_ARRAY1)`` + * ``(int DIM1, int DIM2, TYPE* INPLACE_ARRAY2)`` Argout Arrays ------------- @@ -188,9 +215,9 @@ therefore not sufficient. In python, the convential way to return multiple arguments is to pack them into a tuple and return the tuple. This is what the argout typemaps do. If a wrapped function that uses -argout these argout typemaps has more than one return argument, they -are so packed. The python user does not pass these arrays in, they -simply get returned. The argout signatures are +these argout typemaps has more than one return argument, they are so +packed. The python user does not pass these arrays in, they simply +get returned. The argout signatures are * ``(TYPE ARGOUT_ARRAY1[ANY])`` * ``(TYPE ARGOUT_ARRAY2[ANY][ANY])`` Modified: trunk/numpy/doc/swig/series.cxx =================================================================== --- trunk/numpy/doc/swig/series.cxx 2007-03-14 15:47:12 UTC (rev 3574) +++ trunk/numpy/doc/swig/series.cxx 2007-03-14 19:57:23 UTC (rev 3575) @@ -9,6 +9,10 @@ // void SNAMEOnes( TYPE * array, int size); // TYPE SNAMEMax( TYPE * matrix, int rows, int cols); // void SNAMEFloor(TYPE * array, int rows, int cols, TYPE floor); +// TYPE SNAMESum( int size, TYPE * series); +// void SNAMEZeros(int size, TYPE * array); +// TYPE SNAMEMin( int rows, int cols, TYPE * matrix); +// void SNAMECeil( int rows, int cols, TYPE * array, TYPE ceil); // // for any specified type TYPE (for example: short, unsigned int, long // long, etc.) with given short name SNAME (for example: short, uint, @@ -20,6 +24,10 @@ // * 1D in-place arrays // * 2D input arrays // * 2D in-place arrays +// * 1D input arrays, data last +// * 1D in-place arrays, data last +// * 2D input arrays, data last +// * 2D in-place arrays, data last // #define TEST_FUNCS(TYPE, SNAME) \ \ @@ -46,13 +54,45 @@ } \ \ void SNAME ## Floor(TYPE * array, int rows, int cols, TYPE floor) { \ - int i, j, index; \ - for (j=0; j ceil) array[index] = ceil; \ + } \ + } \ } TEST_FUNCS(signed char , schar ) @@ -67,4 +107,3 @@ TEST_FUNCS(unsigned long long, ulongLong ) TEST_FUNCS(float , float ) TEST_FUNCS(double , double ) -TEST_FUNCS(long double , longDouble) Modified: trunk/numpy/doc/swig/series.h =================================================================== --- trunk/numpy/doc/swig/series.h 2007-03-14 15:47:12 UTC (rev 3574) +++ trunk/numpy/doc/swig/series.h 2007-03-14 19:57:23 UTC (rev 3575) @@ -8,6 +8,10 @@ // void SNAMEOnes( TYPE * array, int size); // TYPE SNAMEMax( TYPE * matrix, int rows, int cols); // void SNAMEFloor(TYPE * array, int rows, int cols, TYPE floor); +// TYPE SNAMESum( int size, TYPE * series); +// void SNAMEZeros(int size, TYPE * array); +// TYPE SNAMEMin( int rows, int cols, TYPE * matrix); +// void SNAMECeil( int rows, int cols, TYPE * array, TYPE ceil); // // for any specified type TYPE (for example: short, unsigned int, long // long, etc.) with given short name SNAME (for example: short, uint, @@ -19,13 +23,21 @@ // * 1D in-place arrays // * 2D input arrays // * 2D in-place arrays +// * 1D input arrays, data last +// * 1D in-place arrays, data last +// * 2D input arrays, data last +// * 2D in-place arrays, data last // #define TEST_FUNC_PROTOS(TYPE, SNAME) \ \ TYPE SNAME ## Prod( TYPE * series, int size); \ void SNAME ## Ones( TYPE * array, int size); \ TYPE SNAME ## Max( TYPE * matrix, int rows, int cols); \ -void SNAME ## Floor(TYPE * array, int rows, int cols, TYPE floor); +void SNAME ## Floor(TYPE * array, int rows, int cols, TYPE floor); \ +TYPE SNAME ## Sum( int size, TYPE * series); \ +void SNAME ## Zeros(int size, TYPE * array); \ +TYPE SNAME ## Min( int rows, int cols, TYPE * matrix); \ +void SNAME ## Ceil( int rows, int cols, TYPE * array, TYPE ceil); TEST_FUNC_PROTOS(signed char , schar ) TEST_FUNC_PROTOS(unsigned char , uchar ) @@ -39,6 +51,5 @@ TEST_FUNC_PROTOS(unsigned long long, ulongLong ) TEST_FUNC_PROTOS(float , float ) TEST_FUNC_PROTOS(double , double ) -TEST_FUNC_PROTOS(long double , longDouble) #endif Modified: trunk/numpy/doc/swig/testSeries.py =================================================================== --- trunk/numpy/doc/swig/testSeries.py 2007-03-14 15:47:12 UTC (rev 3574) +++ trunk/numpy/doc/swig/testSeries.py 2007-03-14 19:57:23 UTC (rev 3575) @@ -25,450 +25,682 @@ #################################################### ### Test functions that take arrays of type BYTE ### def testScharProd(self): - "Test the scharProd function" + "Test scharProd function" self.assertEquals(Series.scharProd([1,2,3,4]), 24) def testScharProdNonContainer(self): - "Test the scharProd function with None" + "Test scharProd function with None" self.assertRaises(TypeError, Series.scharProd, None) def testScharOnes(self): - "Test the scharOnes function" + "Test scharOnes function" myArray = N.zeros(5,'b') Series.scharOnes(myArray) N.testing.assert_array_equal(myArray, N.array([1,1,1,1,1])) def testScharMax(self): - "Test the scharMax function" + "Test scharMax function" matrix = [[-6,5,-4],[3,-2,1]] self.assertEquals(Series.scharMax(matrix), 5) def testScharMaxNonContainer(self): - "Test the scharMax function with None" + "Test scharMax function with None" self.assertRaises(TypeError, Series.scharMax, None) def testScharMaxWrongDim(self): - "Test the scharMax function with a 1D array" + "Test scharMax function with a 1D array" self.assertRaises(TypeError, Series.scharMax, [0, -1, 2, -3]) def testScharFloor(self): - "Test the scharFloor function" + "Test scharFloor function" matrix = N.array([[10,-2],[-6,7]],'b') Series.scharFloor(matrix,0) N.testing.assert_array_equal(matrix, N.array([[10,0],[0,7]])) + def testScharSum(self): + "Test scharSum function" + self.assertEquals(Series.scharSum([-5,6,-7,8]), 2) + + def testScharZeros(self): + "Test scharZeros function" + myArray = N.ones(5,'b') + Series.scharZeros(myArray) + N.testing.assert_array_equal(myArray, N.array([0,0,0,0,0])) + + def testScharMin(self): + "Test scharMin function" + matrix = [[9,8],[7,6],[5,4]] + self.assertEquals(Series.scharMin(matrix), 4) + + def testScharCeil(self): + "Test scharCeil function" + matrix = N.array([[10,-2],[-6,7]],'b') + Series.scharCeil(matrix,5) + N.testing.assert_array_equal(matrix, N.array([[5,-2],[-6,5]])) + ##################################################### ### Test functions that take arrays of type UBYTE ### def testUcharProd(self): - "Test the ucharProd function" + "Test ucharProd function" self.assertEquals(Series.ucharProd([1,2,3,4]), 24) def testUcharProdNonContainer(self): - "Test the ucharProd function with None" + "Test ucharProd function with None" self.assertRaises(TypeError, Series.ucharProd, None) def testUcharOnes(self): - "Test the ucharOnes function" + "Test ucharOnes function" myArray = N.zeros(5,'B') Series.ucharOnes(myArray) N.testing.assert_array_equal(myArray, N.array([1,1,1,1,1])) def testUcharMax(self): - "Test the ucharMax function" + "Test ucharMax function" matrix = [[6,5,4],[3,2,1]] self.assertEquals(Series.ucharMax(matrix), 6) def testUcharMaxNonContainer(self): - "Test the ucharMax function with None" + "Test ucharMax function with None" self.assertRaises(TypeError, Series.ucharMax, None) def testUcharMaxWrongDim(self): - "Test the ucharMax function with a 1D array" + "Test ucharMax function with a 1D array" self.assertRaises(TypeError, Series.ucharMax, [0, 1, 2, 3]) def testUcharFloor(self): - "Test the ucharFloor function" + "Test ucharFloor function" matrix = N.array([[10,2],[6,7]],'B') Series.ucharFloor(matrix,7) - N.testing.assert_array_equal(matrix, N.array([[10,0],[0,7]])) + N.testing.assert_array_equal(matrix, N.array([[10,7],[7,7]])) + def testUcharSum(self): + "Test ucharSum function" + self.assertEquals(Series.ucharSum([5,6,7,8]), 26) + + def testUcharZeros(self): + "Test ucharZeros function" + myArray = N.ones(5,'B') + Series.ucharZeros(myArray) + N.testing.assert_array_equal(myArray, N.array([0,0,0,0,0])) + + def testUcharMin(self): + "Test ucharMin function" + matrix = [[9,8],[7,6],[5,4]] + self.assertEquals(Series.ucharMin(matrix), 4) + + def testUcharCeil(self): + "Test ucharCeil function" + matrix = N.array([[10,2],[6,7]],'B') + Series.ucharCeil(matrix,5) + N.testing.assert_array_equal(matrix, N.array([[5,2],[5,5]])) + ##################################################### ### Test functions that take arrays of type SHORT ### def testShortProd(self): - "Test the shortProd function" + "Test shortProd function" self.assertEquals(Series.shortProd([1,2,3,4]), 24) def testShortProdNonContainer(self): - "Test the shortProd function with None" + "Test shortProd function with None" self.assertRaises(TypeError, Series.shortProd, None) def testShortOnes(self): - "Test the shortOnes function" + "Test shortOnes function" myArray = N.zeros(5,'h') Series.shortOnes(myArray) N.testing.assert_array_equal(myArray, N.array([1,1,1,1,1])) def testShortMax(self): - "Test the shortMax function" + "Test shortMax function" matrix = [[-6,5,-4],[3,-2,1]] self.assertEquals(Series.shortMax(matrix), 5) def testShortMaxNonContainer(self): - "Test the shortMax function with None" + "Test shortMax function with None" self.assertRaises(TypeError, Series.shortMax, None) def testShortMaxWrongDim(self): - "Test the shortMax function with a 1D array" + "Test shortMax function with a 1D array" self.assertRaises(TypeError, Series.shortMax, [0, -1, 2, -3]) def testShortFloor(self): - "Test the shortFloor function" + "Test shortFloor function" matrix = N.array([[10,-2],[-6,7]],'h') Series.shortFloor(matrix,0) N.testing.assert_array_equal(matrix, N.array([[10,0],[0,7]])) + def testShortSum(self): + "Test shortSum function" + self.assertEquals(Series.shortSum([-5,6,-7,8]), 2) + + def testShortZeros(self): + "Test shortZeros function" + myArray = N.ones(5,'h') + Series.shortZeros(myArray) + N.testing.assert_array_equal(myArray, N.array([0,0,0,0,0])) + + def testShortMin(self): + "Test shortMin function" + matrix = [[9,8],[7,6],[5,4]] + self.assertEquals(Series.shortMin(matrix), 4) + + def testShortCeil(self): + "Test shortCeil function" + matrix = N.array([[10,-2],[-6,7]],'h') + Series.shortCeil(matrix,5) + N.testing.assert_array_equal(matrix, N.array([[5,-2],[-6,5]])) + ###################################################### ### Test functions that take arrays of type USHORT ### def testUshortProd(self): - "Test the ushortProd function" + "Test ushortProd function" self.assertEquals(Series.ushortProd([1,2,3,4]), 24) def testUshortProdNonContainer(self): - "Test the ushortProd function with None" + "Test ushortProd function with None" self.assertRaises(TypeError, Series.ushortProd, None) def testUshortOnes(self): - "Test the ushortOnes function" + "Test ushortOnes function" myArray = N.zeros(5,'H') Series.ushortOnes(myArray) N.testing.assert_array_equal(myArray, N.array([1,1,1,1,1])) def testUshortMax(self): - "Test the ushortMax function" + "Test ushortMax function" matrix = [[6,5,4],[3,2,1]] self.assertEquals(Series.ushortMax(matrix), 6) def testUshortMaxNonContainer(self): - "Test the ushortMax function with None" + "Test ushortMax function with None" self.assertRaises(TypeError, Series.ushortMax, None) def testUshortMaxWrongDim(self): - "Test the ushortMax function with a 1D array" + "Test ushortMax function with a 1D array" self.assertRaises(TypeError, Series.ushortMax, [0, 1, 2, 3]) def testUshortFloor(self): - "Test the ushortFloor function" + "Test ushortFloor function" matrix = N.array([[10,2],[6,7]],'H') Series.ushortFloor(matrix,7) - N.testing.assert_array_equal(matrix, N.array([[10,0],[0,7]])) + N.testing.assert_array_equal(matrix, N.array([[10,7],[7,7]])) + def testUshortSum(self): + "Test ushortSum function" + self.assertEquals(Series.ushortSum([5,6,7,8]), 26) + + def testUshortZeros(self): + "Test ushortZeros function" + myArray = N.ones(5,'H') + Series.ushortZeros(myArray) + N.testing.assert_array_equal(myArray, N.array([0,0,0,0,0])) + + def testUshortMin(self): + "Test ushortMin function" + matrix = [[9,8],[7,6],[5,4]] + self.assertEquals(Series.ushortMin(matrix), 4) + + def testUshortCeil(self): + "Test ushortCeil function" + matrix = N.array([[10,2],[6,7]],'H') + Series.ushortCeil(matrix,5) + N.testing.assert_array_equal(matrix, N.array([[5,2],[5,5]])) + ################################################### ### Test functions that take arrays of type INT ### def testIntProd(self): - "Test the intProd function" + "Test intProd function" self.assertEquals(Series.intProd([1,2,3,4]), 24) def testIntProdNonContainer(self): - "Test the intProd function with None" + "Test intProd function with None" self.assertRaises(TypeError, Series.intProd, None) def testIntOnes(self): - "Test the intOnes function" + "Test intOnes function" myArray = N.zeros(5,'i') Series.intOnes(myArray) N.testing.assert_array_equal(myArray, N.array([1,1,1,1,1])) def testIntMax(self): - "Test the intMax function" + "Test intMax function" matrix = [[-6,5,-4],[3,-2,1]] self.assertEquals(Series.intMax(matrix), 5) def testIntMaxNonContainer(self): - "Test the intMax function with None" + "Test intMax function with None" self.assertRaises(TypeError, Series.intMax, None) def testIntMaxWrongDim(self): - "Test the intMax function with a 1D array" + "Test intMax function with a 1D array" self.assertRaises(TypeError, Series.intMax, [0, -1, 2, -3]) def testIntFloor(self): - "Test the intFloor function" + "Test intFloor function" matrix = N.array([[10,-2],[-6,7]],'i') Series.intFloor(matrix,0) N.testing.assert_array_equal(matrix, N.array([[10,0],[0,7]])) + def testIntSum(self): + "Test intSum function" + self.assertEquals(Series.intSum([-5,6,-7,8]), 2) + + def testIntZeros(self): + "Test intZeros function" + myArray = N.ones(5,'i') + Series.intZeros(myArray) + N.testing.assert_array_equal(myArray, N.array([0,0,0,0,0])) + + def testIntMin(self): + "Test intMin function" + matrix = [[9,8],[7,6],[5,4]] + self.assertEquals(Series.intMin(matrix), 4) + + def testIntCeil(self): + "Test intCeil function" + matrix = N.array([[10,-2],[-6,7]],'i') + Series.intCeil(matrix,5) + N.testing.assert_array_equal(matrix, N.array([[5,-2],[-6,5]])) + #################################################### ### Test functions that take arrays of type UINT ### def testUintProd(self): - "Test the uintProd function" + "Test uintProd function" self.assertEquals(Series.uintProd([1,2,3,4]), 24) def testUintProdNonContainer(self): - "Test the uintProd function with None" + "Test uintProd function with None" self.assertRaises(TypeError, Series.uintProd, None) def testUintOnes(self): - "Test the uintOnes function" + "Test uintOnes function" myArray = N.zeros(5,'I') Series.uintOnes(myArray) N.testing.assert_array_equal(myArray, N.array([1,1,1,1,1])) def testUintMax(self): - "Test the uintMax function" + "Test uintMax function" matrix = [[6,5,4],[3,2,1]] self.assertEquals(Series.uintMax(matrix), 6) def testUintMaxNonContainer(self): - "Test the uintMax function with None" + "Test uintMax function with None" self.assertRaises(TypeError, Series.uintMax, None) def testUintMaxWrongDim(self): - "Test the uintMax function with a 1D array" + "Test uintMax function with a 1D array" self.assertRaises(TypeError, Series.uintMax, [0, 1, 2, 3]) def testUintFloor(self): - "Test the uintFloor function" + "Test uintFloor function" matrix = N.array([[10,2],[6,7]],'I') Series.uintFloor(matrix,7) - N.testing.assert_array_equal(matrix, N.array([[10,0],[0,7]])) + N.testing.assert_array_equal(matrix, N.array([[10,7],[7,7]])) + def testUintSum(self): + "Test uintSum function" + self.assertEquals(Series.uintSum([5,6,7,8]), 26) + + def testUintZeros(self): + "Test uintZeros function" + myArray = N.ones(5,'I') + Series.uintZeros(myArray) + N.testing.assert_array_equal(myArray, N.array([0,0,0,0,0])) + + def testUintMin(self): + "Test uintMin function" + matrix = [[9,8],[7,6],[5,4]] + self.assertEquals(Series.uintMin(matrix), 4) + + def testUintCeil(self): + "Test uintCeil function" + matrix = N.array([[10,2],[6,7]],'I') + Series.uintCeil(matrix,5) + N.testing.assert_array_equal(matrix, N.array([[5,2],[5,5]])) + #################################################### ### Test functions that take arrays of type LONG ### def testLongProd(self): - "Test the longProd function" + "Test longProd function" self.assertEquals(Series.longProd([1,2,3,4]), 24) def testLongProdNonContainer(self): - "Test the longProd function with None" + "Test longProd function with None" self.assertRaises(TypeError, Series.longProd, None) def testLongOnes(self): - "Test the longOnes function" + "Test longOnes function" myArray = N.zeros(5,'l') Series.longOnes(myArray) N.testing.assert_array_equal(myArray, N.array([1,1,1,1,1])) def testLongMax(self): - "Test the longMax function" + "Test longMax function" matrix = [[-6,5,-4],[3,-2,1]] self.assertEquals(Series.longMax(matrix), 5) def testLongMaxNonContainer(self): - "Test the longMax function with None" + "Test longMax function with None" self.assertRaises(TypeError, Series.longMax, None) def testLongMaxWrongDim(self): - "Test the longMax function with a 1D array" + "Test longMax function with a 1D array" self.assertRaises(TypeError, Series.longMax, [0, -1, 2, -3]) def testLongFloor(self): - "Test the longFloor function" + "Test longFloor function" matrix = N.array([[10,-2],[-6,7]],'l') Series.longFloor(matrix,0) N.testing.assert_array_equal(matrix, N.array([[10,0],[0,7]])) + def testLongSum(self): + "Test longSum function" + self.assertEquals(Series.longSum([-5,6,-7,8]), 2) + + def testLongZeros(self): + "Test longZeros function" + myArray = N.ones(5,'l') + Series.longZeros(myArray) + N.testing.assert_array_equal(myArray, N.array([0,0,0,0,0])) + + def testLongMin(self): + "Test longMin function" + matrix = [[9,8],[7,6],[5,4]] + self.assertEquals(Series.longMin(matrix), 4) + + def testLongCeil(self): + "Test longCeil function" + matrix = N.array([[10,-2],[-6,7]],'l') + Series.longCeil(matrix,5) + N.testing.assert_array_equal(matrix, N.array([[5,-2],[-6,5]])) + ##################################################### ### Test functions that take arrays of type ULONG ### def testUlongProd(self): - "Test the ulongProd function" + "Test ulongProd function" self.assertEquals(Series.ulongProd([1,2,3,4]), 24) def testUlongProdNonContainer(self): - "Test the ulongProd function with None" + "Test ulongProd function with None" self.assertRaises(TypeError, Series.ulongProd, None) def testUlongOnes(self): - "Test the ulongOnes function" + "Test ulongOnes function" myArray = N.zeros(5,'L') Series.ulongOnes(myArray) N.testing.assert_array_equal(myArray, N.array([1,1,1,1,1])) def testUlongMax(self): - "Test the ulongMax function" + "Test ulongMax function" matrix = [[6,5,4],[3,2,1]] self.assertEquals(Series.ulongMax(matrix), 6) def testUlongMaxNonContainer(self): - "Test the ulongMax function with None" + "Test ulongMax function with None" self.assertRaises(TypeError, Series.ulongMax, None) def testUlongMaxWrongDim(self): - "Test the ulongMax function with a 1D array" + "Test ulongMax function with a 1D array" self.assertRaises(TypeError, Series.ulongMax, [0, 1, 2, 3]) def testUlongFloor(self): - "Test the ulongFloor function" + "Test ulongFloor function" matrix = N.array([[10,2],[6,7]],'L') Series.ulongFloor(matrix,7) - N.testing.assert_array_equal(matrix, N.array([[10,0],[0,7]])) + N.testing.assert_array_equal(matrix, N.array([[10,7],[7,7]])) + def testUlongSum(self): + "Test ulongSum function" + self.assertEquals(Series.ulongSum([5,6,7,8]), 26) + + def testUlongZeros(self): + "Test ulongZeros function" + myArray = N.ones(5,'L') + Series.ulongZeros(myArray) + N.testing.assert_array_equal(myArray, N.array([0,0,0,0,0])) + + def testUlongMin(self): + "Test ulongMin function" + matrix = [[9,8],[7,6],[5,4]] + self.assertEquals(Series.ulongMin(matrix), 4) + + def testUlongCeil(self): + "Test ulongCeil function" + matrix = N.array([[10,2],[6,7]],'L') + Series.ulongCeil(matrix,5) + N.testing.assert_array_equal(matrix, N.array([[5,2],[5,5]])) + ######################################################## ### Test functions that take arrays of type LONGLONG ### def testLongLongProd(self): - "Test the longLongProd function" + "Test longLongProd function" self.assertEquals(Series.longLongProd([1,2,3,4]), 24) def testLongLongProdNonContainer(self): - "Test the longLongProd function with None" + "Test longLongProd function with None" self.assertRaises(TypeError, Series.longLongProd, None) def testLongLongOnes(self): - "Test the longLongOnes function" + "Test longLongOnes function" myArray = N.zeros(5,'q') Series.longLongOnes(myArray) N.testing.assert_array_equal(myArray, N.array([1,1,1,1,1])) def testLongLongMax(self): - "Test the longLongMax function" + "Test longLongMax function" matrix = [[-6,5,-4],[3,-2,1]] self.assertEquals(Series.longLongMax(matrix), 5) def testLongLongMaxNonContainer(self): - "Test the longLongMax function with None" + "Test longLongMax function with None" self.assertRaises(TypeError, Series.longLongMax, None) def testLongLongMaxWrongDim(self): - "Test the longLongMax function with a 1D array" + "Test longLongMax function with a 1D array" self.assertRaises(TypeError, Series.longLongMax, [0, -1, 2, -3]) def testLongLongFloor(self): - "Test the longLongFloor function" + "Test longLongFloor function" matrix = N.array([[10,-2],[-6,7]],'q') Series.longLongFloor(matrix,0) N.testing.assert_array_equal(matrix, N.array([[10,0],[0,7]])) + def testLongLongSum(self): + "Test longLongSum function" + self.assertEquals(Series.longLongSum([-5,6,-7,8]), 2) + + def testLongLongZeros(self): + "Test longLongZeros function" + myArray = N.ones(5,'q') + Series.longLongZeros(myArray) + N.testing.assert_array_equal(myArray, N.array([0,0,0,0,0])) + + def testLongLongMin(self): + "Test longLongMin function" + matrix = [[9,8],[7,6],[5,4]] + self.assertEquals(Series.longLongMin(matrix), 4) + + def testLongLongCeil(self): + "Test longLongCeil function" + matrix = N.array([[10,-2],[-6,7]],'q') + Series.longLongCeil(matrix,5) + N.testing.assert_array_equal(matrix, N.array([[5,-2],[-6,5]])) + ######################################################### ### Test functions that take arrays of type ULONGLONG ### def testUlonglongProd(self): - "Test the ulongLongProd function" + "Test ulongLongProd function" self.assertEquals(Series.ulongLongProd([1,2,3,4]), 24) def testUlongLongProdNonContainer(self): - "Test the ulongLongProd function with None" + "Test ulongLongProd function with None" self.assertRaises(TypeError, Series.ulongLongProd, None) def testUlongLongOnes(self): - "Test the ulongLongOnes function" + "Test ulongLongOnes function" myArray = N.zeros(5,'Q') Series.ulongLongOnes(myArray) N.testing.assert_array_equal(myArray, N.array([1,1,1,1,1])) def testUlongLongMax(self): - "Test the ulongLongMax function" + "Test ulongLongMax function" matrix = [[6,5,4],[3,2,1]] self.assertEquals(Series.ulongLongMax(matrix), 6) def testUlongLongMaxNonContainer(self): - "Test the ulongLongMax function with None" + "Test ulongLongMax function with None" self.assertRaises(TypeError, Series.ulongLongMax, None) def testUlongLongMaxWrongDim(self): - "Test the ulongLongMax function with a 1D array" + "Test ulongLongMax function with a 1D array" self.assertRaises(TypeError, Series.ulongLongMax, [0, 1, 2, 3]) def testUlongLongFloor(self): - "Test the ulongLongFloor function" + "Test ulongLongFloor function" matrix = N.array([[10,2],[6,7]],'Q') Series.ulongLongFloor(matrix,7) - N.testing.assert_array_equal(matrix, N.array([[10,0],[0,7]])) + N.testing.assert_array_equal(matrix, N.array([[10,7],[7,7]])) + def testUlongLongSum(self): + "Test ulongLongSum function" + self.assertEquals(Series.ulongLongSum([5,6,7,8]), 26) + + def testUlongLongZeros(self): + "Test ulongLongZeros function" + myArray = N.ones(5,'Q') + Series.ulongLongZeros(myArray) + N.testing.assert_array_equal(myArray, N.array([0,0,0,0,0])) + + def testUlongLongMin(self): + "Test ulongLongMin function" + matrix = [[9,8],[7,6],[5,4]] + self.assertEquals(Series.ulongLongMin(matrix), 4) + + def testUlongLongCeil(self): + "Test ulongLongCeil function" + matrix = N.array([[10,2],[6,7]],'Q') + Series.ulongLongCeil(matrix,5) + N.testing.assert_array_equal(matrix, N.array([[5,2],[5,5]])) + ##################################################### ### Test functions that take arrays of type FLOAT ### def testFloatProd(self): - "Test the floatProd function (to 5 decimal places)" + "Test floatProd function (to 5 decimal places)" self.assertAlmostEquals(Series.floatProd((1,2.718,3,4)), 32.616, 5) def testFloatProdBadContainer(self): - "Test the floatProd function with an invalid list" + "Test floatProd function with an invalid list" self.assertRaises(BadListError, Series.floatProd, [3.14, "pi"]) def testFloatOnes(self): - "Test the floatOnes function" + "Test floatOnes function" myArray = N.zeros(5,'f') Series.floatOnes(myArray) N.testing.assert_array_equal(myArray, N.array([1.,1.,1.,1.,1.])) def testFloatOnesNonArray(self): - "Test the floatOnes function with a list" + "Test floatOnes function with a list" self.assertRaises(TypeError, Series.floatOnes, [True, 0, 2.718, "pi"]) def testFloatMax(self): - "Test the floatMax function" + "Test floatMax function" matrix = [[-6,5,-4],[3.14,-2.718,1]] self.assertEquals(Series.floatMax(matrix), 5.0) def testFloatMaxNonContainer(self): - "Test the floatMax function with None" + "Test floatMax function with None" self.assertRaises(TypeError, Series.floatMax, None) def testFloatMaxWrongDim(self): - "Test the floatMax function with a 1D array" + "Test floatMax function with a 1D array" self.assertRaises(TypeError, Series.floatMax, [0.0, -1, 2.718, -3.14]) def testFloatFloor(self): - "Test the floatFloor function" + "Test floatFloor function" matrix = N.array([[10,-2],[-6,7]],'f') Series.floatFloor(matrix,0) N.testing.assert_array_equal(matrix, N.array([[10,0],[0,7]])) + def testFloatSum(self): + "Test floatSum function" + self.assertEquals(Series.floatSum([-5,6,-7,8]), 2) + + def testFloatZeros(self): + "Test floatZeros function" + myArray = N.ones(5,'f') + Series.floatZeros(myArray) + N.testing.assert_array_equal(myArray, N.array([0,0,0,0,0])) + + def testFloatMin(self): + "Test floatMin function" + matrix = [[9,8],[7,6],[5,4]] + self.assertEquals(Series.floatMin(matrix), 4) + + def testFloatCeil(self): + "Test floatCeil function" + matrix = N.array([[10,-2],[-6,7]],'f') + Series.floatCeil(matrix,5) + N.testing.assert_array_equal(matrix, N.array([[5,-2],[-6,5]])) + ###################################################### ### Test functions that take arrays of type DOUBLE ### def testDoubleProd(self): - "Test the doubleProd function" + "Test doubleProd function" self.assertEquals(Series.doubleProd((1,2.718,3,4)), 32.616) def testDoubleProdBadContainer(self): - "Test the doubleProd function with an invalid list" + "Test doubleProd function with an invalid list" self.assertRaises(BadListError, Series.doubleProd, [3.14, "pi"]) def testDoubleOnes(self): - "Test the doubleOnes function" + "Test doubleOnes function" myArray = N.zeros(5,'d') Series.doubleOnes(myArray) N.testing.assert_array_equal(myArray, N.array([1.,1.,1.,1.,1.])) def testDoubleOnesNonArray(self): - "Test the doubleOnes function with a list" + "Test doubleOnes function with a list" self.assertRaises(TypeError, Series.doubleOnes, [True, 0, 2.718, "pi"]) def testDoubleMax(self): - "Test the doubleMax function" + "Test doubleMax function" matrix = [[-6,5,-4],[3.14,-2.718,1]] self.assertEquals(Series.doubleMax(matrix), 5.0) def testDoubleMaxNonContainer(self): - "Test the doubleMax function with None" + "Test doubleMax function with None" self.assertRaises(TypeError, Series.doubleMax, None) def testDoubleMaxWrongDim(self): - "Test the doubleMax function with a 1D array" + "Test doubleMax function with a 1D array" self.assertRaises(TypeError, Series.doubleMax, [0.0, -1, 2.718, -3.14]) def testDoubleFloor(self): - "Test the doubleFloor function" + "Test doubleFloor function" matrix = N.array([[10,-2],[-6,7]],'d') Series.doubleFloor(matrix,0) N.testing.assert_array_equal(matrix, N.array([[10,0],[0,7]])) - # ########################################################## - # ### Test functions that take arrays of type LONGDOUBLE ### - # def testLongDoubleProd(self): - # "Test the longDoubleProd function" - # self.assertEquals(Series.longDoubleProd((1,2.718,3,4)), 32.616) + def testDoubleSum(self): + "Test doubleSum function" + self.assertEquals(Series.doubleSum([-5,6,-7,8]), 2) - # def testLongDoubleProdBadContainer(self): - # "Test the longDoubleProd function with an invalid list" - # self.assertRaises(BadListError, Series.longDoubleProd, [3.14, "pi"]) + def testDoubleZeros(self): + "Test doubleZeros function" + myArray = N.ones(5,'d') + Series.doubleZeros(myArray) + N.testing.assert_array_equal(myArray, N.array([0,0,0,0,0])) - # def testLongDoubleOnes(self): - # "Test the longDoubleOnes function" - # myArray = N.zeros(5,'g') - # Series.longDoubleOnes(myArray) - # N.testing.assert_array_equal(myArray, N.array([1.,1.,1.,1.,1.])) + def testDoubleMin(self): + "Test doubleMin function" + matrix = [[9,8],[7,6],[5,4]] + self.assertEquals(Series.doubleMin(matrix), 4) - # def testLongDoubleOnesNonArray(self): - # "Test the longDoubleOnes function with a list" - # self.assertRaises(TypeError, Series.longDoubleOnes, [True, 0, 2.718, "pi"]) + def testDoubleCeil(self): + "Test doubleCeil function" + matrix = N.array([[10,-2],[-6,7]],'d') + Series.doubleCeil(matrix,5) + N.testing.assert_array_equal(matrix, N.array([[5,-2],[-6,5]])) ###################################################################### From numpy-svn at scipy.org Wed Mar 14 16:15:35 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Wed, 14 Mar 2007 15:15:35 -0500 (CDT) Subject: [Numpy-svn] r3576 - trunk/numpy/doc/swig Message-ID: <20070314201535.10D7539C0A5@new.scipy.org> Author: wfspotz at sandia.gov Date: 2007-03-14 15:15:31 -0500 (Wed, 14 Mar 2007) New Revision: 3576 Modified: trunk/numpy/doc/swig/Makefile trunk/numpy/doc/swig/README trunk/numpy/doc/swig/testSeries.py Log: testSeries.py now prints numpy version; documentation updated Modified: trunk/numpy/doc/swig/Makefile =================================================================== --- trunk/numpy/doc/swig/Makefile 2007-03-14 19:57:23 UTC (rev 3575) +++ trunk/numpy/doc/swig/Makefile 2007-03-14 20:15:31 UTC (rev 3576) @@ -13,7 +13,7 @@ # List all of the subdirectories here for recursive make SUBDIRS = -all: $(WRAPPERS) series.cxx series.h +all: $(WRAPPERS) series.cxx series.h html ./setup.py build %_wrap.cxx: %.i numpy.i series.h Modified: trunk/numpy/doc/swig/README =================================================================== --- trunk/numpy/doc/swig/README 2007-03-14 19:57:23 UTC (rev 3575) +++ trunk/numpy/doc/swig/README 2007-03-14 20:15:31 UTC (rev 3576) @@ -72,7 +72,7 @@ ---- * Support for complex data types should be added. Currently swig - dies with a syntax error when the %numpy_typemaps macro isused + dies with a syntax error when the %numpy_typemaps macro is used with complex types. * Better ARGOUT typemaps need to be implemented and tested. I Modified: trunk/numpy/doc/swig/testSeries.py =================================================================== --- trunk/numpy/doc/swig/testSeries.py 2007-03-14 19:57:23 UTC (rev 3575) +++ trunk/numpy/doc/swig/testSeries.py 2007-03-14 20:15:31 UTC (rev 3576) @@ -711,6 +711,8 @@ suite.addTest(unittest.makeSuite(SeriesTestCase)) # Execute the test suite - print "Testing Module Series\n" + print "Testing Module Series" + print "NumPy version", N.__version__ + print result = unittest.TextTestRunner(verbosity=2).run(suite) sys.exit(len(result.errors) + len(result.failures)) From numpy-svn at scipy.org Wed Mar 14 17:07:11 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Wed, 14 Mar 2007 16:07:11 -0500 (CDT) Subject: [Numpy-svn] r3577 - trunk/numpy/doc/swig Message-ID: <20070314210711.6E67D39C0B7@new.scipy.org> Author: wfspotz at sandia.gov Date: 2007-03-14 16:07:05 -0500 (Wed, 14 Mar 2007) New Revision: 3577 Added: trunk/numpy/doc/swig/numpy_swig.pdf Modified: trunk/numpy/doc/swig/Makefile trunk/numpy/doc/swig/numpy_swig.html Log: Added LaTeX/PDF documentation Modified: trunk/numpy/doc/swig/Makefile =================================================================== --- trunk/numpy/doc/swig/Makefile 2007-03-14 20:15:31 UTC (rev 3576) +++ trunk/numpy/doc/swig/Makefile 2007-03-14 21:07:05 UTC (rev 3577) @@ -5,28 +5,53 @@ # ReStructured Text RST2HTML = rst2html.py -RFLAGS = --generator --time --no-xml-declaration +RST2LATEX = rst2latex.py +RFLAGS = --generator --time +HTML_FLAGS = --no-xml-declaration +LATEX_FLAGS = +LATEX = pdflatex # Web pages that need to be made WEB_PAGES = numpy_swig.html +# LaTeX files that need to be made +LATEX_FILES = numpy_swig.tex + +# PDF files that need to be made +PDF_FILES = numpy_swig.pdf + # List all of the subdirectories here for recursive make SUBDIRS = -all: $(WRAPPERS) series.cxx series.h html +all: $(WRAPPERS) series.cxx series.h ./setup.py build +doc: html pdf + %_wrap.cxx: %.i numpy.i series.h swig -c++ -python $< html: $(WEB_PAGES) %.html: %.txt - $(RST2HTML) $(RFLAGS) $< $@ + $(RST2HTML) $(RFLAGS) $(HTML_FLAGS) $< $@ +tex: $(LATEX_FILES) + +%.tex: %.txt + $(RST2LATEX) $(RFLAGS) $(LATEX_FLAGS) $< $@ + +pdf: $(PDF_FILES) + +%.pdf: %.tex + $(LATEX) $< + $(LATEX) $< + clean: $(RM) -r build $(RM) $(WRAPPERS) $(RM) $(PROXIES) + $(RM) $(LATEX_FILES) + $(RM) *.aux *.dvi *.log *.out *~ -.PHONY : html clean +.PHONY : alll doc html tex pdf clean Modified: trunk/numpy/doc/swig/numpy_swig.html =================================================================== --- trunk/numpy/doc/swig/numpy_swig.html 2007-03-14 20:15:31 UTC (rev 3576) +++ trunk/numpy/doc/swig/numpy_swig.html 2007-03-14 21:07:05 UTC (rev 3577) @@ -623,7 +623,7 @@ Added: trunk/numpy/doc/swig/numpy_swig.pdf =================================================================== --- trunk/numpy/doc/swig/numpy_swig.pdf 2007-03-14 20:15:31 UTC (rev 3576) +++ trunk/numpy/doc/swig/numpy_swig.pdf 2007-03-14 21:07:05 UTC (rev 3577) @@ -0,0 +1,1420 @@ +%PDF-1.4 +5 0 obj +<< /S /GoTo /D (introduction.0) >> +endobj +8 0 obj +(Introduction) +endobj +9 0 obj +<< /S /GoTo /D (using-numpy-i.0) >> +endobj +12 0 obj +(Using numpy.i) +endobj +13 0 obj +<< /S /GoTo /D (available-typemaps.0) >> +endobj +16 0 obj +(Available Typemaps) +endobj +17 0 obj +<< /S /GoTo /D (input-arrays.1) >> +endobj +20 0 obj +(Input Arrays) +endobj +21 0 obj +<< /S /GoTo /D (in-place-arrays.1) >> +endobj +24 0 obj +(In-place Arrays) +endobj +25 0 obj +<< /S /GoTo /D (argout-arrays.1) >> +endobj +28 0 obj +(Argout Arrays) +endobj +29 0 obj +<< /S /GoTo /D (helper-functions.0) >> +endobj +32 0 obj +(Helper Functions) +endobj +33 0 obj +<< /S /GoTo /D (macros.1) >> +endobj +36 0 obj +(Macros) +endobj +37 0 obj +<< /S /GoTo /D (routines.1) >> +endobj +40 0 obj +(Routines) +endobj +41 0 obj +<< /S /GoTo /D (acknowledgements.0) >> +endobj +44 0 obj +(Acknowledgements) +endobj +45 0 obj +<< /S /GoTo /D [46 0 R /Fit ] >> +endobj +48 0 obj << +/Length 3630 +/Filter /FlateDecode +>> +stream +x??ko??????E???R?7?~?4w?"???|h?bow?v??:?}?k???y?%jW.??Y?? ??&O?:?O??nu????Zk?j{x??????W"?hm[m??????r?U]?????)oJ? +Zh?c??q"?AZ??__?????Ja????Jh????w?????B????X???? ?^o????Fwz??hT??? +#???[?{?C?H????y?={???/???#?=??;????????o??z?h??ze5,?y R?Y?j?h}???nX ?W$?[????8????k??C???#?b?g??&???GhR?m??G???$d??Cg:~???7???V?????Y????u??K???)'?????B????f????? S??????!q?`a????h?G'B??????}fC?Y$Nxt?c?P?z"?[???f?f?V???qG?2?'???`fm0????@*D???$C???? ?|?????????]?>!??L????m???OX?A?A(????o??U???? ??u?.?X?o? 3?K??o?D?\??????? ??Z???k??rA:S"??vR????F?$?O(?CN?40??t??? "???]?Kv??#X(]????T??c???(??RH??h???x???-???????SCgU???!%??qEO????????t?v?c?TP??6?>JHx ???k?t ?2?7???[?h??Jadkdc6????@?B??/Y7C????#??#?1???KUq7?t|I??[I#@U +?0C??P`?J?i??7?s??(??R*?Rk??????????v?5?C2R??R-?7??Zw+???C*,??'7?G?68m&?L-(A-pQ!+,??y?Pl?????BQ????5^???l??M?;?????6? ?r??????-???TD? ?? ??UT?? ??))?na?z7 ??.E??x.?u??'v~X.?~<cG-.??V-?a ^]??H?=??C???[?????????5?\?Hq???J???I??? ?)'?*T????C?T????"???1Q? u?z?,)?7\??r??2n?bR???P??? I^c????{\??f??hvL`??B6??rIWiX?Z???d??????A69"????8?z?7?>f?????Rhh????3M???~z&??? ???3??????'?'$/sL????? M(?[?????(N?a2T2?=?'z/es%?P?\l??????1#z???5L|k? V??AiQ????O???l2???uK>%?7????Th} +l?????|J?:O]J??????2 +?3[?(lH??????????????V??????????9S?A?h?y?*P7?)?d?`?e?8?:?9?????;?lu_w?????P?v"q:xM???H at p??8???????KY???7?3??????[ ?\j??Xy*{??x?????v_7?m? X?)!?|SN?{K????Zi????]e????P?? ;????J?a8V?z???~M?4?yP?l?H=` ?*3xC?9]???#????sr(yI?P?b??%???P?? +?K?A?Sv?5A:???$???c?}ja?Yc??????V??M?????q??????????t????????6??j-lFE ????My??s?????9S????s???s????Hn???29[L????M+,M? }Uf?D2?7??:q??.?H?+W9acz"???[ ????&?(o ??O???R???????J???????k?ck?x%?n???? ??f????? ????6??6A-? +-????:??82?????,p1?o???*F??G?> endobj +65 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [288.033 562.1429 317.1934 574.0033] +/Subtype/Link/A<> +>> endobj +66 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [312.5275 550.7457 341.6879 561.5849] +/Subtype/Link/A<> +>> endobj +67 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [350.8735 538.7905 380.0339 549.6297] +/Subtype/Link/A<> +>> endobj +71 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [312.8897 475.0296 342.0501 485.8688] +/Subtype/Link/A<> +>> endobj +72 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [124.3686 427.2089 153.529 438.0482] +/Subtype/Link/A<> +>> endobj +73 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [105.5626 402.7406 137.9707 414.6011] +/Subtype/Link/A<> +>> endobj +77 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [178.0471 391.3434 213.3644 402.1827] +/Subtype/Link/A<> +>> endobj +78 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [185.0642 339.2587 220.3815 350.3769] +/Subtype/Link/A<> +>> endobj +79 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [375.3565 327.5825 410.6737 338.4218] +/Subtype/Link/A<> +>> endobj +80 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [168.2912 315.0694 200.6993 326.9299] +/Subtype/Link/A<> +>> endobj +81 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [486.5452 303.1142 521.8625 314.9747] +/Subtype/Link/A<> +>> endobj +82 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [88.3572 279.7619 117.5176 290.6011] +/Subtype/Link/A<> +>> endobj +83 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [332.17 267.5277 361.3304 278.6459] +/Subtype/Link/A<> +>> endobj +84 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [368.9173 231.9412 398.0777 242.7804] +/Subtype/Link/A<> +>> endobj +49 0 obj << +/D [46 0 R /XYZ 74.4095 789.6651 null] +>> endobj +50 0 obj << +/D [46 0 R /XYZ 74.4095 771.7323 null] +>> endobj +60 0 obj << +/D [46 0 R /XYZ 74.4095 613.3264 null] +>> endobj +6 0 obj << +/D [46 0 R /XYZ 74.4095 613.3264 null] +>> endobj +64 0 obj << +/D [46 0 R /XYZ 74.4095 577.585 null] +>> endobj +47 0 obj << +/Font << /F40 53 0 R /F45 56 0 R /F8 59 0 R /F52 63 0 R /F57 70 0 R /F58 76 0 R >> +/ProcSet [ /PDF /Text ] +>> endobj +88 0 obj << +/Length 3282 +/Filter /FlateDecode +>> +stream +x??[?o????b????????i??n??h?"U`MQ?W+Y?vW?Hu]??{?#9?\+?m c?s<^?????Xq?'VN3??r?a???????|{?D???ic/8a??d]AE-??????DAx??@????jn9??~v}?~?-L?*???8X?}???s????A??_S_?y??Hx?:#?$? ]?U???^???5?T???7e?q?2?v9P???`|0??k?T??Kn?7p]>R?vT>Q?P???*??p??1???x?3??Ht???;?D???-u]*??g?a8#?cE????7?vYt?K??????T??????|??h%????W?Z??q?g{????dq?C?%EU??r[g???F.Co???P?)*??1?2?L?QZ??3??c????3??l06?Q?',?Q?%3???????KH??????!}?t???09]?6} ??`?uT`??!Y???1?* n?z?_?e??k?J???)??E^ad?u? ?qa?'\/("}N???+z?h??????(6??8[P??=??@?????????O?2O3?]zM?@?z??X {??L??R?#5???$S?8We???|-?a?SL>?A?j???????????K?[??7???K??U??p?F?c?Q??7???????g???qws?#???8?G?)?"gI??)"?6?}?7??Z?!?M.|???j&E???1?+Z??Q?? ?_??0(i???????X? ^k.+>w??PY?????5???s????1??[???I??L??0???????~??N{?????P??5P??6)?????V?i_[PZ?F9??Fx?[??????5S)L??O?????6m ?L?r:???M???i?Sf?????HU??L1+V?7????X??C:???cB(s?ddA^??a??P???|?????s>???2N??1?Z?????E?A?cy??w? +?-???????z_ ?{V?t1?K ??6?*????d\B????D\2?6?f*??T????7L????Z] ()]=???5????-)?B)"?P??h???Z/lTj??????r +"-??D ??????83Aa1????{?{]??????n??.??!E???????m@??b????)?%?MA4Qh3L?9?D?,??m?)??8g?kendstream +endobj +87 0 obj << +/Type /Page +/Contents 88 0 R +/Resources 86 0 R +/MediaBox [0 0 595.2757 841.8898] +/Parent 85 0 R +/Annots [ 90 0 R 93 0 R 94 0 R 95 0 R 96 0 R 97 0 R 100 0 R ] +>> endobj +90 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [110.73 523.7114 139.8904 534.5506] +/Subtype/Link/A<> +>> endobj +93 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [175.0442 408.1503 204.2046 418.9895] +/Subtype/Link/A<> +>> endobj +94 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [474.6661 408.1503 503.8266 418.9895] +/Subtype/Link/A<> +>> endobj +95 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [265.7793 384.2399 294.9398 395.0792] +/Subtype/Link/A<> +>> endobj +96 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [270.0076 239.4422 299.1681 250.2814] +/Subtype/Link/A<> +>> endobj +97 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [314.0087 227.487 343.1691 238.3263] +/Subtype/Link/A<> +>> endobj +100 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [274.8307 149.1272 310.1479 159.9664] +/Subtype/Link/A<> +>> endobj +89 0 obj << +/D [87 0 R /XYZ 74.4095 789.6651 null] +>> endobj +91 0 obj << +/D [87 0 R /XYZ 74.4095 487.2274 null] +>> endobj +10 0 obj << +/D [87 0 R /XYZ 74.4095 487.2274 null] +>> endobj +92 0 obj << +/D [87 0 R /XYZ 74.4095 444.1617 null] +>> endobj +98 0 obj << +/D [87 0 R /XYZ 74.4095 216.2492 null] +>> endobj +14 0 obj << +/D [87 0 R /XYZ 74.4095 216.2492 null] +>> endobj +99 0 obj << +/D [87 0 R /XYZ 74.4095 173.1835 null] +>> endobj +86 0 obj << +/Font << /F57 70 0 R /F8 59 0 R /F58 76 0 R /F52 63 0 R >> +/ProcSet [ /PDF /Text ] +>> endobj +103 0 obj << +/Length 2322 +/Filter /FlateDecode +>> +stream +x??Zms????_q_:s???B?7???tR;?Q>d?L?t:I??D?(????b? A?N???????????bq|U????????V?4??+??_??x???d????j 3O??q!43M???x?Q??!??TfU??3]7?J??x???J???Z????U?0?kP?K]\?c?? _?????{8???O8??????-]wp?ZV%????8~??;8^n?J???7p|??-]??|?????}g% <6??VI????R??n{?N.7??A7????h?0?????O??????g???o??????O>???????:^V????>???fF)NV??GR?cp?~?1??b??9Z????/v??]?n?????? ?_C$??K}%????CC\z3??????o????x ??`S?A???j~?!?V????=??Y +^?'?????;6???$_?3??vi`?z7???z? ???IH?r???w,J?????9???+??3=??????h??v?1<(D???!4?{??i????q???E?'??7pxt?1?????~?o?? +?k??n&P?7E ?-?j iR?xr????aL?Y??cs:h-4????T?u?.?5????????cg??!?l???? Q???????_L??n??Z &??2?? ?< ???t????8x6't?:GJ ?b???iI???? ????????a?t^??L?????^,oz +60=?]0=?=?)?f??_?F?4;?T??^,?Nv`g?;??w?2/?? ???gL?R&{???)???w??? ???R [Y4V?+^,?J +6`%?]`%?=?????Y?a V?Zg??Rf{???)???w??? g8? ??? 3?T?/?g&0?.0???~\???0H???by&R?1?!??}?|?Tc??2_?@(A???2????A?y +A?????W??S? ?????^,ow +60:??J?n????U?JU???[c(?G???)??^?_??%?????????G?]P???4???Jm?PG????H??Oz??f?k? ?c?F???l????????}?????s??*?x?\N{????a{N ??Yb?? Z??L??????^*??????q???q??w,??~#???*ax?M\??x??V`,???`????HQ??HWz???l?3.?w;?{O???s?K7? ?z??n&??G[7? ???Qw3??J??] 3????;v_?????3????4?????y???????$?????ifn??=JP?X??S????:W?: +?????????to??zw?h?\?Z??~}?n??e~O???& ??9R????????u???0????Pvn??|-??j?kA`?)?:?1? m ??9?J?!??r?Lzd?Z?? ?S`?k?K???x??M ??@???$S?zcE6?\?=??+??R?]e|x???.?p???^??2??$?????7??L.Jp?????0Fc?yB????S??g^J?X?V???p(??????O???? ??q????{??'Y?$?E??J?X?byVS??1??c?'?????q???>?7?????^??????b\i??d??1\e???sx??c?endstream +endobj +102 0 obj << +/Type /Page +/Contents 103 0 R +/Resources 101 0 R +/MediaBox [0 0 595.2757 841.8898] +/Parent 85 0 R +/Annots [ 108 0 R 109 0 R ] +>> endobj +108 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [254.0445 324.4696 313.7075 335.3089] +/Subtype /Link +/A << /S /GoTo /D (input-arrays) >> +>> endobj +109 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[1 0 0] +/Rect [404.0436 324.4696 474.217 335.3089] +/Subtype /Link +/A << /S /GoTo /D (in-place-arrays) >> +>> endobj +104 0 obj << +/D [102 0 R /XYZ 74.4095 789.6651 null] +>> endobj +110 0 obj << +/D [102 0 R /XYZ 74.4095 291.5331 null] +>> endobj +18 0 obj << +/D [102 0 R /XYZ 74.4095 291.5331 null] +>> endobj +111 0 obj << +/D [102 0 R /XYZ 74.4095 254.9179 null] +>> endobj +112 0 obj << +/D [102 0 R /XYZ 74.4095 144.2808 null] +>> endobj +22 0 obj << +/D [102 0 R /XYZ 74.4095 144.2808 null] +>> endobj +101 0 obj << +/Font << /F57 70 0 R /F8 59 0 R /F14 107 0 R /F52 63 0 R >> +/ProcSet [ /PDF /Text ] +>> endobj +115 0 obj << +/Length 3228 +/Filter /FlateDecode +>> +stream +x??[Y??6~?_?GM?B?|?f'?????[?T???euL$?]???n\H????r???f_????????D4?\h??$]??W???????FE?T~??$k?Q?-V)???\}??d JI+???m/KQ?U?7????\??au???{??^q-????t??9[~?????7?~??Y??UL!?f???pC?P????|:?F?ewB>8r??????D?x??? +??oq?/?? ? \????@d*?????)?{ ???vh?1?^I??7???2?z?????Z?e???????gI?'?? "???????A?ZW?9r?D?? j??z%?h{?FE?QI?K??hW"6????-?????[?5]_?????z??)N?*?;?L????!???;\3'????????xDo??O?? ??????pP? +?C??/!s)?.?#_?Wt ,?h???> x?9?G? ????p???h at .m??F8L??????)Ag?_?Xt???E?_Z?~??>??hi85=?!R?Ho[?E?s?C?Y??|??d???_[????K????????_?| ??N???t????#?? ?N?aR?bXS[&y9? +?:qo??? +.R???T?^?E?4p?d?U??M&U?Ix???*R??J??e ??v(W6???? >?????g??i???>???$??????s??? ????????K?????thsp?2?(??O'T5O?yO??&????t.??=?>???Tln>?&J3=3 Um>??|??&?1?;1?\;??'?G???0??????????kbO?Nx:??O??????t?k???? ?XqI?h\????????????<9?????j?'%T????En?}N?Nn?y5#?lK?,/?PQ??L.?x????? ??-%????(K????@ +Wl???%?}?.??;`?,?X???zj?3K,Y??-7??????????m??????#&o6?v}?\??=C????x??"??0p?=??,??c???Zl???z?&|???#Y?&??[#??8D[?%??y?????>????Jx???.?f???? ;?6??????-{????/??Pe ??}o??g????K??mb"H??N"????]?4?M??(Z4?????????@n?????1?p?uqR at Rq-a?=6Z??|t???B ?:P %?????`????T??j{?????g??&??@b?4?$Z[H?B?|~???=Y??}???c?????????x1???1??{?&6??P??7s?O?O6????]?*jP????V???k??B ?)?V?_]C?{8?/???\????qFz8:??O??QF9?<?>}????>?? %[???LR?/ +?]5??!6Q_.??*a????????? ?*?s???|?3????M+?d? Q????? _,?I6?v?2[?G_LQ?F???Dr!??????U????0?>?nc(???z?????0?9?????OK?>#X?????e;0???tg/?Rj?p9B??s?????t$d??y#??y??-??W?]?0?1??](?%?*Z?[sv??_?y?+????????/|?6A_???,???[?Y?? $???C+??vCD?????????a3?G?n???D)?Jp T S?!??????_????a?9??`??43?????bs5tO?1??=?vI????}?_A???f}???{]=??O1*2?1?i?????:???R+??JW??*R?UH??M???x?N?W??b??P?E?#2?P?E??Z???!h`????a_?X???y???(l??? +??????o????H???? +??J5??H5??!0qO?oK'??U??L?O???7c ?x???5e?n]>??????8F@????e?1}??????? \??(2?&v???4f;?&6??(????H5#]*"os???CGhI??????"????)???? ??[U???<? +?+f? U??????????!m?3m>?nv?f?*/7b??gN????p-??? ????????????gU?J??? +C??:??????~A3%? ???/???s|??Nozb??|r?F???>Z ?&\ -? ???n???LX?P)???1R????8?-4 ?;??Ky????????Xtk?mw+?#?7??Z?>.????e?Y*?6> endobj +118 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [161.7108 716.5495 197.0281 727.3887] +/Subtype/Link/A<> +>> endobj +127 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [319.3285 193.7364 354.6457 205.6916] +/Subtype/Link/A<> +>> endobj +128 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [466.3648 165.841 501.682 177.7962] +/Subtype/Link/A<> +>> endobj +116 0 obj << +/D [114 0 R /XYZ 74.4095 789.6651 null] +>> endobj +117 0 obj << +/D [114 0 R /XYZ 74.4095 753.0247 null] +>> endobj +119 0 obj << +/D [114 0 R /XYZ 74.4095 642.3876 null] +>> endobj +26 0 obj << +/D [114 0 R /XYZ 74.4095 642.3876 null] +>> endobj +120 0 obj << +/D [114 0 R /XYZ 74.4095 607.1471 null] +>> endobj +121 0 obj << +/D [114 0 R /XYZ 74.4095 492.9533 null] +>> endobj +30 0 obj << +/D [114 0 R /XYZ 74.4095 492.9533 null] +>> endobj +122 0 obj << +/D [114 0 R /XYZ 74.4095 448.3375 null] +>> endobj +123 0 obj << +/D [114 0 R /XYZ 74.4095 425.2775 null] +>> endobj +34 0 obj << +/D [114 0 R /XYZ 74.4095 425.2775 null] +>> endobj +124 0 obj << +/D [114 0 R /XYZ 74.4095 392.9141 null] +>> endobj +125 0 obj << +/D [114 0 R /XYZ 74.4095 268.8793 null] +>> endobj +38 0 obj << +/D [114 0 R /XYZ 74.4095 268.8793 null] +>> endobj +126 0 obj << +/D [114 0 R /XYZ 74.4095 237.0739 null] +>> endobj +113 0 obj << +/Font << /F52 63 0 R /F8 59 0 R /F14 107 0 R /F57 70 0 R /F45 56 0 R >> +/ProcSet [ /PDF /Text ] +>> endobj +131 0 obj << +/Length 4425 +/Filter /FlateDecode +>> +stream +x??\Ys$?q~???7;??I~?i???6)qm=? +?p0??0+?????Wf]]G??rl?NOwvVVVU??YY` +???H"?Sc?Z?????n???WW,?H??T?????;?5Q????b???TN!????f?hg??_?^??K?6?8??????9"??????m????m??????l?w???w?;???w<\>?? ???????????7o? ?r??+??????????%?Y???(a????? ?????????}? :??&L??W?S' ?Dp??01\?gF]-???x+-L M9_O??pIZE?????>???F5?i??z2&?K2j????F8;?????;?r?????????L??{$y??????o?K?qIk?=???#4??7p??Y?ia???~?'???????0?E;?????????n?O(?f'?Sa6;??S?????~??2OK???v??\? V8t >T|> *?4 ?0??L??aF})?????R? +?,?N?F??? + ?????$L???? ?x-???=2? ?Ht??????u??!?(???O ?/????t??e-Ks??S;9?Az???W*?f?R??Y?R!?J^i?S?W*{5???p?J?f?T +?b?????W??6{?J??????????????-Ii?u?N??_???s?0?-a??7 3??)???fb??????D???f?KB*???S5Zc@9F$?z?Lf?^??"3x??MQ?)? _??W??s???V????]?Z?????@V'???$g ??? ^?A??z?5?O??"??*^$???j:????zy ?i?T????h?%?6-?!??zT ++??w?0$?3^????C "??e?uX???/k?-R(?D???h!????&? ??d???X^(?K?Jo=6????-Z???`?@??X+u%????B??,?p?U(?H???(?}(???Q*?60??d2??K8??Z?#????z??? ???l6???%@???K??g????A?q??]j&????DI5 3?k????{?a{???>qVI?i +2\??1*?T]???.??)~?K????c?????l?#?3JS?)?#?Vis? ????V???{?-05???Y????%$???!$M?1*?e:?0????? + +???z-?????h???3g??V0???@?p???Kt??]nRVj?&?(D ??4?pk?? ?z^???ES??f??RP??D?sd?J??\?w*g??^?d?V0g?L??J??f?V?6g??M??J?y????a?j?g? ?cpk8?????n?a?z:? ??d'???????U?+?????! ?R?????bcv?A? d?S0*?A]N?ii????[?L?K1?* +??t?M???R? `?|R? ??$??L?O??1a(q?? ??a)?s? ?)=6HyNY?{???G7??K?(??yl??>????L???1?)????K????????U?d???g??f?2???????*??RM??????tC?c?j??@?%?????? VSZE????????hx????E??;&?????z?0}???(g???????6p(?]?n??O?W;???B*???Y????|??J+~V?a??????????k?????? yk?%?s??B2?????*???X??%??a?????}???R?j??0L?????W? +??w??!2-?Y?P ????]2MA?p?'m?4^?.?\?v+?=?sx??|?D????V&?%6?*?1f2???p??WbFs??[??? TLw??.??d????QS?1?[+??3??3??2?*6?m?????!?F?D?Xk????4?X??f%??u?T?d????????g?\??m?????J???? ??`S?p??O?o8N?+??C????p??????F?t??????????q???F??e??|????Z?1?K}?15 /?#? g???\?[?(z???B? '3R!??)???L?@N?r-2?`???;R??\??H?f4??2??RjpR@?;??????1?!??;?;5??4wN?:'???s?,UB?B??m?:????c?B?%{?3?? B1?5?? +????>?9m???f??S)??o?W????kl%M?t??@%???U2A?@q*???p?dU???"8k^?}?24???v?k?R`??4 Oo0?&??>i3? ?_?V??m|V???? i???v?7?OW???C??^y??????Gh?R?\????@0? ?n!yQRM[?L???e?????eH??????F??1X?S??i????B?9`_?S???f???G ?W?73\? 2?L?Z?}7*????Z???X?o?%??qL???? 5V?V?5b~?g?^??k??????w ???d?q?b7)5?[????????|????7*???!??M?zr?C?T B?W?g?]??H?x?v?f]8?????LT ??gL???k"?4??\??t?z??dv?????E??a"X??]?4??x?n?a?4;Q?gw?p<=I??d?o????,????~ ??????.M???54F? +|???A???v?w/^tOy?h???C??F*?r????9?[D?~.??a???.%,A(?C?-a??P?_A?(???+??`L?#~\^???????????s(i?3??] ?G2?z$@%F?=???????4M?????E??L?M?P9B?lNa????6??1?T?f ??????k?r?????.h?kT??c??3?? +?WV???m?x?)?Wtn??? ?r aR??????TcZ?;"?tG?7??????Bc???q??/???|h??JmUu?~??,???HT??????Hf? ??????O?dc??_?}?????QZ????$}w>s?N%A?F?M??T?X?2????7Sx? ???? ,?0?;7????H^??K??8Eq"?????Y???X V???)V=??GGb??Xsx???71?#??Rf?c???%L?Ls??????p?????WU???z?V??w?A???/^??????????~?.???SG?_??gdm????euNx?d??????? o?8??u?#2KC??r????B4> +??5?F?%?Q?$??Ab?=?????Xy+9??????^8?? 8??????????~\F?*??b?!???f:?,?O8???????dd??0?? ,R"^??Mos BP ?!?????D?+_?O?vl??xN?????W????h?h"?L??????j??D????1s???O? "tl?B,???Y?o?d~?'?a-?%????p-?5?? o&?_?? ?????/??}??t!*???1)8?V?t20?/??????Ar; ?C??DTi$?A?D?$???I????s???,V`???H?KBt|}?y?6e?H??F?-?^[?PWw"? ?D??P?Z&!?P%?9????e??$??? ?? +??8?["??U??|#??i?o??[?endstream +endobj +130 0 obj << +/Type /Page +/Contents 131 0 R +/Resources 129 0 R +/MediaBox [0 0 595.2757 841.8898] +/Parent 85 0 R +/Annots [ 133 0 R 134 0 R 140 0 R 141 0 R 145 0 R 146 0 R ] +>> endobj +133 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [270.6005 706.756 305.9177 717.8743] +/Subtype/Link/A<> +>> endobj +134 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [305.2243 368.3053 340.5415 379.1445] +/Subtype/Link/A<> +>> endobj +140 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [227.8041 219.3642 256.9646 231.2246] +/Subtype/Link/A<> +>> endobj +141 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [279.3234 219.3642 314.6407 231.2246] +/Subtype/Link/A<> +>> endobj +145 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [324.6699 151.3732 360.0704 161.3277] +/Subtype/Link/A<> +>> endobj +146 0 obj << +/Type /Annot +/Border[0 0 0]/H/I/C[0 1 1] +/Rect [382.9052 151.3732 454.0182 161.3277] +/Subtype/Link/A<> +>> endobj +132 0 obj << +/D [130 0 R /XYZ 74.4095 789.6651 null] +>> endobj +138 0 obj << +/D [130 0 R /XYZ 74.4095 275.3737 null] +>> endobj +42 0 obj << +/D [130 0 R /XYZ 74.4095 275.3737 null] +>> endobj +139 0 obj << +/D [130 0 R /XYZ 74.4095 232.0232 null] +>> endobj +129 0 obj << +/Font << /F45 56 0 R /F8 59 0 R /F57 70 0 R /F11 137 0 R /F52 63 0 R /F67 144 0 R >> +/ProcSet [ /PDF /Text ] +>> endobj +143 0 obj << +/Length1 1231 +/Length2 5884 +/Length3 532 +/Length 6662 +/Filter /FlateDecode +>> +stream +x???e\????iI?J:?????``??a? ?.EJR??Q?;?KAb??s???g? A~AA!T!??????R???A?8??l[_|??@?(?_???>???? ?D?@?$?G???LQ??????+?wH ???$8?wH ?F?$p? ??E?P???Q! p?{"~P?=?^4F-@??-?'??k??????~*???????C@???o?&To?u*lJ??7?j? ?? ?Q???5???.??% ?Q???Q? ?Q???e??????D???7?? ???????3?????J??Q;*$?? +?_??????:@????????>`{?? ??T?sJ]Dq?J??lntE??x????V???thA??;??{???4?????L?Wt?-zC??C??_???{????5???i???????7?????????0P?l???y?i'G?S?p??3Z??WMGz????j??Y???@f}?????E??{?$'b? r~???3{o??w????tcyNGj???_?&????-?FB\u??[!?p4@??gp??5B??ETd???X?P ?q?D?D????C?kAw?????8(%IMQN~8?%???;????]??{W?KU??????????? b,???;???j?_?0C???~?wa??(Pl0?u?E???j)???q?}?P?{~?????+?s>RHA??c?24?/?!=?tp??x?C???p?g?8( !??-? ??e?w????9h???????k9???.? ?Z????wZ??`&cX?* ??? "R~???kc????',?b\???*??_}~??VW?c??(*? +????J?9a)He??????A????9)?in7???"w1p????FD?]???1g|?+H? k???X6"2???ho?ADZ?cn?<}ai?e%????zyi??=????b%????@q?m??H????K??????>???c?n??#???G?Z??X<? ??cu8??z?????&If??kzC?@z*J??!7r?x"??????W??Y??O???????~?Rf???{|Cm??q???i???N?B?I??.?Kg?c??2bF??H&D3?4?I??| ?+}??q(G?1H????????{???M???2?R @?? 4??e??? P?I????e??Q$v?B0?2J??N?1???}????} +h???c????v???tY?Je?m??5b??d?`?f?O???T??@?q?r??%?XJ?4}?3????D?W??B+??w ,?#-V?zTO?!@????%?????? +C9?"/0??????0?C|???R?Q???;???R+sj?d?@o?? ?}???x??!I?1?j???]?w-W ??T????B????~?+????-?V??????B,.,?????j7??4?Th\?~?(~???m???;?T??9?P?????)???????f???o?`*?M???C??9??"???i L64^U?ft???6?k?+?,?4??C??#?b|v??>? ??;?????-?g?OHy)?!??K?????R??????>B?????????????%?????_?_`???]P???&??v?Vw?N?9?????????s?y??I?s???x?? ?p???C? }jCI????,2???F?'"????r??i????K?1?c9'"2;9BM?N?AYM???@1??Uo??J????????????W,V???D?y??:gRd*yM(!??;h1*Nl????4??e#??????^????}????+??>???????l?:???=6??M]???G??Rb=4h????(?Kr?`??? ?{?%??=??Wq?O???7V-!????{1Gp??????????? }XC?L?4?518?q??.????"?YX??"Ek?Q_,??i??X?3ZE?K??? +r?n??YV??x?e?????~??Q?ks??J???<D-kY????????itm?| cRX#??W ??)?H??x??fQaNG??68_??\cT'c?? ?B??{???i?{}c((??????f?}????????\.?&?LKc???)?>?H? 0?'o.?'C???????1??|2%]ZD?Bw????~????uMr??$??sl=???4??Zai?!?/?M?????K?}5W???yq}????5?n??8??@ E?D??? ?t?ke?p,??IJ?sr??;??az?;?RY?\?A??!???/?n??s?ajw?????5  +?dn???C3&??U??Lj????"???-_???|???[???V?B?(?x????n??S??o?u??2???g?????pU???F????@,?@b??5?z?9J?#??L????:?+?d?Kf 4?????@5??,?@/???0Z??????|?*??yS ?????C????H?0R?{1???^??????k,z???;5\?T??????f??!F?zk?I,??->Z?E?/??G????'=M???~ Z+???r?|.????Nh??z?U'{d???G??????@ ????EbY?0??;?w?? ???*i?$~>?}?????J??}?r??????Q6????,h???*?}?j?j????}u???????T??B????????\?L$a???????dTDe??mj}Vq?h?xF]???.?)n????m????r??N??????2??O ??WfV?w?D??7?c???+}???B~??Q.???Q??A??;y?G??K?????????p?wzn*?$s1??UO??{n=?J??ED'??'??,??????1?`B6? (m+?????[ ???T="???8?G)??_;m=??4?|???8?3??????Oe ??cy?v8X?M??????D??V{??@?7??8?x????{v?S?r?}? +??????\???|???W??W&Q?en????~???B??CYA{]?F?z[VR?S?^??]??P?2R?Q??d/t????n#???&u3??h2???6I???N?7d??O? ^???.>)???????0lm?????'?4e/c?r-p /,~??*?H5~?k???um{???H????OL3??n???vYU]??Ix?1?V T|w`?n???w |/?#?4X??J???????#??`[?j?p??/M?5?endstream +endobj +144 0 obj << +/Type /Font +/Subtype /Type1 +/Encoding 147 0 R +/FirstChar 45 +/LastChar 121 +/Widths 148 0 R +/BaseFont /HFJZPX+CMR9 +/FontDescriptor 142 0 R +>> endobj +142 0 obj << +/Ascent 694 +/CapHeight 683 +/Descent -194 +/FontName /HFJZPX+CMR9 +/ItalicAngle 0 +/StemV 74 +/XHeight 431 +/FontBBox [-39 -250 1036 750] +/Flags 4 +/CharSet (/hyphen/period/zero/one/two/three/four/seven/eight/colon/C/D/G/S/T/U/a/b/c/d/e/f/i/l/m/n/o/r/s/t/u/x/y) +/FontFile 143 0 R +>> endobj +148 0 obj +[343 285 0 514 514 514 514 514 0 0 514 514 0 285 0 0 0 0 0 0 0 0 742 785 0 0 806 0 0 0 0 0 0 0 0 0 0 0 571 742 771 0 0 0 0 0 0 0 0 0 0 0 514 571 457 571 457 314 0 0 285 0 0 285 856 571 514 0 0 402 405 400 571 0 0 542 542 ] +endobj +147 0 obj << +/Type /Encoding +/Differences [ 0 /.notdef 45/hyphen/period 47/.notdef 48/zero/one/two/three/four 53/.notdef 55/seven/eight 57/.notdef 58/colon 59/.notdef 67/C/D 69/.notdef 71/G 72/.notdef 83/S/T/U 86/.notdef 97/a/b/c/d/e/f 103/.notdef 105/i 106/.notdef 108/l/m/n/o 112/.notdef 114/r/s/t/u 118/.notdef 120/x/y 122/.notdef] +>> endobj +136 0 obj << +/Length1 751 +/Length2 1033 +/Length3 532 +/Length 1579 +/Filter /FlateDecode +>> +stream +x???iTW?Q?J?V?VRPo?Q?L? $0 B?Me???H2?3???,??JU??; U$.???-? 5h???ZA +?"u??`-?O???WOg???????g?;\NT,O???a(I?,.&?F +OM??{?????5???((?5??U?XR?C??r?? ?????T??,?`???a*N??L???>/??^?r?)??0=????0?b ???i?a?7?????????f?~(???Q ?6?? 5Z= )? 1H?????b?^3|N?j\)'R???????}\? ???4?B?:8??6???o?C??_???? ?P????Z?W??Z??fB?pHD?"d???r???lK +1?H??w????\W??[?448?5?:??W?????s???m?-U???????-A9?n~o??'u???-?3M??;i5YN?????d??M??u5?/?T??L????5} ?N?g??/?NE?S?W|??[.?5????E???F????K?v???'u ?????k?~*w?X???q?????>=>/?YQ +?J??=KPD????????~I??7?9X??u???7fM???%?oo????!??? ?y???w ???h%???n]??K;V?t?O?_|tz at -????????Uq??:?k???~.v?Hc???&t????V???\?C?rR??.??~?????E????????HF?N?P{???e???|??>???W??|q` ?}a??G???m????/?n?|?+o?J1??3e?*??????????m????w??h?1v ??eD?????????,?.???XN?????g?????{?|A?9?xH?q]n?e#?\??%M???K?^? ?????=u??}??;??u3n???xF?9????^?\w,?T?Yz?8??fr???=5|??????}s?E???;??????p?q?V>??i? ?)[????P??8?fk?v?????{M=U??i??%?+* vS?m{\?)?M??}??`???????&??? +> endobj +135 0 obj << +/Ascent 694 +/CapHeight 683 +/Descent -194 +/FontName /GMWUIW+CMMI10 +/ItalicAngle -14.04 +/StemV 72 +/XHeight 431 +/FontBBox [-32 -250 1048 750] +/Flags 4 +/CharSet (/less) +/FontFile 136 0 R +>> endobj +150 0 obj +[778 ] +endobj +149 0 obj << +/Type /Encoding +/Differences [ 0 /.notdef 60/less 61/.notdef] +>> endobj +106 0 obj << +/Length1 750 +/Length2 576 +/Length3 532 +/Length 1110 +/Filter /FlateDecode +>> +stream +x?SU ?uL?OJu??+?5?3?Rp? ?44P0?3?RUu.JM,???sI,I?R0??4Tp,MW04U00?22?25?RUp?/?,?L?(Q?p?)2Wp?M-?LN?S?M,?H??????????ZR???????Q??Z?ZT????eh????\????????r?g^Z??9D8??&U?ZT t????? +@'????T*???q????J???B7??4'?/1d<8?0?s3s*?*?s JKR?|?SR??????B????Y??.?Y???????????kh?g`l +??,v??HM ?,I?PHK?)N?????;|`?????9?iC?,???WRY??`?P ?"??P*??P?6?300*B+?2???????t#S3?????J.` +?L? 2?RR+R+?.????/jQM?BZ~(Z??I? ??% q.L?89?WT?Y*?Z? 644S077?EQ?\ZT??WN+?????2?A??Z???u?Z~?uK??mm+?\_X????????7?D?????Rl:/P1?d????????(??l=U?h?d?_O??E?k?v-X1??t???`????i????_y. ?1?????????:?un~Q???3/??S??}??]?? +???$e~s?]F1????/??Q???m????|<?????/??q'}I???+6???E??g???xT.??G??gt???v??G??U|?????~??]?R????_k?9???:?{?p??G?? ??d}dN<6??-uB?o?H??=c?M?vH??z?q?a???RK?~,K???}????????m??????yo??~?????v? +?_????s>???.#????????{?/?????k????\m?|??r???X???????ad?j|?????R/?,2?p?0, H?IM,*??M,???Trendstream +endobj +107 0 obj << +/Type /Font +/Subtype /Type1 +/Encoding 151 0 R +/FirstChar 15 +/LastChar 15 +/Widths 152 0 R +/BaseFont /POGVCN+CMSY10 +/FontDescriptor 105 0 R +>> endobj +105 0 obj << +/Ascent 750 +/CapHeight 683 +/Descent -194 +/FontName /POGVCN+CMSY10 +/ItalicAngle -14.035 +/StemV 85 +/XHeight 431 +/FontBBox [-29 -960 1116 775] +/Flags 4 +/CharSet (/bullet) +/FontFile 106 0 R +>> endobj +152 0 obj +[500 ] +endobj +151 0 obj << +/Type /Encoding +/Differences [ 0 /.notdef 15/bullet 16/.notdef] +>> endobj +75 0 obj << +/Length1 884 +/Length2 3123 +/Length3 532 +/Length 3746 +/Filter /FlateDecode +>> +stream +x???WXS???)?E)K??iH?[T"H?.U ? +??@])RA:(????*?("]?&A?l at B?p???o{=??>?????o??????S????,??j??(?T????H??!?ii4?P$?9 T??? +?6?@??5??R " ?I?~d??8?>?C? ?u?,?b(N?=? +??????????Vx??'H?q0 ?X +?:??O?D< P?+??r?{?${?M?~?<?M?HDW??!p#}7??????????\]?0n???????c??~?R????( 0$?@2?w?E?/s? ??????.?J??%:???C(?'xj|A?1??u?WO?g$?~wB??O??6f??????????b????????D&??z??t!??{d??fZD, G : +(%C&c? ?CD'?D? ??t?p?D?/????Id????[???$$?q? ????I?? ?8???!?? *p?/H{??J?? ?mx??/??&?7?T: @P???U%?k?K??"?A"??y?w?o??MA_ ????????7?\????g9?)????*?,U63?~??\?a?-???9??&??????????W??a?|?\???????3v????????9Iw????\?~?Rh0?T~(<????????.??#T???D??~?A"h95??I;O?&Q5?K[??? +????2???z??!so??mv?q_?h;y?E?j????WT6?s???g??o?????Q?+??????s???f???4?5/????w??*~?QX>X?A?.bc?vAh??????4?j?? a?j?55c??a???.???7or??,>(g????;hA-\???????t?6?W-"$?uA???F2??'?|(???#]O?{@D?%s2?j.?$?r???pc?c?#|?^??e?????????u??CX??????b??'?g??uL??>&?&????NQ?4d?*W&?t?\?gZ??kx??C8?N???2?Cf?LX?1?C? +???} ?6?U???K????c????)Aiw???? er???????rf?G???QM???=?5?0.z} ?[? +???? +?uwEM??TN}?Y??wI?*????l+?O?C7%H?:???,???/?7?g?#?Pc?? ?_]?l?0??}?<j????b=W??/??u??(??F??J&B[w?\>?????JI=8]????9q 5Z??fZ????!?Uu8(-???In~?*?*|]?????D":???&?)??.????k?????|?O|??S??Y+8/)]??{9y?72????N ????????~???V???u?????m9??#%????E^*?`[????f*?ny.!_a?!&:0H?^???m?I?X_??<2*???mN?B?&????jm???;?jAuOc??iN???,\_??FV??N:-]???+??'?C?c?as???rU ?8??}??(??k?"+L?L??P?h?R???et?x????4?????J5??????????91??H#????_"}?:????l?G????j?~|?c|?;?????6UA?6??{?6???% +f??]???m???????B?:S1z???O??????_39YR:?l????gfF?w?!?*??x?o?h?t?P?*>y???+???????%y>?%?B|W?????I?l???Gm|??B??"]O$?fS?I>?*?A?<3???h)?uL??????G r|._?????????+b? +?ONY??????5I?n?mdl?Y7?!U/?g8 ???|n????\????^??-??tl9????a?? +?L.?-??y?z?8?+??b????3&?K(???L?Y{X?uP[A???h??[??=???H?P??il???????f?? +]/?@]l?u??oW?-??????{K|[???^Y??'%??N???????a:b??4qMB??????fr??FOP??Bh\???$????C??*??:???T I?|?\??e?Gc?$??`?b??'^??k??????~?8cb{d?u?Rn>?q?H:?X?th?&G?>c??????F~!?T?X?{?2~???<K??:?A-X???'?>??6???????53'???????LR????[??????j?l?:n?FM??;?>"?Uw??2j??7??y/??s<> #`?.h?}e??-?d`C????A?u?@???Y.H??U???????@??ikw????U??g???6~?p9?j?'Ft?I?????zj???eJ???a??????E?S??????>??NKKt???q???*Y?6??L???Lt???3FKY?x??d~[ICsm>??????????U???d*?5Nw???}????ua?bjS?????8?T?$;^??Z[?cY?>????[??????t? ??%??F?H??&7#c?S?p??t???(H???=?%?Qv8?T +z?ysm?unv?y??;??5M??50?N?Wc??OI?&?~|c??e??w??"6r? +???2S?? i,?=&??????*w??(?\????q???????;R?3 ??[??}??)??.?????J ??? vd????Y???=?[?x[?K?f????bv#???hP!??mt!?a?w??i?????f??v???V?Y?"?????????????6f??~0????. +???i????N??u??5IN??q?w7G12?x????|?tS??M??f???b?(K???> endobj +74 0 obj << +/Ascent 694 +/CapHeight 683 +/Descent -194 +/FontName /WZSOTE+CMTI10 +/ItalicAngle -14.04 +/StemV 68 +/XHeight 431 +/FontBBox [-163 -250 1146 969] +/Flags 4 +/CharSet (/a/d/e/g/i/n/r/s/t/u) +/FontFile 75 0 R +>> endobj +154 0 obj +[511 0 0 511 460 0 460 0 307 0 0 0 0 562 0 0 0 422 409 332 537 ] +endobj +153 0 obj << +/Type /Encoding +/Differences [ 0 /.notdef 97/a 98/.notdef 100/d/e 102/.notdef 103/g 104/.notdef 105/i 106/.notdef 110/n 111/.notdef 114/r/s/t/u 118/.notdef] +>> endobj +69 0 obj << +/Length1 1757 +/Length2 10713 +/Length3 532 +/Length 11715 +/Filter /FlateDecode +>> +stream +x???e\[???qwJqP?]?+(??'?"E?[qw+???{q??????}??s??{???M?!??s?c????Z*5V 3{???????S ?N]??????!?FK+C@?vo?!@!?? @? ??pr?pA?h?){70??`?b?k?@????C,?????65{S???????u?@????qr?@?? ?d???W&y;s{??d3g???;AC?????4???q???????n at h?????????????_?????m??d?????? ??? ????Z??{49???????3A?%? ?*?L??o? ZM?????<tGd? ?r?? `?&???3A??=?O???~????O?????uP{&????t??u?|&???3A?t?!A??L????@??^?????/5r???`'S{?s????s??+4y&??????]??M??K6??9,?@??-?@h?]??Ma?Bc?>#???n?Bc???? 4?????1??@h ????????1\?@h ????m?Gs8?x?-?????$%?]???X??'?7'??????i??`?????z?????%? +4E???7??J? ??%?;^??+iQ?T?>???7 k?uP??i???]q +>?6?6???Sh????_????????S?H???s?r???;?n???8??U??2?-N'?'??? [?????L?????T>~m?????t?T?8I???y??]p?b??????P????????rQ?b??5E +??%?1W7f?:(??X`Y????r? ??k;?IjYGrY?T??|??B???Zce????OT???>E?qA'?#?bLU?!???w8?N??~r\??qb??G at f???D??j\?'r?Q???????V??:s???Z'K??t??7J?X?o?ibn?`?%?~??s_??G??he??U s??j??????[?,[6V? ?j+&n????v??`?{a?k%??]?!???7?d?fb~???(R?[n]??4nC??z??H~b???Z)??M????1;?m?Om???f?????/???k?g?np?pE\d?y?o?S?p?? ?9x_?????????-. +?o/?e????P???R?6??C???3L??^???:?]Xpa??;?vZ4WOkk??]???E???az????C??M?m??}?+?*?A?5!??+i??"?^be?o??6#Z?azi?6??A??4?|sp|??????z??Ge????????.???u]T?????wZx;??r$j9??,?HTN?Qc s ?? ????w???? +8r?M???=3?????O??g???/_??\v???>?f)'???????\}?7?????N?????-????\-6&I_??U ?Q???J#??]?? ??MT^???yM?3)??NG???9{c8?}K^z?:/?>????&???A????u?~?G?o? ??????_??? ??"?&b??,^o?c?X8t-C8o5????A?-n?h?_?vDc???rYAz??a??qm?_???X[??~????2?6????q????u?Wd??D +?????????V???????u???,???????-1??Ns?X?IT?(]?=???????T??@??? ???[$??hwN??8*??&?[? \?? U???[??.??LGY?EJ??aJ??s?y"wYlYg5?}????'pB?:?J?lW???W\?_?? |??-S??!X???EcS/DaJ?m? ?@?qY a????????0w1? +?s??W??l?gr??Q????:?;??? ????;?"???S\>?`?&D?;??y???x/??M0??h?X?P-????(??L??^Z?l?F +x????:M??O??1?D>??'~I??>?>???V??f????'}d???W????n^?w?{O6?hY?C????-??) D?????_??6????J??{7 +?#% ??????M??}s??????????U??J?CVi4???wg??O???a)?2?Q1d5?????"?????;??R???v4?,?;???B?]?'???)????U???g??A?H^???b?4b]&????>iL5[?.+????u??$2???0 +??*^????{V'?]??X???`O? ?4?s??{,Ey???E#?F??H??????4??x +??y??k????&nb???V??&g??xs? ??tj2??t??|??j?W?s?l2WF?p~??H??? ??? ??7b?????Uu_{??2#??tk???VMjv?!om????7V%??????I???m?cJ??kD?5}o??q??Q???5G????>?M?gJ5["z????+??|????=??A# & Ybb# e?K?$?H???%??+??o?"?Z~_???[???fP??2?9Ol?)??????,_?g???v;?f_??? ?0?w??c>??????*???(??zIF?xJ??E?w???#H????)???R7uT?sj????I?z?$96?;ak????_??|qy?L!???= ????d3??^I0)F?GW?#??0??c?\??[$@?=Mj?q????pJKX?m?APtm?&? ?z*f?<#K?B?!??6?????*?}?!)G??{?[?s-???? ?3?H?? '9f!=?????p_?/?l%??3[;??I>?d???????+;?e_???????Q!?e?? ? ??6?????a??j/|?!?--??X???"???V$yF?z]????(|??[???5x??7??6??B'??/?f?p1??j,?PU?s~`(9d??j???? >L?kN4YvJ??? &???????/????M?0e&G?&?z???"??2^6?gew?F???I?l? ????@??;?e?7G}mr??b?-k?I? Q?te? ?Q?2?GlY?fEOk?%??? ???c?t +T.lw*8??????\,?6Sl??|?[???~???@?jN??N??r?? f??$?%?+)???F?`?h?n? ?}Y?I???6o]A????f>??? ?????%?i??j?u!?eh?????!????9??uH3??:???v??}?????Z?k??'????rK??;?|???_?H[]?v,d???F{i? :? *7???E??(5?$??i? ?"6???V?a?k_??[%????G?????B???+??!?JW?????G??p?CF? ???`emu|?$?Fc??????EaQ??]?zMG?LTm???f???????v????????L???0[??~? ???? s?a???9?(m?#i*1??;???y?????l???q?&9 ???x?Ei?\@HHh?r?oC@?&M?????u????>??5?Y??K??8???!w?????|?Q?2?????:t???????? ?Q?e?+??%d??#?%u*? ?K?5*E$??F?Q?mJ??MWV/R=fM?_?)%???2?4??M???8?aK?tJ?LH}?u|"s?H6K?E6?h?@?u99??|QN%????????'J??????[?.???Dt1???++'F????P4 +?5??=2'??u?S??F$?~???Rh??s6?s??:?'?Y?^??Y?(???0??T:y????OKS???? +????'?6??V?Q`L?????O??N8{??A+????l}?P?1??N?R?_?os?R"?^?m?????o??????'o!!?35????s??O}O?=??E??FM:Su\??a7?~?T?on?C???\????v70?t?T38)CI?pp??mQ???Qy??N????2$??#rx)??#?a677?7? ??B?????{????~??l?QO5????>??o??&???9?K??????'-]?+???????????????}?kX????iz??b?^???W&?5?????J?F???}bq?]??????B \?F?!???:???g??VA?x??,???PK>E?M.?o???Ha?b((??/???6F*:??K?A?? .???1???/?r??s?9??Om? u^"???o-'m.B??? >h<}End}p_??a?@s?n?X?#??a?????J??????q!???]?`71A?Mq?8?_?M??????????>?KC???6??i?*??_?RI4A????????8?]???J?:rUA5??X/?P.???@???d??X>P?H??ma???-"q?]?7?O?? M' ????T'??zu???)g?Po?7[?_??/?p9?|?P^??I????sQ???U?e?f?!?P??Wc?K?=F?gYN?~[&?#>???a?Gc??^ ha?Q??? ?W?i9???Gv?????~}?$??Cz??X.??d-???L???)??C?gq??QT3????}?(??I?_,???T????;6???p? !!??1???????ML?????H?l?`???.??+??Oy9dz?R6?a??;NM?m ?Ha??E?@?????M~zZ&?c?] ?/^??+?-??M??????SD_gb???????N?F???G????z???b??'????? +????'p?>?y ?? ???}?????(?'?????:?????]?_=?V:??y}2[i?d??????]??]*V;D?+??;?~??? ?<[??7p?~??????????p???O:?? +????? ?????y??2K??? 6??~?m??R/??u?}2*????:?????z??d??8???D# ??s???,?Z4??n??q? ;UtB#?Mf?b?Ur????9?E??0?tN ?{Q??7B?)??9h ?JuU6\?M|??Cw?h???,?7??X?L?}??? ? +Q???????1?s???9?(B?GR??????:w??y????'N???,????????? +???g?pl:???n???)'?_?,??4??6??4?'Q???7???? ^?? +p??n??_??r?i??? ???/2??UwZ?8b???)?JH?ZV?\?%?"N?K?,?w<6y? R????%$p??wy?F#?!????B&??R??J??B\%??&???P?4cP&C6Sv??E?g~??:???l_??(????w?|??\M???????(? ?H0z[#?'??X?m?,R?(???? +??$/??6?-?y0b??4? ????n?j???Z????`5?f??????a?????????o* u???^O?u??s?K????h:?yT?(.4?aYK?R/????Mc(??+#?1r?\????fX??????.?R?Ay6?+J86ZH??6? ?????k?-lB?U?9?TO??w??Wh????N)j?n?[?`??<?7?.r*j???$o?;????\??-p ?2|%??apw> ?C??XM?{D??7-????]??H%??SY?w???????BB^?S?|b??l? ???#c?d?K???3???q??????????o?O. ?& ?? O_?S+?*???c ?T|???n?4D?Rh????G 2w:??c}???$3@???"??i??#R???h??^??!?h3??C2}?????$w?`????f ?EG&j???w?WF?!?)??OL55?K?????t?8`?=?_z?n???,??-??G??LVs??q?????????*s?f)u??i??=? +?4?h?8?f~?7Z??-??;????x????>RuW?h ????????Y??$\}???#?????K?qi9x??)U ???6?{??U~P*?s?E???,?M????M??'?:???n??,?S????xx????*?`?`?x?s??Im?%???????UEw???????X??x??y?0L??D?Td8?3?Zv????o??L??$^;?&?'d? +;2????%?>?????k??s????};?Q?y??#??????K??roc-?(b???#?N?+???l?J\?T8??aFZ0?Eo?6Q??r???????????y?I?p_Sa??u?d??FV{?????]??:k}?TA_????( /:?RiD??P???x +K?'??????R??=:?(?????`?fT??????x???Y???>~=O??D?V??Q Uz}?e?????~???|?X?????6`$?n? +? ??$????????x?;?8?????y?;}j?????-?????fa??j?????{?-W?f?#????a?Ayf9?x??Eq C:lI+c????$??l?"?>R???p?* ,??8%?3???TW?L??>E?;??\?}zo?5?????Jq???s?L??????Ur?-?L%??9???:#?Y?3??Z????y?? =???@VQ?q??D???|QT?F}H???O^??N??E???}YH.?i??Ni?S?a????w?a[?? +?TT?CH??????>w/Q?v?b@??????????q6}??uP?Y????w?FMQ??X?q(?G[e4>O??oD?L?5??3?vS?:0???j +???(?&{???C?mQ?????9)???~??x,?Vq?yc2???*????oE?q????oc:?P?>?kH?gE??|??OS?WF?ND ??T???g_+?+???#???j? ?z??w???a?a?????1?X??T-????y?i???GY??[?"??*??X??????e4???t??l????RDf6?;?o ?d???n??_???c??O????????\?_%\?&?8?n=Y???? +5??R? ?2 "l)|KG?%??A"Mz&l?8??ab?E?????A?j?F3?W?As????N??C??,?'?i?|???KV\? +???/???S!&mbC?y??a??d???H????OnB???=???iK8????L T???? ?76V??uL???E???4?I????>??:?6g~Z??zz??????>"l%\?Sh?Nv?d??*?]s???\8???;?a??O?b??QhV???#????\?Y???O?Z?K:???SA u?????b??tT?}???;?Q??0n???!q??}?Z R=?@r???6??M?p?n????W?????????????^1??' +] 7???O??g?????kt? %???i??;????d ??FO?k???gw??? ? ???????9j???>a1???????j???,????x???X?z??3%i?x?n?_?W???uWoWu 1{??i????=?7?'v?V?????`F??8??!SRbP??k5*?&???f?{?.?? e? ?????k,???g?u??]???+{m?*3?#???+p??????' +????{[c?5??_4u?endstream +endobj +70 0 obj << +/Type /Font +/Subtype /Type1 +/Encoding 155 0 R +/FirstChar 34 +/LastChar 125 +/Widths 156 0 R +/BaseFont /CSTUWT+CMTT10 +/FontDescriptor 68 0 R +>> endobj +68 0 obj << +/Ascent 611 +/CapHeight 611 +/Descent -222 +/FontName /CSTUWT+CMTT10 +/ItalicAngle 0 +/StemV 69 +/XHeight 431 +/FontBBox [-4 -235 731 800] +/Flags 4 +/CharSet (/quotedbl/numbersign/percent/parenleft/parenright/asterisk/comma/hyphen/period/slash/one/two/colon/semicolon/A/B/C/D/E/F/G/H/I/L/M/N/O/P/R/S/T/U/V/W/Y/bracketleft/bracketright/underscore/a/b/c/d/e/f/g/h/i/j/l/m/n/o/p/q/r/s/t/u/w/x/y/braceleft/braceright) +/FontFile 69 0 R +>> endobj +156 0 obj +[525 525 0 525 0 0 525 525 525 0 525 525 525 525 0 525 525 0 0 0 0 0 0 0 525 525 0 0 0 0 0 525 525 525 525 525 525 525 525 525 0 0 525 525 525 525 525 0 525 525 525 525 525 525 0 525 0 525 0 525 0 525 0 525 525 525 525 525 525 525 525 525 525 0 525 525 525 525 525 525 525 525 525 525 0 525 525 525 0 525 0 525 ] +endobj +155 0 obj << +/Type /Encoding +/Differences [ 0 /.notdef 34/quotedbl/numbersign 36/.notdef 37/percent 38/.notdef 40/parenleft/parenright/asterisk 43/.notdef 44/comma/hyphen/period/slash 48/.notdef 49/one/two 51/.notdef 58/colon/semicolon 60/.notdef 65/A/B/C/D/E/F/G/H/I 74/.notdef 76/L/M/N/O/P 81/.notdef 82/R/S/T/U/V/W 88/.notdef 89/Y 90/.notdef 91/bracketleft 92/.notdef 93/bracketright 94/.notdef 95/underscore 96/.notdef 97/a/b/c/d/e/f/g/h/i/j 107/.notdef 108/l/m/n/o/p/q/r/s/t/u 118/.notdef 119/w/x/y 122/.notdef 123/braceleft 124/.notdef 125/braceright 126/.notdef] +>> endobj +62 0 obj << +/Length1 1170 +/Length2 5327 +/Length3 532 +/Length 6065 +/Filter /FlateDecode +>> +stream +x???e\?]??Q?S@%?n???;E?????ah$?????n?[??T)????n=????W?s????]{???????????O????"h>?H???h ????llJ( G"?!h?$$!(??????????0!@ ????????J\%??`(?5????`N??G??C{????? +x s???aP~B?[?V0[8?P?/G$@?_a??????a(W?)'?$c?D8z?0B]$F ?q???Wust??8?U??.??:? ????H'g74 ?ABa(????eN??_2h?#?Za??????=a?Gp????? +?;C@???mP7??5??????{??@z9?S??????1?A?=?@~ ?I????2?1?5 +G`BDA? ^???????#?0O??X??Dc?0-y?A???Na????? ?W?_!Q??3????B??,?H P?M??s?&!???o??C?????I `??0 +?3)??$??M?????? ??????1*??#??bt?@???oa? F?b???b??1?? ????c????p?16<~? F??o???STDz????E@??B1???-?? ??!??????7??1??y?? f??R?????e~*?q?o)????6tOu???r,~????Zo|U?AI????????5????{??@?????mw?? ?V:?? ?-g????d?????Dn?M??+K2)xu8?5????g?e&?S????`Q1c? GpXH=??c?4??p?????;+?A~?a??y???o?(? +?s?-????X?k??x?l?W??M??q+??d?(s.????m3HN??dW)/3q8??v?%Htmls8?h>`???u????m?_M ??9\G??????Q?zbf+??k?"???????G?????T?W??Ut?????0?????lG?l???????#????Y??k&1?T?I;<>s?????Hqc}??r???^?s?? ?.T}'H????E???R~T? ?H??????g.g????nk?e?d??7??[o????????? B^?=V?t?????????7j??j ?V?r ??WY9+?z??[? +??????QY2(?[|N??l?.???Nl?k?&O? LI2?????p'?]?B?????? ??q?{?X????H?]???1.?.?p??V??9"{`>???`?K6?u0M?,4Q????M?r????$.?,??}?`??XO??Y^6??8???"chf?3??Ly???r!?{:?s????r'F0???????????4????????V?z?\:?????{I??/???~???v???v?HA?$uM???zI????jJ?????? Se +w???.?????????K\??dQc??mM????p???)??Qls?J().[????5vq?1??j?>?%?F???}?`???????ZqYjW??~????>?*g???[?Dh]?m4?E;?.uf????a=s??<0q?D?8??}?fd??#[?rK????4? TY? +????Y}????$!?/??2?8?X??\f?? +pq??0 ??????"9??iN???_":?k?O7???I??????.??Tp?$a>?=???T?Nw??DX?V??+???xO??(??'????=w????I?2??n*X&;k?(s?d??U?B??uL????|yh?@????????u??b ??o?N??J9??? ?x??~??u@???u?p?Pj??&?m??V??y????L??J$v[?'????????$;"????jR?%???p??I??Q4?$??#Zs)K??K?oH?j???????`]????B?O?[????[????z?'???\??0?????WF+WKdM??Y?=?{?????yu????F??C?r????g???r?o+??x??? ???????w?t_???-F??Nn??~??n??oT?n]f?u'?9???_?T~????L??????^?*?i~??A??0%???S???a?aq????"?-Ap????y ?y?)?r?Y?[???3?[???????z.?;?l????EA??P?Oa?iX?%?:P???2??e?I? -??@&iA?b???mDNR??L}*??A~?G ???( +Z?Q=T?GVi?6?V??s???????C.o????d?r??1v?j?????E"jr?7v83G??lHX??rn8???$??6U???RM{v???B\?????]???O~?)#?#???l???8?TE>?????*?wnb3??V?w???*8???????????h? +?x?????c?*7?g>???"??e??mt???l????9Gl???o;??%?1?????~?9?????m{4-?5????5??R?U????-cB,??? ]?-?:??-U???S?"???????o ?_Oy*p??U?d)??v?!???/?????8ukC5??l*Q?jY-??g,?8*7Q\??O???????{N?^ ?t????Q??M?!?h10??)Q?q???????q e???OS??w];????^??q??????????{??j??????????|_?x?~??4???B??? ??{?I`l?s???; #??'?@?B?:?A*???nb???D??????\???'??K?{bAQ:?V?F??p5nz?$?f???????gl????3j2??s????XgfwjF_?????Oz??\?kK?K$?6??V?;?????Z?\?2S N????!`eZ?????? ??Q???7?)?y?$r??a U?????i?=????????r?>??$]6??c??%??S?H? a??\K5 +O:??x??8D???J?!??0%~g>0V?? ???????????sB]:?? k????+??}6???????z??.??!????k?R2?EG!???n.?@?B?[guTH?5\`??l??5??.^?:?r???%??.??a?iU?????^???e?KU?^?5???]?#cM??_?v`?W???????i??^??C???vc?$Q?????????.]?H???y?Y|~s ???Df???C???????SuD_????? ??EBh??;?w???4?pY\=?3T?u???C??q?t??+[??Y????i?]???N>?? +?????m???KqS?m7??????(?Jji?>Z? ?;E?_???j????]$#?Hj?????/???9?7??8xr?%?\fo???u??]?]U?z??Z??K?(??})?T?????~?????K?c???-$t7qg?:6/c??.?;8??e?YD???%?T????????Q?#q#_dc???`7z+?X?4V? ??OB?>?T2?l???uT?$?;}??C???????{|?2?????i8??^6>|7??? +??Dj??m +>g8-?0,I?9}?7??T???W??????jN????????????9???q6??5S/Z&??"?????x?o?????L???L??N?A?zu?s?i3?p?H??'?D^???/k?)?q?aF?D??w???]?"#??1??_??D!??du?k7w#?<??u_???O??5?+???g?k??N?+?Zn??)y???O%????(w?yu>?|?B#U]%?3?"On?m?8v???????I??^c ???da??i? >?s=pJJ?B?0???K?V?4???????u?????j9?]?????K"^.z?N??J }w????.|??X:?&???Yw4??i?-n?? +c?}?c??I.??GT?(?`?+??q?gM9??Y???2?w??W??/h ????? 5HR~X8\e??L?4????0>(??3??k,f?????V?? ???:????)???X;4_???? +??7,??????}?W2??^?w??L;?? W???? *k???.?????V??_~#???8??x~???s?????l?????m?E??rC?????D???F=d?qv??4?????T????UW??[???_Nn?^'Fs?? abS?Z?,?G?.?e??xs?~???s???uy????pAl?????2?????G?y?q?????n?? a"??? ?K3????????,}???{?P?>????CR?6????;V????TT4h?p?N?om???? ?L????U +?l????cd???9?$?0???PV? +LoP?m|??1???Nx??w?]??"??~N???c?,????????C?????,t??????!z +?u$??????????%?"???S??X?+??y????%VS"!?O?>xx<-???:?o???_?????0 +?t???")?endstream +endobj +63 0 obj << +/Type /Font +/Subtype /Type1 +/Encoding 157 0 R +/FirstChar 45 +/LastChar 121 +/Widths 158 0 R +/BaseFont /HSLNSI+CMBX12 +/FontDescriptor 61 0 R +>> endobj +61 0 obj << +/Ascent 694 +/CapHeight 686 +/Descent -194 +/FontName /HSLNSI+CMBX12 +/ItalicAngle 0 +/StemV 109 +/XHeight 444 +/FontBBox [-53 -251 1139 750] +/Flags 4 +/CharSet (/hyphen/period/A/F/H/I/M/R/T/U/a/b/c/d/e/g/i/k/l/m/n/o/p/r/s/t/u/v/w/y) +/FontFile 62 0 R +>> endobj +158 0 obj +[375 312 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 850 0 0 0 0 707 0 880 419 0 0 0 1067 0 0 0 0 839 0 782 865 0 0 0 0 0 0 0 0 0 0 0 547 625 500 625 513 0 562 0 312 0 594 312 937 625 562 625 0 459 444 437 625 594 812 0 594 ] +endobj +157 0 obj << +/Type /Encoding +/Differences [ 0 /.notdef 45/hyphen/period 47/.notdef 65/A 66/.notdef 70/F 71/.notdef 72/H/I 74/.notdef 77/M 78/.notdef 82/R 83/.notdef 84/T/U 86/.notdef 97/a/b/c/d/e 102/.notdef 103/g 104/.notdef 105/i 106/.notdef 107/k/l/m/n/o/p 113/.notdef 114/r/s/t/u/v/w 120/.notdef 121/y 122/.notdef] +>> endobj +58 0 obj << +/Length1 1798 +/Length2 12939 +/Length3 532 +/Length 13952 +/Filter /FlateDecode +>> +stream +x???UT\?????K h?????k????w????Kpw????o???d?}y??i???l?????????H???h?m ??6????t?\!EF#? )??=?????Z???`??d? ?n>~\?,\?Lp?![7{?o?? +!???V@{3#k????)???#K??????? `i P?? ?"?h? 4??cd?9 ????????$amb`?w???????????I ?0ilcm?0?????|?????a??;u???5???? +?5X?Y???+['G?=@??ho???j?{??9Y?w?????????7K ???!3Q3W??????)??????8????M|T?_?e?E?4??=??j?70?vTv??O??$????Gu??\Z ?e?H??????i?X??Y0?? ?? ??>V??<f??@W???0=?????#???xLl??????9?7?W?????f??-? ?????9?vN6%?W%?'????5?Z[M??2???%H?Z:9? |??XY????M?lM??BlO}??? ??, L?D8??@{????6???0??QG????M??e?S'???*b??W??9??_?X9????_?r????(??????O}????'??? ?'?! ??>.??>?,??>dD?C???Cbb?cX??CV?}(H?????14????'??????C +??CA?}????????S?C +???????????b??>2??,T?3????? ?????????????_??????Q??????_?a????????~?????+??????_??b? ?\????,??????_????/?p??~?r?k??r? ?\?????????'(h??A???m>. ?T??????d9?lz??B>???a???t?-??q?'5{??N?@R? +~k?![?5???jY0"eG?^??T?????O???????0.z?k?#y?m?Y???W?*U?m???????a???Tnz}?8^#???b?$[?BX?z??[???;-??]]4?R%8????H%??8?%x?%>bm???<??z???? ?)&+?M?3????Yq? +C????(/???o??k???=`rFqD??=?2?GDo???H???9Ms?:?+)??z??3??i??b>?El?MY$?#???1 ??3?M*???M?sO?8??HUmJMH"?fs,????I wF??to8b[??w???:^pf;(O???/?r???}P- 2???*Y?;???`????6C??o!r[??u?????_z????????8?BH?MR?????%O??vZ?????2?&j???_???S?E?[?6?TA'uP?0?)}u???=???c??????]N??E????zq??>?{%?Q,`s?>w????s?d??6???)l??_????J5???A\Q?=?;g*??q?+???????~?????:????? 7J???\?? ??d?(- $???9f???c????E6?W ? ??? ???"B?eh?F?i? ?=+??N?c??????z??%B?S ??J??3?c????6?E???????Gk??p??b?~?L{?5???fe?-b?)?????b??????=???So???S?#>?z??ef??GV?????K???w???j?Q?G?DA????^{?=_a??????MD|mP?+???"S? ???#g~S?R/X????R\?qMl?z?vcuY?f ?U@?T|>]Gb???Q??{?;?@?IW??-??u??b?>?7?-P?{YM(]%4V J?c?????K??:0J?D?w?,k`A???4??)? /  ?.?rG??'?-?Ry/0?`pes?f?m?v?k?^???(}??,z?????-9????/Z?D? ????-o2i*G>?wlYD|?a&??`? ??l?i????PL????????g??b?kJ"+? ??j??6??????m?T!pjSA?{????`??q?i.?}{\]T????????e8 r??_yB ??9y$???fJS?m????a?P?/??k???;O?h??]????xT?2LO???RP6m0??? ?????8-1M????????l?Zed J"{G????u7`@? ?c?]}?h??e4??A?a-2? +i???@??'??8?^?h)??4?????v??Z?_|??n?8?7???  Hj??w ?? ??? ??e????{'z8A+???Y???0???t???A????? ????=AU?:? ???>?|?b??/??Is?d?Qz???1??????????k???U?6??l?2I??!h??9c?????h?RWn?_??{????????????*? ?3$?'?};L??l^!wr?-?l???????B"? Yc?? ??b?'sH????? ?n????NZ7???? +?????2-? +??M??/? -?U??V???????y?????9??C?S?k?? +??J[??X?]><8??n??C???U@??{%\S?S, ??h8a???-%?a?lx???????N??sq{??l??{?????`??Y??dFE???f/w?.F_"nC?g??v??=?'?S?Wmv?,??1??H{????su???Fok?S?S~???Iu??'1?h?2S???l??tRWM2?^?m ???g??rQ???Ht???? #?A/?,?r{?7??.[?!":?????+`c???D?????{ ???5?Em???????+???4??????L$??jaSZX???:?*???"?)?9n?k1??X|:@ +jLC? ???u?x?3??4?? +ux???1?A(?f????b?u? I??cT??yX?K?Q=? +]?3???X2I(p%**?d????i8??;??s??]?=B?; ?????? ??V:?nsRc?(5vdb??????u-?k???.* N???V3+,??t??x??????@HH?? d,D?_4??]H??????V?? ????% ?J Ud +4??~???????sbO?o??3Cy?{mVC{????T??:Y??A?gF?????\?F? ?@?m?0?????!m?^Y??i??????C?|?Z??8x???P??2?q)??j?/??Fh ????`???z3 +Pz?lY0?Z??~???;I>??i?`Q????G?C?b?%O??av&W ?.?Z[?pw[?A??n??[????D?;&?m e?????.|A??@?X???,%??g??1 J?]]???????6??? `???!?c??F?5?7?~???0?Y????o?0kg?T&_??W!???7?E?,?*????!^?/?/?j?yi??r.???^?]??\?????#??*M:?l?7??X?rj_j???Et??W?8?doM?N?) ?h2?L????b?v"q!??Z?j??????????L????~????m@?vH?????Ih^??6????1m???;??imb??`#?u?L???Cc)??8?j?r?>`~???n?q?? +( +A) ???0k?+????a+?9???1?v?@???????6?Q?S$?_?q9@]fV\?M?d;??n9???=:L??C?>A???Ak??Q?=?[?[6??????????u??? ? ????????\ ?U???I?}t !????X?S??????[?O?s6? !??5w??w?0????.?????M?pa?O?X?U? ??W?e4?`2??9i ?KQ?/"??e?`??4^?y??????L?+???~?U?]FY^?{?? 8KY/0????)????g??r?C???|oCU_?'? +?p !?`????%P?S???~???'? :????? ?????o???Vsj%???X ?E?b?A??e? a{1?>p????n?EN??;?????l????} $??? z?/ ??+??{??%aOU????e?????G?^??[C_?^??:n????5V??V?N????N?????+Z?Xx?????Y???h??W???? +q???(????*?"2Z?H??~^????]?;[s?yG?4.?????Z?| q???J@?3&PT????? ???A???*?a????}??6????!??mT#2?/e?l???b6I? ?Am +/??f?}????~\?????????4???)??*?W??]??p???????s????l??m$;=?+?[??????}?[??cw???E????y]?a??q??R>?v??????D?k J?P??d?$???K?LRZ????%`{???[???!????vT?(???r?????????Y? G?_? +??_$?#]"??z??K7??J[??s?O??n.?????Wv%?K???;Q_JxSH$?C?ocV?Y?@??????27???,?Ld???? ?Nt??E??T???}?Uri?F?)??5??z7????}+^V??7??'?=?9???"?E??~ Q\EA?s????@9????N?U?N(???A3???W?NzP /???l +??w?P?&.O8'j>???k>M?O???=*?l??QZ?r???o??>??x?????`Ie ?????? "??Bl??M??*?????'??h2%???Y?R???????{ "????-?\??h??8?i4?R?H>3}'????a_?:f?D?V? P?2=&? 1{)(_b?1???? +???Ask???????????Y?????L?^??)C3?&%Q??V???? + 2?tf?A`???.}??8?x?2?L?a|??????]???+8?e4~) ~???Ra?z?Ta??f!1??sb]???^?2?u?1gs:??|?=!1?3,t?e64??cM +?C??.i]`X??????$&2lC????u`??b???V???M?/????Y????7???.??????$????????R????? V?t??];?j\?`6{??=????F*PA4??D?P????D}!?/+fbx?$W??+:?'2h?Z ?WDY+#O6p?. +??sOrZd??k?Ae??8nf0?j6?= :? W +??H???B???Lko76?9??W(vo??_+????`G?QT# +_???3}?.?D?;?????.?|T-#??4]d??8c(???????=AW?7?S?sf(?r?5Ou`B}b!?>YCW%??5??%p???@?o>??.?sV?W?*???* Pb?P?>#V?5D??L???D???@!<~=?VK??H??[i7???v?????fO.?O?*?~???}w?+?????alg?2????`??G?Ms??{t +0?^{?A??4?(4oi ?+`[?"??'}??L?????dV??08???vt?%S?puKJKl???r?2???EP?????+???N8? +?'??-TM4?a/??????r?j+?V?{? $`?77?>?*?B??N??????????WP????A??????_/F?E????-"t????*??$??WHL???-|?E?8'?1?#?(???L?P?????@'?\?? +d?>?????$p??S?$T???m???????s???J"@;???[t????a????{?W?N{k6D`0???n? +Z?? ??N;d???Q?T??T?????????Z]fP? k2?9p=? s??%R?: ?r?-:?5?(????g~;?O??????d ?"?x??BA??????*?roD>??P?L )t?y?xI????|???H&??d[)9???v.?F1????h?'Z???ZZ??S?!? ?? ?{???_|2???J??m?T?y?St2d:LQ5?4?&??k?????9????A??;z????|???j?>8&? +??????z?&??U?>?S?!g??x-???M?y???5?J????R???cT???a?h??,?t??/ }2r?\8??u?ih?+?\??????? +?z????@?*??h??Mr?????G?*9? *@FGrV?u?V?????1!;i??^??????z????o???c?4|?!x??F?Q?"m?8??9???Nkf6??J&?~?^?|5??x????a???^??|??[F4 +"???d?? vn????z?h???7&??????A???V2=????`4????????Ku???Tpa??)????N?p??Xv?2Z???ai???2???0=?7?`???vsC2?d)???j9??VG??n???w ?L??Z??G??E?K??*0??)s??xh??2?/??PJ^r,?}?"?????t?G?V?fM?w???C:????2?+^{??1mX??Z ??r?l ?.?? +?gR?u???????????7?Y? @< ??y????2?=????W [T`L?????????t\??k??_??????UZ??k~??$?H]K??U??vl?D.i?;{7|I??f*j?"??? ???)??>?MF]L???n^l???z??????0?#u?T?h???*y2 ,Iy???)}?L?/ h?S>P\p????cu8??=-??Ou?Eh?e>?t|???r(???=??2???PHK>???JO?c???4?? ?\??^??:??v1Q???v ???I?km?`P???g????(???N?|XX?$ ??????7?(?????CF?^mgL?%|???E?;?????k?=h??;]D??~?}d7v ??`F???????)O~????_??????C??l???W?(u?idlv???N????e?????? ??C?????h`9?-Z???L?C?3????P? ????1?u??????3?8W??????P-??t?K???r??9.YC&?L??;2?n?vRC?\?|?P??) +????/M?M?T???l??Q??V?m???R?a???SA?Y????s??M??\??1?k?!?????C?Qj .?? +?GJx???r????[:?x +o????S?"??H??!????????ub?'?8?&\!>?(?????U8:?/?N?}??D?L???a?????]?61???x??V?????5???N~.??????;:X?S???)!?[?BU?j%~0?\?'>?nU8??b?RJ??rS?????4???[j???r?????s??X(w??qc}?S???L^q?????5 0???lp?!????????=?2??fS??)z=%%6?w Z??v??,??? ?#?d?6??W?f|?}?D???+{? +K??O_[??Bb/[?F???AN(f?i?P?Nl?3???0f??& ??x???q??M????8????lx?b?54???/???Hq???5r???v?.?.?P(i??1i?T??>?s?~?Y?????s???#Q??eo?a?!??pz?Y??6?W@? ??gWi?.$/b?-???y?????b???A?????????l?_5Z????i>?5?1?h?q-???m???q?Fo9???G +??w??$?R????.LQW+Z\?????s?Q??\?v-ar??????4?pf????d?qJa?Zq?N?2?n?r??SJO ????3?b_??? =?????I????W? ??@??K??V???*JZU'~???4?d??u`??A?s?WB%??3??ac???_1?I0??8?N????m??k??+??x\CT?P?????bo???Wv??b`?6?b????G_C>e _?5~?l}42?? ?'?]??RP?`??'?>?P?:?h?i??3vV v??]eK-FF?i%?x???b?T.y:???.N?9?|8???8???? + +,??A|?@?`??%?(???I????f"Rhf??????[??QX?????*??\???z?YZN ????'?????p?iRDhx??v??s???????Z?S?uD???Cw?x7sjEm???F4?z]?7+F??odmx???H??agI???9?????e???Yxm????/? V???Zu/%oHi5?????HZ?p5?Q;??]????2????^?x??}???J?????i?%???8?d???????*??????d?'Z??l???w??>#???=g?#? S???4"c??b?U???*?aS??????}b?????:ZS??z"???????jsS at Rt}?[???????Vv??C<"?????*???QU?j??????o?'Do???V?V??(v?[?????m???v ???r6??MA???I5?e???1FT??9?[7'X7???U??3???????WS??$????{????[?????????a?X +?b????;|9??9??Z?4?7@? ????eA(?e???-g?^?2??(gy? ??4C?p??lq +v????t ?w?+b??2R??~%7 Ih?4??" ??'??X?`25?P?(U?U +?????{0?N?? o??-???]m_2}?*?? ??Z5?)??O?????>0?5n???n????q?N?R4Fx?KX???'?Q?C??K??}????8b@??=??-hp~???1 ?4???|??`? ?p????????91H|?????????O??Q&8VZ??8?SO???????y????}?????Km?B?a.? ?d?|??\eP +??????s %?c +???z?Ss?]????J?`u??? ?n??F??????UHv??y? Q?S?'?????_j?q?|1?[?^???D??QK??????N???|?????W:,?L??3???=XZ?A??v??9??N??~?w?e5B??lb?x?l?4?D???????N??x??z*??%_Np????1S?t???K?????!4F1grc????nX??'??bY?t????qUg?Q???f ?z?^??<"???Li.??[?????)T?L??3xK?[????C???j????_T-K?1?W? %?????y???Tz^?70?? ???.?w/1?Yor??ju??? ???(~?>???h??a?????7{p????J??h`??r?K*?V???{?rj?t??s?`:??g?????x0(U:x????~??????:????x%i????-??T ??Oa[Ow????e?(o?k?|Q?????AgZP???)ed????XG?F??4^?R???[i*?ic]???????>h??^!??!l3?? ???????5??Y??d:w'??#?VPr t? ???Y??"?????t??N?-??+=???=??M?c?? f +.H??D??-?=iYEA??w????8???cn? +??M_d????z??Q?}????s??=? ?V?1s?1??_?F?*?,?}???4)(????,?+?????/????2?I???<???V2l?[???&1J?Ro8??oTrmg&??:???#]??? +&?8ll*?R!4??H?.!N]l??}i??>?m??????o-?X??0/;???9j2?????[? ????+'??????:]e!???Q????R5A8?6G???$\1?ON??D?ST ??? ?A???u?p???GUK?????????Y ?m? ?-????endstream +endobj +59 0 obj << +/Type /Font +/Subtype /Type1 +/Encoding 159 0 R +/FirstChar 11 +/LastChar 122 +/Widths 160 0 R +/BaseFont /NLFWZQ+CMR10 +/FontDescriptor 57 0 R +>> endobj +57 0 obj << +/Ascent 694 +/CapHeight 683 +/Descent -194 +/FontName /NLFWZQ+CMR10 +/ItalicAngle 0 +/StemV 69 +/XHeight 431 +/FontBBox [-251 -250 1009 969] +/Flags 4 +/CharSet (/ff/fi/fl/ffi/quoteright/parenleft/parenright/plus/comma/hyphen/period/slash/zero/one/two/three/four/five/seven/colon/semicolon/equal/question/A/B/C/E/F/G/H/I/L/M/N/O/P/R/S/T/U/W/Y/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z) +/FontFile 58 0 R +>> endobj +160 0 obj +[583 556 556 833 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 278 389 389 0 778 278 333 278 500 500 500 500 500 500 500 0 500 0 0 278 278 0 778 0 472 0 750 708 722 0 681 653 785 750 361 0 0 625 917 750 778 681 0 736 556 722 750 0 1028 0 750 0 0 0 0 0 0 0 500 556 444 556 444 306 500 556 278 306 528 278 833 556 500 556 528 392 394 389 556 528 722 528 528 444 ] +endobj +159 0 obj << +/Type /Encoding +/Differences [ 0 /.notdef 11/ff/fi/fl/ffi 15/.notdef 39/quoteright/parenleft/parenright 42/.notdef 43/plus/comma/hyphen/period/slash/zero/one/two/three/four/five 54/.notdef 55/seven 56/.notdef 58/colon/semicolon 60/.notdef 61/equal 62/.notdef 63/question 64/.notdef 65/A/B/C 68/.notdef 69/E/F/G/H/I 74/.notdef 76/L/M/N/O/P 81/.notdef 82/R/S/T/U 86/.notdef 87/W 88/.notdef 89/Y 90/.notdef 97/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z 123/.notdef] +>> endobj +55 0 obj << +/Length1 1254 +/Length2 7124 +/Length3 532 +/Length 7899 +/Filter /FlateDecode +>> +stream +x???UT\???q??@??[pI???!PZPH??N?w??!???? 8? ??????s?}??_??7?\s}c?????????fPS??????% ?V????8?@),zziG? ? +j'c ????r`S? ?/??+ ???HC???,,a&i?????`G+??@?f ????@P?????@??p?????.`3,..??0[X?aq??$og?6s???? ?? .`?S??4??A?f`s,?7P?j`?????,.? ??1????????q[+???2????0?#@jv???Tm?_rRP?-#3?X?$?, `????????L? +???@????vf??o????? +???Y?????X??4???.?G???????h?????O?_??3???d?@P3+; 7?????? ~z????X????`7?1'?????`u??cCy?N{G?l?c??(???m??an????VN6?y? ?????~>???$????x?]????*? ?E?o???j +????C?y??? ?h?????!|I???k??e?~C~??o??? ????a??????7?k@Cx??C???o?r? ?VN?!? +????C???o?r???Vn?!???7?[y???}????n??'???#? ????????Q ??,?C?T?FF????5W?[??{??????????rE??`??aj??c_??????b???j?nE?]?6??w?????#7??&??k?????`??????mO????{???H<?????`^?'?~???2?5???a??B????????H???r ????V??_???G ??qe???Q???|????c???vp?-w??1?wo???y?5?;q???? ??????n?[SL?v?G???AE??'6???!B7{?t?r???S6???c???.?]?\2?o????M??? +iK??SP???Fl|?????F??L???????T+???B ??B?{??m?D????=???.?u???Sw/??,?kc?a?zy??B7?????$f?e??F'7_?1??y O1?R???j??? =[}{??d>%??g?W??'?t????T{?l`?B???S???8?SL???6}j??:??????S??? +voa*{???????|v??_? ?S??N???MT??????"?K?L??RWCsI?^?n????:??>r?????" ???U???K??$]"????}?Z,L?[g???)'?}???F??5???v?????=3????`?W???R????,????e??O?u??????3Y??}S???????e??d???????t=????j=?????:???B???iR[!?????0M?j??b? ? `?O??????b??R????,??>m?????Qb?P???05Z.v?r?@?c * ??,?xD!?J????D????????m,?/??l ???c?W~6??o?J???????3??dr0??s?]??X??!???P??=[S???~??y?/????Pc`M???W]?f5?@???M|/c|???z?O~?JKD?????`??yG=???L??Au?u????bl +?[#}h?W:?????(?????)X?%&???}??2?????,?xic???x"&??B?z?8?vE>??WgO??K?2??X@/??E?j|Q?E)?z}??8@??f?????'?g?????????[F?uLi?{??l.??BT1??6?gO??d?9$O????=???mo??e??9 x? ?>???????{7?h????W?9??C?J????k?v[?l???z??????+?G??E`.n??~?????`????wmv?r7??G??T??3????NEU?\05 ?u(d+~?Y B?U$?_9oW??(\??m?%?5>?.??>?|^??C"A?1??c??9w??`aAH??? ^???e!??????C??M?C$ K?????P?a,Q;?H?=???????\??^()w??j3??u??????{??????{?????A??sP??^f<)6????6?????m,???>?T~??????WQK????p??2??qan?U?02-c??????????9???Me??}"?????x?????Z?? ???? +??=qZ~?????lF,%E?O????^+?-??RQ??8!xE=C??Y??a???"?*???/?"?:????_?n??%n?????A?[_){-?VQ?U??R?k?9?+!??V????3L????h?.???O?%?sI????? p?6??????????D ??????w?????\z?? 9H?????? +J;?h??? ?J?Y ?o? ?|?^??c???3? ???O? ???i?V??,??T?e???????C`??i?? ????{??Sz'???l?v?????U\ /[U ??f at pO?|?]?~??g>????O?????~????(>???????n????4?????Z? ]??be?????H24bg?s??M?&???3??q?~?V0?Q59????5?G?????x*??1??????u?!??88|??????g4?QHT?'3??ZL??e>??+???U?????{~v?5?%???$v? o$uW???????j??n(???1?.?B?]??-3???a??g?????1/i?_:Y0?+:yZ??H??? ,{0MT4????????P?M??'????V?{{?W2[7?????? 0^;???~????3AhK??c>???u? ?8??jkO??b??'2????_?T????1?????r???i??????%1.??hD???????I ?\b? 1??eT??t??J]?OT6U??????y 1?$?????A?? ?!??8??x????R .??e?o8????????fh?T.?l?r&#IY????F)?"3???Ka-?\/.?EZ??J??G9???j?51T?????q?y????>D??????T????UM9???"??J??Gd +???U????=?V?/????e+????w9???bV?>??R?j???vJ???)/???4?(IJI???w?&Q??D7??b??bty??????3?DV?[B??q??~??I?~??(??#? +???iYd?????#`?????!"`?y??P??Y5%???9??*?>??S|x,_g3??/?0?X??H?n2swr???????S ????y?????????9?U?R?w%@[?nr??cz.???YC ???? o?D?1&?f?z???2^?aqvW???t???us??'????e(G????5>???z?~no?{J?u??|?a?mKl?#M?L??w?A?t=???p*M?>?????Q??o(Ib?CG?^??&T?g??????Gc{uK%???L??} 6E???tDL{?}??:??????X?49?8??cH????W2????y????^??LU??2i?/?Cp?1Ll???,$???bqI??M??]+?2??????\Q???K^???9??[d???B???7TG;?,D!??k??+???,?S1??B? ????O??????Um?K???;?QB??B??C????n40K at Y??pn?;?Y??@~^?}??vZ??[71?0 hU????????jw}H??F?N???{.dm~??z??????k??S?J???srG?????[???1??;p?????)?? ?v1?d????OnT?????$V??%?%???@???%?~??|&2???}?e??f?Nhf??h=??Oa???a +???wV??x??????????l?`?1?h??????c?c?]S??6 at g3?9o!'????{)???? j??e?J?gl??i???#%:H?g~? ???z??w?lM?&????nJlV??ZB????Y??v$?`^??a??t?*?????|u??[?}??=/\? ???????????s?P?8?I??????1 P?U?s???|;?i ???.W?9????? ??M?ms?Uj;?!?p?`5??*?8WN ?`2@??j??rS)h?8?#9???v|i???r?? +j?C}iX??D??db??? ?n??Tt<'O?G#e??8{s??S???/5???e4????B9E?Z??`M???F??Wi(???b??OsYJ???te????????e?]U?sD7W?yLx?q=???I?????C?\:?h?j??~?+?>U???Y??,l"b?f??0(%???/?JU?0?E.?? II-?????!?"?D$?????,\??]??J +DZ??????\??x5??P????K??h?_k?g/?m??? ?e?e?cG?q????E?????j?????_r1 +??d??? +???H????>:?<6??|q??7A???j_??~?@r?0C\?C??*??a*?X?*n?3 j?q?2%????T?c?O ?g?C??k?nV?E$ji?>??#]!?i?90???5??P?????8 +???{?VH?db? ?h?t??f?Q????T??b???!???????rf2??^?f??)???d?H??& ?X?A?\SY UR??^??o?*??_K7??@?OB????He????u?`?ha?f?v?"??(Hdy?????)?%i?,x????? L6Q?? m??eO??y9+???E?.]J??7????@?i? ?????5??}??1 +?P?s?y??y??vS??CUV??K?Cb?^??<2????3?}??zVb?????lj????l6S;??^}%t??X?^ND?n??I???r????"???????vO???s??A"'????{???d?M??h?o8L?q m??^?4??+#~????\h? ;?rZ??9??}???~?@x-1???^u8-??!???[????5??J?????wt ???e????x??! ???q;?d?:&W????O?X?(?:P?,??r+@???~a?tf????[?S?9?????????kKR???q?diM??V0.mT?&ju??4?r!??Qz??nB?!2??????Q?8???&?6X????uendstream +endobj +56 0 obj << +/Type /Font +/Subtype /Type1 +/Encoding 161 0 R +/FirstChar 40 +/LastChar 122 +/Widths 162 0 R +/BaseFont /IPJAYH+CMBX10 +/FontDescriptor 54 0 R +>> endobj +54 0 obj << +/Ascent 694 +/CapHeight 686 +/Descent -194 +/FontName /IPJAYH+CMBX10 +/ItalicAngle 0 +/StemV 114 +/XHeight 444 +/FontBBox [-301 -250 1164 946] +/Flags 4 +/CharSet (/parenleft/parenright/asterisk/comma/A/D/I/O/P/a/b/c/d/e/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z) +/FontFile 55 0 R +>> endobj +162 0 obj +[447 447 575 0 319 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 869 0 0 882 0 0 0 0 436 0 0 0 0 0 864 786 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 559 639 511 639 527 0 575 639 319 351 607 319 958 639 575 639 607 474 454 447 639 607 831 607 607 511 ] +endobj +161 0 obj << +/Type /Encoding +/Differences [ 0 /.notdef 40/parenleft/parenright/asterisk 43/.notdef 44/comma 45/.notdef 65/A 66/.notdef 68/D 69/.notdef 73/I 74/.notdef 79/O/P 81/.notdef 97/a/b/c/d/e 102/.notdef 103/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z 123/.notdef] +>> endobj +52 0 obj << +/Length1 1064 +/Length2 4328 +/Length3 532 +/Length 5027 +/Filter /FlateDecode +>> +stream +x???g<\{???`D??#Q??Q"z??[b??3???A? D???^?D??K?????e'?{o?w_???????|??;?????????+k???+??^A>A @^CWP ??????P ?T?b????? ?j  ??%?!B" v@???F??a??? `??a+?- ??iHi??? +[?:??r??]p?0?$??h?B:x?p?& +?.8??????+?:8hB???KC??Y?rtr??????F?????7 ?5????YU ??E?:???B%??Z???6P??8i?o??????i???????y??iCH??????????o?M????q????'??K CY#???? @?h?'?8????=p????( ?????A?A??S?6???;??????(???p??wDL?W?M???o?U?W??????R?7??F?n5???I???}8???m?@Q???8??8)??(?s??q??????????7*??????pR??????????WX??ED1q??RsE??H??? ?P? ?~p?F?$?&T ?????X??-???T??? l???.?"?"??h?????l????|(???4?U\`??:S??\?-8j??*?Y??=????2??op?????h?%???b+??maD?7??? gX* jj??n? ?? ??fZ:??Vi3?s???(=?(?8?$??D?|`??q????N`???lKXT?Q???A?uq?:S&??j? +h???|~??#.w^?a5?7?z?I? u??5?^E?P??s"????rK??????? ??TWO9?V? ??????????mG???PTt??5?1?#??k????u?x?}?v??DLwW] K?L??? ?f??oF?X?F??f?C??m'|?I?:???????T[??jL?*??????z?????.???Yh????)?+???m????F9?c?t?x?+ _?B?.j??-n????Hnxb? ??/?wS?|?:???,?kt/:J??o??W????+8Y?M??????AH4G????8o7?7???Z?IP??e$>??????/?R,??#WR3??:? ????U&n??????W.m??T??U?M??P??lH??DB?$1?l? ?????? =P???LE?Dj????6??!4??5?r??Q??*??p????pzG????j??????:????\??~%Z???*??M ???????jC@~RU??=??g?9??????5????J?0???(????????w????M?w?-????(?e??i\?? C? y?;c?z?q????m7?????U??U??3?7SM=?9????6?J??f]?????0;??@??????3X?D?q??X?R?\?,???W???????????>?j_?R?C??????K?????(K??C?V?g?r??3???bUM  ??D ??P}{???4??_?7?#.???;????( z*$??????lR?e??'?G??????N?ym{~?P"?XZ???1Y4 WQ???_O?"???e????S??w'?f +???????[?q?c?Y???{?npx$?$??R at RIP??;???KlH??A????,?+-??????W??G????X?atT??%? m?#?NpIT7?@??~????????5?>??????I??P???? +SS?Z??b??L61vb?9?/Y?????t=????x-r~}????? 4/f?????????0#?J?J?/Z'?&?????a????{???????u) ??$?T?H????t?2'?I????$_?6????fR:?P?hQ??q9??lFVl9????????????w> W?_H?,?H?&3?h?n???f?,??b??l.??,Js?K_=K?x1?? :????j?lV)?|?z?x?smZ2?3??-?eL????g??."q??o????.v?@p????????\???H?? ??G????W!\?????2?E???NiG?'???6_????^ cJ? Zz^=?e??Y????t4???&???JbZ@??|???5?? d???C?I???d42?$n]?z?????V??';v??b?7????z??? ?l???<4/????=??Wb?C?-??????a?9sX_??-O?7o4??= ?u? ?0????4?)(?q,?`1?6r>s ?C4?p#?????-/]????????]??? +????h???#S$#??U?8m??y????8G?\?"? .r??o???1!:?%^?$?k?TxQ?????w}?,??`???w+%???s f???}?2??w?k??*#?&,?sL;3???:U?N/?$??E(??{??JOZ?g|L`???M??????n?[??YB??Uw????_^?????K5???W??k?0???f?4??:"e?5?!nM^?%#????+???? ?~te???=??Nz+?Y?n?O?@???????a??g;????V?W??|?v??+W?'*???]H?J ?h?&AFo|8????\?zA???|f?qU??No???5me1??]?b???r!?U?????H?KE?????A????fL??y????t?)'r=??#?Z^?K??????W?pj?2??I???????^?^????!s?C??#m??5?endstream +endobj +53 0 obj << +/Type /Font +/Subtype /Type1 +/Encoding 163 0 R +/FirstChar 46 +/LastChar 121 +/Widths 164 0 R +/BaseFont /NUTQTM+CMR17 +/FontDescriptor 51 0 R +>> endobj +51 0 obj << +/Ascent 694 +/CapHeight 683 +/Descent -195 +/FontName /NUTQTM+CMR17 +/ItalicAngle 0 +/StemV 53 +/XHeight 430 +/FontBBox [-33 -250 945 749] +/Flags 4 +/CharSet (/period/colon/F/G/I/N/P/S/W/a/c/e/f/i/l/m/n/o/p/r/t/u/y) +/FontFile 52 0 R +>> endobj +164 0 obj +[250 0 0 0 0 0 0 0 0 0 0 0 250 0 0 0 0 0 0 0 0 0 0 0 602 726 0 328 0 0 0 0 693 0 628 0 0 511 0 0 0 955 0 0 0 0 0 0 0 0 0 459 0 406 0 406 276 0 0 250 0 0 250 772 511 459 511 0 354 0 354 511 0 0 0 485 ] +endobj +163 0 obj << +/Type /Encoding +/Differences [ 0 /.notdef 46/period 47/.notdef 58/colon 59/.notdef 70/F/G 72/.notdef 73/I 74/.notdef 78/N 79/.notdef 80/P 81/.notdef 83/S 84/.notdef 87/W 88/.notdef 97/a 98/.notdef 99/c 100/.notdef 101/e/f 103/.notdef 105/i 106/.notdef 108/l/m/n/o/p 113/.notdef 114/r 115/.notdef 116/t/u 118/.notdef 121/y 122/.notdef] +>> endobj +85 0 obj << +/Type /Pages +/Count 5 +/Kids [46 0 R 87 0 R 102 0 R 114 0 R 130 0 R] +>> endobj +165 0 obj << +/Type /Outlines +/First 7 0 R +/Last 43 0 R +/Count 5 +>> endobj +43 0 obj << +/Title 44 0 R +/A 41 0 R +/Parent 165 0 R +/Prev 31 0 R +>> endobj +39 0 obj << +/Title 40 0 R +/A 37 0 R +/Parent 31 0 R +/Prev 35 0 R +>> endobj +35 0 obj << +/Title 36 0 R +/A 33 0 R +/Parent 31 0 R +/Next 39 0 R +>> endobj +31 0 obj << +/Title 32 0 R +/A 29 0 R +/Parent 165 0 R +/Prev 15 0 R +/Next 43 0 R +/First 35 0 R +/Last 39 0 R +/Count -2 +>> endobj +27 0 obj << +/Title 28 0 R +/A 25 0 R +/Parent 15 0 R +/Prev 23 0 R +>> endobj +23 0 obj << +/Title 24 0 R +/A 21 0 R +/Parent 15 0 R +/Prev 19 0 R +/Next 27 0 R +>> endobj +19 0 obj << +/Title 20 0 R +/A 17 0 R +/Parent 15 0 R +/Next 23 0 R +>> endobj +15 0 obj << +/Title 16 0 R +/A 13 0 R +/Parent 165 0 R +/Prev 11 0 R +/Next 31 0 R +/First 19 0 R +/Last 27 0 R +/Count -3 +>> endobj +11 0 obj << +/Title 12 0 R +/A 9 0 R +/Parent 165 0 R +/Prev 7 0 R +/Next 15 0 R +>> endobj +7 0 obj << +/Title 8 0 R +/A 5 0 R +/Parent 165 0 R +/Next 11 0 R +>> endobj +166 0 obj << +/Names [(Doc-Start) 50 0 R (acknowledgements) 138 0 R (acknowledgements.0) 42 0 R (argout-arrays) 119 0 R (argout-arrays.1) 26 0 R (available-typemaps) 98 0 R (available-typemaps.0) 14 0 R (helper-functions) 121 0 R (helper-functions.0) 30 0 R (in-place-arrays) 112 0 R (in-place-arrays.1) 22 0 R (input-arrays) 110 0 R (input-arrays.1) 18 0 R (introduction) 60 0 R (introduction.0) 6 0 R (macros) 123 0 R (macros.1) 34 0 R (page.1) 49 0 R (page.2) 89 0 R (page.3) 104 0 R (page.4) 116 0 R (page.5) 132 0 R (routines) 125 0 R (routines.1) 38 0 R (section*.1) 64 0 R (section*.10) 139 0 R (section*.2) 92 0 R (section*.3) 99 0 R (section*.4) 111 0 R (section*.5) 117 0 R (section*.6) 120 0 R (section*.7) 122 0 R (section*.8) 124 0 R (section*.9) 126 0 R (using-numpy-i) 91 0 R (using-numpy-i.0) 10 0 R] +/Limits [(Doc-Start) (using-numpy-i.0)] +>> endobj +167 0 obj << +/Kids [166 0 R] +>> endobj +168 0 obj << +/Dests 167 0 R +>> endobj +169 0 obj << +/Type /Catalog +/Pages 85 0 R +/Outlines 165 0 R +/Names 168 0 R +/PageMode /UseOutlines +/OpenAction 45 0 R +>> endobj +170 0 obj << +/Author(Bill Spotz)/Title(numpy.i: a SWIG Interface File for NumPy)/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfeTeX-1.21a)/Keywords() +/CreationDate (D:20070314142904-06'00') +/PTEX.Fullbanner (This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) kpathsea version 3.5.4) +>> endobj +xref +0 171 +0000000001 65535 f +0000000002 00000 f +0000000003 00000 f +0000000004 00000 f +0000000000 00000 f +0000000009 00000 n +0000007405 00000 n +0000095755 00000 n +0000000059 00000 n +0000000089 00000 n +0000012508 00000 n +0000095669 00000 n +0000000140 00000 n +0000000172 00000 n +0000012691 00000 n +0000095544 00000 n +0000000229 00000 n +0000000266 00000 n +0000015915 00000 n +0000095470 00000 n +0000000317 00000 n +0000000348 00000 n +0000016103 00000 n +0000095383 00000 n +0000000402 00000 n +0000000436 00000 n +0000020446 00000 n +0000095309 00000 n +0000000488 00000 n +0000000520 00000 n +0000020634 00000 n +0000095184 00000 n +0000000575 00000 n +0000000610 00000 n +0000020822 00000 n +0000095110 00000 n +0000000655 00000 n +0000000680 00000 n +0000021010 00000 n +0000095036 00000 n +0000000727 00000 n +0000000754 00000 n +0000027134 00000 n +0000094961 00000 n +0000000809 00000 n +0000000844 00000 n +0000004603 00000 n +0000007525 00000 n +0000000894 00000 n +0000007222 00000 n +0000007283 00000 n +0000093974 00000 n +0000088668 00000 n +0000093815 00000 n +0000087845 00000 n +0000079666 00000 n +0000087685 00000 n +0000078364 00000 n +0000064132 00000 n +0000078205 00000 n +0000007344 00000 n +0000063303 00000 n +0000056958 00000 n +0000063143 00000 n +0000007465 00000 n +0000004831 00000 n +0000005000 00000 n +0000005170 00000 n +0000055603 00000 n +0000043607 00000 n +0000055443 00000 n +0000005340 00000 n +0000005510 00000 n +0000005679 00000 n +0000043125 00000 n +0000039100 00000 n +0000042965 00000 n +0000005851 00000 n +0000006024 00000 n +0000006197 00000 n +0000006370 00000 n +0000006542 00000 n +0000006715 00000 n +0000006884 00000 n +0000007052 00000 n +0000094797 00000 n +0000012813 00000 n +0000011015 00000 n +0000007654 00000 n +0000012386 00000 n +0000011195 00000 n +0000012447 00000 n +0000012569 00000 n +0000011363 00000 n +0000011533 00000 n +0000011703 00000 n +0000011873 00000 n +0000012043 00000 n +0000012630 00000 n +0000012752 00000 n +0000012212 00000 n +0000016165 00000 n +0000015320 00000 n +0000012918 00000 n +0000015789 00000 n +0000038780 00000 n +0000037390 00000 n +0000038619 00000 n +0000015469 00000 n +0000015628 00000 n +0000015852 00000 n +0000015977 00000 n +0000016040 00000 n +0000021135 00000 n +0000019580 00000 n +0000016272 00000 n +0000020257 00000 n +0000020320 00000 n +0000019737 00000 n +0000020383 00000 n +0000020508 00000 n +0000020571 00000 n +0000020696 00000 n +0000020759 00000 n +0000020884 00000 n +0000020947 00000 n +0000021072 00000 n +0000019911 00000 n +0000020085 00000 n +0000027259 00000 n +0000025759 00000 n +0000021254 00000 n +0000027008 00000 n +0000025940 00000 n +0000026113 00000 n +0000037075 00000 n +0000035215 00000 n +0000036914 00000 n +0000027071 00000 n +0000027196 00000 n +0000026287 00000 n +0000026458 00000 n +0000034334 00000 n +0000027391 00000 n +0000034174 00000 n +0000026632 00000 n +0000026816 00000 n +0000034870 00000 n +0000034630 00000 n +0000037305 00000 n +0000037281 00000 n +0000039013 00000 n +0000038989 00000 n +0000043427 00000 n +0000043345 00000 n +0000056378 00000 n +0000056048 00000 n +0000063803 00000 n +0000063568 00000 n +0000079171 00000 n +0000078790 00000 n +0000088391 00000 n +0000088137 00000 n +0000094439 00000 n +0000094221 00000 n +0000094887 00000 n +0000095827 00000 n +0000096693 00000 n +0000096732 00000 n +0000096770 00000 n +0000096898 00000 n +trailer +<< +/Size 171 +/Root 169 0 R +/Info 170 0 R +/ID [<8D2853DC6A1BBFAC7BA2723500BA9EB7> <8D2853DC6A1BBFAC7BA2723500BA9EB7>] +>> +startxref +97211 +%%EOF From numpy-svn at scipy.org Wed Mar 14 17:08:28 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Wed, 14 Mar 2007 16:08:28 -0500 (CDT) Subject: [Numpy-svn] r3578 - trunk/numpy/doc/swig Message-ID: <20070314210828.9F13939C0B7@new.scipy.org> Author: wfspotz at sandia.gov Date: 2007-03-14 16:08:25 -0500 (Wed, 14 Mar 2007) New Revision: 3578 Modified: trunk/numpy/doc/swig/Makefile Log: Fixed typo in Makefile Modified: trunk/numpy/doc/swig/Makefile =================================================================== --- trunk/numpy/doc/swig/Makefile 2007-03-14 21:07:05 UTC (rev 3577) +++ trunk/numpy/doc/swig/Makefile 2007-03-14 21:08:25 UTC (rev 3578) @@ -54,4 +54,4 @@ $(RM) $(LATEX_FILES) $(RM) *.aux *.dvi *.log *.out *~ -.PHONY : alll doc html tex pdf clean +.PHONY : all doc html tex pdf clean From numpy-svn at scipy.org Wed Mar 14 17:12:04 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Wed, 14 Mar 2007 16:12:04 -0500 (CDT) Subject: [Numpy-svn] r3579 - trunk/numpy/doc/swig Message-ID: <20070314211204.4CDD639C0C8@new.scipy.org> Author: wfspotz at sandia.gov Date: 2007-03-14 16:11:59 -0500 (Wed, 14 Mar 2007) New Revision: 3579 Modified: trunk/numpy/doc/swig/README Log: Updated README file Modified: trunk/numpy/doc/swig/README =================================================================== --- trunk/numpy/doc/swig/README 2007-03-14 21:08:25 UTC (rev 3578) +++ trunk/numpy/doc/swig/README 2007-03-14 21:11:59 UTC (rev 3579) @@ -58,8 +58,10 @@ a _Series extension module and a Series python module. The Makefile automates everything, setting up the dependencies, calling swig to generate the wrappers, and calling setup.py to compile the wrapper -code and generate the shared object. Targets "all" (default), -"clean" and "html" (generate HTML documentation) are supported. +code and generate the shared object. Targets "all" (default), "doc" +and "clean" are supported. The "doc" target creates HTML +documentation (with make target "html"), and PDF documentation (with +make targets "tex" and "pdf"). To build and test the code, simply execute from the shell:: From numpy-svn at scipy.org Thu Mar 15 10:45:39 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Thu, 15 Mar 2007 09:45:39 -0500 (CDT) Subject: [Numpy-svn] r3580 - trunk/numpy/core/src Message-ID: <20070315144539.0BAE039C096@new.scipy.org> Author: oliphant Date: 2007-03-15 09:45:35 -0500 (Thu, 15 Mar 2007) New Revision: 3580 Modified: trunk/numpy/core/src/arrayobject.c Log: Fix missing addition bug. Modified: trunk/numpy/core/src/arrayobject.c =================================================================== --- trunk/numpy/core/src/arrayobject.c 2007-03-14 21:11:59 UTC (rev 3579) +++ trunk/numpy/core/src/arrayobject.c 2007-03-15 14:45:35 UTC (rev 3580) @@ -8942,7 +8942,7 @@ for (i=0; ind; i++) { sumstrides[i] = 0; for (j=0; jnumiter; j++) { - sumstrides[i] = multi->iters[j]->strides[i]; + sumstrides[i] += multi->iters[j]->strides[i]; } } axis=0; From numpy-svn at scipy.org Fri Mar 16 08:53:15 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Fri, 16 Mar 2007 07:53:15 -0500 (CDT) Subject: [Numpy-svn] r3581 - trunk/numpy/lib Message-ID: <20070316125315.2259539C015@new.scipy.org> Author: stefan Date: 2007-03-16 07:53:05 -0500 (Fri, 16 Mar 2007) New Revision: 3581 Modified: trunk/numpy/lib/index_tricks.py Log: Remove invalid part of r_ docstring. Modified: trunk/numpy/lib/index_tricks.py =================================================================== --- trunk/numpy/lib/index_tricks.py 2007-03-15 14:45:35 UTC (rev 3580) +++ trunk/numpy/lib/index_tricks.py 2007-03-16 12:53:05 UTC (rev 3581) @@ -327,8 +327,6 @@ class c_class(concatenator): """Translates slice objects to concatenation along the second axis. - - This is equivalent to r_['-1,2,0',...] """ def __init__(self): concatenator.__init__(self, -1, ndmin=2, trans1d=0) From numpy-svn at scipy.org Mon Mar 19 13:19:50 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Mon, 19 Mar 2007 12:19:50 -0500 (CDT) Subject: [Numpy-svn] r3582 - trunk/numpy/random/mtrand Message-ID: <20070319171950.1C84039C097@new.scipy.org> Author: oliphant Date: 2007-03-19 12:19:39 -0500 (Mon, 19 Mar 2007) New Revision: 3582 Modified: trunk/numpy/random/mtrand/Python.pxi trunk/numpy/random/mtrand/mtrand.c trunk/numpy/random/mtrand/mtrand.pyx Log: Make random number generators faster for scalar parameters. Modified: trunk/numpy/random/mtrand/Python.pxi =================================================================== --- trunk/numpy/random/mtrand/Python.pxi 2007-03-16 12:53:05 UTC (rev 3581) +++ trunk/numpy/random/mtrand/Python.pxi 2007-03-19 17:19:39 UTC (rev 3582) @@ -10,9 +10,13 @@ # String API char* PyString_AsString(object string) + char* PyString_AS_STRING(object string) object PyString_FromString(char* c_string) object PyString_FromStringAndSize(char* c_string, int length) + # Float API + double PyFloat_AsDouble(object ob) + # Memory API void* PyMem_Malloc(size_t n) void* PyMem_Realloc(void* buf, size_t n) @@ -32,8 +36,16 @@ destructor2 destr) void* PyCObject_AsVoidPtr(object self) void* PyCObject_GetDesc(object self) - int PyCObject_SetVoidPtr(object self, void* cobj) - + int PyCObject_SetVoidPtr(object self, void* cobj) + + # TypeCheck API + int PyFloat_Check(object obj) + int PyInt_Check(object obj) + + # Error API + int PyErr_Occurred() + void PyErr_Clear() + cdef extern from "string.h": void *memcpy(void *s1, void *s2, int n) Modified: trunk/numpy/random/mtrand/mtrand.c =================================================================== --- trunk/numpy/random/mtrand/mtrand.c 2007-03-16 12:53:05 UTC (rev 3581) +++ trunk/numpy/random/mtrand/mtrand.c 2007-03-19 17:19:39 UTC (rev 3582) @@ -1,4 +1,4 @@ -/* Generated by Pyrex 0.9.5.1a on Thu Feb 1 14:12:28 2007 */ +/* Generated by Pyrex 0.9.5.1 on Sat Mar 17 23:42:27 2007 */ #include "Python.h" #include "structmember.h" @@ -124,12 +124,18 @@ static PyObject *__pyx_k59; static PyObject *__pyx_k60; static PyObject *(__pyx_f_6mtrand_cont0_array(rk_state (*),double ((*)(rk_state (*))),PyObject *)); /*proto*/ +static PyObject *(__pyx_f_6mtrand_cont1_array_sc(rk_state (*),double ((*)(rk_state (*),double )),PyObject *,double )); /*proto*/ static PyObject *(__pyx_f_6mtrand_cont1_array(rk_state (*),double ((*)(rk_state (*),double )),PyObject *,PyArrayObject *)); /*proto*/ +static PyObject *(__pyx_f_6mtrand_cont2_array_sc(rk_state (*),double ((*)(rk_state (*),double ,double )),PyObject *,double ,double )); /*proto*/ static PyObject *(__pyx_f_6mtrand_cont2_array(rk_state (*),double ((*)(rk_state (*),double ,double )),PyObject *,PyArrayObject *,PyArrayObject *)); /*proto*/ +static PyObject *(__pyx_f_6mtrand_cont3_array_sc(rk_state (*),double ((*)(rk_state (*),double ,double ,double )),PyObject *,double ,double ,double )); /*proto*/ static PyObject *(__pyx_f_6mtrand_cont3_array(rk_state (*),double ((*)(rk_state (*),double ,double ,double )),PyObject *,PyArrayObject *,PyArrayObject *,PyArrayObject *)); /*proto*/ static PyObject *(__pyx_f_6mtrand_disc0_array(rk_state (*),long ((*)(rk_state (*))),PyObject *)); /*proto*/ +static PyObject *(__pyx_f_6mtrand_discnp_array_sc(rk_state (*),long ((*)(rk_state (*),long ,double )),PyObject *,long ,double )); /*proto*/ static PyObject *(__pyx_f_6mtrand_discnp_array(rk_state (*),long ((*)(rk_state (*),long ,double )),PyObject *,PyArrayObject *,PyArrayObject *)); /*proto*/ +static PyObject *(__pyx_f_6mtrand_discnmN_array_sc(rk_state (*),long ((*)(rk_state (*),long ,long ,long )),PyObject *,long ,long ,long )); /*proto*/ static PyObject *(__pyx_f_6mtrand_discnmN_array(rk_state (*),long ((*)(rk_state (*),long ,long ,long )),PyObject *,PyArrayObject *,PyArrayObject *,PyArrayObject *)); /*proto*/ +static PyObject *(__pyx_f_6mtrand_discd_array_sc(rk_state (*),long ((*)(rk_state (*),double )),PyObject *,double )); /*proto*/ static PyObject *(__pyx_f_6mtrand_discd_array(rk_state (*),long ((*)(rk_state (*),double )),PyObject *,PyArrayObject *)); /*proto*/ static double (__pyx_f_6mtrand_kahan_sum(double (*),long )); /*proto*/ @@ -270,6 +276,88 @@ return __pyx_r; } +static PyObject *__pyx_n_Float64; + +static PyObject *__pyx_f_6mtrand_cont1_array_sc(rk_state (*__pyx_v_state),double ((*__pyx_v_func)(rk_state (*),double )),PyObject *__pyx_v_size,double __pyx_v_a) { + double (*__pyx_v_array_data); + PyArrayObject *arrayObject; + long __pyx_v_length; + long __pyx_v_i; + PyObject *__pyx_r; + int __pyx_1; + PyObject *__pyx_2 = 0; + PyObject *__pyx_3 = 0; + PyObject *__pyx_4 = 0; + Py_INCREF(__pyx_v_size); + arrayObject = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":146 */ + __pyx_1 = __pyx_v_size == Py_None; + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":147 */ + __pyx_2 = PyFloat_FromDouble(__pyx_v_func(__pyx_v_state,__pyx_v_a)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + /*else*/ { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":149 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_Float64); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; goto __pyx_L1;} + Py_INCREF(__pyx_v_size); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_size); + PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); + Py_DECREF(((PyObject *)arrayObject)); + arrayObject = ((PyArrayObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":150 */ + __pyx_v_length = PyArray_SIZE(arrayObject); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":151 */ + __pyx_v_array_data = ((double (*))arrayObject->data); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":152 */ + for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":153 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,__pyx_v_a); + } + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":154 */ + Py_INCREF(((PyObject *)arrayObject)); + __pyx_r = ((PyObject *)arrayObject); + goto __pyx_L0; + } + __pyx_L2:; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_2); + Py_XDECREF(__pyx_3); + Py_XDECREF(__pyx_4); + __Pyx_AddTraceback("mtrand.cont1_array_sc"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(arrayObject); + Py_DECREF(__pyx_v_size); + return __pyx_r; +} + static PyObject *__pyx_n_ValueError; static PyObject *__pyx_k61p; @@ -284,7 +372,6 @@ npy_intp __pyx_v_i; PyArrayIterObject *__pyx_v_itera; PyArrayMultiIterObject *__pyx_v_multi; - int __pyx_v_scalar; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; @@ -297,87 +384,56 @@ __pyx_v_itera = ((PyArrayIterObject *)Py_None); Py_INCREF(Py_None); __pyx_v_multi = ((PyArrayMultiIterObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":149 */ - __pyx_v_scalar = 0; - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":150 */ - __pyx_1 = (__pyx_v_oa->nd == 0); - if (__pyx_1) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":151 */ - __pyx_v_oa_data = ((double (*))__pyx_v_oa->data); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":152 */ - __pyx_v_scalar = 1; - goto __pyx_L2; - } - __pyx_L2:; - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":154 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":165 */ __pyx_1 = __pyx_v_size == Py_None; if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":155 */ - __pyx_1 = __pyx_v_scalar; - if (__pyx_1) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":166 */ + __pyx_2 = PyArray_SimpleNew(__pyx_v_oa->nd,__pyx_v_oa->dimensions,NPY_DOUBLE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); + Py_DECREF(((PyObject *)arrayObject)); + arrayObject = ((PyArrayObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":156 */ - __pyx_2 = PyFloat_FromDouble(__pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0]))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; goto __pyx_L1;} - __pyx_r = __pyx_2; - __pyx_2 = 0; - goto __pyx_L0; - goto __pyx_L4; - } - /*else*/ { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":167 */ + __pyx_v_length = PyArray_SIZE(arrayObject); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":158 */ - __pyx_2 = PyArray_SimpleNew(__pyx_v_oa->nd,__pyx_v_oa->dimensions,NPY_DOUBLE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); - Py_DECREF(((PyObject *)arrayObject)); - arrayObject = ((PyArrayObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":168 */ + __pyx_v_array_data = ((double (*))arrayObject->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":159 */ - __pyx_v_length = PyArray_SIZE(arrayObject); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":169 */ + __pyx_2 = PyArray_IterNew(((PyObject *)__pyx_v_oa)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayIterObject *)__pyx_2))); + Py_DECREF(((PyObject *)__pyx_v_itera)); + __pyx_v_itera = ((PyArrayIterObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":160 */ - __pyx_v_array_data = ((double (*))arrayObject->data); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":170 */ + for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":161 */ - __pyx_2 = PyArray_IterNew(((PyObject *)__pyx_v_oa)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayIterObject *)__pyx_2))); - Py_DECREF(((PyObject *)__pyx_v_itera)); - __pyx_v_itera = ((PyArrayIterObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":171 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(((double (*))__pyx_v_itera->dataptr)[0])); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":162 */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":163 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(((double (*))__pyx_v_itera->dataptr)[0])); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":164 */ - PyArray_ITER_NEXT(__pyx_v_itera); - } + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":172 */ + PyArray_ITER_NEXT(__pyx_v_itera); } - __pyx_L4:; - goto __pyx_L3; + goto __pyx_L2; } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":166 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":174 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; goto __pyx_L1;} - __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; goto __pyx_L1;} + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;} Py_INCREF(__pyx_v_size); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_size); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); __pyx_4 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); @@ -385,71 +441,52 @@ arrayObject = ((PyArrayObject *)__pyx_4); Py_DECREF(__pyx_4); __pyx_4 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":167 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":175 */ __pyx_v_array_data = ((double (*))arrayObject->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":168 */ - __pyx_1 = __pyx_v_scalar; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":176 */ + __pyx_3 = PyArray_MultiIterNew(2,((void (*))arrayObject),((void (*))__pyx_v_oa)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_3))); + Py_DECREF(((PyObject *)__pyx_v_multi)); + __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":178 */ + __pyx_1 = (__pyx_v_multi->size != PyArray_SIZE(arrayObject)); if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":169 */ - __pyx_v_length = PyArray_SIZE(arrayObject); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":170 */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":171 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0])); - } - goto __pyx_L7; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":179 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;} + Py_INCREF(__pyx_k61p); + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k61p); + __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; + __Pyx_Raise(__pyx_3, 0, 0); + Py_DECREF(__pyx_3); __pyx_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;} + goto __pyx_L5; } - /*else*/ { + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":173 */ - __pyx_3 = PyArray_MultiIterNew(2,((void (*))arrayObject),((void (*))__pyx_v_oa)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_3))); - Py_DECREF(((PyObject *)__pyx_v_multi)); - __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_3); - Py_DECREF(__pyx_3); __pyx_3 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":180 */ + __pyx_5 = __pyx_v_multi->size; + for (__pyx_v_i = 0; __pyx_v_i < __pyx_5; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":175 */ - __pyx_1 = (__pyx_v_multi->size != PyArray_SIZE(arrayObject)); - if (__pyx_1) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":181 */ + __pyx_v_oa_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":176 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;} - Py_INCREF(__pyx_k61p); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k61p); - __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;} - goto __pyx_L10; - } - __pyx_L10:; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":182 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0])); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":177 */ - __pyx_5 = __pyx_v_multi->size; - for (__pyx_v_i = 0; __pyx_v_i < __pyx_5; ++__pyx_v_i) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":178 */ - __pyx_v_oa_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":179 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0])); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":180 */ - PyArray_MultiIter_NEXTi(__pyx_v_multi,1); - } + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":183 */ + PyArray_MultiIter_NEXTi(__pyx_v_multi,1); } - __pyx_L7:; } - __pyx_L3:; + __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":181 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":184 */ Py_INCREF(((PyObject *)arrayObject)); __pyx_r = ((PyObject *)arrayObject); goto __pyx_L0; @@ -471,6 +508,86 @@ return __pyx_r; } +static PyObject *__pyx_f_6mtrand_cont2_array_sc(rk_state (*__pyx_v_state),double ((*__pyx_v_func)(rk_state (*),double ,double )),PyObject *__pyx_v_size,double __pyx_v_a,double __pyx_v_b) { + double (*__pyx_v_array_data); + PyArrayObject *arrayObject; + long __pyx_v_length; + long __pyx_v_i; + PyObject *__pyx_r; + int __pyx_1; + PyObject *__pyx_2 = 0; + PyObject *__pyx_3 = 0; + PyObject *__pyx_4 = 0; + Py_INCREF(__pyx_v_size); + arrayObject = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":193 */ + __pyx_1 = __pyx_v_size == Py_None; + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":194 */ + __pyx_2 = PyFloat_FromDouble(__pyx_v_func(__pyx_v_state,__pyx_v_a,__pyx_v_b)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + /*else*/ { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":196 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} + Py_INCREF(__pyx_v_size); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_size); + PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); + Py_DECREF(((PyObject *)arrayObject)); + arrayObject = ((PyArrayObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":197 */ + __pyx_v_length = PyArray_SIZE(arrayObject); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":198 */ + __pyx_v_array_data = ((double (*))arrayObject->data); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":199 */ + for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":200 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,__pyx_v_a,__pyx_v_b); + } + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":201 */ + Py_INCREF(((PyObject *)arrayObject)); + __pyx_r = ((PyObject *)arrayObject); + goto __pyx_L0; + } + __pyx_L2:; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_2); + Py_XDECREF(__pyx_3); + Py_XDECREF(__pyx_4); + __Pyx_AddTraceback("mtrand.cont2_array_sc"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(arrayObject); + Py_DECREF(__pyx_v_size); + return __pyx_r; +} + static PyObject *__pyx_k62p; static char (__pyx_k62[]) = "size is not compatible with inputs"; @@ -480,10 +597,8 @@ double (*__pyx_v_oa_data); double (*__pyx_v_ob_data); PyArrayObject *arrayObject; - npy_intp __pyx_v_length; npy_intp __pyx_v_i; PyArrayMultiIterObject *__pyx_v_multi; - int __pyx_v_scalar; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; @@ -496,97 +611,60 @@ arrayObject = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_multi = ((PyArrayMultiIterObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":194 */ - __pyx_v_scalar = 0; - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":195 */ - __pyx_1 = (__pyx_v_oa->nd == 0); - if (__pyx_1) { - __pyx_1 = (__pyx_v_ob->nd == 0); - } - if (__pyx_1) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":196 */ - __pyx_v_oa_data = ((double (*))__pyx_v_oa->data); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":197 */ - __pyx_v_ob_data = ((double (*))__pyx_v_ob->data); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":198 */ - __pyx_v_scalar = 1; - goto __pyx_L2; - } - __pyx_L2:; - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":200 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":214 */ __pyx_1 = __pyx_v_size == Py_None; if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":201 */ - __pyx_1 = __pyx_v_scalar; - if (__pyx_1) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":215 */ + __pyx_2 = PyArray_MultiIterNew(2,((void (*))__pyx_v_oa),((void (*))__pyx_v_ob)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_2))); + Py_DECREF(((PyObject *)__pyx_v_multi)); + __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":202 */ - __pyx_2 = PyFloat_FromDouble(__pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0]),(__pyx_v_ob_data[0]))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;} - __pyx_r = __pyx_2; - __pyx_2 = 0; - goto __pyx_L0; - goto __pyx_L4; - } - /*else*/ { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":216 */ + __pyx_2 = PyArray_SimpleNew(__pyx_v_multi->nd,__pyx_v_multi->dimensions,NPY_DOUBLE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); + Py_DECREF(((PyObject *)arrayObject)); + arrayObject = ((PyArrayObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":204 */ - __pyx_2 = PyArray_MultiIterNew(2,((void (*))__pyx_v_oa),((void (*))__pyx_v_ob)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_2))); - Py_DECREF(((PyObject *)__pyx_v_multi)); - __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":217 */ + __pyx_v_array_data = ((double (*))arrayObject->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":205 */ - __pyx_2 = PyArray_SimpleNew(__pyx_v_multi->nd,__pyx_v_multi->dimensions,NPY_DOUBLE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); - Py_DECREF(((PyObject *)arrayObject)); - arrayObject = ((PyArrayObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":218 */ + __pyx_3 = __pyx_v_multi->size; + for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":206 */ - __pyx_v_array_data = ((double (*))arrayObject->data); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":219 */ + __pyx_v_oa_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,0)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":207 */ - __pyx_3 = __pyx_v_multi->size; - for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":220 */ + __pyx_v_ob_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":208 */ - __pyx_v_oa_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,0)); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":221 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0]),(__pyx_v_ob_data[0])); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":209 */ - __pyx_v_ob_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":210 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0]),(__pyx_v_ob_data[0])); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":211 */ - PyArray_MultiIter_NEXT(__pyx_v_multi); - } + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":222 */ + PyArray_MultiIter_NEXT(__pyx_v_multi); } - __pyx_L4:; - goto __pyx_L3; + goto __pyx_L2; } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":213 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;} - __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":224 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;} - __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} + __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;} + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_INCREF(__pyx_v_size); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_size); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_5); __pyx_5 = 0; - __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;} + __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_5))); @@ -594,77 +672,58 @@ arrayObject = ((PyArrayObject *)__pyx_5); Py_DECREF(__pyx_5); __pyx_5 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":214 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":225 */ __pyx_v_array_data = ((double (*))arrayObject->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":215 */ - __pyx_1 = __pyx_v_scalar; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":226 */ + __pyx_4 = PyArray_MultiIterNew(3,((void (*))arrayObject),((void (*))__pyx_v_oa),((void (*))__pyx_v_ob)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_4))); + Py_DECREF(((PyObject *)__pyx_v_multi)); + __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":227 */ + __pyx_1 = (__pyx_v_multi->size != PyArray_SIZE(arrayObject)); if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":216 */ - __pyx_v_length = PyArray_SIZE(arrayObject); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":217 */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":218 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0]),(__pyx_v_ob_data[0])); - } - goto __pyx_L7; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":228 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} + __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} + Py_INCREF(__pyx_k62p); + PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k62p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_5); __pyx_5 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} + goto __pyx_L5; } - /*else*/ { + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":220 */ - __pyx_4 = PyArray_MultiIterNew(3,((void (*))arrayObject),((void (*))__pyx_v_oa),((void (*))__pyx_v_ob)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_4))); - Py_DECREF(((PyObject *)__pyx_v_multi)); - __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_4); - Py_DECREF(__pyx_4); __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":229 */ + __pyx_3 = __pyx_v_multi->size; + for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":221 */ - __pyx_1 = (__pyx_v_multi->size != PyArray_SIZE(arrayObject)); - if (__pyx_1) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":230 */ + __pyx_v_oa_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":222 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;} - __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;} - Py_INCREF(__pyx_k62p); - PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k62p); - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_5); __pyx_5 = 0; - __Pyx_Raise(__pyx_4, 0, 0); - Py_DECREF(__pyx_4); __pyx_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;} - goto __pyx_L10; - } - __pyx_L10:; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":231 */ + __pyx_v_ob_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,2)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":223 */ - __pyx_3 = __pyx_v_multi->size; - for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":232 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0]),(__pyx_v_ob_data[0])); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":224 */ - __pyx_v_oa_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":233 */ + PyArray_MultiIter_NEXTi(__pyx_v_multi,1); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":225 */ - __pyx_v_ob_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,2)); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":226 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0]),(__pyx_v_ob_data[0])); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":227 */ - PyArray_MultiIter_NEXTi(__pyx_v_multi,1); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":228 */ - PyArray_MultiIter_NEXTi(__pyx_v_multi,2); - } + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":234 */ + PyArray_MultiIter_NEXTi(__pyx_v_multi,2); } - __pyx_L7:; } - __pyx_L3:; + __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":229 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":235 */ Py_INCREF(((PyObject *)arrayObject)); __pyx_r = ((PyObject *)arrayObject); goto __pyx_L0; @@ -686,6 +745,86 @@ return __pyx_r; } +static PyObject *__pyx_f_6mtrand_cont3_array_sc(rk_state (*__pyx_v_state),double ((*__pyx_v_func)(rk_state (*),double ,double ,double )),PyObject *__pyx_v_size,double __pyx_v_a,double __pyx_v_b,double __pyx_v_c) { + double (*__pyx_v_array_data); + PyArrayObject *arrayObject; + long __pyx_v_length; + long __pyx_v_i; + PyObject *__pyx_r; + int __pyx_1; + PyObject *__pyx_2 = 0; + PyObject *__pyx_3 = 0; + PyObject *__pyx_4 = 0; + Py_INCREF(__pyx_v_size); + arrayObject = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":245 */ + __pyx_1 = __pyx_v_size == Py_None; + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":246 */ + __pyx_2 = PyFloat_FromDouble(__pyx_v_func(__pyx_v_state,__pyx_v_a,__pyx_v_b,__pyx_v_c)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + /*else*/ { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":248 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_Float64); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; goto __pyx_L1;} + Py_INCREF(__pyx_v_size); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_size); + PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); + Py_DECREF(((PyObject *)arrayObject)); + arrayObject = ((PyArrayObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":249 */ + __pyx_v_length = PyArray_SIZE(arrayObject); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":250 */ + __pyx_v_array_data = ((double (*))arrayObject->data); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":251 */ + for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":252 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,__pyx_v_a,__pyx_v_b,__pyx_v_c); + } + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":253 */ + Py_INCREF(((PyObject *)arrayObject)); + __pyx_r = ((PyObject *)arrayObject); + goto __pyx_L0; + } + __pyx_L2:; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_2); + Py_XDECREF(__pyx_3); + Py_XDECREF(__pyx_4); + __Pyx_AddTraceback("mtrand.cont3_array_sc"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(arrayObject); + Py_DECREF(__pyx_v_size); + return __pyx_r; +} + static PyObject *__pyx_k63p; static char (__pyx_k63[]) = "size is not compatible with inputs"; @@ -696,10 +835,8 @@ double (*__pyx_v_ob_data); double (*__pyx_v_oc_data); PyArrayObject *arrayObject; - npy_intp __pyx_v_length; npy_intp __pyx_v_i; PyArrayMultiIterObject *__pyx_v_multi; - int __pyx_v_scalar; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; @@ -713,106 +850,63 @@ arrayObject = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_multi = ((PyArrayMultiIterObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":244 */ - __pyx_v_scalar = 0; - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":245 */ - __pyx_1 = (__pyx_v_oa->nd == 0); - if (__pyx_1) { - __pyx_1 = (__pyx_v_ob->nd == 0); - if (__pyx_1) { - __pyx_1 = (__pyx_v_oc->nd == 0); - } - } - if (__pyx_1) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":246 */ - __pyx_v_oa_data = ((double (*))__pyx_v_oa->data); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":247 */ - __pyx_v_ob_data = ((double (*))__pyx_v_ob->data); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":248 */ - __pyx_v_oc_data = ((double (*))__pyx_v_oc->data); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":249 */ - __pyx_v_scalar = 1; - goto __pyx_L2; - } - __pyx_L2:; - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":251 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":267 */ __pyx_1 = __pyx_v_size == Py_None; if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":252 */ - __pyx_1 = __pyx_v_scalar; - if (__pyx_1) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":268 */ + __pyx_2 = PyArray_MultiIterNew(3,((void (*))__pyx_v_oa),((void (*))__pyx_v_ob),((void (*))__pyx_v_oc)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_2))); + Py_DECREF(((PyObject *)__pyx_v_multi)); + __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":253 */ - __pyx_2 = PyFloat_FromDouble(__pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0]),(__pyx_v_ob_data[0]),(__pyx_v_oc_data[0]))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; goto __pyx_L1;} - __pyx_r = __pyx_2; - __pyx_2 = 0; - goto __pyx_L0; - goto __pyx_L4; - } - /*else*/ { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":269 */ + __pyx_2 = PyArray_SimpleNew(__pyx_v_multi->nd,__pyx_v_multi->dimensions,NPY_DOUBLE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); + Py_DECREF(((PyObject *)arrayObject)); + arrayObject = ((PyArrayObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":255 */ - __pyx_2 = PyArray_MultiIterNew(3,((void (*))__pyx_v_oa),((void (*))__pyx_v_ob),((void (*))__pyx_v_oc)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_2))); - Py_DECREF(((PyObject *)__pyx_v_multi)); - __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":270 */ + __pyx_v_array_data = ((double (*))arrayObject->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":256 */ - __pyx_2 = PyArray_SimpleNew(__pyx_v_multi->nd,__pyx_v_multi->dimensions,NPY_DOUBLE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); - Py_DECREF(((PyObject *)arrayObject)); - arrayObject = ((PyArrayObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":271 */ + __pyx_3 = __pyx_v_multi->size; + for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":257 */ - __pyx_v_array_data = ((double (*))arrayObject->data); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":272 */ + __pyx_v_oa_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,0)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":258 */ - __pyx_3 = __pyx_v_multi->size; - for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":273 */ + __pyx_v_ob_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":259 */ - __pyx_v_oa_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,0)); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":274 */ + __pyx_v_oc_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,2)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":260 */ - __pyx_v_ob_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":275 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0]),(__pyx_v_ob_data[0]),(__pyx_v_oc_data[0])); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":261 */ - __pyx_v_oc_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,2)); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":262 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0]),(__pyx_v_ob_data[0]),(__pyx_v_oc_data[0])); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":263 */ - PyArray_MultiIter_NEXT(__pyx_v_multi); - } + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":276 */ + PyArray_MultiIter_NEXT(__pyx_v_multi); } - __pyx_L4:; - goto __pyx_L3; + goto __pyx_L2; } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":265 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; goto __pyx_L1;} - __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":278 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; goto __pyx_L1;} - __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} + __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; goto __pyx_L1;} + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} Py_INCREF(__pyx_v_size); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_size); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_5); __pyx_5 = 0; - __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; goto __pyx_L1;} + __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_5))); @@ -820,77 +914,58 @@ arrayObject = ((PyArrayObject *)__pyx_5); Py_DECREF(__pyx_5); __pyx_5 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":266 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":279 */ __pyx_v_array_data = ((double (*))arrayObject->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":267 */ - __pyx_1 = __pyx_v_scalar; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":280 */ + __pyx_4 = PyArray_MultiIterNew(4,((void (*))arrayObject),((void (*))__pyx_v_oa),((void (*))__pyx_v_ob),((void (*))__pyx_v_oc)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_4))); + Py_DECREF(((PyObject *)__pyx_v_multi)); + __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":282 */ + __pyx_1 = (__pyx_v_multi->size != PyArray_SIZE(arrayObject)); if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":268 */ - __pyx_v_length = PyArray_SIZE(arrayObject); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":269 */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":270 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0]),(__pyx_v_ob_data[0]),(__pyx_v_oc_data[0])); - } - goto __pyx_L7; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":283 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;} + __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;} + Py_INCREF(__pyx_k63p); + PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k63p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_5); __pyx_5 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; goto __pyx_L1;} + goto __pyx_L5; } - /*else*/ { + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":272 */ - __pyx_4 = PyArray_MultiIterNew(4,((void (*))arrayObject),((void (*))__pyx_v_oa),((void (*))__pyx_v_ob),((void (*))__pyx_v_oc)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_4))); - Py_DECREF(((PyObject *)__pyx_v_multi)); - __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_4); - Py_DECREF(__pyx_4); __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":284 */ + __pyx_3 = __pyx_v_multi->size; + for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":274 */ - __pyx_1 = (__pyx_v_multi->size != PyArray_SIZE(arrayObject)); - if (__pyx_1) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":285 */ + __pyx_v_oa_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":275 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} - __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} - Py_INCREF(__pyx_k63p); - PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k63p); - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_5); __pyx_5 = 0; - __Pyx_Raise(__pyx_4, 0, 0); - Py_DECREF(__pyx_4); __pyx_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} - goto __pyx_L10; - } - __pyx_L10:; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":286 */ + __pyx_v_ob_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,2)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":276 */ - __pyx_3 = __pyx_v_multi->size; - for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":287 */ + __pyx_v_oc_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,3)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":277 */ - __pyx_v_oa_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":288 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0]),(__pyx_v_ob_data[0]),(__pyx_v_oc_data[0])); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":278 */ - __pyx_v_ob_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,2)); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":279 */ - __pyx_v_oc_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,3)); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":280 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0]),(__pyx_v_ob_data[0]),(__pyx_v_oc_data[0])); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":281 */ - PyArray_MultiIter_NEXT(__pyx_v_multi); - } + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":289 */ + PyArray_MultiIter_NEXT(__pyx_v_multi); } - __pyx_L7:; } - __pyx_L3:; + __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":282 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":290 */ Py_INCREF(((PyObject *)arrayObject)); __pyx_r = ((PyObject *)arrayObject); goto __pyx_L0; @@ -928,12 +1003,12 @@ Py_INCREF(__pyx_v_size); arrayObject = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":290 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":298 */ __pyx_1 = __pyx_v_size == Py_None; if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":291 */ - __pyx_2 = PyInt_FromLong(__pyx_v_func(__pyx_v_state)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":299 */ + __pyx_2 = PyInt_FromLong(__pyx_v_func(__pyx_v_state)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; @@ -941,17 +1016,17 @@ } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":293 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":301 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;} + __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;} Py_INCREF(__pyx_v_size); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_size); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); @@ -959,20 +1034,20 @@ arrayObject = ((PyArrayObject *)__pyx_2); Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":294 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":302 */ __pyx_v_length = PyArray_SIZE(arrayObject); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":295 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":303 */ __pyx_v_array_data = ((long (*))arrayObject->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":296 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":304 */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":297 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":305 */ (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state); } - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":298 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":306 */ Py_INCREF(((PyObject *)arrayObject)); __pyx_r = ((PyObject *)arrayObject); goto __pyx_L0; @@ -993,6 +1068,88 @@ return __pyx_r; } +static PyObject *__pyx_n_Int; + +static PyObject *__pyx_f_6mtrand_discnp_array_sc(rk_state (*__pyx_v_state),long ((*__pyx_v_func)(rk_state (*),long ,double )),PyObject *__pyx_v_size,long __pyx_v_n,double __pyx_v_p) { + long (*__pyx_v_array_data); + PyArrayObject *arrayObject; + long __pyx_v_length; + long __pyx_v_i; + PyObject *__pyx_r; + int __pyx_1; + PyObject *__pyx_2 = 0; + PyObject *__pyx_3 = 0; + PyObject *__pyx_4 = 0; + Py_INCREF(__pyx_v_size); + arrayObject = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":314 */ + __pyx_1 = __pyx_v_size == Py_None; + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":315 */ + __pyx_2 = PyInt_FromLong(__pyx_v_func(__pyx_v_state,__pyx_v_n,__pyx_v_p)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + /*else*/ { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":317 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_Int); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;} + Py_INCREF(__pyx_v_size); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_size); + PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); + Py_DECREF(((PyObject *)arrayObject)); + arrayObject = ((PyArrayObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":318 */ + __pyx_v_length = PyArray_SIZE(arrayObject); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":319 */ + __pyx_v_array_data = ((long (*))arrayObject->data); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":320 */ + for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":321 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,__pyx_v_n,__pyx_v_p); + } + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":322 */ + Py_INCREF(((PyObject *)arrayObject)); + __pyx_r = ((PyObject *)arrayObject); + goto __pyx_L0; + } + __pyx_L2:; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_2); + Py_XDECREF(__pyx_3); + Py_XDECREF(__pyx_4); + __Pyx_AddTraceback("mtrand.discnp_array_sc"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(arrayObject); + Py_DECREF(__pyx_v_size); + return __pyx_r; +} + static PyObject *__pyx_k64p; static char (__pyx_k64[]) = "size is not compatible with inputs"; @@ -1000,11 +1157,9 @@ static PyObject *__pyx_f_6mtrand_discnp_array(rk_state (*__pyx_v_state),long ((*__pyx_v_func)(rk_state (*),long ,double )),PyObject *__pyx_v_size,PyArrayObject *__pyx_v_on,PyArrayObject *__pyx_v_op) { long (*__pyx_v_array_data); PyArrayObject *arrayObject; - npy_intp __pyx_v_length; npy_intp __pyx_v_i; double (*__pyx_v_op_data); long (*__pyx_v_on_data); - int __pyx_v_scalar; PyArrayMultiIterObject *__pyx_v_multi; PyObject *__pyx_r; int __pyx_1; @@ -1018,95 +1173,58 @@ arrayObject = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_multi = ((PyArrayMultiIterObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":310 */ - __pyx_v_scalar = 0; - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":311 */ - __pyx_1 = (__pyx_v_on->nd == 0); - if (__pyx_1) { - __pyx_1 = (__pyx_v_op->nd == 0); - } - if (__pyx_1) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":312 */ - __pyx_v_on_data = ((long (*))__pyx_v_on->data); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":313 */ - __pyx_v_op_data = ((double (*))__pyx_v_op->data); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":314 */ - __pyx_v_scalar = 1; - goto __pyx_L2; - } - __pyx_L2:; - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":316 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":333 */ __pyx_1 = __pyx_v_size == Py_None; if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":317 */ - __pyx_1 = __pyx_v_scalar; - if (__pyx_1) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":334 */ + __pyx_2 = PyArray_MultiIterNew(2,((void (*))__pyx_v_on),((void (*))__pyx_v_op)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_2))); + Py_DECREF(((PyObject *)__pyx_v_multi)); + __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":318 */ - __pyx_2 = PyInt_FromLong(__pyx_v_func(__pyx_v_state,(__pyx_v_on_data[0]),(__pyx_v_op_data[0]))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; goto __pyx_L1;} - __pyx_r = __pyx_2; - __pyx_2 = 0; - goto __pyx_L0; - goto __pyx_L4; - } - /*else*/ { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":335 */ + __pyx_2 = PyArray_SimpleNew(__pyx_v_multi->nd,__pyx_v_multi->dimensions,NPY_LONG); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); + Py_DECREF(((PyObject *)arrayObject)); + arrayObject = ((PyArrayObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":320 */ - __pyx_2 = PyArray_MultiIterNew(2,((void (*))__pyx_v_on),((void (*))__pyx_v_op)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_2))); - Py_DECREF(((PyObject *)__pyx_v_multi)); - __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":336 */ + __pyx_v_array_data = ((long (*))arrayObject->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":321 */ - __pyx_2 = PyArray_SimpleNew(__pyx_v_multi->nd,__pyx_v_multi->dimensions,NPY_LONG); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); - Py_DECREF(((PyObject *)arrayObject)); - arrayObject = ((PyArrayObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":337 */ + __pyx_3 = __pyx_v_multi->size; + for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":322 */ - __pyx_v_array_data = ((long (*))arrayObject->data); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":338 */ + __pyx_v_on_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,0)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":323 */ - __pyx_3 = __pyx_v_multi->size; - for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":339 */ + __pyx_v_op_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":324 */ - __pyx_v_on_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,0)); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":340 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_on_data[0]),(__pyx_v_op_data[0])); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":325 */ - __pyx_v_op_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":326 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_on_data[0]),(__pyx_v_op_data[0])); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":327 */ - PyArray_MultiIter_NEXT(__pyx_v_multi); - } + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":341 */ + PyArray_MultiIter_NEXT(__pyx_v_multi); } - __pyx_L4:; - goto __pyx_L3; + goto __pyx_L2; } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":329 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; goto __pyx_L1;} - __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":343 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; goto __pyx_L1;} - __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;} Py_INCREF(__pyx_v_size); PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_size); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); @@ -1114,77 +1232,58 @@ arrayObject = ((PyArrayObject *)__pyx_2); Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":330 */ - __pyx_1 = __pyx_v_scalar; - if (__pyx_1) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":344 */ + __pyx_v_array_data = ((long (*))arrayObject->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":331 */ - __pyx_v_length = PyArray_SIZE(arrayObject); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":345 */ + __pyx_4 = PyArray_MultiIterNew(3,((void (*))arrayObject),((void (*))__pyx_v_on),((void (*))__pyx_v_op)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_4))); + Py_DECREF(((PyObject *)__pyx_v_multi)); + __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":332 */ - __pyx_v_array_data = ((long (*))arrayObject->data); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":346 */ + __pyx_1 = (__pyx_v_multi->size != PyArray_SIZE(arrayObject)); + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":333 */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":334 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_on_data[0]),(__pyx_v_op_data[0])); - } - goto __pyx_L7; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":347 */ + __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;} + Py_INCREF(__pyx_k64p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k64p); + __pyx_4 = PyObject_CallObject(__pyx_5, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;} + goto __pyx_L5; } - /*else*/ { + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":336 */ - __pyx_4 = PyArray_MultiIterNew(3,((void (*))arrayObject),((void (*))__pyx_v_on),((void (*))__pyx_v_op)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_4))); - Py_DECREF(((PyObject *)__pyx_v_multi)); - __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_4); - Py_DECREF(__pyx_4); __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":348 */ + __pyx_3 = __pyx_v_multi->size; + for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":337 */ - __pyx_1 = (__pyx_v_multi->size != PyArray_SIZE(arrayObject)); - if (__pyx_1) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":349 */ + __pyx_v_on_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":338 */ - __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; goto __pyx_L1;} - Py_INCREF(__pyx_k64p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k64p); - __pyx_4 = PyObject_CallObject(__pyx_5, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; goto __pyx_L1;} - Py_DECREF(__pyx_5); __pyx_5 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_4, 0, 0); - Py_DECREF(__pyx_4); __pyx_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; goto __pyx_L1;} - goto __pyx_L10; - } - __pyx_L10:; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":350 */ + __pyx_v_op_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,2)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":339 */ - __pyx_3 = __pyx_v_multi->size; - for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":351 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_on_data[0]),(__pyx_v_op_data[0])); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":340 */ - __pyx_v_on_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":352 */ + PyArray_MultiIter_NEXTi(__pyx_v_multi,1); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":341 */ - __pyx_v_op_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,2)); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":342 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_on_data[0]),(__pyx_v_op_data[0])); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":343 */ - PyArray_MultiIter_NEXTi(__pyx_v_multi,1); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":344 */ - PyArray_MultiIter_NEXTi(__pyx_v_multi,2); - } + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":353 */ + PyArray_MultiIter_NEXTi(__pyx_v_multi,2); } - __pyx_L7:; } - __pyx_L3:; + __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":346 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":355 */ Py_INCREF(((PyObject *)arrayObject)); __pyx_r = ((PyObject *)arrayObject); goto __pyx_L0; @@ -1206,6 +1305,86 @@ return __pyx_r; } +static PyObject *__pyx_f_6mtrand_discnmN_array_sc(rk_state (*__pyx_v_state),long ((*__pyx_v_func)(rk_state (*),long ,long ,long )),PyObject *__pyx_v_size,long __pyx_v_n,long __pyx_v_m,long __pyx_v_N) { + long (*__pyx_v_array_data); + PyArrayObject *arrayObject; + long __pyx_v_length; + long __pyx_v_i; + PyObject *__pyx_r; + int __pyx_1; + PyObject *__pyx_2 = 0; + PyObject *__pyx_3 = 0; + PyObject *__pyx_4 = 0; + Py_INCREF(__pyx_v_size); + arrayObject = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":364 */ + __pyx_1 = __pyx_v_size == Py_None; + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":365 */ + __pyx_2 = PyInt_FromLong(__pyx_v_func(__pyx_v_state,__pyx_v_n,__pyx_v_m,__pyx_v_N)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + /*else*/ { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":367 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_Int); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;} + Py_INCREF(__pyx_v_size); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_size); + PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); + Py_DECREF(((PyObject *)arrayObject)); + arrayObject = ((PyArrayObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":368 */ + __pyx_v_length = PyArray_SIZE(arrayObject); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":369 */ + __pyx_v_array_data = ((long (*))arrayObject->data); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":370 */ + for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":371 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,__pyx_v_n,__pyx_v_m,__pyx_v_N); + } + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":372 */ + Py_INCREF(((PyObject *)arrayObject)); + __pyx_r = ((PyObject *)arrayObject); + goto __pyx_L0; + } + __pyx_L2:; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_2); + Py_XDECREF(__pyx_3); + Py_XDECREF(__pyx_4); + __Pyx_AddTraceback("mtrand.discnmN_array_sc"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(arrayObject); + Py_DECREF(__pyx_v_size); + return __pyx_r; +} + static PyObject *__pyx_k65p; static char (__pyx_k65[]) = "size is not compatible with inputs"; @@ -1216,10 +1395,8 @@ long (*__pyx_v_om_data); long (*__pyx_v_oN_data); PyArrayObject *arrayObject; - npy_intp __pyx_v_length; npy_intp __pyx_v_i; PyArrayMultiIterObject *__pyx_v_multi; - int __pyx_v_scalar; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; @@ -1233,104 +1410,61 @@ arrayObject = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_multi = ((PyArrayMultiIterObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":360 */ - __pyx_v_scalar = 0; - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":361 */ - __pyx_1 = (__pyx_v_on->nd == 0); - if (__pyx_1) { - __pyx_1 = (__pyx_v_om->nd == 0); - if (__pyx_1) { - __pyx_1 = (__pyx_v_oN->nd == 0); - } - } - if (__pyx_1) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":362 */ - __pyx_v_scalar = 1; - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":363 */ - __pyx_v_on_data = ((long (*))__pyx_v_on->data); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":364 */ - __pyx_v_om_data = ((long (*))__pyx_v_om->data); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":365 */ - __pyx_v_oN_data = ((long (*))__pyx_v_oN->data); - goto __pyx_L2; - } - __pyx_L2:; - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":367 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":385 */ __pyx_1 = __pyx_v_size == Py_None; if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":368 */ - __pyx_1 = __pyx_v_scalar; - if (__pyx_1) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":386 */ + __pyx_2 = PyArray_MultiIterNew(3,((void (*))__pyx_v_on),((void (*))__pyx_v_om),((void (*))__pyx_v_oN)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_2))); + Py_DECREF(((PyObject *)__pyx_v_multi)); + __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":369 */ - __pyx_2 = PyInt_FromLong(__pyx_v_func(__pyx_v_state,(__pyx_v_on_data[0]),(__pyx_v_om_data[0]),(__pyx_v_oN_data[0]))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; goto __pyx_L1;} - __pyx_r = __pyx_2; - __pyx_2 = 0; - goto __pyx_L0; - goto __pyx_L4; - } - /*else*/ { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":387 */ + __pyx_2 = PyArray_SimpleNew(__pyx_v_multi->nd,__pyx_v_multi->dimensions,NPY_LONG); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); + Py_DECREF(((PyObject *)arrayObject)); + arrayObject = ((PyArrayObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":371 */ - __pyx_2 = PyArray_MultiIterNew(3,((void (*))__pyx_v_on),((void (*))__pyx_v_om),((void (*))__pyx_v_oN)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_2))); - Py_DECREF(((PyObject *)__pyx_v_multi)); - __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":388 */ + __pyx_v_array_data = ((long (*))arrayObject->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":372 */ - __pyx_2 = PyArray_SimpleNew(__pyx_v_multi->nd,__pyx_v_multi->dimensions,NPY_LONG); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); - Py_DECREF(((PyObject *)arrayObject)); - arrayObject = ((PyArrayObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":389 */ + __pyx_3 = __pyx_v_multi->size; + for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":373 */ - __pyx_v_array_data = ((long (*))arrayObject->data); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":390 */ + __pyx_v_on_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,0)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":374 */ - __pyx_3 = __pyx_v_multi->size; - for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":391 */ + __pyx_v_om_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":375 */ - __pyx_v_on_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,0)); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":392 */ + __pyx_v_oN_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,2)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":376 */ - __pyx_v_om_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":393 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_on_data[0]),(__pyx_v_om_data[0]),(__pyx_v_oN_data[0])); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":377 */ - __pyx_v_oN_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,2)); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":378 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_on_data[0]),(__pyx_v_om_data[0]),(__pyx_v_oN_data[0])); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":379 */ - PyArray_MultiIter_NEXT(__pyx_v_multi); - } + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":394 */ + PyArray_MultiIter_NEXT(__pyx_v_multi); } - __pyx_L4:; - goto __pyx_L3; + goto __pyx_L2; } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":381 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;} - __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":396 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;} - __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} Py_INCREF(__pyx_v_size); PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_size); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); @@ -1338,77 +1472,58 @@ arrayObject = ((PyArrayObject *)__pyx_2); Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":382 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":397 */ __pyx_v_array_data = ((long (*))arrayObject->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":383 */ - __pyx_1 = __pyx_v_scalar; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":398 */ + __pyx_4 = PyArray_MultiIterNew(4,((void (*))arrayObject),((void (*))__pyx_v_on),((void (*))__pyx_v_om),((void (*))__pyx_v_oN)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_4))); + Py_DECREF(((PyObject *)__pyx_v_multi)); + __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":400 */ + __pyx_1 = (__pyx_v_multi->size != PyArray_SIZE(arrayObject)); if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":384 */ - __pyx_v_length = PyArray_SIZE(arrayObject); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":385 */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":386 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_on_data[0]),(__pyx_v_om_data[0]),(__pyx_v_oN_data[0])); - } - goto __pyx_L7; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":401 */ + __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;} + Py_INCREF(__pyx_k65p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k65p); + __pyx_4 = PyObject_CallObject(__pyx_5, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;} + goto __pyx_L5; } - /*else*/ { + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":388 */ - __pyx_4 = PyArray_MultiIterNew(4,((void (*))arrayObject),((void (*))__pyx_v_on),((void (*))__pyx_v_om),((void (*))__pyx_v_oN)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_4))); - Py_DECREF(((PyObject *)__pyx_v_multi)); - __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_4); - Py_DECREF(__pyx_4); __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":402 */ + __pyx_3 = __pyx_v_multi->size; + for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":390 */ - __pyx_1 = (__pyx_v_multi->size != PyArray_SIZE(arrayObject)); - if (__pyx_1) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":403 */ + __pyx_v_on_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":391 */ - __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; goto __pyx_L1;} - Py_INCREF(__pyx_k65p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k65p); - __pyx_4 = PyObject_CallObject(__pyx_5, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; goto __pyx_L1;} - Py_DECREF(__pyx_5); __pyx_5 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_4, 0, 0); - Py_DECREF(__pyx_4); __pyx_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; goto __pyx_L1;} - goto __pyx_L10; - } - __pyx_L10:; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":404 */ + __pyx_v_om_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,2)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":392 */ - __pyx_3 = __pyx_v_multi->size; - for (__pyx_v_i = 0; __pyx_v_i < __pyx_3; ++__pyx_v_i) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":405 */ + __pyx_v_oN_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,3)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":393 */ - __pyx_v_on_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":406 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_on_data[0]),(__pyx_v_om_data[0]),(__pyx_v_oN_data[0])); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":394 */ - __pyx_v_om_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,2)); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":395 */ - __pyx_v_oN_data = ((long (*))PyArray_MultiIter_DATA(__pyx_v_multi,3)); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":396 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_on_data[0]),(__pyx_v_om_data[0]),(__pyx_v_oN_data[0])); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":397 */ - PyArray_MultiIter_NEXT(__pyx_v_multi); - } + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":407 */ + PyArray_MultiIter_NEXT(__pyx_v_multi); } - __pyx_L7:; } - __pyx_L3:; + __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":399 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":409 */ Py_INCREF(((PyObject *)arrayObject)); __pyx_r = ((PyObject *)arrayObject); goto __pyx_L0; @@ -1431,6 +1546,86 @@ return __pyx_r; } +static PyObject *__pyx_f_6mtrand_discd_array_sc(rk_state (*__pyx_v_state),long ((*__pyx_v_func)(rk_state (*),double )),PyObject *__pyx_v_size,double __pyx_v_a) { + long (*__pyx_v_array_data); + PyArrayObject *arrayObject; + long __pyx_v_length; + long __pyx_v_i; + PyObject *__pyx_r; + int __pyx_1; + PyObject *__pyx_2 = 0; + PyObject *__pyx_3 = 0; + PyObject *__pyx_4 = 0; + Py_INCREF(__pyx_v_size); + arrayObject = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":417 */ + __pyx_1 = __pyx_v_size == Py_None; + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":418 */ + __pyx_2 = PyInt_FromLong(__pyx_v_func(__pyx_v_state,__pyx_v_a)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + /*else*/ { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":420 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_Int); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;} + Py_INCREF(__pyx_v_size); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_size); + PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); + Py_DECREF(((PyObject *)arrayObject)); + arrayObject = ((PyArrayObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":421 */ + __pyx_v_length = PyArray_SIZE(arrayObject); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":422 */ + __pyx_v_array_data = ((long (*))arrayObject->data); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":423 */ + for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":424 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,__pyx_v_a); + } + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":425 */ + Py_INCREF(((PyObject *)arrayObject)); + __pyx_r = ((PyObject *)arrayObject); + goto __pyx_L0; + } + __pyx_L2:; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_2); + Py_XDECREF(__pyx_3); + Py_XDECREF(__pyx_4); + __Pyx_AddTraceback("mtrand.discd_array_sc"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(arrayObject); + Py_DECREF(__pyx_v_size); + return __pyx_r; +} + static PyObject *__pyx_k66p; static char (__pyx_k66[]) = "size is not compatible with inputs"; @@ -1443,7 +1638,6 @@ npy_intp __pyx_v_i; PyArrayMultiIterObject *__pyx_v_multi; PyArrayIterObject *__pyx_v_itera; - int __pyx_v_scalar; PyObject *__pyx_r; int __pyx_1; PyObject *__pyx_2 = 0; @@ -1456,85 +1650,54 @@ __pyx_v_multi = ((PyArrayMultiIterObject *)Py_None); Py_INCREF(Py_None); __pyx_v_itera = ((PyArrayIterObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":411 */ - __pyx_v_scalar = 0; - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":412 */ - __pyx_1 = (__pyx_v_oa->nd == 0); - if (__pyx_1) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":413 */ - __pyx_v_oa_data = ((double (*))__pyx_v_oa->data); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":414 */ - __pyx_v_scalar = 1; - goto __pyx_L2; - } - __pyx_L2:; - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":416 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":436 */ __pyx_1 = __pyx_v_size == Py_None; if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":417 */ - __pyx_1 = __pyx_v_scalar; - if (__pyx_1) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":437 */ + __pyx_2 = PyArray_SimpleNew(__pyx_v_oa->nd,__pyx_v_oa->dimensions,NPY_LONG); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); + Py_DECREF(((PyObject *)arrayObject)); + arrayObject = ((PyArrayObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":418 */ - __pyx_2 = PyInt_FromLong(__pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0]))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; goto __pyx_L1;} - __pyx_r = __pyx_2; - __pyx_2 = 0; - goto __pyx_L0; - goto __pyx_L4; - } - /*else*/ { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":438 */ + __pyx_v_length = PyArray_SIZE(arrayObject); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":420 */ - __pyx_2 = PyArray_SimpleNew(__pyx_v_oa->nd,__pyx_v_oa->dimensions,NPY_LONG); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); - Py_DECREF(((PyObject *)arrayObject)); - arrayObject = ((PyArrayObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":439 */ + __pyx_v_array_data = ((long (*))arrayObject->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":421 */ - __pyx_v_length = PyArray_SIZE(arrayObject); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":440 */ + __pyx_2 = PyArray_IterNew(((PyObject *)__pyx_v_oa)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayIterObject *)__pyx_2))); + Py_DECREF(((PyObject *)__pyx_v_itera)); + __pyx_v_itera = ((PyArrayIterObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":422 */ - __pyx_v_array_data = ((long (*))arrayObject->data); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":441 */ + for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":423 */ - __pyx_2 = PyArray_IterNew(((PyObject *)__pyx_v_oa)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayIterObject *)__pyx_2))); - Py_DECREF(((PyObject *)__pyx_v_itera)); - __pyx_v_itera = ((PyArrayIterObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":442 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(((double (*))__pyx_v_itera->dataptr)[0])); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":424 */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":425 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(((double (*))__pyx_v_itera->dataptr)[0])); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":426 */ - PyArray_ITER_NEXT(__pyx_v_itera); - } + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":443 */ + PyArray_ITER_NEXT(__pyx_v_itera); } - __pyx_L4:; - goto __pyx_L3; + goto __pyx_L2; } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":428 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":445 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;} + __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;} Py_INCREF(__pyx_v_size); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_size); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); @@ -1542,71 +1705,52 @@ arrayObject = ((PyArrayObject *)__pyx_2); Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":429 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":446 */ __pyx_v_array_data = ((long (*))arrayObject->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":430 */ - __pyx_1 = __pyx_v_scalar; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":447 */ + __pyx_3 = PyArray_MultiIterNew(2,((void (*))arrayObject),((void (*))__pyx_v_oa)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_3))); + Py_DECREF(((PyObject *)__pyx_v_multi)); + __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":448 */ + __pyx_1 = (__pyx_v_multi->size != PyArray_SIZE(arrayObject)); if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":431 */ - __pyx_v_length = PyArray_SIZE(arrayObject); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":432 */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":433 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0])); - } - goto __pyx_L7; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":449 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; goto __pyx_L1;} + Py_INCREF(__pyx_k66p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k66p); + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(__pyx_3, 0, 0); + Py_DECREF(__pyx_3); __pyx_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; goto __pyx_L1;} + goto __pyx_L5; } - /*else*/ { + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":435 */ - __pyx_3 = PyArray_MultiIterNew(2,((void (*))arrayObject),((void (*))__pyx_v_oa)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayMultiIterObject *)__pyx_3))); - Py_DECREF(((PyObject *)__pyx_v_multi)); - __pyx_v_multi = ((PyArrayMultiIterObject *)__pyx_3); - Py_DECREF(__pyx_3); __pyx_3 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":450 */ + __pyx_5 = __pyx_v_multi->size; + for (__pyx_v_i = 0; __pyx_v_i < __pyx_5; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":436 */ - __pyx_1 = (__pyx_v_multi->size != PyArray_SIZE(arrayObject)); - if (__pyx_1) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":451 */ + __pyx_v_oa_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":437 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;} - Py_INCREF(__pyx_k66p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k66p); - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;} - goto __pyx_L10; - } - __pyx_L10:; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":452 */ + (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0])); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":438 */ - __pyx_5 = __pyx_v_multi->size; - for (__pyx_v_i = 0; __pyx_v_i < __pyx_5; ++__pyx_v_i) { - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":439 */ - __pyx_v_oa_data = ((double (*))PyArray_MultiIter_DATA(__pyx_v_multi,1)); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":440 */ - (__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state,(__pyx_v_oa_data[0])); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":441 */ - PyArray_MultiIter_NEXTi(__pyx_v_multi,1); - } + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":453 */ + PyArray_MultiIter_NEXTi(__pyx_v_multi,1); } - __pyx_L7:; } - __pyx_L3:; + __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":442 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":454 */ Py_INCREF(((PyObject *)arrayObject)); __pyx_r = ((PyObject *)arrayObject); goto __pyx_L0; @@ -1636,29 +1780,29 @@ long __pyx_v_i; double __pyx_r; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":447 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":459 */ __pyx_v_sum = (__pyx_v_darr[0]); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":448 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":460 */ __pyx_v_c = 0.0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":449 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":461 */ for (__pyx_v_i = 1; __pyx_v_i < __pyx_v_n; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":450 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":462 */ __pyx_v_y = ((__pyx_v_darr[__pyx_v_i]) - __pyx_v_c); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":451 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":463 */ __pyx_v_t = (__pyx_v_sum + __pyx_v_y); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":452 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":464 */ __pyx_v_c = ((__pyx_v_t - __pyx_v_sum) - __pyx_v_y); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":453 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":465 */ __pyx_v_sum = __pyx_v_t; } - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":454 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":466 */ __pyx_r = __pyx_v_sum; goto __pyx_L0; @@ -1680,15 +1824,15 @@ Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_seed); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":477 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":489 */ ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state = ((rk_state (*))PyMem_Malloc((sizeof(rk_state )))); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":479 */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_seed); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":491 */ + __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_seed); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; goto __pyx_L1;} Py_INCREF(__pyx_v_seed); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_seed); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; @@ -1712,14 +1856,14 @@ int __pyx_1; Py_INCREF(__pyx_v_self); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":482 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":494 */ __pyx_1 = (((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state != NULL); if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":483 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":495 */ PyMem_Free(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":484 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":496 */ ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state = NULL; goto __pyx_L2; } @@ -1749,42 +1893,42 @@ Py_INCREF(__pyx_v_seed); arrayObject_obj = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":498 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":510 */ __pyx_1 = __pyx_v_seed == Py_None; if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":499 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":511 */ __pyx_v_errcode = rk_randomseed(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state); goto __pyx_L2; } - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;} Py_INCREF(__pyx_v_seed); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_seed); - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;} __pyx_1 = __pyx_4 == __pyx_2; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":501 */ - __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_v_seed); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":513 */ + __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_v_seed); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} rk_seed(__pyx_5,((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state); goto __pyx_L2; } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":503 */ - __pyx_3 = PyArray_ContiguousFromObject(__pyx_v_seed,NPY_LONG,1,1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":515 */ + __pyx_3 = PyArray_ContiguousFromObject(__pyx_v_seed,NPY_LONG,1,1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; goto __pyx_L1;} Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)arrayObject_obj)); arrayObject_obj = ((PyArrayObject *)__pyx_3); Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":504 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":516 */ init_by_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,((unsigned long (*))arrayObject_obj->data),(arrayObject_obj->dimensions[0])); } __pyx_L2:; @@ -1821,18 +1965,18 @@ Py_INCREF(__pyx_v_self); arrayObject_state = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":513 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_empty); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":525 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_empty); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyInt_FromLong(624); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(624); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;} + __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3); __pyx_1 = 0; __pyx_3 = 0; - __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} + __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); @@ -1840,12 +1984,12 @@ arrayObject_state = ((PyArrayObject *)__pyx_1); Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":514 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":526 */ memcpy(((void (*))arrayObject_state->data),((void (*))((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state->key),(624 * (sizeof(long )))); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":515 */ - __pyx_3 = PyInt_FromLong(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state->pos); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; goto __pyx_L1;} - __pyx_2 = PyTuple_New(3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":527 */ + __pyx_3 = PyInt_FromLong(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state->pos); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; goto __pyx_L1;} + __pyx_2 = PyTuple_New(3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; goto __pyx_L1;} Py_INCREF(__pyx_n_MT19937); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_MT19937); Py_INCREF(((PyObject *)arrayObject_state)); @@ -1898,79 +2042,79 @@ __pyx_v_algorithm_name = Py_None; Py_INCREF(Py_None); __pyx_v_key = Py_None; Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":526 */ - __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;} - __pyx_2 = PyObject_GetItem(__pyx_v_state, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":538 */ + __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; goto __pyx_L1;} + __pyx_2 = PyObject_GetItem(__pyx_v_state, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v_algorithm_name); __pyx_v_algorithm_name = __pyx_2; __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":527 */ - if (PyObject_Cmp(__pyx_v_algorithm_name, __pyx_n_MT19937, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":539 */ + if (PyObject_Cmp(__pyx_v_algorithm_name, __pyx_n_MT19937, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; goto __pyx_L1;} __pyx_3 = __pyx_3 != 0; if (__pyx_3) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":528 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":540 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; goto __pyx_L1;} Py_INCREF(__pyx_k69p); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k69p); - __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __Pyx_Raise(__pyx_4, 0, 0); Py_DECREF(__pyx_4); __pyx_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":529 */ - __pyx_1 = PySequence_GetSlice(__pyx_v_state, 1, 0x7fffffff); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} - __pyx_2 = PyObject_GetIter(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":541 */ + __pyx_1 = PySequence_GetSlice(__pyx_v_state, 1, 0x7fffffff); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; goto __pyx_L1;} + __pyx_2 = PyObject_GetIter(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_4 = __Pyx_UnpackItem(__pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} + __pyx_4 = __Pyx_UnpackItem(__pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; goto __pyx_L1;} Py_DECREF(__pyx_v_key); __pyx_v_key = __pyx_4; __pyx_4 = 0; - __pyx_1 = __Pyx_UnpackItem(__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} - __pyx_3 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} + __pyx_1 = __Pyx_UnpackItem(__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; goto __pyx_L1;} + __pyx_3 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_v_pos = __pyx_3; - if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} + if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":530 */ - __pyx_4 = PyArray_ContiguousFromObject(__pyx_v_key,NPY_LONG,1,1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":542 */ + __pyx_4 = PyArray_ContiguousFromObject(__pyx_v_key,NPY_LONG,1,1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; goto __pyx_L1;} Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); Py_DECREF(((PyObject *)arrayObject_obj)); arrayObject_obj = ((PyArrayObject *)__pyx_4); Py_DECREF(__pyx_4); __pyx_4 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":531 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":543 */ __pyx_3 = ((arrayObject_obj->dimensions[0]) != 624); if (__pyx_3) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":532 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":544 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;} Py_INCREF(__pyx_k70p); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k70p); - __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __Pyx_Raise(__pyx_4, 0, 0); Py_DECREF(__pyx_4); __pyx_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":533 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":545 */ memcpy(((void (*))((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state->key),((void (*))arrayObject_obj->data),(624 * (sizeof(long )))); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":534 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":546 */ ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state->pos = __pyx_v_pos; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -1999,9 +2143,9 @@ if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":538 */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_get_state); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; goto __pyx_L1;} - __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":550 */ + __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_get_state); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_r = __pyx_2; __pyx_2 = 0; @@ -2031,12 +2175,12 @@ Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_state); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":541 */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_set_state); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":553 */ + __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_set_state); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; goto __pyx_L1;} Py_INCREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_state); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; @@ -2069,17 +2213,17 @@ if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; Py_INCREF(__pyx_v_self); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":544 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_random); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":556 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_random); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n___RandomState_ctor); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n___RandomState_ctor); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_get_state); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;} - __pyx_4 = PyObject_CallObject(__pyx_3, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;} + __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_get_state); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_3, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;} + __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); PyTuple_SET_ITEM(__pyx_3, 2, __pyx_4); @@ -2116,8 +2260,8 @@ Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_size); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":552 */ - __pyx_1 = __pyx_f_6mtrand_cont0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_double,__pyx_v_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":564 */ + __pyx_1 = __pyx_f_6mtrand_cont0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_double,__pyx_v_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -2146,8 +2290,8 @@ Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_size); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":559 */ - __pyx_1 = __pyx_f_6mtrand_disc0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_long,__pyx_v_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":571 */ + __pyx_1 = __pyx_f_6mtrand_disc0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_long,__pyx_v_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -2197,58 +2341,58 @@ Py_INCREF(__pyx_v_size); arrayObject = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":574 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":586 */ __pyx_1 = __pyx_v_high == Py_None; if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":575 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":587 */ __pyx_v_lo = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":576 */ - __pyx_2 = PyInt_AsLong(__pyx_v_low); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":588 */ + __pyx_2 = PyInt_AsLong(__pyx_v_low); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; goto __pyx_L1;} __pyx_v_hi = __pyx_2; goto __pyx_L2; } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":578 */ - __pyx_2 = PyInt_AsLong(__pyx_v_low); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":590 */ + __pyx_2 = PyInt_AsLong(__pyx_v_low); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; goto __pyx_L1;} __pyx_v_lo = __pyx_2; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":579 */ - __pyx_2 = PyInt_AsLong(__pyx_v_high); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":591 */ + __pyx_2 = PyInt_AsLong(__pyx_v_high); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; goto __pyx_L1;} __pyx_v_hi = __pyx_2; } __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":581 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":593 */ __pyx_v_diff = ((__pyx_v_hi - __pyx_v_lo) - 1); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":582 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":594 */ __pyx_1 = (__pyx_v_diff < 0); if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":583 */ - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":595 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; goto __pyx_L1;} Py_INCREF(__pyx_k71p); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k71p); - __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; goto __pyx_L1;} + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; __Pyx_Raise(__pyx_5, 0, 0); Py_DECREF(__pyx_5); __pyx_5 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":585 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":597 */ __pyx_1 = __pyx_v_size == Py_None; if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":586 */ - __pyx_3 = PyLong_FromUnsignedLong((rk_interval(__pyx_v_diff,((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state) + __pyx_v_lo)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":598 */ + __pyx_3 = PyLong_FromUnsignedLong((rk_interval(__pyx_v_diff,((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state) + __pyx_v_lo)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; goto __pyx_L1;} __pyx_r = __pyx_3; __pyx_3 = 0; goto __pyx_L0; @@ -2256,17 +2400,17 @@ } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":588 */ - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; goto __pyx_L1;} - __pyx_5 = PyObject_GetAttr(__pyx_4, __pyx_n_empty); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":600 */ + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; goto __pyx_L1;} + __pyx_5 = PyObject_GetAttr(__pyx_4, __pyx_n_empty); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; goto __pyx_L1;} + __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; goto __pyx_L1;} Py_INCREF(__pyx_v_size); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_size); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3); __pyx_3 = 0; - __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); @@ -2274,20 +2418,20 @@ arrayObject = ((PyArrayObject *)__pyx_3); Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":589 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":601 */ __pyx_v_length = PyArray_SIZE(arrayObject); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":590 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":602 */ __pyx_v_array_data = ((long (*))arrayObject->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":591 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":603 */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_length; ++__pyx_v_i) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":592 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":604 */ (__pyx_v_array_data[__pyx_v_i]) = (__pyx_v_lo + ((long )rk_interval(__pyx_v_diff,((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state))); } - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":593 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":605 */ Py_INCREF(((PyObject *)arrayObject)); __pyx_r = ((PyObject *)arrayObject); goto __pyx_L0; @@ -2324,22 +2468,19 @@ Py_INCREF(__pyx_v_self); __pyx_v_bytestring = Py_None; Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":601 */ - __pyx_v_bytes = PyMem_Malloc(__pyx_v_length); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":602 */ - rk_fill(__pyx_v_bytes,__pyx_v_length,((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state); - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":603 */ - __pyx_1 = PyString_FromStringAndSize(((char (*))__pyx_v_bytes),__pyx_v_length); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":613 */ + __pyx_1 = PyString_FromStringAndSize(NULL,__pyx_v_length); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; goto __pyx_L1;} Py_DECREF(__pyx_v_bytestring); __pyx_v_bytestring = __pyx_1; __pyx_1 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":604 */ - PyMem_Free(__pyx_v_bytes); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":614 */ + __pyx_v_bytes = PyString_AS_STRING(__pyx_v_bytestring); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":605 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":615 */ + rk_fill(__pyx_v_bytes,__pyx_v_length,((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":616 */ Py_INCREF(__pyx_v_bytestring); __pyx_r = __pyx_v_bytestring; goto __pyx_L0; @@ -2367,11 +2508,14 @@ PyArrayObject *__pyx_v_olow; PyArrayObject *__pyx_v_ohigh; PyArrayObject *__pyx_v_odiff; + double __pyx_v_flow; + double __pyx_v_fhigh; PyObject *__pyx_v_temp; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; + PyObject *__pyx_4 = 0; static char *__pyx_argnames[] = {"low","high","size",0}; __pyx_v_low = __pyx_k8; __pyx_v_high = __pyx_k9; @@ -2386,58 +2530,80 @@ __pyx_v_odiff = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_temp = Py_None; Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":616 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_low,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":627 */ + __pyx_v_flow = PyFloat_AsDouble(__pyx_v_low); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":628 */ + __pyx_v_fhigh = PyFloat_AsDouble(__pyx_v_high); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":629 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":630 */ + __pyx_2 = __pyx_f_6mtrand_cont2_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_uniform,__pyx_v_size,__pyx_v_flow,(__pyx_v_fhigh - __pyx_v_flow)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":631 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":632 */ + __pyx_2 = PyArray_FROM_OTF(__pyx_v_low,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); Py_DECREF(((PyObject *)__pyx_v_olow)); - __pyx_v_olow = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_olow = ((PyArrayObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":617 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_high,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":633 */ + __pyx_2 = PyArray_FROM_OTF(__pyx_v_high,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); Py_DECREF(((PyObject *)__pyx_v_ohigh)); - __pyx_v_ohigh = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_ohigh = ((PyArrayObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":618 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_subtract); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":634 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_subtract); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_ohigh)); - PyTuple_SET_ITEM(__pyx_1, 0, ((PyObject *)__pyx_v_ohigh)); + PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_ohigh)); Py_INCREF(((PyObject *)__pyx_v_olow)); - PyTuple_SET_ITEM(__pyx_1, 1, ((PyObject *)__pyx_v_olow)); - __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 1, ((PyObject *)__pyx_v_olow)); + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v_temp); - __pyx_v_temp = __pyx_3; - __pyx_3 = 0; + __pyx_v_temp = __pyx_4; + __pyx_4 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":619 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":635 */ Py_INCREF(__pyx_v_temp); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":621 */ - __pyx_2 = PyArray_EnsureArray(__pyx_v_temp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":637 */ + __pyx_3 = PyArray_EnsureArray(__pyx_v_temp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_odiff)); - __pyx_v_odiff = ((PyArrayObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_v_odiff = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":622 */ - __pyx_1 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_uniform,__pyx_v_size,__pyx_v_olow,__pyx_v_odiff); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":638 */ + __pyx_2 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_uniform,__pyx_v_size,__pyx_v_olow,__pyx_v_odiff); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); + Py_XDECREF(__pyx_4); __Pyx_AddTraceback("mtrand.RandomState.uniform"); __pyx_r = 0; __pyx_L0:; @@ -2476,24 +2642,24 @@ } Py_INCREF(__pyx_v_self); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":635 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":651 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; goto __pyx_L1;} Py_INCREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_args); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;} - if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; goto __pyx_L1;} + if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; goto __pyx_L1;} __pyx_4 = __pyx_4 == 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_4) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":636 */ - __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_random_sample); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; goto __pyx_L1;} - __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":652 */ + __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_random_sample); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; @@ -2502,12 +2668,12 @@ } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":638 */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_random_sample); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; goto __pyx_L1;} - __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; goto __pyx_L1;} - __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; goto __pyx_L1;} - if (PyDict_SetItem(__pyx_3, __pyx_n_size, __pyx_v_args) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; goto __pyx_L1;} - __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":654 */ + __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_random_sample); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; goto __pyx_L1;} + __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; goto __pyx_L1;} + __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; goto __pyx_L1;} + if (PyDict_SetItem(__pyx_3, __pyx_n_size, __pyx_v_args) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; goto __pyx_L1;} + __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; @@ -2553,24 +2719,24 @@ } Py_INCREF(__pyx_v_self); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":650 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":666 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;} Py_INCREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_args); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; goto __pyx_L1;} - if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;} + if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;} __pyx_4 = __pyx_4 == 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_4) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":651 */ - __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_standard_normal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; goto __pyx_L1;} - __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":667 */ + __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_standard_normal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = __pyx_3; __pyx_3 = 0; @@ -2579,12 +2745,12 @@ } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":653 */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_standard_normal); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":669 */ + __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_standard_normal); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; goto __pyx_L1;} Py_INCREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_args); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_r = __pyx_3; @@ -2629,17 +2795,17 @@ Py_INCREF(__pyx_v_high); Py_INCREF(__pyx_v_size); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":662 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":678 */ __pyx_1 = __pyx_v_high == Py_None; if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":663 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":679 */ Py_INCREF(__pyx_v_low); Py_DECREF(__pyx_v_high); __pyx_v_high = __pyx_v_low; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":664 */ - __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":680 */ + __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;} Py_DECREF(__pyx_v_low); __pyx_v_low = __pyx_2; __pyx_2 = 0; @@ -2647,19 +2813,19 @@ } __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":665 */ - __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_randint); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; goto __pyx_L1;} - __pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; goto __pyx_L1;} - __pyx_4 = PyNumber_Add(__pyx_v_high, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":681 */ + __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_randint); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;} + __pyx_4 = PyNumber_Add(__pyx_v_high, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; goto __pyx_L1;} + __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;} Py_INCREF(__pyx_v_low); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_low); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_4); Py_INCREF(__pyx_v_size); PyTuple_SET_ITEM(__pyx_3, 2, __pyx_v_size); __pyx_4 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_r = __pyx_4; @@ -2694,8 +2860,8 @@ Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_size); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":673 */ - __pyx_1 = __pyx_f_6mtrand_cont0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_gauss,__pyx_v_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":689 */ + __pyx_1 = __pyx_f_6mtrand_cont0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_gauss,__pyx_v_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -2716,8 +2882,10 @@ static PyObject *__pyx_n_less_equal; static PyObject *__pyx_k73p; +static PyObject *__pyx_k74p; static char (__pyx_k73[]) = "scale <= 0"; +static char (__pyx_k74[]) = "scale <= 0"; static PyObject *__pyx_f_6mtrand_11RandomState_normal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_normal[] = "Normal distribution (mean=loc, stdev=scale).\n\n normal(loc=0.0, scale=1.0, size=None) -> random values\n "; @@ -2727,12 +2895,14 @@ PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_oloc; PyArrayObject *__pyx_v_oscale; + double __pyx_v_floc; + double __pyx_v_fscale; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"loc","scale","size",0}; __pyx_v_loc = __pyx_k14; __pyx_v_scale = __pyx_k15; @@ -2745,74 +2915,115 @@ __pyx_v_oloc = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_oscale = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":682 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_loc,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":699 */ + __pyx_v_floc = PyFloat_AsDouble(__pyx_v_loc); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":700 */ + __pyx_v_fscale = PyFloat_AsDouble(__pyx_v_scale); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":701 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":702 */ + __pyx_1 = (__pyx_v_fscale <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":703 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; goto __pyx_L1;} + Py_INCREF(__pyx_k73p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k73p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":704 */ + __pyx_2 = __pyx_f_6mtrand_cont2_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_normal,__pyx_v_size,__pyx_v_floc,__pyx_v_fscale); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":706 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":708 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_loc,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_oloc)); - __pyx_v_oloc = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_oloc = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":683 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":709 */ + __pyx_4 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); Py_DECREF(((PyObject *)__pyx_v_oscale)); - __pyx_v_oscale = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_oscale = ((PyArrayObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":684 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":710 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_oscale)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); + __pyx_4 = 0; + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":685 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; goto __pyx_L1;} - Py_INCREF(__pyx_k73p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k73p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":711 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;} + Py_INCREF(__pyx_k74p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k74p); + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; goto __pyx_L1;} - goto __pyx_L2; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":686 */ - __pyx_4 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_normal,__pyx_v_size,__pyx_v_oloc,__pyx_v_oscale); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":712 */ + __pyx_5 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_normal,__pyx_v_size,__pyx_v_oloc,__pyx_v_oscale); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.normal"); __pyx_r = 0; __pyx_L0:; @@ -2825,11 +3036,15 @@ return __pyx_r; } -static PyObject *__pyx_k74p; static PyObject *__pyx_k75p; +static PyObject *__pyx_k76p; +static PyObject *__pyx_k77p; +static PyObject *__pyx_k78p; -static char (__pyx_k74[]) = "a <= 0"; -static char (__pyx_k75[]) = "b <= 0"; +static char (__pyx_k75[]) = "a <= 0"; +static char (__pyx_k76[]) = "b <= 0"; +static char (__pyx_k77[]) = "a <= 0"; +static char (__pyx_k78[]) = "b <= 0"; static PyObject *__pyx_f_6mtrand_11RandomState_beta(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_beta[] = "Beta distribution over [0, 1].\n\n beta(a, b, size=None) -> random values\n "; @@ -2839,12 +3054,14 @@ PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_oa; PyArrayObject *__pyx_v_ob; + double __pyx_v_fa; + double __pyx_v_fb; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"a","b","size",0}; __pyx_v_size = __pyx_k17; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_a, &__pyx_v_b, &__pyx_v_size)) return 0; @@ -2855,115 +3072,175 @@ __pyx_v_oa = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_ob = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":695 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_a,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); - Py_DECREF(((PyObject *)__pyx_v_oa)); - __pyx_v_oa = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":722 */ + __pyx_v_fa = PyFloat_AsDouble(__pyx_v_a); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":696 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_b,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); - Py_DECREF(((PyObject *)__pyx_v_ob)); - __pyx_v_ob = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":723 */ + __pyx_v_fb = PyFloat_AsDouble(__pyx_v_b); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":698 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; goto __pyx_L1;} - Py_INCREF(((PyObject *)__pyx_v_oa)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_oa)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":724 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":699 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; goto __pyx_L1;} - Py_INCREF(__pyx_k74p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k74p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":725 */ + __pyx_1 = (__pyx_v_fa <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":726 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; goto __pyx_L1;} + Py_INCREF(__pyx_k75p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k75p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":727 */ + __pyx_1 = (__pyx_v_fb <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":728 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; goto __pyx_L1;} + Py_INCREF(__pyx_k76p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k76p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; goto __pyx_L1;} + goto __pyx_L4; + } + __pyx_L4:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":729 */ + __pyx_2 = __pyx_f_6mtrand_cont2_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_beta,__pyx_v_size,__pyx_v_fa,__pyx_v_fb); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":700 */ - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":731 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":733 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_a,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); + Py_DECREF(((PyObject *)__pyx_v_oa)); + __pyx_v_oa = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":734 */ + __pyx_4 = PyArray_FROM_OTF(__pyx_v_b,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); + Py_DECREF(((PyObject *)__pyx_v_ob)); + __pyx_v_ob = ((PyArrayObject *)__pyx_4); Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; goto __pyx_L1;} + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":735 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; goto __pyx_L1;} - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; goto __pyx_L1;} - Py_INCREF(((PyObject *)__pyx_v_ob)); - PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_ob)); - PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} + Py_INCREF(((PyObject *)__pyx_v_oa)); + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_oa)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); __pyx_4 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); __pyx_4 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":701 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; goto __pyx_L1;} - Py_INCREF(__pyx_k75p); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k75p); - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":736 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; goto __pyx_L1;} + Py_INCREF(__pyx_k77p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k77p); + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; goto __pyx_L1;} - goto __pyx_L3; + __Pyx_Raise(__pyx_2, 0, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; goto __pyx_L1;} + goto __pyx_L5; } - __pyx_L3:; + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":702 */ - __pyx_2 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_beta,__pyx_v_size,__pyx_v_oa,__pyx_v_ob); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; goto __pyx_L1;} - __pyx_r = __pyx_2; - __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":737 */ + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_5, __pyx_n_any); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_5 = PyInt_FromLong(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; goto __pyx_L1;} + Py_INCREF(((PyObject *)__pyx_v_ob)); + PyTuple_SET_ITEM(__pyx_3, 0, ((PyObject *)__pyx_v_ob)); + PyTuple_SET_ITEM(__pyx_3, 1, __pyx_5); + __pyx_5 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_5); + __pyx_5 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_1 = PyObject_IsTrue(__pyx_3); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":738 */ + __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; goto __pyx_L1;} + Py_INCREF(__pyx_k78p); + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k78p); + __pyx_2 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; + __Pyx_Raise(__pyx_2, 0, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; goto __pyx_L1;} + goto __pyx_L6; + } + __pyx_L6:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":739 */ + __pyx_3 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_beta,__pyx_v_size,__pyx_v_oa,__pyx_v_ob); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; goto __pyx_L1;} + __pyx_r = __pyx_3; + __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.beta"); __pyx_r = 0; __pyx_L0:; @@ -2976,9 +3253,11 @@ return __pyx_r; } -static PyObject *__pyx_k76p; +static PyObject *__pyx_k79p; +static PyObject *__pyx_k80p; -static char (__pyx_k76[]) = "scale <= 0"; +static char (__pyx_k79[]) = "scale <= 0"; +static char (__pyx_k80[]) = "scale <= 0"; static PyObject *__pyx_f_6mtrand_11RandomState_exponential(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_exponential[] = "Exponential distribution.\n\n exponential(scale=1.0, size=None) -> random values\n "; @@ -2986,12 +3265,13 @@ PyObject *__pyx_v_scale = 0; PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_oscale; + double __pyx_v_fscale; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"scale","size",0}; __pyx_v_scale = __pyx_k18; __pyx_v_size = __pyx_k19; @@ -3001,67 +3281,105 @@ Py_INCREF(__pyx_v_size); __pyx_v_oscale = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":710 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":749 */ + __pyx_v_fscale = PyFloat_AsDouble(__pyx_v_scale); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":750 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":751 */ + __pyx_1 = (__pyx_v_fscale <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":752 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;} + Py_INCREF(__pyx_k79p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k79p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":753 */ + __pyx_2 = __pyx_f_6mtrand_cont1_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_exponential,__pyx_v_size,__pyx_v_fscale); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":755 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":757 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_oscale)); - __pyx_v_oscale = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_oscale = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":711 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":758 */ + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_3 = PyFloat_FromDouble(0.0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_oscale)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":712 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;} - Py_INCREF(__pyx_k76p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k76p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":759 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} + Py_INCREF(__pyx_k80p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k80p); + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;} - goto __pyx_L2; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":713 */ - __pyx_4 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_exponential,__pyx_v_size,__pyx_v_oscale); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":760 */ + __pyx_5 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_exponential,__pyx_v_size,__pyx_v_oscale); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.exponential"); __pyx_r = 0; __pyx_L0:; @@ -3084,8 +3402,8 @@ Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_size); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":720 */ - __pyx_1 = __pyx_f_6mtrand_cont0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_standard_exponential,__pyx_v_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":767 */ + __pyx_1 = __pyx_f_6mtrand_cont0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_standard_exponential,__pyx_v_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -3102,22 +3420,27 @@ return __pyx_r; } -static PyObject *__pyx_k77p; +static PyObject *__pyx_n_fscale; -static char (__pyx_k77[]) = "shape <= 0"; +static PyObject *__pyx_k81p; +static PyObject *__pyx_k82p; +static char (__pyx_k81[]) = "shape <= 0"; +static char (__pyx_k82[]) = "shape <= 0"; + static PyObject *__pyx_f_6mtrand_11RandomState_standard_gamma(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_standard_gamma[] = "Standard Gamma distribution.\n\n standard_gamma(shape, size=None) -> random values\n "; static PyObject *__pyx_f_6mtrand_11RandomState_standard_gamma(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_shape = 0; PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_oshape; + double __pyx_v_fshape; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"shape","size",0}; __pyx_v_size = __pyx_k21; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_shape, &__pyx_v_size)) return 0; @@ -3126,67 +3449,110 @@ Py_INCREF(__pyx_v_size); __pyx_v_oshape = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":728 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_shape,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":777 */ + __pyx_v_fshape = PyFloat_AsDouble(__pyx_v_shape); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":778 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":779 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_fscale); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} + if (PyObject_Cmp(__pyx_2, __pyx_3, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} + __pyx_1 = __pyx_1 <= 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":780 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;} + Py_INCREF(__pyx_k81p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k81p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":781 */ + __pyx_2 = __pyx_f_6mtrand_cont1_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_standard_gamma,__pyx_v_size,__pyx_v_fshape); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":783 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":784 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_shape,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_oshape)); - __pyx_v_oshape = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_oshape = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":729 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":785 */ + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_3 = PyFloat_FromDouble(0.0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_oshape)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_oshape)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_oshape)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":730 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; goto __pyx_L1;} - Py_INCREF(__pyx_k77p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k77p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":786 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; goto __pyx_L1;} + Py_INCREF(__pyx_k82p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k82p); + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; goto __pyx_L1;} - goto __pyx_L2; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":731 */ - __pyx_4 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_standard_gamma,__pyx_v_size,__pyx_v_oshape); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":787 */ + __pyx_5 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_standard_gamma,__pyx_v_size,__pyx_v_oshape); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.standard_gamma"); __pyx_r = 0; __pyx_L0:; @@ -3197,11 +3563,15 @@ return __pyx_r; } -static PyObject *__pyx_k78p; -static PyObject *__pyx_k79p; +static PyObject *__pyx_k83p; +static PyObject *__pyx_k84p; +static PyObject *__pyx_k85p; +static PyObject *__pyx_k86p; -static char (__pyx_k78[]) = "shape <= 0"; -static char (__pyx_k79[]) = "scale <= 0"; +static char (__pyx_k83[]) = "shape <= 0"; +static char (__pyx_k84[]) = "scale <= 0"; +static char (__pyx_k85[]) = "shape <= 0"; +static char (__pyx_k86[]) = "scale <= 0"; static PyObject *__pyx_f_6mtrand_11RandomState_gamma(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_gamma[] = "Gamma distribution.\n\n gamma(shape, scale=1.0, size=None) -> random values\n "; @@ -3211,12 +3581,14 @@ PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_oshape; PyArrayObject *__pyx_v_oscale; + double __pyx_v_fshape; + double __pyx_v_fscale; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"shape","scale","size",0}; __pyx_v_scale = __pyx_k22; __pyx_v_size = __pyx_k23; @@ -3228,115 +3600,175 @@ __pyx_v_oshape = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_oscale = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":740 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_shape,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); - Py_DECREF(((PyObject *)__pyx_v_oshape)); - __pyx_v_oshape = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":797 */ + __pyx_v_fshape = PyFloat_AsDouble(__pyx_v_shape); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":741 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); - Py_DECREF(((PyObject *)__pyx_v_oscale)); - __pyx_v_oscale = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":798 */ + __pyx_v_fscale = PyFloat_AsDouble(__pyx_v_scale); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":742 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;} - Py_INCREF(((PyObject *)__pyx_v_oshape)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_oshape)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":799 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":743 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; goto __pyx_L1;} - Py_INCREF(__pyx_k78p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k78p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":800 */ + __pyx_1 = (__pyx_v_fshape <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":801 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; goto __pyx_L1;} + Py_INCREF(__pyx_k83p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k83p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":802 */ + __pyx_1 = (__pyx_v_fscale <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":803 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; goto __pyx_L1;} + Py_INCREF(__pyx_k84p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k84p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; goto __pyx_L1;} + goto __pyx_L4; + } + __pyx_L4:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":804 */ + __pyx_2 = __pyx_f_6mtrand_cont2_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_gamma,__pyx_v_size,__pyx_v_fshape,__pyx_v_fscale); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":744 */ - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":806 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":807 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_shape,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); + Py_DECREF(((PyObject *)__pyx_v_oshape)); + __pyx_v_oshape = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":808 */ + __pyx_4 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); + Py_DECREF(((PyObject *)__pyx_v_oscale)); + __pyx_v_oscale = ((PyArrayObject *)__pyx_4); Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; goto __pyx_L1;} + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":809 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; goto __pyx_L1;} - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; goto __pyx_L1;} - Py_INCREF(((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;} + Py_INCREF(((PyObject *)__pyx_v_oshape)); + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_oshape)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); __pyx_4 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); __pyx_4 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":745 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; goto __pyx_L1;} - Py_INCREF(__pyx_k79p); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k79p); - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":810 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;} + Py_INCREF(__pyx_k85p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k85p); + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; goto __pyx_L1;} - goto __pyx_L3; + __Pyx_Raise(__pyx_2, 0, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;} + goto __pyx_L5; } - __pyx_L3:; + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":746 */ - __pyx_2 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_gamma,__pyx_v_size,__pyx_v_oshape,__pyx_v_oscale); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; goto __pyx_L1;} - __pyx_r = __pyx_2; - __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":811 */ + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_5, __pyx_n_any); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_5 = PyFloat_FromDouble(0.0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;} + Py_INCREF(((PyObject *)__pyx_v_oscale)); + PyTuple_SET_ITEM(__pyx_3, 0, ((PyObject *)__pyx_v_oscale)); + PyTuple_SET_ITEM(__pyx_3, 1, __pyx_5); + __pyx_5 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_5); + __pyx_5 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_1 = PyObject_IsTrue(__pyx_3); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":812 */ + __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;} + Py_INCREF(__pyx_k86p); + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k86p); + __pyx_2 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; + __Pyx_Raise(__pyx_2, 0, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;} + goto __pyx_L6; + } + __pyx_L6:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":813 */ + __pyx_3 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_gamma,__pyx_v_size,__pyx_v_oshape,__pyx_v_oscale); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;} + __pyx_r = __pyx_3; + __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.gamma"); __pyx_r = 0; __pyx_L0:; @@ -3349,11 +3781,15 @@ return __pyx_r; } -static PyObject *__pyx_k80p; -static PyObject *__pyx_k81p; +static PyObject *__pyx_k87p; +static PyObject *__pyx_k88p; +static PyObject *__pyx_k89p; +static PyObject *__pyx_k90p; -static char (__pyx_k80[]) = "dfnum <= 0"; -static char (__pyx_k81[]) = "dfden <= 0"; +static char (__pyx_k87[]) = "shape <= 0"; +static char (__pyx_k88[]) = "scale <= 0"; +static char (__pyx_k89[]) = "dfnum <= 0"; +static char (__pyx_k90[]) = "dfden <= 0"; static PyObject *__pyx_f_6mtrand_11RandomState_f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_f[] = "F distribution.\n\n f(dfnum, dfden, size=None) -> random values\n "; @@ -3363,12 +3799,14 @@ PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_odfnum; PyArrayObject *__pyx_v_odfden; + double __pyx_v_fdfnum; + double __pyx_v_fdfden; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"dfnum","dfden","size",0}; __pyx_v_size = __pyx_k24; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_dfnum, &__pyx_v_dfden, &__pyx_v_size)) return 0; @@ -3379,115 +3817,175 @@ __pyx_v_odfnum = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_odfden = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":755 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_dfnum,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); - Py_DECREF(((PyObject *)__pyx_v_odfnum)); - __pyx_v_odfnum = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":823 */ + __pyx_v_fdfnum = PyFloat_AsDouble(__pyx_v_dfnum); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":756 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_dfden,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); - Py_DECREF(((PyObject *)__pyx_v_odfden)); - __pyx_v_odfden = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":824 */ + __pyx_v_fdfden = PyFloat_AsDouble(__pyx_v_dfden); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":757 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; goto __pyx_L1;} - Py_INCREF(((PyObject *)__pyx_v_odfnum)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_odfnum)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":825 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":758 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; goto __pyx_L1;} - Py_INCREF(__pyx_k80p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k80p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":826 */ + __pyx_1 = (__pyx_v_fdfnum <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":827 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;} + Py_INCREF(__pyx_k87p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k87p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":828 */ + __pyx_1 = (__pyx_v_fdfden <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":829 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;} + Py_INCREF(__pyx_k88p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k88p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;} + goto __pyx_L4; + } + __pyx_L4:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":830 */ + __pyx_2 = __pyx_f_6mtrand_cont2_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_f,__pyx_v_size,__pyx_v_fdfnum,__pyx_v_fdfden); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":759 */ - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":832 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":834 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_dfnum,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); + Py_DECREF(((PyObject *)__pyx_v_odfnum)); + __pyx_v_odfnum = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":835 */ + __pyx_4 = PyArray_FROM_OTF(__pyx_v_dfden,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); + Py_DECREF(((PyObject *)__pyx_v_odfden)); + __pyx_v_odfden = ((PyArrayObject *)__pyx_4); Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":836 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} - Py_INCREF(((PyObject *)__pyx_v_odfden)); - PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_odfden)); - PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;} + Py_INCREF(((PyObject *)__pyx_v_odfnum)); + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_odfnum)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); __pyx_4 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); __pyx_4 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":760 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; goto __pyx_L1;} - Py_INCREF(__pyx_k81p); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k81p); - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":837 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;} + Py_INCREF(__pyx_k89p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k89p); + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; goto __pyx_L1;} - goto __pyx_L3; + __Pyx_Raise(__pyx_2, 0, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;} + goto __pyx_L5; } - __pyx_L3:; + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":761 */ - __pyx_2 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_f,__pyx_v_size,__pyx_v_odfnum,__pyx_v_odfden); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; goto __pyx_L1;} - __pyx_r = __pyx_2; - __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":838 */ + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_5, __pyx_n_any); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_5 = PyFloat_FromDouble(0.0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;} + Py_INCREF(((PyObject *)__pyx_v_odfden)); + PyTuple_SET_ITEM(__pyx_3, 0, ((PyObject *)__pyx_v_odfden)); + PyTuple_SET_ITEM(__pyx_3, 1, __pyx_5); + __pyx_5 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_5); + __pyx_5 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_1 = PyObject_IsTrue(__pyx_3); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":839 */ + __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} + Py_INCREF(__pyx_k90p); + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k90p); + __pyx_2 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; + __Pyx_Raise(__pyx_2, 0, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} + goto __pyx_L6; + } + __pyx_L6:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":840 */ + __pyx_3 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_f,__pyx_v_size,__pyx_v_odfnum,__pyx_v_odfden); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;} + __pyx_r = __pyx_3; + __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.f"); __pyx_r = 0; __pyx_L0:; @@ -3502,13 +4000,19 @@ static PyObject *__pyx_n_less; -static PyObject *__pyx_k82p; -static PyObject *__pyx_k83p; -static PyObject *__pyx_k84p; +static PyObject *__pyx_k91p; +static PyObject *__pyx_k92p; +static PyObject *__pyx_k93p; +static PyObject *__pyx_k94p; +static PyObject *__pyx_k95p; +static PyObject *__pyx_k96p; -static char (__pyx_k82[]) = "dfnum <= 1"; -static char (__pyx_k83[]) = "dfden <= 0"; -static char (__pyx_k84[]) = "nonc < 0"; +static char (__pyx_k91[]) = "dfnum <= 1"; +static char (__pyx_k92[]) = "dfden <= 0"; +static char (__pyx_k93[]) = "nonc < 0"; +static char (__pyx_k94[]) = "dfnum <= 1"; +static char (__pyx_k95[]) = "dfden <= 0"; +static char (__pyx_k96[]) = "nonc < 0"; static PyObject *__pyx_f_6mtrand_11RandomState_noncentral_f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_noncentral_f[] = "Noncentral F distribution.\n\n noncentral_f(dfnum, dfden, nonc, size=None) -> random values\n "; @@ -3520,12 +4024,15 @@ PyArrayObject *__pyx_v_odfnum; PyArrayObject *__pyx_v_odfden; PyArrayObject *__pyx_v_ononc; + double __pyx_v_fdfnum; + double __pyx_v_fdfden; + double __pyx_v_fnonc; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"dfnum","dfden","nonc","size",0}; __pyx_v_size = __pyx_k25; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO|O", __pyx_argnames, &__pyx_v_dfnum, &__pyx_v_dfden, &__pyx_v_nonc, &__pyx_v_size)) return 0; @@ -3538,163 +4045,245 @@ __pyx_v_odfden = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_ononc = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":771 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_dfnum,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":850 */ + __pyx_v_fdfnum = PyFloat_AsDouble(__pyx_v_dfnum); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":851 */ + __pyx_v_fdfden = PyFloat_AsDouble(__pyx_v_dfden); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":852 */ + __pyx_v_fnonc = PyFloat_AsDouble(__pyx_v_nonc); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":853 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":854 */ + __pyx_1 = (__pyx_v_fdfnum <= 1); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":855 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; goto __pyx_L1;} + Py_INCREF(__pyx_k91p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k91p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":856 */ + __pyx_1 = (__pyx_v_fdfden <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":857 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; goto __pyx_L1;} + Py_INCREF(__pyx_k92p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k92p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; goto __pyx_L1;} + goto __pyx_L4; + } + __pyx_L4:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":858 */ + __pyx_1 = (__pyx_v_fnonc < 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":859 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;} + Py_INCREF(__pyx_k93p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k93p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;} + goto __pyx_L5; + } + __pyx_L5:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":860 */ + __pyx_2 = __pyx_f_6mtrand_cont3_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_noncentral_f,__pyx_v_size,__pyx_v_fdfnum,__pyx_v_fdfden,__pyx_v_fnonc); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":863 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":865 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_dfnum,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_odfnum)); - __pyx_v_odfnum = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_odfnum = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":772 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_dfden,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":866 */ + __pyx_4 = PyArray_FROM_OTF(__pyx_v_dfden,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); Py_DECREF(((PyObject *)__pyx_v_odfden)); - __pyx_v_odfden = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_odfden = ((PyArrayObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":773 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_nonc,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":867 */ + __pyx_2 = PyArray_FROM_OTF(__pyx_v_nonc,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); Py_DECREF(((PyObject *)__pyx_v_ononc)); - __pyx_v_ononc = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_ononc = ((PyArrayObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":775 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(1.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":869 */ + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_any); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = PyFloat_FromDouble(1.0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_odfnum)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_odfnum)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_odfnum)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_2); + __pyx_2 = 0; + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); + __pyx_2 = 0; + __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":776 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;} - Py_INCREF(__pyx_k82p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k82p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":870 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; goto __pyx_L1;} + Py_INCREF(__pyx_k94p); + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k94p); + __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;} - goto __pyx_L2; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; goto __pyx_L1;} + goto __pyx_L6; } - __pyx_L2:; + __pyx_L6:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":777 */ - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":871 */ + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_5, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_4, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;} - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;} + __pyx_5 = PyFloat_FromDouble(0.0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} + __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_odfden)); - PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_odfden)); - PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); - __pyx_4 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_odfden)); + PyTuple_SET_ITEM(__pyx_4, 1, __pyx_5); + __pyx_5 = 0; + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_5); + __pyx_5 = 0; + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); - __pyx_4 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_4); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":778 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; goto __pyx_L1;} - Py_INCREF(__pyx_k83p); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k83p); - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":872 */ + __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} + Py_INCREF(__pyx_k95p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k95p); + __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; goto __pyx_L1;} - goto __pyx_L3; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} + goto __pyx_L7; } - __pyx_L3:; + __pyx_L7:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":779 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} - __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":873 */ + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;} + __pyx_5 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_less); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_2 = PyFloat_FromDouble(0.0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} + __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;} + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_ononc)); - PyTuple_SET_ITEM(__pyx_1, 0, ((PyObject *)__pyx_v_ononc)); - PyTuple_SET_ITEM(__pyx_1, 1, __pyx_2); - __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_ononc)); + PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); - __pyx_2 = 0; - __pyx_1 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); + __pyx_4 = 0; + __pyx_2 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_1); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":780 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;} - Py_INCREF(__pyx_k84p); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k84p); - __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":874 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; goto __pyx_L1;} + __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; goto __pyx_L1;} + Py_INCREF(__pyx_k96p); + PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k96p); + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_5); __pyx_5 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;} - goto __pyx_L4; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; goto __pyx_L1;} + goto __pyx_L8; } - __pyx_L4:; + __pyx_L8:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":781 */ - __pyx_1 = __pyx_f_6mtrand_cont3_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_noncentral_f,__pyx_v_size,__pyx_v_odfnum,__pyx_v_odfden,__pyx_v_ononc); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":875 */ + __pyx_2 = __pyx_f_6mtrand_cont3_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_noncentral_f,__pyx_v_size,__pyx_v_odfnum,__pyx_v_odfden,__pyx_v_ononc); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.noncentral_f"); __pyx_r = 0; __pyx_L0:; @@ -3709,9 +4298,11 @@ return __pyx_r; } -static PyObject *__pyx_k85p; +static PyObject *__pyx_k97p; +static PyObject *__pyx_k98p; -static char (__pyx_k85[]) = "df <= 0"; +static char (__pyx_k97[]) = "df <= 0"; +static char (__pyx_k98[]) = "df <= 0"; static PyObject *__pyx_f_6mtrand_11RandomState_chisquare(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_chisquare[] = "Chi^2 distribution.\n\n chisquare(df, size=None) -> random values\n "; @@ -3719,12 +4310,13 @@ PyObject *__pyx_v_df = 0; PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_odf; + double __pyx_v_fdf; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"df","size",0}; __pyx_v_size = __pyx_k26; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_df, &__pyx_v_size)) return 0; @@ -3733,67 +4325,108 @@ Py_INCREF(__pyx_v_size); __pyx_v_odf = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":790 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_df,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":886 */ + __pyx_v_fdf = PyFloat_AsDouble(__pyx_v_df); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":887 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":888 */ + __pyx_1 = (__pyx_v_fdf <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":889 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; goto __pyx_L1;} + Py_INCREF(__pyx_k97p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k97p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":890 */ + __pyx_2 = PyFloat_FromDouble(__pyx_v_fdf); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; goto __pyx_L1;} + __pyx_3 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_chisquare,__pyx_v_size,((PyArrayObject *)__pyx_2)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_r = __pyx_3; + __pyx_3 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":892 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":894 */ + __pyx_4 = PyArray_FROM_OTF(__pyx_v_df,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); Py_DECREF(((PyObject *)__pyx_v_odf)); - __pyx_v_odf = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_odf = ((PyArrayObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":791 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":895 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_odf)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_odf)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_odf)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); + __pyx_4 = 0; + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":792 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; goto __pyx_L1;} - Py_INCREF(__pyx_k85p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k85p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":896 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; goto __pyx_L1;} + Py_INCREF(__pyx_k98p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k98p); + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; goto __pyx_L1;} - goto __pyx_L2; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":793 */ - __pyx_4 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_chisquare,__pyx_v_size,__pyx_v_odf); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":897 */ + __pyx_5 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_chisquare,__pyx_v_size,__pyx_v_odf); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.chisquare"); __pyx_r = 0; __pyx_L0:; @@ -3804,11 +4437,15 @@ return __pyx_r; } -static PyObject *__pyx_k86p; -static PyObject *__pyx_k87p; +static PyObject *__pyx_k99p; +static PyObject *__pyx_k100p; +static PyObject *__pyx_k101p; +static PyObject *__pyx_k102p; -static char (__pyx_k86[]) = "df <= 1"; -static char (__pyx_k87[]) = "nonc < 0"; +static char (__pyx_k99[]) = "df <= 0"; +static char (__pyx_k100[]) = "nonc <= 0"; +static char (__pyx_k101[]) = "df <= 1"; +static char (__pyx_k102[]) = "nonc < 0"; static PyObject *__pyx_f_6mtrand_11RandomState_noncentral_chisquare(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_noncentral_chisquare[] = "Noncentral Chi^2 distribution.\n\n noncentral_chisquare(df, nonc, size=None) -> random values\n "; @@ -3818,12 +4455,14 @@ PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_odf; PyArrayObject *__pyx_v_ononc; + double __pyx_v_fdf; + double __pyx_v_fnonc; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"df","nonc","size",0}; __pyx_v_size = __pyx_k27; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_df, &__pyx_v_nonc, &__pyx_v_size)) return 0; @@ -3834,115 +4473,175 @@ __pyx_v_odf = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_ononc = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":802 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_df,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); - Py_DECREF(((PyObject *)__pyx_v_odf)); - __pyx_v_odf = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":906 */ + __pyx_v_fdf = PyFloat_AsDouble(__pyx_v_df); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":803 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_nonc,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); - Py_DECREF(((PyObject *)__pyx_v_ononc)); - __pyx_v_ononc = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":907 */ + __pyx_v_fnonc = PyFloat_AsDouble(__pyx_v_nonc); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":804 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;} - Py_INCREF(((PyObject *)__pyx_v_odf)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_odf)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":908 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":805 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; goto __pyx_L1;} - Py_INCREF(__pyx_k86p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k86p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":909 */ + __pyx_1 = (__pyx_v_fdf <= 1); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":910 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;} + Py_INCREF(__pyx_k99p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k99p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":911 */ + __pyx_1 = (__pyx_v_fnonc <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":912 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;} + Py_INCREF(__pyx_k100p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k100p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;} + goto __pyx_L4; + } + __pyx_L4:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":913 */ + __pyx_2 = __pyx_f_6mtrand_cont2_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_noncentral_chisquare,__pyx_v_size,__pyx_v_fdf,__pyx_v_fnonc); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":806 */ - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":916 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":918 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_df,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); + Py_DECREF(((PyObject *)__pyx_v_odf)); + __pyx_v_odf = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":919 */ + __pyx_4 = PyArray_FROM_OTF(__pyx_v_nonc,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); + Py_DECREF(((PyObject *)__pyx_v_ononc)); + __pyx_v_ononc = ((PyArrayObject *)__pyx_4); Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;} + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":920 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;} - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;} - Py_INCREF(((PyObject *)__pyx_v_ononc)); - PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_ononc)); - PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;} + Py_INCREF(((PyObject *)__pyx_v_odf)); + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_odf)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); __pyx_4 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); __pyx_4 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":807 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; goto __pyx_L1;} - Py_INCREF(__pyx_k87p); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k87p); - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":921 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; goto __pyx_L1;} + Py_INCREF(__pyx_k101p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k101p); + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; goto __pyx_L1;} - goto __pyx_L3; + __Pyx_Raise(__pyx_2, 0, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; goto __pyx_L1;} + goto __pyx_L5; } - __pyx_L3:; + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":808 */ - __pyx_2 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_noncentral_chisquare,__pyx_v_size,__pyx_v_odf,__pyx_v_ononc); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;} - __pyx_r = __pyx_2; - __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":922 */ + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_5, __pyx_n_any); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_5 = PyFloat_FromDouble(0.0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} + Py_INCREF(((PyObject *)__pyx_v_ononc)); + PyTuple_SET_ITEM(__pyx_3, 0, ((PyObject *)__pyx_v_ononc)); + PyTuple_SET_ITEM(__pyx_3, 1, __pyx_5); + __pyx_5 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_5); + __pyx_5 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_1 = PyObject_IsTrue(__pyx_3); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":923 */ + __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;} + Py_INCREF(__pyx_k102p); + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k102p); + __pyx_2 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; + __Pyx_Raise(__pyx_2, 0, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;} + goto __pyx_L6; + } + __pyx_L6:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":924 */ + __pyx_3 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_noncentral_chisquare,__pyx_v_size,__pyx_v_odf,__pyx_v_ononc); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; goto __pyx_L1;} + __pyx_r = __pyx_3; + __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.noncentral_chisquare"); __pyx_r = 0; __pyx_L0:; @@ -3967,8 +4666,8 @@ Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_size); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":816 */ - __pyx_1 = __pyx_f_6mtrand_cont0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_standard_cauchy,__pyx_v_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":932 */ + __pyx_1 = __pyx_f_6mtrand_cont0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_standard_cauchy,__pyx_v_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -3985,9 +4684,11 @@ return __pyx_r; } -static PyObject *__pyx_k88p; +static PyObject *__pyx_k103p; +static PyObject *__pyx_k104p; -static char (__pyx_k88[]) = "df <= 0"; +static char (__pyx_k103[]) = "df <= 0"; +static char (__pyx_k104[]) = "df <= 0"; static PyObject *__pyx_f_6mtrand_11RandomState_standard_t(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_standard_t[] = "Standard Student\'s t distribution with df degrees of freedom.\n\n standard_t(df, size=None)\n "; @@ -3995,12 +4696,13 @@ PyObject *__pyx_v_df = 0; PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_odf; + double __pyx_v_fdf; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"df","size",0}; __pyx_v_size = __pyx_k29; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_df, &__pyx_v_size)) return 0; @@ -4009,67 +4711,105 @@ Py_INCREF(__pyx_v_size); __pyx_v_odf = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":824 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_df,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":942 */ + __pyx_v_fdf = PyFloat_AsDouble(__pyx_v_df); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":943 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":944 */ + __pyx_1 = (__pyx_v_fdf <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":945 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; goto __pyx_L1;} + Py_INCREF(__pyx_k103p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k103p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":946 */ + __pyx_2 = __pyx_f_6mtrand_cont1_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_standard_t,__pyx_v_size,__pyx_v_fdf); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":948 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":950 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_df,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_odf)); - __pyx_v_odf = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_odf = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":825 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":951 */ + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_3 = PyFloat_FromDouble(0.0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_odf)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_odf)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_odf)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":826 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; goto __pyx_L1;} - Py_INCREF(__pyx_k88p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k88p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":952 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; goto __pyx_L1;} + Py_INCREF(__pyx_k104p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k104p); + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; goto __pyx_L1;} - goto __pyx_L2; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":827 */ - __pyx_4 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_standard_t,__pyx_v_size,__pyx_v_odf); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":953 */ + __pyx_5 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_standard_t,__pyx_v_size,__pyx_v_odf); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.standard_t"); __pyx_r = 0; __pyx_L0:; @@ -4080,9 +4820,11 @@ return __pyx_r; } -static PyObject *__pyx_k89p; +static PyObject *__pyx_k105p; +static PyObject *__pyx_k106p; -static char (__pyx_k89[]) = "kappa < 0"; +static char (__pyx_k105[]) = "kappa < 0"; +static char (__pyx_k106[]) = "kappa < 0"; static PyObject *__pyx_f_6mtrand_11RandomState_vonmises(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_vonmises[] = "von Mises circular distribution with mode mu and dispersion parameter\n kappa on [-pi, pi].\n\n vonmises(mu, kappa, size=None)\n "; @@ -4092,12 +4834,14 @@ PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_omu; PyArrayObject *__pyx_v_okappa; + double __pyx_v_fmu; + double __pyx_v_fkappa; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"mu","kappa","size",0}; __pyx_v_size = __pyx_k30; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_mu, &__pyx_v_kappa, &__pyx_v_size)) return 0; @@ -4108,74 +4852,115 @@ __pyx_v_omu = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_okappa = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":837 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_mu,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":964 */ + __pyx_v_fmu = PyFloat_AsDouble(__pyx_v_mu); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":965 */ + __pyx_v_fkappa = PyFloat_AsDouble(__pyx_v_kappa); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":966 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":967 */ + __pyx_1 = (__pyx_v_fkappa < 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":968 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; goto __pyx_L1;} + Py_INCREF(__pyx_k105p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k105p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":969 */ + __pyx_2 = __pyx_f_6mtrand_cont2_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_vonmises,__pyx_v_size,__pyx_v_fmu,__pyx_v_fkappa); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":971 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":973 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_mu,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_omu)); - __pyx_v_omu = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_omu = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":838 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_kappa,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":974 */ + __pyx_4 = PyArray_FROM_OTF(__pyx_v_kappa,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); Py_DECREF(((PyObject *)__pyx_v_okappa)); - __pyx_v_okappa = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_okappa = ((PyArrayObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":839 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":975 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_less); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_okappa)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_okappa)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_okappa)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); + __pyx_4 = 0; + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":840 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;} - Py_INCREF(__pyx_k89p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k89p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":976 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;} + Py_INCREF(__pyx_k106p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k106p); + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;} - goto __pyx_L2; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":841 */ - __pyx_4 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_vonmises,__pyx_v_size,__pyx_v_omu,__pyx_v_okappa); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":977 */ + __pyx_5 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_vonmises,__pyx_v_size,__pyx_v_omu,__pyx_v_okappa); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.vonmises"); __pyx_r = 0; __pyx_L0:; @@ -4188,9 +4973,11 @@ return __pyx_r; } -static PyObject *__pyx_k90p; +static PyObject *__pyx_k107p; +static PyObject *__pyx_k108p; -static char (__pyx_k90[]) = "a <= 0"; +static char (__pyx_k107[]) = "a <= 0"; +static char (__pyx_k108[]) = "a <= 0"; static PyObject *__pyx_f_6mtrand_11RandomState_pareto(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_pareto[] = "Pareto distribution.\n\n pareto(a, size=None)\n "; @@ -4198,12 +4985,13 @@ PyObject *__pyx_v_a = 0; PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_oa; + double __pyx_v_fa; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"a","size",0}; __pyx_v_size = __pyx_k31; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_a, &__pyx_v_size)) return 0; @@ -4212,67 +5000,105 @@ Py_INCREF(__pyx_v_size); __pyx_v_oa = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":849 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_a,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":987 */ + __pyx_v_fa = PyFloat_AsDouble(__pyx_v_a); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":988 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":989 */ + __pyx_1 = (__pyx_v_fa <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":990 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;} + Py_INCREF(__pyx_k107p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k107p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":991 */ + __pyx_2 = __pyx_f_6mtrand_cont1_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_pareto,__pyx_v_size,__pyx_v_fa); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":993 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":995 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_a,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_oa)); - __pyx_v_oa = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_oa = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":850 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":996 */ + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_3 = PyFloat_FromDouble(0.0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_oa)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_oa)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_oa)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":851 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; goto __pyx_L1;} - Py_INCREF(__pyx_k90p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k90p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":997 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; goto __pyx_L1;} + Py_INCREF(__pyx_k108p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k108p); + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; goto __pyx_L1;} - goto __pyx_L2; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":852 */ - __pyx_4 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_pareto,__pyx_v_size,__pyx_v_oa); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":998 */ + __pyx_5 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_pareto,__pyx_v_size,__pyx_v_oa); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.pareto"); __pyx_r = 0; __pyx_L0:; @@ -4283,199 +5109,283 @@ return __pyx_r; } -static PyObject *__pyx_k91p; +static PyObject *__pyx_k109p; +static PyObject *__pyx_k110p; -static char (__pyx_k91[]) = "a <= 0"; +static char (__pyx_k109[]) = "a <= 0"; +static char (__pyx_k110[]) = "a <= 0"; static PyObject *__pyx_f_6mtrand_11RandomState_weibull(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_weibull[] = "Weibull distribution.\n\n weibull(a, size=None)\n "; static PyObject *__pyx_f_6mtrand_11RandomState_weibull(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - double __pyx_v_a; + PyObject *__pyx_v_a = 0; PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_oa; + double __pyx_v_fa; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"a","size",0}; __pyx_v_size = __pyx_k32; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "d|O", __pyx_argnames, &__pyx_v_a, &__pyx_v_size)) return 0; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_a, &__pyx_v_size)) return 0; Py_INCREF(__pyx_v_self); + Py_INCREF(__pyx_v_a); Py_INCREF(__pyx_v_size); __pyx_v_oa = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":860 */ - __pyx_1 = PyFloat_FromDouble(__pyx_v_a); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; goto __pyx_L1;} - __pyx_2 = PyArray_FROM_OTF(__pyx_1,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1008 */ + __pyx_v_fa = PyFloat_AsDouble(__pyx_v_a); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1009 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1010 */ + __pyx_1 = (__pyx_v_fa <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1011 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; goto __pyx_L1;} + Py_INCREF(__pyx_k109p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k109p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1012 */ + __pyx_2 = __pyx_f_6mtrand_cont1_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_weibull,__pyx_v_size,__pyx_v_fa); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1014 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1016 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_a,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_oa)); - __pyx_v_oa = ((PyArrayObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_v_oa = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":861 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1017 */ + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_3 = PyFloat_FromDouble(0.0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_oa)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_oa)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_oa)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":862 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} - Py_INCREF(__pyx_k91p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k91p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1018 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;} + Py_INCREF(__pyx_k110p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k110p); + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;} - goto __pyx_L2; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":863 */ - __pyx_4 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_weibull,__pyx_v_size,__pyx_v_oa); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1019 */ + __pyx_5 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_weibull,__pyx_v_size,__pyx_v_oa); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.weibull"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_oa); Py_DECREF(__pyx_v_self); + Py_DECREF(__pyx_v_a); Py_DECREF(__pyx_v_size); return __pyx_r; } -static PyObject *__pyx_k92p; +static PyObject *__pyx_k111p; +static PyObject *__pyx_k112p; -static char (__pyx_k92[]) = "a <= 0"; +static char (__pyx_k111[]) = "a <= 0"; +static char (__pyx_k112[]) = "a <= 0"; static PyObject *__pyx_f_6mtrand_11RandomState_power(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_power[] = "Power distribution.\n\n power(a, size=None)\n "; static PyObject *__pyx_f_6mtrand_11RandomState_power(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - double __pyx_v_a; + PyObject *__pyx_v_a = 0; PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_oa; + double __pyx_v_fa; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"a","size",0}; __pyx_v_size = __pyx_k33; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "d|O", __pyx_argnames, &__pyx_v_a, &__pyx_v_size)) return 0; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_a, &__pyx_v_size)) return 0; Py_INCREF(__pyx_v_self); + Py_INCREF(__pyx_v_a); Py_INCREF(__pyx_v_size); __pyx_v_oa = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":871 */ - __pyx_1 = PyFloat_FromDouble(__pyx_v_a); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} - __pyx_2 = PyArray_FROM_OTF(__pyx_1,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1029 */ + __pyx_v_fa = PyFloat_AsDouble(__pyx_v_a); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1030 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1031 */ + __pyx_1 = (__pyx_v_fa <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1032 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; goto __pyx_L1;} + Py_INCREF(__pyx_k111p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k111p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1032; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1033 */ + __pyx_2 = __pyx_f_6mtrand_cont1_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_power,__pyx_v_size,__pyx_v_fa); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1035 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1037 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_a,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_oa)); - __pyx_v_oa = ((PyArrayObject *)__pyx_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_v_oa = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":872 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1038 */ + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_3 = PyFloat_FromDouble(0.0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_oa)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_oa)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_oa)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":873 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;} - Py_INCREF(__pyx_k92p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k92p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1039 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; goto __pyx_L1;} + Py_INCREF(__pyx_k112p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k112p); + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;} - goto __pyx_L2; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":874 */ - __pyx_4 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_power,__pyx_v_size,__pyx_v_oa); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1040 */ + __pyx_5 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_power,__pyx_v_size,__pyx_v_oa); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.power"); __pyx_r = 0; __pyx_L0:; Py_DECREF(__pyx_v_oa); Py_DECREF(__pyx_v_self); + Py_DECREF(__pyx_v_a); Py_DECREF(__pyx_v_size); return __pyx_r; } -static PyObject *__pyx_k93p; +static PyObject *__pyx_k113p; +static PyObject *__pyx_k114p; -static char (__pyx_k93[]) = "scale <= 0"; +static char (__pyx_k113[]) = "scale <= 0"; +static char (__pyx_k114[]) = "scale <= 0"; static PyObject *__pyx_f_6mtrand_11RandomState_laplace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_laplace[] = "Laplace distribution.\n \n laplace(loc=0.0, scale=1.0, size=None)\n "; @@ -4485,12 +5395,14 @@ PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_oloc; PyArrayObject *__pyx_v_oscale; + double __pyx_v_floc; + double __pyx_v_fscale; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"loc","scale","size",0}; __pyx_v_loc = __pyx_k34; __pyx_v_scale = __pyx_k35; @@ -4503,74 +5415,115 @@ __pyx_v_oloc = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_oscale = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":883 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_loc,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; goto __pyx_L1;} - if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1050 */ + __pyx_v_floc = PyFloat_AsDouble(__pyx_v_loc); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1051 */ + __pyx_v_fscale = PyFloat_AsDouble(__pyx_v_scale); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1052 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1053 */ + __pyx_1 = (__pyx_v_fscale <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1054 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; goto __pyx_L1;} + Py_INCREF(__pyx_k113p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k113p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1055 */ + __pyx_2 = __pyx_f_6mtrand_cont2_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_laplace,__pyx_v_size,__pyx_v_floc,__pyx_v_fscale); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1057 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1058 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_loc,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_oloc)); - __pyx_v_oloc = ((PyArrayObject *)__pyx_1); - __pyx_1 = 0; + __pyx_v_oloc = ((PyArrayObject *)__pyx_3); + __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":884 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; goto __pyx_L1;} - if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1059 */ + __pyx_4 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_oscale)); - __pyx_v_oscale = ((PyArrayObject *)__pyx_1); - __pyx_1 = 0; + __pyx_v_oscale = ((PyArrayObject *)__pyx_4); + __pyx_4 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":885 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1060 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_oscale)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); + __pyx_4 = 0; + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":886 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;} - Py_INCREF(__pyx_k93p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k93p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1061 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; goto __pyx_L1;} + Py_INCREF(__pyx_k114p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k114p); + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;} - goto __pyx_L2; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":887 */ - __pyx_4 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_laplace,__pyx_v_size,__pyx_v_oloc,__pyx_v_oscale); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1062 */ + __pyx_5 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_laplace,__pyx_v_size,__pyx_v_oloc,__pyx_v_oscale); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.laplace"); __pyx_r = 0; __pyx_L0:; @@ -4583,9 +5536,11 @@ return __pyx_r; } -static PyObject *__pyx_k94p; +static PyObject *__pyx_k115p; +static PyObject *__pyx_k116p; -static char (__pyx_k94[]) = "scale <= 0"; +static char (__pyx_k115[]) = "scale <= 0"; +static char (__pyx_k116[]) = "scale <= 0"; static PyObject *__pyx_f_6mtrand_11RandomState_gumbel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_gumbel[] = "Gumbel distribution.\n \n gumbel(loc=0.0, scale=1.0, size=None)\n "; @@ -4595,12 +5550,14 @@ PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_oloc; PyArrayObject *__pyx_v_oscale; + double __pyx_v_floc; + double __pyx_v_fscale; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"loc","scale","size",0}; __pyx_v_loc = __pyx_k37; __pyx_v_scale = __pyx_k38; @@ -4613,74 +5570,115 @@ __pyx_v_oloc = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_oscale = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":896 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_loc,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; goto __pyx_L1;} - if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1072 */ + __pyx_v_floc = PyFloat_AsDouble(__pyx_v_loc); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1073 */ + __pyx_v_fscale = PyFloat_AsDouble(__pyx_v_scale); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1074 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1075 */ + __pyx_1 = (__pyx_v_fscale <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1076 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;} + Py_INCREF(__pyx_k115p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k115p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1077 */ + __pyx_2 = __pyx_f_6mtrand_cont2_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_gumbel,__pyx_v_size,__pyx_v_floc,__pyx_v_fscale); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1079 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1080 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_loc,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_oloc)); - __pyx_v_oloc = ((PyArrayObject *)__pyx_1); - __pyx_1 = 0; + __pyx_v_oloc = ((PyArrayObject *)__pyx_3); + __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":897 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; goto __pyx_L1;} - if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1081 */ + __pyx_4 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_oscale)); - __pyx_v_oscale = ((PyArrayObject *)__pyx_1); - __pyx_1 = 0; + __pyx_v_oscale = ((PyArrayObject *)__pyx_4); + __pyx_4 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":898 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1082 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_oscale)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); + __pyx_4 = 0; + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":899 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;} - Py_INCREF(__pyx_k94p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k94p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1083 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;} + Py_INCREF(__pyx_k116p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k116p); + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;} - goto __pyx_L2; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":900 */ - __pyx_4 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_gumbel,__pyx_v_size,__pyx_v_oloc,__pyx_v_oscale); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1084 */ + __pyx_5 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_gumbel,__pyx_v_size,__pyx_v_oloc,__pyx_v_oscale); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.gumbel"); __pyx_r = 0; __pyx_L0:; @@ -4693,9 +5691,11 @@ return __pyx_r; } -static PyObject *__pyx_k95p; +static PyObject *__pyx_k117p; +static PyObject *__pyx_k118p; -static char (__pyx_k95[]) = "scale <= 0"; +static char (__pyx_k117[]) = "scale <= 0"; +static char (__pyx_k118[]) = "scale <= 0"; static PyObject *__pyx_f_6mtrand_11RandomState_logistic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_logistic[] = "Logistic distribution.\n \n logistic(loc=0.0, scale=1.0, size=None)\n "; @@ -4705,12 +5705,14 @@ PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_oloc; PyArrayObject *__pyx_v_oscale; + double __pyx_v_floc; + double __pyx_v_fscale; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"loc","scale","size",0}; __pyx_v_loc = __pyx_k40; __pyx_v_scale = __pyx_k41; @@ -4723,74 +5725,115 @@ __pyx_v_oloc = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_oscale = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":909 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_loc,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; goto __pyx_L1;} - if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1094 */ + __pyx_v_floc = PyFloat_AsDouble(__pyx_v_loc); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1095 */ + __pyx_v_fscale = PyFloat_AsDouble(__pyx_v_scale); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1096 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1097 */ + __pyx_1 = (__pyx_v_fscale <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1098 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;} + Py_INCREF(__pyx_k117p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k117p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1099 */ + __pyx_2 = __pyx_f_6mtrand_cont2_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_logistic,__pyx_v_size,__pyx_v_floc,__pyx_v_fscale); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1101 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1102 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_loc,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_oloc)); - __pyx_v_oloc = ((PyArrayObject *)__pyx_1); - __pyx_1 = 0; + __pyx_v_oloc = ((PyArrayObject *)__pyx_3); + __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":910 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;} - if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1103 */ + __pyx_4 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_oscale)); - __pyx_v_oscale = ((PyArrayObject *)__pyx_1); - __pyx_1 = 0; + __pyx_v_oscale = ((PyArrayObject *)__pyx_4); + __pyx_4 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":911 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1104 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_oscale)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); + __pyx_4 = 0; + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":912 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;} - Py_INCREF(__pyx_k95p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k95p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1105 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; goto __pyx_L1;} + Py_INCREF(__pyx_k118p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k118p); + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;} - goto __pyx_L2; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":913 */ - __pyx_4 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_logistic,__pyx_v_size,__pyx_v_oloc,__pyx_v_oscale); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1106 */ + __pyx_5 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_logistic,__pyx_v_size,__pyx_v_oloc,__pyx_v_oscale); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.logistic"); __pyx_r = 0; __pyx_L0:; @@ -4803,9 +5846,11 @@ return __pyx_r; } -static PyObject *__pyx_k96p; +static PyObject *__pyx_k119p; +static PyObject *__pyx_k120p; -static char (__pyx_k96[]) = "sigma <= 0.0"; +static char (__pyx_k119[]) = "sigma <= 0"; +static char (__pyx_k120[]) = "sigma <= 0.0"; static PyObject *__pyx_f_6mtrand_11RandomState_lognormal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_lognormal[] = "Log-normal distribution.\n \n Note that the mean parameter is not the mean of this distribution, but \n the underlying normal distribution.\n \n lognormal(mean, sigma) <=> exp(normal(mean, sigma))\n \n lognormal(mean=0.0, sigma=1.0, size=None)\n "; @@ -4815,12 +5860,14 @@ PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_omean; PyArrayObject *__pyx_v_osigma; + double __pyx_v_fmean; + double __pyx_v_fsigma; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"mean","sigma","size",0}; __pyx_v_mean = __pyx_k43; __pyx_v_sigma = __pyx_k44; @@ -4833,74 +5880,115 @@ __pyx_v_omean = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_osigma = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":927 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_mean,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; goto __pyx_L1;} - if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1121 */ + __pyx_v_fmean = PyFloat_AsDouble(__pyx_v_mean); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1122 */ + __pyx_v_fsigma = PyFloat_AsDouble(__pyx_v_sigma); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1124 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1125 */ + __pyx_1 = (__pyx_v_fsigma <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1126 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; goto __pyx_L1;} + Py_INCREF(__pyx_k119p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k119p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1127 */ + __pyx_2 = __pyx_f_6mtrand_cont2_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_lognormal,__pyx_v_size,__pyx_v_fmean,__pyx_v_fsigma); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1129 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1131 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_mean,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_omean)); - __pyx_v_omean = ((PyArrayObject *)__pyx_1); - __pyx_1 = 0; + __pyx_v_omean = ((PyArrayObject *)__pyx_3); + __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":928 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_sigma,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; goto __pyx_L1;} - if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1132 */ + __pyx_4 = PyArray_FROM_OTF(__pyx_v_sigma,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_osigma)); - __pyx_v_osigma = ((PyArrayObject *)__pyx_1); - __pyx_1 = 0; + __pyx_v_osigma = ((PyArrayObject *)__pyx_4); + __pyx_4 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":929 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1133 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_osigma)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_osigma)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_osigma)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); + __pyx_4 = 0; + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":930 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; goto __pyx_L1;} - Py_INCREF(__pyx_k96p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k96p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1134 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + Py_INCREF(__pyx_k120p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k120p); + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; goto __pyx_L1;} - goto __pyx_L2; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":931 */ - __pyx_4 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_lognormal,__pyx_v_size,__pyx_v_omean,__pyx_v_osigma); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1135 */ + __pyx_5 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_lognormal,__pyx_v_size,__pyx_v_omean,__pyx_v_osigma); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.lognormal"); __pyx_r = 0; __pyx_L0:; @@ -4913,9 +6001,11 @@ return __pyx_r; } -static PyObject *__pyx_k97p; +static PyObject *__pyx_k121p; +static PyObject *__pyx_k122p; -static char (__pyx_k97[]) = "scale <= 0.0"; +static char (__pyx_k121[]) = "scale <= 0"; +static char (__pyx_k122[]) = "scale <= 0.0"; static PyObject *__pyx_f_6mtrand_11RandomState_rayleigh(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_rayleigh[] = "Rayleigh distribution.\n \n rayleigh(scale=1.0, size=None)\n "; @@ -4923,12 +6013,13 @@ PyObject *__pyx_v_scale = 0; PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_oscale; + double __pyx_v_fscale; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"scale","size",0}; __pyx_v_scale = __pyx_k46; __pyx_v_size = __pyx_k47; @@ -4938,67 +6029,105 @@ Py_INCREF(__pyx_v_size); __pyx_v_oscale = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":939 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1145 */ + __pyx_v_fscale = PyFloat_AsDouble(__pyx_v_scale); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1147 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1148 */ + __pyx_1 = (__pyx_v_fscale <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1149 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;} + Py_INCREF(__pyx_k121p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k121p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1150 */ + __pyx_2 = __pyx_f_6mtrand_cont1_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_rayleigh,__pyx_v_size,__pyx_v_fscale); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1152 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1154 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_oscale)); - __pyx_v_oscale = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_oscale = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":940 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1155 */ + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_3 = PyFloat_FromDouble(0.0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_oscale)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":941 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; goto __pyx_L1;} - Py_INCREF(__pyx_k97p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k97p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1156 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; goto __pyx_L1;} + Py_INCREF(__pyx_k122p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k122p); + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; goto __pyx_L1;} - goto __pyx_L2; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":942 */ - __pyx_4 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_rayleigh,__pyx_v_size,__pyx_v_oscale); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1157 */ + __pyx_5 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_rayleigh,__pyx_v_size,__pyx_v_oscale); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.rayleigh"); __pyx_r = 0; __pyx_L0:; @@ -5009,11 +6138,15 @@ return __pyx_r; } -static PyObject *__pyx_k98p; -static PyObject *__pyx_k99p; +static PyObject *__pyx_k123p; +static PyObject *__pyx_k124p; +static PyObject *__pyx_k125p; +static PyObject *__pyx_k126p; -static char (__pyx_k98[]) = "mean <= 0.0"; -static char (__pyx_k99[]) = "scale <= 0.0"; +static char (__pyx_k123[]) = "mean <= 0"; +static char (__pyx_k124[]) = "scale <= 0"; +static char (__pyx_k125[]) = "mean <= 0.0"; +static char (__pyx_k126[]) = "scale <= 0.0"; static PyObject *__pyx_f_6mtrand_11RandomState_wald(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_wald[] = "Wald (inverse Gaussian) distribution.\n \n wald(mean, scale, size=None)\n "; @@ -5023,12 +6156,14 @@ PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_omean; PyArrayObject *__pyx_v_oscale; + double __pyx_v_fmean; + double __pyx_v_fscale; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"mean","scale","size",0}; __pyx_v_size = __pyx_k48; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_mean, &__pyx_v_scale, &__pyx_v_size)) return 0; @@ -5039,112 +6174,172 @@ __pyx_v_omean = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_oscale = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":951 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_mean,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;} - if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1167 */ + __pyx_v_fmean = PyFloat_AsDouble(__pyx_v_mean); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1168 */ + __pyx_v_fscale = PyFloat_AsDouble(__pyx_v_scale); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1169 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1170 */ + __pyx_1 = (__pyx_v_fmean <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1171 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; goto __pyx_L1;} + Py_INCREF(__pyx_k123p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k123p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1172 */ + __pyx_1 = (__pyx_v_fscale <= 0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1173 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; goto __pyx_L1;} + Py_INCREF(__pyx_k124p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k124p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; goto __pyx_L1;} + goto __pyx_L4; + } + __pyx_L4:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1174 */ + __pyx_2 = __pyx_f_6mtrand_cont2_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_wald,__pyx_v_size,__pyx_v_fmean,__pyx_v_fscale); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1176 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1177 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_mean,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_omean)); - __pyx_v_omean = ((PyArrayObject *)__pyx_1); - __pyx_1 = 0; + __pyx_v_omean = ((PyArrayObject *)__pyx_3); + __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":952 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; goto __pyx_L1;} - if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1178 */ + __pyx_4 = PyArray_FROM_OTF(__pyx_v_scale,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_6mtrand_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_oscale)); - __pyx_v_oscale = ((PyArrayObject *)__pyx_1); - __pyx_1 = 0; + __pyx_v_oscale = ((PyArrayObject *)__pyx_4); + __pyx_4 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":953 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1179 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_omean)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_omean)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_omean)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); + __pyx_4 = 0; + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); + __pyx_4 = 0; + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":954 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; goto __pyx_L1;} - Py_INCREF(__pyx_k98p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k98p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1180 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; goto __pyx_L1;} + Py_INCREF(__pyx_k125p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k125p); + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; goto __pyx_L1;} - goto __pyx_L2; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; goto __pyx_L1;} + goto __pyx_L5; } - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_5, __pyx_n_any); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_5 = PyFloat_FromDouble(0.0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;} + Py_INCREF(((PyObject *)__pyx_v_oscale)); + PyTuple_SET_ITEM(__pyx_3, 0, ((PyObject *)__pyx_v_oscale)); + PyTuple_SET_ITEM(__pyx_3, 1, __pyx_5); + __pyx_5 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_4 = PyFloat_FromDouble(0.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; goto __pyx_L1;} - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; goto __pyx_L1;} - Py_INCREF(((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_oscale)); - PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); - __pyx_4 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_5); + __pyx_5 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); - __pyx_4 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_1 = PyObject_IsTrue(__pyx_3); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - if (__pyx_5) { + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":956 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; goto __pyx_L1;} - Py_INCREF(__pyx_k99p); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k99p); - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1182 */ + __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; goto __pyx_L1;} + Py_INCREF(__pyx_k126p); + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k126p); + __pyx_2 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; goto __pyx_L1;} - goto __pyx_L2; + __Pyx_Raise(__pyx_2, 0, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; goto __pyx_L1;} + goto __pyx_L5; } - __pyx_L2:; + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":957 */ - __pyx_2 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_wald,__pyx_v_size,__pyx_v_omean,__pyx_v_oscale); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; goto __pyx_L1;} - __pyx_r = __pyx_2; - __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1183 */ + __pyx_3 = __pyx_f_6mtrand_cont2_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_wald,__pyx_v_size,__pyx_v_omean,__pyx_v_oscale); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;} + __pyx_r = __pyx_3; + __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.wald"); __pyx_r = 0; __pyx_L0:; @@ -5160,13 +6355,19 @@ static PyObject *__pyx_n_greater; static PyObject *__pyx_n_equal; -static PyObject *__pyx_k100p; -static PyObject *__pyx_k101p; -static PyObject *__pyx_k102p; +static PyObject *__pyx_k127p; +static PyObject *__pyx_k128p; +static PyObject *__pyx_k129p; +static PyObject *__pyx_k130p; +static PyObject *__pyx_k131p; +static PyObject *__pyx_k132p; -static char (__pyx_k100[]) = "left > mode"; -static char (__pyx_k101[]) = "mode > right"; -static char (__pyx_k102[]) = "left == right"; +static char (__pyx_k127[]) = "left > mode"; +static char (__pyx_k128[]) = "mode > right"; +static char (__pyx_k129[]) = "left == right"; +static char (__pyx_k130[]) = "left > mode"; +static char (__pyx_k131[]) = "mode > right"; +static char (__pyx_k132[]) = "left == right"; static PyObject *__pyx_f_6mtrand_11RandomState_triangular(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_triangular[] = "Triangular distribution starting at left, peaking at mode, and \n ending at right (left <= mode <= right).\n \n triangular(left, mode, right, size=None)\n "; @@ -5178,12 +6379,15 @@ PyArrayObject *__pyx_v_oleft; PyArrayObject *__pyx_v_omode; PyArrayObject *__pyx_v_oright; + double __pyx_v_fleft; + double __pyx_v_fmode; + double __pyx_v_fright; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"left","mode","right","size",0}; __pyx_v_size = __pyx_k49; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO|O", __pyx_argnames, &__pyx_v_left, &__pyx_v_mode, &__pyx_v_right, &__pyx_v_size)) return 0; @@ -5196,160 +6400,242 @@ __pyx_v_omode = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_oright = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":968 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_left,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1196 */ + __pyx_v_fleft = PyFloat_AsDouble(__pyx_v_left); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1197 */ + __pyx_v_fright = PyFloat_AsDouble(__pyx_v_right); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1198 */ + __pyx_v_fmode = PyFloat_AsDouble(__pyx_v_mode); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1199 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1200 */ + __pyx_1 = (__pyx_v_fleft > __pyx_v_fmode); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1201 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;} + Py_INCREF(__pyx_k127p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k127p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1202 */ + __pyx_1 = (__pyx_v_fmode > __pyx_v_fright); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1203 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;} + Py_INCREF(__pyx_k128p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k128p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;} + goto __pyx_L4; + } + __pyx_L4:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1204 */ + __pyx_1 = (__pyx_v_fleft == __pyx_v_fright); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1205 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; goto __pyx_L1;} + Py_INCREF(__pyx_k129p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k129p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; goto __pyx_L1;} + goto __pyx_L5; + } + __pyx_L5:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1206 */ + __pyx_2 = __pyx_f_6mtrand_cont3_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_triangular,__pyx_v_size,__pyx_v_fleft,__pyx_v_fmode,__pyx_v_fright); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1209 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1210 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_left,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_oleft)); - __pyx_v_oleft = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_oleft = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":969 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_mode,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1211 */ + __pyx_4 = PyArray_FROM_OTF(__pyx_v_mode,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_4))); Py_DECREF(((PyObject *)__pyx_v_omode)); - __pyx_v_omode = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_omode = ((PyArrayObject *)__pyx_4); + Py_DECREF(__pyx_4); __pyx_4 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":970 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_right,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1212 */ + __pyx_2 = PyArray_FROM_OTF(__pyx_v_right,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); Py_DECREF(((PyObject *)__pyx_v_oright)); - __pyx_v_oright = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_oright = ((PyArrayObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":972 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_greater); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1214 */ + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_any); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_greater); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_oleft)); - PyTuple_SET_ITEM(__pyx_1, 0, ((PyObject *)__pyx_v_oleft)); + PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_oleft)); Py_INCREF(((PyObject *)__pyx_v_omode)); - PyTuple_SET_ITEM(__pyx_1, 1, ((PyObject *)__pyx_v_omode)); - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 1, ((PyObject *)__pyx_v_omode)); + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); - __pyx_4 = 0; - __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_5); + __pyx_5 = 0; + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_1); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":973 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; goto __pyx_L1;} - Py_INCREF(__pyx_k100p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k100p); - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1215 */ + __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; goto __pyx_L1;} + Py_INCREF(__pyx_k130p); + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k130p); + __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; goto __pyx_L1;} - goto __pyx_L2; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; goto __pyx_L1;} + goto __pyx_L6; } - __pyx_L2:; + __pyx_L6:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":974 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; goto __pyx_L1;} - __pyx_4 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_greater); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1216 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;} + __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; goto __pyx_L1;} + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_4, __pyx_n_greater); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_omode)); - PyTuple_SET_ITEM(__pyx_1, 0, ((PyObject *)__pyx_v_omode)); + PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_omode)); Py_INCREF(((PyObject *)__pyx_v_oright)); - PyTuple_SET_ITEM(__pyx_1, 1, ((PyObject *)__pyx_v_oright)); - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 1, ((PyObject *)__pyx_v_oright)); + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); - __pyx_2 = 0; - __pyx_1 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); + __pyx_4 = 0; + __pyx_2 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_1); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":975 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;} - Py_INCREF(__pyx_k101p); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k101p); - __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1217 */ + __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; goto __pyx_L1;} + __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; goto __pyx_L1;} + Py_INCREF(__pyx_k131p); + PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k131p); + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_5); __pyx_5 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; goto __pyx_L1;} - goto __pyx_L3; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; goto __pyx_L1;} + goto __pyx_L7; } - __pyx_L3:; + __pyx_L7:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":976 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_4, __pyx_n_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1218 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_5, __pyx_n_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_oleft)); - PyTuple_SET_ITEM(__pyx_1, 0, ((PyObject *)__pyx_v_oleft)); + PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_oleft)); Py_INCREF(((PyObject *)__pyx_v_oright)); - PyTuple_SET_ITEM(__pyx_1, 1, ((PyObject *)__pyx_v_oright)); - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 1, ((PyObject *)__pyx_v_oright)); + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); - __pyx_4 = 0; - __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_5); + __pyx_5 = 0; + __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_1); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":977 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; goto __pyx_L1;} - Py_INCREF(__pyx_k102p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k102p); - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1219 */ + __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; goto __pyx_L1;} + Py_INCREF(__pyx_k132p); + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k132p); + __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; goto __pyx_L1;} - goto __pyx_L4; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; goto __pyx_L1;} + goto __pyx_L8; } - __pyx_L4:; + __pyx_L8:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":978 */ - __pyx_1 = __pyx_f_6mtrand_cont3_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_triangular,__pyx_v_size,__pyx_v_oleft,__pyx_v_omode,__pyx_v_oright); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1220 */ + __pyx_2 = __pyx_f_6mtrand_cont3_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_triangular,__pyx_v_size,__pyx_v_oleft,__pyx_v_omode,__pyx_v_oright); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.triangular"); __pyx_r = 0; __pyx_L0:; @@ -5364,14 +6650,22 @@ return __pyx_r; } -static PyObject *__pyx_k103p; -static PyObject *__pyx_k104p; -static PyObject *__pyx_k105p; +static PyObject *__pyx_n_PyInt_AsLong; -static char (__pyx_k103[]) = "n <= 0"; -static char (__pyx_k104[]) = "p < 0"; -static char (__pyx_k105[]) = "p > 1"; +static PyObject *__pyx_k133p; +static PyObject *__pyx_k134p; +static PyObject *__pyx_k135p; +static PyObject *__pyx_k136p; +static PyObject *__pyx_k137p; +static PyObject *__pyx_k138p; +static char (__pyx_k133[]) = "n <= 0"; +static char (__pyx_k134[]) = "p < 0"; +static char (__pyx_k135[]) = "p > 1"; +static char (__pyx_k136[]) = "n <= 0"; +static char (__pyx_k137[]) = "p < 0"; +static char (__pyx_k138[]) = "p > 1"; + static PyObject *__pyx_f_6mtrand_11RandomState_binomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_binomial[] = "Binomial distribution of n trials and p probability of success.\n\n binomial(n, p, size=None) -> random values\n "; static PyObject *__pyx_f_6mtrand_11RandomState_binomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -5380,12 +6674,15 @@ PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_on; PyArrayObject *__pyx_v_op; + long __pyx_v_ln; + double __pyx_v_fp; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; + long __pyx_4; int __pyx_5; + PyObject *__pyx_6 = 0; static char *__pyx_argnames[] = {"n","p","size",0}; __pyx_v_size = __pyx_k50; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_n, &__pyx_v_p, &__pyx_v_size)) return 0; @@ -5396,147 +6693,232 @@ __pyx_v_on = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_op = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":989 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_n,NPY_LONG,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); - Py_DECREF(((PyObject *)__pyx_v_on)); - __pyx_v_on = ((PyArrayObject *)__pyx_1); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1233 */ + __pyx_v_fp = PyFloat_AsDouble(__pyx_v_p); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1234 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_PyInt_AsLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; goto __pyx_L1;} + Py_INCREF(__pyx_v_n); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_n); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_v_ln = __pyx_4; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":990 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_p,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1235 */ + __pyx_5 = (!PyErr_Occurred()); + if (__pyx_5) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1236 */ + __pyx_5 = (__pyx_v_ln <= 0); + if (__pyx_5) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1237 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; goto __pyx_L1;} + Py_INCREF(__pyx_k133p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k133p); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(__pyx_3, 0, 0); + Py_DECREF(__pyx_3); __pyx_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1238 */ + __pyx_5 = (__pyx_v_fp < 0); + if (__pyx_5) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1239 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; goto __pyx_L1;} + Py_INCREF(__pyx_k134p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k134p); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(__pyx_3, 0, 0); + Py_DECREF(__pyx_3); __pyx_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; goto __pyx_L1;} + goto __pyx_L4; + } + __pyx_5 = (__pyx_v_fp > 1); + if (__pyx_5) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1241 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; goto __pyx_L1;} + Py_INCREF(__pyx_k135p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k135p); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(__pyx_3, 0, 0); + Py_DECREF(__pyx_3); __pyx_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; goto __pyx_L1;} + goto __pyx_L4; + } + __pyx_L4:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1242 */ + __pyx_1 = __pyx_f_6mtrand_discnp_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_binomial,__pyx_v_size,__pyx_v_ln,__pyx_v_fp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1244 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1246 */ + __pyx_2 = PyArray_FROM_OTF(__pyx_v_n,NPY_LONG,NPY_ALIGNED); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); + Py_DECREF(((PyObject *)__pyx_v_on)); + __pyx_v_on = ((PyArrayObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1247 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_p,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_op)); - __pyx_v_op = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_op = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":991 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1248 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; goto __pyx_L1;} + __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; goto __pyx_L1;} + Py_INCREF(__pyx_v_n); + PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_n); + PyTuple_SET_ITEM(__pyx_6, 1, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; goto __pyx_L1;} - Py_INCREF(__pyx_v_n); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_n); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3); + __pyx_3 = 0; + __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_5 = PyObject_IsTrue(__pyx_6); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":992 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; goto __pyx_L1;} - Py_INCREF(__pyx_k103p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k103p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1249 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; goto __pyx_L1;} + Py_INCREF(__pyx_k136p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k136p); + __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(__pyx_1, 0, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; goto __pyx_L1;} - goto __pyx_L2; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; goto __pyx_L1;} + goto __pyx_L5; } - __pyx_L2:; + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":993 */ - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_less); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1250 */ + __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_6, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_less); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;} - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;} + __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; goto __pyx_L1;} + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_p); - PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); - __pyx_4 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 1, __pyx_6); + __pyx_6 = 0; + __pyx_6 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_6); + __pyx_6 = 0; + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); - __pyx_4 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;} + __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":994 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; goto __pyx_L1;} - Py_INCREF(__pyx_k104p); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k104p); - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1251 */ + __pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; goto __pyx_L1;} + Py_INCREF(__pyx_k137p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k137p); + __pyx_1 = PyObject_CallObject(__pyx_6, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_1, 0, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; goto __pyx_L1;} - goto __pyx_L3; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; goto __pyx_L1;} + goto __pyx_L6; } - __pyx_L3:; + __pyx_L6:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":995 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;} - __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1252 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; goto __pyx_L1;} + __pyx_6 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_greater); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;} - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_greater); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; goto __pyx_L1;} Py_INCREF(__pyx_v_p); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_p); - PyTuple_SET_ITEM(__pyx_1, 1, __pyx_2); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_p); + PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2); + __pyx_2 = 0; + __pyx_3 = PyObject_CallObject(__pyx_6, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); - __pyx_2 = 0; - __pyx_1 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_5 = PyObject_IsTrue(__pyx_3); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_1); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":996 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;} - Py_INCREF(__pyx_k105p); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k105p); - __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1253 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; goto __pyx_L1;} + __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; goto __pyx_L1;} + Py_INCREF(__pyx_k138p); + PyTuple_SET_ITEM(__pyx_6, 0, __pyx_k138p); + __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;} - goto __pyx_L4; + Py_DECREF(__pyx_6); __pyx_6 = 0; + __Pyx_Raise(__pyx_1, 0, 0); + Py_DECREF(__pyx_1); __pyx_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; goto __pyx_L1;} + goto __pyx_L7; } - __pyx_L4:; + __pyx_L7:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":997 */ - __pyx_1 = __pyx_f_6mtrand_discnp_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_binomial,__pyx_v_size,__pyx_v_on,__pyx_v_op); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1254 */ + __pyx_3 = __pyx_f_6mtrand_discnp_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_binomial,__pyx_v_size,__pyx_v_on,__pyx_v_op); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; goto __pyx_L1;} + __pyx_r = __pyx_3; + __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -5545,7 +6927,7 @@ Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_6); __Pyx_AddTraceback("mtrand.RandomState.binomial"); __pyx_r = 0; __pyx_L0:; @@ -5558,13 +6940,19 @@ return __pyx_r; } -static PyObject *__pyx_k106p; -static PyObject *__pyx_k107p; -static PyObject *__pyx_k108p; +static PyObject *__pyx_k139p; +static PyObject *__pyx_k140p; +static PyObject *__pyx_k141p; +static PyObject *__pyx_k142p; +static PyObject *__pyx_k143p; +static PyObject *__pyx_k144p; -static char (__pyx_k106[]) = "n <= 0"; -static char (__pyx_k107[]) = "p < 0"; -static char (__pyx_k108[]) = "p > 1"; +static char (__pyx_k139[]) = "n <= 0"; +static char (__pyx_k140[]) = "p < 0"; +static char (__pyx_k141[]) = "p > 1"; +static char (__pyx_k142[]) = "n <= 0"; +static char (__pyx_k143[]) = "p < 0"; +static char (__pyx_k144[]) = "p > 1"; static PyObject *__pyx_f_6mtrand_11RandomState_negative_binomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_negative_binomial[] = "Negative Binomial distribution.\n\n negative_binomial(n, p, size=None) -> random values\n "; @@ -5574,12 +6962,15 @@ PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_on; PyArrayObject *__pyx_v_op; + long __pyx_v_ln; + double __pyx_v_fp; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; + long __pyx_4; int __pyx_5; + PyObject *__pyx_6 = 0; static char *__pyx_argnames[] = {"n","p","size",0}; __pyx_v_size = __pyx_k51; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_n, &__pyx_v_p, &__pyx_v_size)) return 0; @@ -5590,147 +6981,232 @@ __pyx_v_on = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_op = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1006 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_n,NPY_LONG,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); - Py_DECREF(((PyObject *)__pyx_v_on)); - __pyx_v_on = ((PyArrayObject *)__pyx_1); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1266 */ + __pyx_v_fp = PyFloat_AsDouble(__pyx_v_p); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1267 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_PyInt_AsLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; goto __pyx_L1;} + Py_INCREF(__pyx_v_n); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_n); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_v_ln = __pyx_4; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1007 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_p,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1268 */ + __pyx_5 = (!PyErr_Occurred()); + if (__pyx_5) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1269 */ + __pyx_5 = (__pyx_v_ln <= 0); + if (__pyx_5) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1270 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; goto __pyx_L1;} + Py_INCREF(__pyx_k139p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k139p); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(__pyx_3, 0, 0); + Py_DECREF(__pyx_3); __pyx_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1271 */ + __pyx_5 = (__pyx_v_fp < 0); + if (__pyx_5) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1272 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; goto __pyx_L1;} + Py_INCREF(__pyx_k140p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k140p); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(__pyx_3, 0, 0); + Py_DECREF(__pyx_3); __pyx_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; goto __pyx_L1;} + goto __pyx_L4; + } + __pyx_5 = (__pyx_v_fp > 1); + if (__pyx_5) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1274 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; goto __pyx_L1;} + Py_INCREF(__pyx_k141p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k141p); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(__pyx_3, 0, 0); + Py_DECREF(__pyx_3); __pyx_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; goto __pyx_L1;} + goto __pyx_L4; + } + __pyx_L4:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1275 */ + __pyx_1 = __pyx_f_6mtrand_discnp_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_negative_binomial,__pyx_v_size,__pyx_v_ln,__pyx_v_fp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1278 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1280 */ + __pyx_2 = PyArray_FROM_OTF(__pyx_v_n,NPY_LONG,NPY_ALIGNED); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); + Py_DECREF(((PyObject *)__pyx_v_on)); + __pyx_v_on = ((PyArrayObject *)__pyx_2); + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1281 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_p,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_op)); - __pyx_v_op = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_op = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1008 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1282 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;} + __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;} + Py_INCREF(__pyx_v_n); + PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_n); + PyTuple_SET_ITEM(__pyx_6, 1, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; goto __pyx_L1;} - Py_INCREF(__pyx_v_n); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_n); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3); + __pyx_3 = 0; + __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_5 = PyObject_IsTrue(__pyx_6); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1009 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; goto __pyx_L1;} - Py_INCREF(__pyx_k106p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k106p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1283 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; goto __pyx_L1;} + Py_INCREF(__pyx_k142p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k142p); + __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(__pyx_1, 0, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; goto __pyx_L1;} - goto __pyx_L2; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; goto __pyx_L1;} + goto __pyx_L5; } - __pyx_L2:; + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1010 */ - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_less); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1284 */ + __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_6, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_less); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; goto __pyx_L1;} - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; goto __pyx_L1;} + __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;} + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_p); - PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); - __pyx_4 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 1, __pyx_6); + __pyx_6 = 0; + __pyx_6 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_6); + __pyx_6 = 0; + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); - __pyx_4 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; goto __pyx_L1;} + __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1011 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; goto __pyx_L1;} - Py_INCREF(__pyx_k107p); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k107p); - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1285 */ + __pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; goto __pyx_L1;} + Py_INCREF(__pyx_k143p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k143p); + __pyx_1 = PyObject_CallObject(__pyx_6, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_1, 0, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; goto __pyx_L1;} - goto __pyx_L3; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; goto __pyx_L1;} + goto __pyx_L6; } - __pyx_L3:; + __pyx_L6:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1012 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; goto __pyx_L1;} - __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1286 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; goto __pyx_L1;} + __pyx_6 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_greater); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; goto __pyx_L1;} - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_greater); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; goto __pyx_L1;} Py_INCREF(__pyx_v_p); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_p); - PyTuple_SET_ITEM(__pyx_1, 1, __pyx_2); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_p); + PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2); + __pyx_2 = 0; + __pyx_3 = PyObject_CallObject(__pyx_6, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); - __pyx_2 = 0; - __pyx_1 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_5 = PyObject_IsTrue(__pyx_3); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_1); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1013 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; goto __pyx_L1;} - Py_INCREF(__pyx_k108p); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k108p); - __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1287 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;} + __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;} + Py_INCREF(__pyx_k144p); + PyTuple_SET_ITEM(__pyx_6, 0, __pyx_k144p); + __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; goto __pyx_L1;} - goto __pyx_L4; + Py_DECREF(__pyx_6); __pyx_6 = 0; + __Pyx_Raise(__pyx_1, 0, 0); + Py_DECREF(__pyx_1); __pyx_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;} + goto __pyx_L7; } - __pyx_L4:; + __pyx_L7:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1014 */ - __pyx_1 = __pyx_f_6mtrand_discnp_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_negative_binomial,__pyx_v_size,__pyx_v_on,__pyx_v_op); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1288 */ + __pyx_3 = __pyx_f_6mtrand_discnp_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_negative_binomial,__pyx_v_size,__pyx_v_on,__pyx_v_op); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;} + __pyx_r = __pyx_3; + __pyx_3 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -5739,7 +7215,7 @@ Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_6); __Pyx_AddTraceback("mtrand.RandomState.negative_binomial"); __pyx_r = 0; __pyx_L0:; @@ -5752,9 +7228,11 @@ return __pyx_r; } -static PyObject *__pyx_k109p; +static PyObject *__pyx_k145p; +static PyObject *__pyx_k146p; -static char (__pyx_k109[]) = "lam < 0"; +static char (__pyx_k145[]) = "lam < 0"; +static char (__pyx_k146[]) = "lam < 0"; static PyObject *__pyx_f_6mtrand_11RandomState_poisson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_poisson[] = "Poisson distribution.\n\n poisson(lam=1.0, size=None) -> random values\n "; @@ -5762,12 +7240,13 @@ PyObject *__pyx_v_lam = 0; PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_olam; + double __pyx_v_flam; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"lam","size",0}; __pyx_v_lam = __pyx_k52; __pyx_v_size = __pyx_k53; @@ -5777,67 +7256,108 @@ Py_INCREF(__pyx_v_size); __pyx_v_olam = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1023 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_lam,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1298 */ + __pyx_v_flam = PyFloat_AsDouble(__pyx_v_lam); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1299 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1300 */ + __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; goto __pyx_L1;} + if (PyObject_Cmp(__pyx_v_lam, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; goto __pyx_L1;} + __pyx_1 = __pyx_1 < 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1301 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; goto __pyx_L1;} + Py_INCREF(__pyx_k145p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k145p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1302 */ + __pyx_2 = __pyx_f_6mtrand_discd_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_poisson,__pyx_v_size,__pyx_v_flam); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1304 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1306 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_lam,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_olam)); - __pyx_v_olam = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_olam = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1024 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1307 */ + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_less); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_olam)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_olam)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_olam)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1025 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; goto __pyx_L1;} - Py_INCREF(__pyx_k109p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k109p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1308 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; goto __pyx_L1;} + Py_INCREF(__pyx_k146p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k146p); + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; goto __pyx_L1;} - goto __pyx_L2; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1026 */ - __pyx_4 = __pyx_f_6mtrand_discd_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_poisson,__pyx_v_size,__pyx_v_olam); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1309 */ + __pyx_5 = __pyx_f_6mtrand_discd_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_poisson,__pyx_v_size,__pyx_v_olam); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.poisson"); __pyx_r = 0; __pyx_L0:; @@ -5848,9 +7368,11 @@ return __pyx_r; } -static PyObject *__pyx_k110p; +static PyObject *__pyx_k147p; +static PyObject *__pyx_k148p; -static char (__pyx_k110[]) = "a <= 1.0"; +static char (__pyx_k147[]) = "a <= 1.0"; +static char (__pyx_k148[]) = "a <= 1.0"; static PyObject *__pyx_f_6mtrand_11RandomState_zipf(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_zipf[] = "Zipf distribution.\n \n zipf(a, size=None)\n "; @@ -5858,12 +7380,13 @@ PyObject *__pyx_v_a = 0; PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_oa; + double __pyx_v_fa; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"a","size",0}; __pyx_v_size = __pyx_k54; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_a, &__pyx_v_size)) return 0; @@ -5872,67 +7395,105 @@ Py_INCREF(__pyx_v_size); __pyx_v_oa = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1034 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_a,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1319 */ + __pyx_v_fa = PyFloat_AsDouble(__pyx_v_a); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1320 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1321 */ + __pyx_1 = (__pyx_v_fa <= 1.0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1322 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; goto __pyx_L1;} + Py_INCREF(__pyx_k147p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k147p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1322; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1323 */ + __pyx_2 = __pyx_f_6mtrand_discd_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_zipf,__pyx_v_size,__pyx_v_fa); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1325 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1327 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_a,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_oa)); - __pyx_v_oa = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_oa = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1035 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less_equal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(1.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1328 */ + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_less_equal); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_3 = PyFloat_FromDouble(1.0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_oa)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_oa)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_oa)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1036 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; goto __pyx_L1;} - Py_INCREF(__pyx_k110p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k110p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1329 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; goto __pyx_L1;} + Py_INCREF(__pyx_k148p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k148p); + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; goto __pyx_L1;} - goto __pyx_L2; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L2:; + __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1037 */ - __pyx_4 = __pyx_f_6mtrand_discd_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_zipf,__pyx_v_size,__pyx_v_oa); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1330 */ + __pyx_5 = __pyx_f_6mtrand_discd_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_zipf,__pyx_v_size,__pyx_v_oa); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; goto __pyx_L1;} + __pyx_r = __pyx_5; + __pyx_5 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.zipf"); __pyx_r = 0; __pyx_L0:; @@ -5943,11 +7504,15 @@ return __pyx_r; } -static PyObject *__pyx_k111p; -static PyObject *__pyx_k112p; +static PyObject *__pyx_k149p; +static PyObject *__pyx_k150p; +static PyObject *__pyx_k151p; +static PyObject *__pyx_k152p; -static char (__pyx_k111[]) = "p < 0.0"; -static char (__pyx_k112[]) = "p > 1.0"; +static char (__pyx_k149[]) = "p < 0.0"; +static char (__pyx_k150[]) = "p > 1.0"; +static char (__pyx_k151[]) = "p < 0.0"; +static char (__pyx_k152[]) = "p > 1.0"; static PyObject *__pyx_f_6mtrand_11RandomState_geometric(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_geometric[] = "Geometric distribution with p being the probability of \"success\" on\n an individual trial.\n \n geometric(p, size=None)\n "; @@ -5955,12 +7520,13 @@ PyObject *__pyx_v_p = 0; PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_op; + double __pyx_v_fp; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"p","size",0}; __pyx_v_size = __pyx_k55; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_p, &__pyx_v_size)) return 0; @@ -5969,97 +7535,154 @@ Py_INCREF(__pyx_v_size); __pyx_v_op = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1046 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_p,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1341 */ + __pyx_v_fp = PyFloat_AsDouble(__pyx_v_p); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1342 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1343 */ + __pyx_1 = (__pyx_v_fp < 0.0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1344 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; goto __pyx_L1;} + Py_INCREF(__pyx_k149p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k149p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1345 */ + __pyx_1 = (__pyx_v_fp > 1.0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1346 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; goto __pyx_L1;} + Py_INCREF(__pyx_k150p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k150p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; goto __pyx_L1;} + goto __pyx_L4; + } + __pyx_L4:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1347 */ + __pyx_2 = __pyx_f_6mtrand_discd_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_geometric,__pyx_v_size,__pyx_v_fp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1349 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1352 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_p,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_op)); - __pyx_v_op = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_op = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1047 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1353 */ + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_less); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_3 = PyFloat_FromDouble(0.0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_op)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_op)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_op)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1048 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; goto __pyx_L1;} - Py_INCREF(__pyx_k111p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k111p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1354 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; goto __pyx_L1;} + Py_INCREF(__pyx_k151p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k151p); + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; goto __pyx_L1;} - goto __pyx_L2; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; goto __pyx_L1;} + goto __pyx_L5; } - __pyx_L2:; + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1049 */ - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_greater); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1355 */ + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_5, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_greater); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_4 = PyFloat_FromDouble(1.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; goto __pyx_L1;} - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; goto __pyx_L1;} + __pyx_5 = PyFloat_FromDouble(1.0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; goto __pyx_L1;} + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_op)); PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_op)); - PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); - __pyx_4 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_2, 1, __pyx_5); + __pyx_5 = 0; + __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); - __pyx_4 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5); + __pyx_5 = 0; + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_1 = PyObject_IsTrue(__pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - if (__pyx_5) { + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1050 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; goto __pyx_L1;} - Py_INCREF(__pyx_k112p); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k112p); - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1356 */ + __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; goto __pyx_L1;} + Py_INCREF(__pyx_k152p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k152p); + __pyx_4 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; goto __pyx_L1;} - goto __pyx_L3; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; goto __pyx_L1;} + goto __pyx_L6; } - __pyx_L3:; + __pyx_L6:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1051 */ - __pyx_2 = __pyx_f_6mtrand_discd_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_geometric,__pyx_v_size,__pyx_v_op); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1357 */ + __pyx_2 = __pyx_f_6mtrand_discd_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_geometric,__pyx_v_size,__pyx_v_op); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; @@ -6067,10 +7690,10 @@ __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.geometric"); __pyx_r = 0; __pyx_L0:; @@ -6083,15 +7706,23 @@ static PyObject *__pyx_n_add; -static PyObject *__pyx_k113p; -static PyObject *__pyx_k114p; -static PyObject *__pyx_k115p; -static PyObject *__pyx_k116p; +static PyObject *__pyx_k153p; +static PyObject *__pyx_k154p; +static PyObject *__pyx_k155p; +static PyObject *__pyx_k156p; +static PyObject *__pyx_k157p; +static PyObject *__pyx_k158p; +static PyObject *__pyx_k159p; +static PyObject *__pyx_k160p; -static char (__pyx_k113[]) = "ngood < 1"; -static char (__pyx_k114[]) = "nbad < 1"; -static char (__pyx_k115[]) = "ngood + nbad < nsample"; -static char (__pyx_k116[]) = "nsample < 1"; +static char (__pyx_k153[]) = "ngood < 1"; +static char (__pyx_k154[]) = "nbad < 1"; +static char (__pyx_k155[]) = "nsample < 1"; +static char (__pyx_k156[]) = "ngood + nbad < nsample"; +static char (__pyx_k157[]) = "ngood < 1"; +static char (__pyx_k158[]) = "nbad < 1"; +static char (__pyx_k159[]) = "nsample < 1"; +static char (__pyx_k160[]) = "ngood + nbad < nsample"; static PyObject *__pyx_f_6mtrand_11RandomState_hypergeometric(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_hypergeometric[] = "Hypergeometric distribution.\n \n Consider an urn with ngood \"good\" balls and nbad \"bad\" balls. If one \n were to draw nsample balls from the urn without replacement, then \n the hypergeometric distribution describes the distribution of \"good\" \n balls in the sample.\n \n hypergeometric(ngood, nbad, nsample, size=None) \n "; @@ -6103,13 +7734,17 @@ PyArrayObject *__pyx_v_ongood; PyArrayObject *__pyx_v_onbad; PyArrayObject *__pyx_v_onsample; + long __pyx_v_lngood; + long __pyx_v_lnbad; + long __pyx_v_lnsample; PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; + long __pyx_4; int __pyx_5; PyObject *__pyx_6 = 0; + PyObject *__pyx_7 = 0; static char *__pyx_argnames[] = {"ngood","nbad","nsample","size",0}; __pyx_v_size = __pyx_k56; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO|O", __pyx_argnames, &__pyx_v_ngood, &__pyx_v_nbad, &__pyx_v_nsample, &__pyx_v_size)) return 0; @@ -6122,205 +7757,345 @@ __pyx_v_onbad = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); __pyx_v_onsample = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1067 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_ngood,NPY_LONG,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); - Py_DECREF(((PyObject *)__pyx_v_ongood)); - __pyx_v_ongood = ((PyArrayObject *)__pyx_1); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1372 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_PyInt_AsLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; goto __pyx_L1;} + Py_INCREF(__pyx_v_ngood); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_ngood); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_v_lngood = __pyx_4; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1068 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_nbad,NPY_LONG,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); - Py_DECREF(((PyObject *)__pyx_v_onbad)); - __pyx_v_onbad = ((PyArrayObject *)__pyx_1); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1373 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_PyInt_AsLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; goto __pyx_L1;} + Py_INCREF(__pyx_v_nbad); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_nbad); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_v_lnbad = __pyx_4; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1069 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_nsample,NPY_LONG,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); - Py_DECREF(((PyObject *)__pyx_v_onsample)); - __pyx_v_onsample = ((PyArrayObject *)__pyx_1); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1374 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_PyInt_AsLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; goto __pyx_L1;} + Py_INCREF(__pyx_v_nsample); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_nsample); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1070 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; goto __pyx_L1;} - Py_INCREF(((PyObject *)__pyx_v_ongood)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_ongood)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_v_lnsample = __pyx_4; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1375 */ + __pyx_5 = (!PyErr_Occurred()); if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1071 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; goto __pyx_L1;} - Py_INCREF(__pyx_k113p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k113p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1376 */ + __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; goto __pyx_L1;} + if (PyObject_Cmp(__pyx_v_ngood, __pyx_1, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; goto __pyx_L1;} + __pyx_5 = __pyx_5 < 0; Py_DECREF(__pyx_1); __pyx_1 = 0; + if (__pyx_5) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1377 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; goto __pyx_L1;} + Py_INCREF(__pyx_k153p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k153p); + __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_1, 0, 0); + Py_DECREF(__pyx_1); __pyx_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1378 */ + __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; goto __pyx_L1;} + if (PyObject_Cmp(__pyx_v_nbad, __pyx_2, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; goto __pyx_L1;} + __pyx_5 = __pyx_5 < 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); + if (__pyx_5) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1379 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; goto __pyx_L1;} + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; goto __pyx_L1;} + Py_INCREF(__pyx_k154p); + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k154p); + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_Raise(__pyx_2, 0, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; goto __pyx_L1;} + goto __pyx_L4; + } + __pyx_L4:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1380 */ + __pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; goto __pyx_L1;} + if (PyObject_Cmp(__pyx_v_nsample, __pyx_3, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; goto __pyx_L1;} + __pyx_5 = __pyx_5 < 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; goto __pyx_L1;} + if (__pyx_5) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1381 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; goto __pyx_L1;} + Py_INCREF(__pyx_k155p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k155p); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(__pyx_3, 0, 0); + Py_DECREF(__pyx_3); __pyx_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; goto __pyx_L1;} + goto __pyx_L5; + } + __pyx_L5:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1382 */ + __pyx_1 = PyNumber_Add(__pyx_v_ngood, __pyx_v_nbad); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; goto __pyx_L1;} + if (PyObject_Cmp(__pyx_1, __pyx_v_nsample, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; goto __pyx_L1;} + __pyx_5 = __pyx_5 < 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + if (__pyx_5) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1383 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; goto __pyx_L1;} + Py_INCREF(__pyx_k156p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k156p); + __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_1, 0, 0); + Py_DECREF(__pyx_1); __pyx_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; goto __pyx_L1;} + goto __pyx_L6; + } + __pyx_L6:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1384 */ + __pyx_2 = __pyx_f_6mtrand_discnmN_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_hypergeometric,__pyx_v_size,__pyx_v_lngood,__pyx_v_lnbad,__pyx_v_lnsample); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1384; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; goto __pyx_L2; } __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1072 */ - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_less); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1388 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1390 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_ngood,NPY_LONG,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); + Py_DECREF(((PyObject *)__pyx_v_ongood)); + __pyx_v_ongood = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1391 */ + __pyx_1 = PyArray_FROM_OTF(__pyx_v_nbad,NPY_LONG,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + Py_DECREF(((PyObject *)__pyx_v_onbad)); + __pyx_v_onbad = ((PyArrayObject *)__pyx_1); + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1392 */ + __pyx_2 = PyArray_FROM_OTF(__pyx_v_nsample,NPY_LONG,NPY_ALIGNED); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_2))); + Py_DECREF(((PyObject *)__pyx_v_onsample)); + __pyx_v_onsample = ((PyArrayObject *)__pyx_2); Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; goto __pyx_L1;} - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; goto __pyx_L1;} - Py_INCREF(((PyObject *)__pyx_v_onbad)); - PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_onbad)); - PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); - __pyx_4 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; goto __pyx_L1;} + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1393 */ + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_less); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); - __pyx_4 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; goto __pyx_L1;} + __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; goto __pyx_L1;} + __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; goto __pyx_L1;} + Py_INCREF(((PyObject *)__pyx_v_ongood)); + PyTuple_SET_ITEM(__pyx_6, 0, ((PyObject *)__pyx_v_ongood)); + PyTuple_SET_ITEM(__pyx_6, 1, __pyx_2); + __pyx_2 = 0; + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_6); __pyx_6 = 0; + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); + __pyx_2 = 0; + __pyx_6 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_5 = PyObject_IsTrue(__pyx_6); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1073 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; goto __pyx_L1;} - Py_INCREF(__pyx_k114p); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k114p); - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1394 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; goto __pyx_L1;} + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; goto __pyx_L1;} + Py_INCREF(__pyx_k157p); + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k157p); + __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; goto __pyx_L1;} - goto __pyx_L3; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; goto __pyx_L1;} + goto __pyx_L7; } - __pyx_L3:; + __pyx_L7:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1074 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; goto __pyx_L1;} - __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1395 */ + __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_6, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_add); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; goto __pyx_L1;} - Py_INCREF(((PyObject *)__pyx_v_ongood)); - PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_ongood)); + __pyx_6 = PyInt_FromLong(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; goto __pyx_L1;} + __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_onbad)); - PyTuple_SET_ITEM(__pyx_2, 1, ((PyObject *)__pyx_v_onbad)); - __pyx_6 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_1, 0, ((PyObject *)__pyx_v_onbad)); + PyTuple_SET_ITEM(__pyx_1, 1, __pyx_6); + __pyx_6 = 0; + __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_6); + __pyx_6 = 0; + __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_6); - Py_INCREF(((PyObject *)__pyx_v_onsample)); - PyTuple_SET_ITEM(__pyx_1, 1, ((PyObject *)__pyx_v_onsample)); - __pyx_6 = 0; - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_5 = PyObject_IsTrue(__pyx_1); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_6, 0, __pyx_2); - __pyx_2 = 0; - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_6); __pyx_6 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_3); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1075 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; goto __pyx_L1;} - Py_INCREF(__pyx_k115p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k115p); - __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1396 */ + __pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; goto __pyx_L1;} + Py_INCREF(__pyx_k158p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k158p); + __pyx_3 = PyObject_CallObject(__pyx_6, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_4, 0, 0); - Py_DECREF(__pyx_4); __pyx_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; goto __pyx_L1;} - goto __pyx_L4; + __Pyx_Raise(__pyx_3, 0, 0); + Py_DECREF(__pyx_3); __pyx_3 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; goto __pyx_L1;} + goto __pyx_L8; } - __pyx_L4:; + __pyx_L8:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1076 */ - __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_6, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;} - Py_DECREF(__pyx_6); __pyx_6 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_less); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1397 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; goto __pyx_L1;} + __pyx_6 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;} - __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_less); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; goto __pyx_L1;} + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_onsample)); - PyTuple_SET_ITEM(__pyx_6, 0, ((PyObject *)__pyx_v_onsample)); - PyTuple_SET_ITEM(__pyx_6, 1, __pyx_4); - __pyx_4 = 0; - __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_onsample)); + PyTuple_SET_ITEM(__pyx_2, 1, __pyx_1); + __pyx_1 = 0; + __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); + __pyx_1 = 0; + __pyx_2 = PyObject_CallObject(__pyx_6, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; - __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); - __pyx_1 = 0; - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;} + __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1077 */ - __pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; goto __pyx_L1;} - Py_INCREF(__pyx_k116p); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k116p); - __pyx_3 = PyObject_CallObject(__pyx_6, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1398 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; goto __pyx_L1;} + __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; goto __pyx_L1;} + Py_INCREF(__pyx_k159p); + PyTuple_SET_ITEM(__pyx_6, 0, __pyx_k159p); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; goto __pyx_L1;} - goto __pyx_L5; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; goto __pyx_L1;} + goto __pyx_L9; } - __pyx_L5:; + __pyx_L9:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1078 */ - __pyx_4 = __pyx_f_6mtrand_discnmN_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_hypergeometric,__pyx_v_size,__pyx_v_ongood,__pyx_v_onbad,__pyx_v_onsample); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; goto __pyx_L1;} - __pyx_r = __pyx_4; - __pyx_4 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1399 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_6, __pyx_n_less); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;} + __pyx_6 = PyObject_GetAttr(__pyx_2, __pyx_n_add); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;} + Py_INCREF(((PyObject *)__pyx_v_ongood)); + PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_ongood)); + Py_INCREF(((PyObject *)__pyx_v_onbad)); + PyTuple_SET_ITEM(__pyx_2, 1, ((PyObject *)__pyx_v_onbad)); + __pyx_7 = PyObject_CallObject(__pyx_6, __pyx_2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_6, 0, __pyx_7); + Py_INCREF(((PyObject *)__pyx_v_onsample)); + PyTuple_SET_ITEM(__pyx_6, 1, ((PyObject *)__pyx_v_onsample)); + __pyx_7 = 0; + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_6); __pyx_6 = 0; + __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_7, 0, __pyx_2); + __pyx_2 = 0; + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_7); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_7); __pyx_7 = 0; + __pyx_5 = PyObject_IsTrue(__pyx_3); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + if (__pyx_5) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1400 */ + __pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; goto __pyx_L1;} + Py_INCREF(__pyx_k160p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k160p); + __pyx_1 = PyObject_CallObject(__pyx_6, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; goto __pyx_L1;} + Py_DECREF(__pyx_6); __pyx_6 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __Pyx_Raise(__pyx_1, 0, 0); + Py_DECREF(__pyx_1); __pyx_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; goto __pyx_L1;} + goto __pyx_L10; + } + __pyx_L10:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1401 */ + __pyx_7 = __pyx_f_6mtrand_discnmN_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_hypergeometric,__pyx_v_size,__pyx_v_ongood,__pyx_v_onbad,__pyx_v_onsample); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; goto __pyx_L1;} + __pyx_r = __pyx_7; + __pyx_7 = 0; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -6329,8 +8104,8 @@ Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_6); + Py_XDECREF(__pyx_7); __Pyx_AddTraceback("mtrand.RandomState.hypergeometric"); __pyx_r = 0; __pyx_L0:; @@ -6345,11 +8120,15 @@ return __pyx_r; } -static PyObject *__pyx_k117p; -static PyObject *__pyx_k118p; +static PyObject *__pyx_k161p; +static PyObject *__pyx_k162p; +static PyObject *__pyx_k163p; +static PyObject *__pyx_k164p; -static char (__pyx_k117[]) = "p < 0.0"; -static char (__pyx_k118[]) = "p > 1.0"; +static char (__pyx_k161[]) = "p < 0.0"; +static char (__pyx_k162[]) = "p > 1.0"; +static char (__pyx_k163[]) = "p < 0.0"; +static char (__pyx_k164[]) = "p > 1.0"; static PyObject *__pyx_f_6mtrand_11RandomState_logseries(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_logseries[] = "Logarithmic series distribution.\n \n logseries(p, size=None)\n "; @@ -6357,12 +8136,13 @@ PyObject *__pyx_v_p = 0; PyObject *__pyx_v_size = 0; PyArrayObject *__pyx_v_op; + double __pyx_v_fp; PyObject *__pyx_r; - PyObject *__pyx_1 = 0; + int __pyx_1; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; - int __pyx_5; + PyObject *__pyx_5 = 0; static char *__pyx_argnames[] = {"p","size",0}; __pyx_v_size = __pyx_k57; if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_p, &__pyx_v_size)) return 0; @@ -6371,97 +8151,154 @@ Py_INCREF(__pyx_v_size); __pyx_v_op = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1087 */ - __pyx_1 = PyArray_FROM_OTF(__pyx_v_p,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; goto __pyx_L1;} - Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1412 */ + __pyx_v_fp = PyFloat_AsDouble(__pyx_v_p); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1413 */ + __pyx_1 = (!PyErr_Occurred()); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1414 */ + __pyx_1 = (__pyx_v_fp < 0.0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1415 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; goto __pyx_L1;} + Py_INCREF(__pyx_k161p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k161p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; goto __pyx_L1;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1416 */ + __pyx_1 = (__pyx_v_fp > 1.0); + if (__pyx_1) { + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1417 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; goto __pyx_L1;} + Py_INCREF(__pyx_k162p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k162p); + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; goto __pyx_L1;} + goto __pyx_L4; + } + __pyx_L4:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1418 */ + __pyx_2 = __pyx_f_6mtrand_discd_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_logseries,__pyx_v_size,__pyx_v_fp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + goto __pyx_L2; + } + __pyx_L2:; + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1420 */ + PyErr_Clear(); + + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1422 */ + __pyx_3 = PyArray_FROM_OTF(__pyx_v_p,NPY_DOUBLE,NPY_ALIGNED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; goto __pyx_L1;} + Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_3))); Py_DECREF(((PyObject *)__pyx_v_op)); - __pyx_v_op = ((PyArrayObject *)__pyx_1); - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_v_op = ((PyArrayObject *)__pyx_3); + Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1088 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_less); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1423 */ + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_less); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_3 = PyFloat_FromDouble(0.0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_op)); - PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_op)); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1); - __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)__pyx_v_op)); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - __pyx_1 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - if (__pyx_5) { + __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1089 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; goto __pyx_L1;} - Py_INCREF(__pyx_k117p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k117p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1424 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; goto __pyx_L1;} + Py_INCREF(__pyx_k163p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k163p); + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; goto __pyx_L1;} - goto __pyx_L2; + __Pyx_Raise(__pyx_4, 0, 0); + Py_DECREF(__pyx_4); __pyx_4 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; goto __pyx_L1;} + goto __pyx_L5; } - __pyx_L2:; + __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1090 */ - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_n_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_greater); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1425 */ + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_5, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_greater); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_4 = PyFloat_FromDouble(1.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; goto __pyx_L1;} - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; goto __pyx_L1;} + __pyx_5 = PyFloat_FromDouble(1.0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; goto __pyx_L1;} + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; goto __pyx_L1;} Py_INCREF(((PyObject *)__pyx_v_op)); PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_op)); - PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4); - __pyx_4 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_2, 1, __pyx_5); + __pyx_5 = 0; + __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); - __pyx_4 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5); + __pyx_5 = 0; + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; goto __pyx_L1;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_1 = PyObject_IsTrue(__pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - if (__pyx_5) { + if (__pyx_1) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1091 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; goto __pyx_L1;} - Py_INCREF(__pyx_k118p); - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k118p); - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1426 */ + __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1426; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1426; goto __pyx_L1;} + Py_INCREF(__pyx_k164p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k164p); + __pyx_4 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1426; goto __pyx_L1;} + Py_DECREF(__pyx_5); __pyx_5 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; goto __pyx_L1;} - goto __pyx_L3; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1426; goto __pyx_L1;} + goto __pyx_L6; } - __pyx_L3:; + __pyx_L6:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1092 */ - __pyx_2 = __pyx_f_6mtrand_discd_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_logseries,__pyx_v_size,__pyx_v_op); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1427 */ + __pyx_2 = __pyx_f_6mtrand_discd_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,rk_logseries,__pyx_v_size,__pyx_v_op); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1427; goto __pyx_L1;} __pyx_r = __pyx_2; __pyx_2 = 0; goto __pyx_L0; @@ -6469,10 +8306,10 @@ __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); __Pyx_AddTraceback("mtrand.RandomState.logseries"); __pyx_r = 0; __pyx_L0:; @@ -6495,15 +8332,15 @@ static PyObject *__pyx_n_sqrt; static PyObject *__pyx_n_tuple; -static PyObject *__pyx_k119p; -static PyObject *__pyx_k120p; -static PyObject *__pyx_k121p; -static PyObject *__pyx_k122p; +static PyObject *__pyx_k165p; +static PyObject *__pyx_k166p; +static PyObject *__pyx_k167p; +static PyObject *__pyx_k168p; -static char (__pyx_k119[]) = "mean must be 1 dimensional"; -static char (__pyx_k120[]) = "cov must be 2 dimensional and square"; -static char (__pyx_k121[]) = "mean and cov must have same length"; -static char (__pyx_k122[]) = "numpy.dual"; +static char (__pyx_k165[]) = "mean must be 1 dimensional"; +static char (__pyx_k166[]) = "cov must be 2 dimensional and square"; +static char (__pyx_k167[]) = "mean and cov must have same length"; +static char (__pyx_k168[]) = "numpy.dual"; static PyObject *__pyx_f_6mtrand_11RandomState_multivariate_normal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_multivariate_normal[] = "Return an array containing multivariate normally distributed random numbers\n with specified mean and covariance.\n\n multivariate_normal(mean, cov) -> random values\n multivariate_normal(mean, cov, [m, n, ...]) -> random values\n\n mean must be a 1 dimensional array. cov must be a square two dimensional\n array with the same number of rows and columns as mean has elements.\n\n The first form returns a single 1-D array containing a multivariate\n normal.\n\n The second form returns an array of shape (m, n, ..., cov.shape[0]).\n In this case, output[i,j,...,:] is a 1-D array containing a multivariate\n normal.\n "; @@ -6539,40 +8376,40 @@ __pyx_v_s = Py_None; Py_INCREF(Py_None); __pyx_v_v = Py_None; Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1113 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1448 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; goto __pyx_L1;} + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; goto __pyx_L1;} Py_INCREF(__pyx_v_mean); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_mean); - __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v_mean); __pyx_v_mean = __pyx_3; __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1114 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_array); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1449 */ + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_array); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; goto __pyx_L1;} Py_INCREF(__pyx_v_cov); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_cov); - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_cov); __pyx_v_cov = __pyx_2; __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1115 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1450 */ __pyx_4 = __pyx_v_size == Py_None; if (__pyx_4) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1116 */ - __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1116; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1451 */ + __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; goto __pyx_L1;} Py_DECREF(__pyx_v_shape); __pyx_v_shape = __pyx_1; __pyx_1 = 0; @@ -6580,140 +8417,140 @@ } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1118 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1453 */ Py_INCREF(__pyx_v_size); Py_DECREF(__pyx_v_shape); __pyx_v_shape = __pyx_v_size; } __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1119 */ - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_v_mean, __pyx_n_shape); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1454 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_v_mean, __pyx_n_shape); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; goto __pyx_L1;} + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; goto __pyx_L1;} - if (PyObject_Cmp(__pyx_2, __pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; goto __pyx_L1;} + if (PyObject_Cmp(__pyx_2, __pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; goto __pyx_L1;} __pyx_4 = __pyx_4 != 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; if (__pyx_4) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1120 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; goto __pyx_L1;} - Py_INCREF(__pyx_k119p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k119p); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1455 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; goto __pyx_L1;} + Py_INCREF(__pyx_k165p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k165p); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1121 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_v_cov, __pyx_n_shape); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1456 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_v_cov, __pyx_n_shape); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; goto __pyx_L1;} - if (PyObject_Cmp(__pyx_2, __pyx_1, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;} + if (PyObject_Cmp(__pyx_2, __pyx_1, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;} __pyx_4 = __pyx_4 != 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (!__pyx_4) { - __pyx_3 = PyObject_GetAttr(__pyx_v_cov, __pyx_n_shape); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; goto __pyx_L1;} - __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; goto __pyx_L1;} - __pyx_1 = PyObject_GetItem(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_v_cov, __pyx_n_shape); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;} + __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;} + __pyx_1 = PyObject_GetItem(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyObject_GetAttr(__pyx_v_cov, __pyx_n_shape); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; goto __pyx_L1;} - __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; goto __pyx_L1;} - __pyx_5 = PyObject_GetItem(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_v_cov, __pyx_n_shape); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;} + __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;} + __pyx_5 = PyObject_GetItem(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - if (PyObject_Cmp(__pyx_1, __pyx_5, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; goto __pyx_L1;} + if (PyObject_Cmp(__pyx_1, __pyx_5, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;} __pyx_4 = __pyx_4 != 0; Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; } if (__pyx_4) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1122 */ - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; goto __pyx_L1;} - Py_INCREF(__pyx_k120p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k120p); - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1457 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; goto __pyx_L1;} + Py_INCREF(__pyx_k166p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k166p); + __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; __Pyx_Raise(__pyx_1, 0, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1123 */ - __pyx_5 = PyObject_GetAttr(__pyx_v_mean, __pyx_n_shape); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; goto __pyx_L1;} - __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; goto __pyx_L1;} - __pyx_2 = PyObject_GetItem(__pyx_5, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1458 */ + __pyx_5 = PyObject_GetAttr(__pyx_v_mean, __pyx_n_shape); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; goto __pyx_L1;} + __pyx_2 = PyObject_GetItem(__pyx_5, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_1 = PyObject_GetAttr(__pyx_v_cov, __pyx_n_shape); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; goto __pyx_L1;} - __pyx_5 = PyInt_FromLong(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; goto __pyx_L1;} - __pyx_3 = PyObject_GetItem(__pyx_1, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_v_cov, __pyx_n_shape); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; goto __pyx_L1;} + __pyx_5 = PyInt_FromLong(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; goto __pyx_L1;} + __pyx_3 = PyObject_GetItem(__pyx_1, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; - if (PyObject_Cmp(__pyx_2, __pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; goto __pyx_L1;} + if (PyObject_Cmp(__pyx_2, __pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; goto __pyx_L1;} __pyx_4 = __pyx_4 != 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; if (__pyx_4) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1124 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; goto __pyx_L1;} - __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; goto __pyx_L1;} - Py_INCREF(__pyx_k121p); - PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k121p); - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1459 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1459; goto __pyx_L1;} + __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1459; goto __pyx_L1;} + Py_INCREF(__pyx_k167p); + PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k167p); + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1459; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1459; goto __pyx_L1;} goto __pyx_L5; } __pyx_L5:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1126 */ - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; goto __pyx_L1;} - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; goto __pyx_L1;} - __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1461 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; goto __pyx_L1;} Py_INCREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_shape); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_1); __pyx_1 = 0; - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; - __pyx_4 = PyObject_IsTrue(__pyx_2); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; goto __pyx_L1;} + __pyx_4 = PyObject_IsTrue(__pyx_2); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1461; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_4) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1127 */ - __pyx_1 = PyList_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1462 */ + __pyx_1 = PyList_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; goto __pyx_L1;} Py_INCREF(__pyx_v_shape); PyList_SET_ITEM(__pyx_1, 0, __pyx_v_shape); Py_DECREF(__pyx_v_shape); @@ -6723,186 +8560,186 @@ } __pyx_L6:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1128 */ - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_list); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; goto __pyx_L1;} - __pyx_5 = PySequence_GetSlice(__pyx_v_shape, 0, 0x7fffffff); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1463 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_list); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; goto __pyx_L1;} + __pyx_5 = PySequence_GetSlice(__pyx_v_shape, 0, 0x7fffffff); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_5); __pyx_5 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; goto __pyx_L1;} + __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_final_shape); __pyx_v_final_shape = __pyx_1; __pyx_1 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1129 */ - __pyx_5 = PyObject_GetAttr(__pyx_v_final_shape, __pyx_n_append); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_v_mean, __pyx_n_shape); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; goto __pyx_L1;} - __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; goto __pyx_L1;} - __pyx_1 = PyObject_GetItem(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1464 */ + __pyx_5 = PyObject_GetAttr(__pyx_v_final_shape, __pyx_n_append); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_v_mean, __pyx_n_shape); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; goto __pyx_L1;} + __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; goto __pyx_L1;} + __pyx_1 = PyObject_GetItem(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); __pyx_1 = 0; - __pyx_2 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1133 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_standard_normal); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} - __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_5, __pyx_n_multiply); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1468 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_standard_normal); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_5, __pyx_n_multiply); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; - __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_reduce); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_reduce); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} + __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; goto __pyx_L1;} Py_INCREF(__pyx_v_final_shape); PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_final_shape); - __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;} + __pyx_5 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_x); __pyx_v_x = __pyx_5; __pyx_5 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1134 */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_multiply); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1469 */ + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_multiply); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_reduce); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_reduce); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;} Py_INCREF(__pyx_v_final_shape); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_final_shape); - __pyx_1 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + __pyx_1 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyInt_FromLong(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} - __pyx_3 = PyNumber_Subtract(__pyx_1, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + __pyx_5 = PyInt_FromLong(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;} + __pyx_3 = PyNumber_Subtract(__pyx_1, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; - __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_1 = PySequence_GetSlice(__pyx_v_final_shape, 0, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} - __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + __pyx_1 = PySequence_GetSlice(__pyx_v_final_shape, 0, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;} + __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_1); __pyx_1 = 0; - __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; - __pyx_1 = PyObject_GetAttr(__pyx_v_mean, __pyx_n_shape); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; goto __pyx_L1;} - __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; goto __pyx_L1;} - __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_v_mean, __pyx_n_shape); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; goto __pyx_L1;} + __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; goto __pyx_L1;} + __pyx_5 = PyObject_GetItem(__pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3); PyTuple_SET_ITEM(__pyx_1, 1, __pyx_5); __pyx_3 = 0; __pyx_5 = 0; - if (PyObject_SetAttr(__pyx_v_x, __pyx_n_shape, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_v_x, __pyx_n_shape, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1143 */ - __pyx_2 = PyList_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1478 */ + __pyx_2 = PyList_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1478; goto __pyx_L1;} Py_INCREF(__pyx_n_svd); PyList_SET_ITEM(__pyx_2, 0, __pyx_n_svd); - __pyx_3 = __Pyx_Import(__pyx_k122p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; goto __pyx_L1;} + __pyx_3 = __Pyx_Import(__pyx_k168p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1478; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_5 = PyObject_GetAttr(__pyx_3, __pyx_n_svd); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; goto __pyx_L1;} + __pyx_5 = PyObject_GetAttr(__pyx_3, __pyx_n_svd); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1478; goto __pyx_L1;} Py_DECREF(__pyx_v_svd); __pyx_v_svd = __pyx_5; __pyx_5 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1145 */ - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1480 */ + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; goto __pyx_L1;} Py_INCREF(__pyx_v_cov); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_cov); - __pyx_2 = PyObject_CallObject(__pyx_v_svd, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_v_svd, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = PyObject_GetIter(__pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; goto __pyx_L1;} + __pyx_3 = PyObject_GetIter(__pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_5 = __Pyx_UnpackItem(__pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; goto __pyx_L1;} + __pyx_5 = __Pyx_UnpackItem(__pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; goto __pyx_L1;} Py_DECREF(__pyx_v_u); __pyx_v_u = __pyx_5; __pyx_5 = 0; - __pyx_1 = __Pyx_UnpackItem(__pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; goto __pyx_L1;} + __pyx_1 = __Pyx_UnpackItem(__pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; goto __pyx_L1;} Py_DECREF(__pyx_v_s); __pyx_v_s = __pyx_1; __pyx_1 = 0; - __pyx_2 = __Pyx_UnpackItem(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; goto __pyx_L1;} + __pyx_2 = __Pyx_UnpackItem(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; goto __pyx_L1;} Py_DECREF(__pyx_v_v); __pyx_v_v = __pyx_2; __pyx_2 = 0; - if (__Pyx_EndUnpack(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; goto __pyx_L1;} + if (__Pyx_EndUnpack(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1146 */ - __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_5, __pyx_n_dot); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1481 */ + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_5, __pyx_n_dot); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_sqrt); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_sqrt); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;} + __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;} Py_INCREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_s); - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; - __pyx_3 = PyNumber_Multiply(__pyx_v_x, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;} + __pyx_3 = PyNumber_Multiply(__pyx_v_x, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3); Py_INCREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_v_v); __pyx_3 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_v_x); __pyx_v_x = __pyx_2; __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1149 */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_add); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1484 */ + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_add); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;} + __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; goto __pyx_L1;} Py_INCREF(__pyx_v_mean); PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_mean); Py_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_5, 1, __pyx_v_x); Py_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_5, 2, __pyx_v_x); - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1150 */ - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_tuple); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1485 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_tuple); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; goto __pyx_L1;} + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; goto __pyx_L1;} Py_INCREF(__pyx_v_final_shape); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_final_shape); - __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; goto __pyx_L1;} + __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; - if (PyObject_SetAttr(__pyx_v_x, __pyx_n_shape, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_v_x, __pyx_n_shape, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1151 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1486 */ Py_INCREF(__pyx_v_x); __pyx_r = __pyx_v_x; goto __pyx_L0; @@ -6933,9 +8770,9 @@ static PyObject *__pyx_n_zeros; -static PyObject *__pyx_k124p; +static PyObject *__pyx_k170p; -static char (__pyx_k124[]) = "sum(pvals) > 1.0"; +static char (__pyx_k170[]) = "sum(pvals) > 1.0"; static PyObject *__pyx_f_6mtrand_11RandomState_multinomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mtrand_11RandomState_multinomial[] = "Multinomial distribution.\n \n multinomial(n, pvals, size=None) -> random values\n\n pvals is a sequence of probabilities that should sum to 1 (however, the\n last element is always assumed to account for the remaining probability\n as long as sum(pvals[:-1]) <= 1).\n "; @@ -6971,54 +8808,54 @@ __pyx_v_shape = Py_None; Py_INCREF(Py_None); __pyx_v_multin = Py_None; Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1169 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1504 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; goto __pyx_L1;} Py_INCREF(__pyx_v_pvals); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_pvals); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; goto __pyx_L1;} + __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_v_d = __pyx_4; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1170 */ - __pyx_1 = PyArray_ContiguousFromObject(__pyx_v_pvals,NPY_DOUBLE,1,1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1505 */ + __pyx_1 = PyArray_ContiguousFromObject(__pyx_v_pvals,NPY_DOUBLE,1,1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; goto __pyx_L1;} Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); Py_DECREF(((PyObject *)arrayObject_parr)); arrayObject_parr = ((PyArrayObject *)__pyx_1); Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1171 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1506 */ __pyx_v_pix = ((double (*))arrayObject_parr->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1173 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1508 */ __pyx_5 = (__pyx_f_6mtrand_kahan_sum(__pyx_v_pix,(__pyx_v_d - 1)) > 1.0); if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1174 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; goto __pyx_L1;} - Py_INCREF(__pyx_k124p); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k124p); - __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1509 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; goto __pyx_L1;} + Py_INCREF(__pyx_k170p); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k170p); + __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; __Pyx_Raise(__pyx_1, 0, 0); Py_DECREF(__pyx_1); __pyx_1 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1509; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1176 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1511 */ __pyx_5 = __pyx_v_size == Py_None; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1177 */ - __pyx_2 = PyInt_FromLong(__pyx_v_d); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1512 */ + __pyx_2 = PyInt_FromLong(__pyx_v_d); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1512; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1512; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_shape); @@ -7026,22 +8863,22 @@ __pyx_3 = 0; goto __pyx_L3; } - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1513; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1513; goto __pyx_L1;} Py_INCREF(__pyx_v_size); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_size); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1513; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1513; goto __pyx_L1;} __pyx_5 = __pyx_3 == __pyx_1; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1179 */ - __pyx_2 = PyInt_FromLong(__pyx_v_d); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; goto __pyx_L1;} - __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1514 */ + __pyx_2 = PyInt_FromLong(__pyx_v_d); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; goto __pyx_L1;} Py_INCREF(__pyx_v_size); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_size); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); @@ -7053,12 +8890,12 @@ } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1181 */ - __pyx_1 = PyInt_FromLong(__pyx_v_d); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1516 */ + __pyx_1 = PyInt_FromLong(__pyx_v_d); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1); __pyx_1 = 0; - __pyx_3 = PyNumber_Add(__pyx_v_size, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;} + __pyx_3 = PyNumber_Add(__pyx_v_size, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_shape); __pyx_v_shape = __pyx_3; @@ -7066,85 +8903,85 @@ } __pyx_L3:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1183 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_zeros); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1518 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_zeros); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;} - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; goto __pyx_L1;} + __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; goto __pyx_L1;} Py_INCREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_shape); PyTuple_SET_ITEM(__pyx_1, 1, __pyx_3); __pyx_3 = 0; - __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_v_multin); __pyx_v_multin = __pyx_3; __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1184 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1519 */ Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_multin))); Py_DECREF(((PyObject *)arrayObject_mnarr)); arrayObject_mnarr = ((PyArrayObject *)__pyx_v_multin); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1185 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1520 */ __pyx_v_mnix = ((long (*))arrayObject_mnarr->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1186 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1521 */ __pyx_v_i = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1187 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1522 */ while (1) { __pyx_5 = (__pyx_v_i < PyArray_SIZE(arrayObject_mnarr)); if (!__pyx_5) break; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1188 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1523 */ __pyx_v_Sum = 1.0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1189 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1524 */ __pyx_v_dn = __pyx_v_n; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1190 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1525 */ __pyx_4 = (__pyx_v_d - 1); for (__pyx_v_j = 0; __pyx_v_j < __pyx_4; ++__pyx_v_j) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1191 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1526 */ (__pyx_v_mnix[(__pyx_v_i + __pyx_v_j)]) = rk_binomial(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,__pyx_v_dn,((__pyx_v_pix[__pyx_v_j]) / __pyx_v_Sum)); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1192 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1527 */ __pyx_v_dn = (__pyx_v_dn - (__pyx_v_mnix[(__pyx_v_i + __pyx_v_j)])); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1193 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1528 */ __pyx_5 = (__pyx_v_dn <= 0); if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1194 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1529 */ goto __pyx_L7; goto __pyx_L8; } __pyx_L8:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1195 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1530 */ __pyx_v_Sum = (__pyx_v_Sum - (__pyx_v_pix[__pyx_v_j])); } __pyx_L7:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1196 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1531 */ __pyx_5 = (__pyx_v_dn > 0); if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1197 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1532 */ (__pyx_v_mnix[((__pyx_v_i + __pyx_v_d) - 1)]) = __pyx_v_dn; goto __pyx_L9; } __pyx_L9:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1199 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1534 */ __pyx_v_i = (__pyx_v_i + __pyx_v_d); } - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1201 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1536 */ Py_INCREF(__pyx_v_multin); __pyx_r = __pyx_v_multin; goto __pyx_L0; @@ -7202,35 +9039,35 @@ __pyx_v_shape = Py_None; Py_INCREF(Py_None); __pyx_v_diric = Py_None; Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1258 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1593 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; goto __pyx_L1;} Py_INCREF(__pyx_v_alpha); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_alpha); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; goto __pyx_L1;} + __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __pyx_v_k = __pyx_4; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1259 */ - __pyx_1 = PyArray_ContiguousFromObject(__pyx_v_alpha,NPY_DOUBLE,1,1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1259; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1594 */ + __pyx_1 = PyArray_ContiguousFromObject(__pyx_v_alpha,NPY_DOUBLE,1,1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; goto __pyx_L1;} Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1))); Py_DECREF(((PyObject *)__pyx_v_alpha_arr)); __pyx_v_alpha_arr = ((PyArrayObject *)__pyx_1); Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1260 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1595 */ __pyx_v_alpha_data = ((double (*))__pyx_v_alpha_arr->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1262 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1597 */ __pyx_5 = __pyx_v_size == Py_None; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1263 */ - __pyx_2 = PyInt_FromLong(__pyx_v_k); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1598 */ + __pyx_2 = PyInt_FromLong(__pyx_v_k); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_shape); @@ -7238,22 +9075,22 @@ __pyx_3 = 0; goto __pyx_L2; } - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; goto __pyx_L1;} Py_INCREF(__pyx_v_size); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_size); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; goto __pyx_L1;} __pyx_5 = __pyx_3 == __pyx_1; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1265 */ - __pyx_2 = PyInt_FromLong(__pyx_v_k); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; goto __pyx_L1;} - __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1600 */ + __pyx_2 = PyInt_FromLong(__pyx_v_k); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; goto __pyx_L1;} Py_INCREF(__pyx_v_size); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_size); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); @@ -7265,12 +9102,12 @@ } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1267 */ - __pyx_1 = PyInt_FromLong(__pyx_v_k); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1602 */ + __pyx_1 = PyInt_FromLong(__pyx_v_k); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1602; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1602; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1); __pyx_1 = 0; - __pyx_3 = PyNumber_Add(__pyx_v_size, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; goto __pyx_L1;} + __pyx_3 = PyNumber_Add(__pyx_v_size, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1602; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_shape); __pyx_v_shape = __pyx_3; @@ -7278,72 +9115,72 @@ } __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1269 */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_zeros); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1604 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1604; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_zeros); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1604; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_float64); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1604; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_float64); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1604; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1604; goto __pyx_L1;} Py_INCREF(__pyx_v_shape); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_shape); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_1); __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; goto __pyx_L1;} + __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1604; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_diric); __pyx_v_diric = __pyx_1; __pyx_1 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1270 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1605 */ Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_diric))); Py_DECREF(((PyObject *)__pyx_v_val_arr)); __pyx_v_val_arr = ((PyArrayObject *)__pyx_v_diric); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1271 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1606 */ __pyx_v_val_data = ((double (*))__pyx_v_val_arr->data); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1273 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1608 */ __pyx_v_i = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1274 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1609 */ __pyx_v_totsize = PyArray_SIZE(__pyx_v_val_arr); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1275 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1610 */ while (1) { __pyx_5 = (__pyx_v_i < __pyx_v_totsize); if (!__pyx_5) break; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1276 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1611 */ __pyx_v_acc = 0.0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1277 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1612 */ for (__pyx_v_j = 0; __pyx_v_j < __pyx_v_k; ++__pyx_v_j) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1278 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1613 */ (__pyx_v_val_data[(__pyx_v_i + __pyx_v_j)]) = rk_standard_gamma(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state,(__pyx_v_alpha_data[__pyx_v_j])); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1279 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1614 */ __pyx_v_acc = (__pyx_v_acc + (__pyx_v_val_data[(__pyx_v_i + __pyx_v_j)])); } - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1280 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1615 */ __pyx_v_invacc = (1 / __pyx_v_acc); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1281 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1616 */ for (__pyx_v_j = 0; __pyx_v_j < __pyx_v_k; ++__pyx_v_j) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1282 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1617 */ (__pyx_v_val_data[(__pyx_v_i + __pyx_v_j)]) = ((__pyx_v_val_data[(__pyx_v_i + __pyx_v_j)]) * __pyx_v_invacc); } - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1283 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1618 */ __pyx_v_i = (__pyx_v_i + __pyx_v_k); } - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1285 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1620 */ Py_INCREF(__pyx_v_diric); __pyx_r = __pyx_v_diric; goto __pyx_L0; @@ -7389,37 +9226,37 @@ Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_x); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1296 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1631 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; goto __pyx_L1;} Py_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_x); - __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; goto __pyx_L1;} - __pyx_2 = PyNumber_Subtract(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; goto __pyx_L1;} + __pyx_2 = PyNumber_Subtract(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; goto __pyx_L1;} + __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_i = __pyx_4; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1297 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1632 */ /*try:*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1298 */ - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; goto __pyx_L2;} - __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; goto __pyx_L2;} - __pyx_2 = PyObject_GetItem(__pyx_v_x, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; goto __pyx_L2;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1633 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; goto __pyx_L2;} + __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; goto __pyx_L2;} + __pyx_2 = PyObject_GetItem(__pyx_v_x, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; goto __pyx_L2;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; goto __pyx_L2;} + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; goto __pyx_L2;} PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; goto __pyx_L2;} + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; goto __pyx_L2;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; goto __pyx_L2;} + __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; goto __pyx_L2;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_j = __pyx_4; } @@ -7429,142 +9266,142 @@ Py_XDECREF(__pyx_1); __pyx_1 = 0; Py_XDECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1299 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1634 */ /*except:*/ { __Pyx_AddTraceback("mtrand.shuffle"); - __pyx_3 = __Pyx_GetExcValue(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; goto __pyx_L1;} + __pyx_3 = __Pyx_GetExcValue(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1300 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1635 */ __pyx_v_j = 0; goto __pyx_L3; } __pyx_L3:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1302 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1637 */ __pyx_5 = (__pyx_v_j == 0); if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1304 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1639 */ while (1) { __pyx_5 = (__pyx_v_i > 0); if (!__pyx_5) break; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1305 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1640 */ __pyx_v_j = rk_interval(__pyx_v_i,((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1306 */ - __pyx_1 = PyInt_FromLong(__pyx_v_j); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;} - __pyx_2 = PyObject_GetItem(__pyx_v_x, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1641 */ + __pyx_1 = PyInt_FromLong(__pyx_v_j); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; goto __pyx_L1;} + __pyx_2 = PyObject_GetItem(__pyx_v_x, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = PyInt_FromLong(__pyx_v_i); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;} - __pyx_1 = PyObject_GetItem(__pyx_v_x, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(__pyx_v_i); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; goto __pyx_L1;} + __pyx_1 = PyObject_GetItem(__pyx_v_x, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyInt_FromLong(__pyx_v_i); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;} - if (PyObject_SetItem(__pyx_v_x, __pyx_3, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(__pyx_v_i); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; goto __pyx_L1;} + if (PyObject_SetItem(__pyx_v_x, __pyx_3, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyInt_FromLong(__pyx_v_j); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;} - if (PyObject_SetItem(__pyx_v_x, __pyx_2, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;} + __pyx_2 = PyInt_FromLong(__pyx_v_j); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; goto __pyx_L1;} + if (PyObject_SetItem(__pyx_v_x, __pyx_2, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1307 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1642 */ __pyx_v_i = (__pyx_v_i - 1); } goto __pyx_L4; } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1310 */ - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_hasattr); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; goto __pyx_L1;} - __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; goto __pyx_L1;} - __pyx_2 = PyObject_GetItem(__pyx_v_x, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1645 */ + __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_hasattr); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;} + __pyx_2 = PyObject_GetItem(__pyx_v_x, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; goto __pyx_L1;} + __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2); Py_INCREF(__pyx_n_copy); PyTuple_SET_ITEM(__pyx_1, 1, __pyx_n_copy); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_5 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; goto __pyx_L1;} + __pyx_5 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_copy = __pyx_5; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1311 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1646 */ __pyx_5 = __pyx_v_copy; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1312 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1647 */ while (1) { __pyx_5 = (__pyx_v_i > 0); if (!__pyx_5) break; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1313 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1648 */ __pyx_v_j = rk_interval(__pyx_v_i,((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1314 */ - __pyx_3 = PyInt_FromLong(__pyx_v_j); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; goto __pyx_L1;} - __pyx_1 = PyObject_GetItem(__pyx_v_x, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1649 */ + __pyx_3 = PyInt_FromLong(__pyx_v_j); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;} + __pyx_1 = PyObject_GetItem(__pyx_v_x, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_copy); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_copy); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = PyInt_FromLong(__pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; goto __pyx_L1;} - __pyx_2 = PyObject_GetItem(__pyx_v_x, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(__pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;} + __pyx_2 = PyObject_GetItem(__pyx_v_x, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_copy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_copy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyInt_FromLong(__pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; goto __pyx_L1;} - if (PyObject_SetItem(__pyx_v_x, __pyx_1, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(__pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;} + if (PyObject_SetItem(__pyx_v_x, __pyx_1, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyInt_FromLong(__pyx_v_j); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; goto __pyx_L1;} - if (PyObject_SetItem(__pyx_v_x, __pyx_3, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(__pyx_v_j); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;} + if (PyObject_SetItem(__pyx_v_x, __pyx_3, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1315 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1650 */ __pyx_v_i = (__pyx_v_i - 1); } goto __pyx_L7; } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1317 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1652 */ while (1) { __pyx_5 = (__pyx_v_i > 0); if (!__pyx_5) break; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1318 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1653 */ __pyx_v_j = rk_interval(__pyx_v_i,((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1319 */ - __pyx_1 = PyInt_FromLong(__pyx_v_j); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;} - __pyx_2 = PyObject_GetItem(__pyx_v_x, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1654 */ + __pyx_1 = PyInt_FromLong(__pyx_v_j); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; goto __pyx_L1;} + __pyx_2 = PyObject_GetItem(__pyx_v_x, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = PySequence_GetSlice(__pyx_2, 0, 0x7fffffff); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;} + __pyx_3 = PySequence_GetSlice(__pyx_2, 0, 0x7fffffff); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = PyInt_FromLong(__pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;} - __pyx_2 = PyObject_GetItem(__pyx_v_x, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(__pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; goto __pyx_L1;} + __pyx_2 = PyObject_GetItem(__pyx_v_x, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PySequence_GetSlice(__pyx_2, 0, 0x7fffffff); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;} + __pyx_1 = PySequence_GetSlice(__pyx_2, 0, 0x7fffffff); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyInt_FromLong(__pyx_v_i); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;} - if (PyObject_SetItem(__pyx_v_x, __pyx_2, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;} + __pyx_2 = PyInt_FromLong(__pyx_v_i); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; goto __pyx_L1;} + if (PyObject_SetItem(__pyx_v_x, __pyx_2, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyInt_FromLong(__pyx_v_j); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;} - if (PyObject_SetItem(__pyx_v_x, __pyx_3, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(__pyx_v_j); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; goto __pyx_L1;} + if (PyObject_SetItem(__pyx_v_x, __pyx_3, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1320 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1655 */ __pyx_v_i = (__pyx_v_i - 1); } } @@ -7606,37 +9443,37 @@ Py_INCREF(__pyx_v_x); __pyx_v_arr = Py_None; Py_INCREF(Py_None); - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1328 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} - __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_integer); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1663 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_integer); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_4); __pyx_2 = 0; __pyx_4 = 0; - __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} + __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; goto __pyx_L1;} Py_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_x); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_3); __pyx_3 = 0; - __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; goto __pyx_L1;} + __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; if (__pyx_5) { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1329 */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_arange); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1664 */ + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_arange); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; goto __pyx_L1;} Py_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_x); - __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1664; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_arr); @@ -7646,14 +9483,14 @@ } /*else*/ { - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1331 */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; goto __pyx_L1;} - __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_array); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1666 */ + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__sp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_array); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; goto __pyx_L1;} Py_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_x); - __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_arr); @@ -7662,17 +9499,17 @@ } __pyx_L2:; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1332 */ - __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_shuffle); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1667 */ + __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_shuffle); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; goto __pyx_L1;} + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; goto __pyx_L1;} Py_INCREF(__pyx_v_arr); PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_arr); - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1333 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1668 */ Py_INCREF(__pyx_v_arr); __pyx_r = __pyx_v_arr; goto __pyx_L0; @@ -7694,7 +9531,10 @@ } static __Pyx_InternTabEntry __pyx_intern_tab[] = { + {&__pyx_n_Float64, "Float64"}, + {&__pyx_n_Int, "Int"}, {&__pyx_n_MT19937, "MT19937"}, + {&__pyx_n_PyInt_AsLong, "PyInt_AsLong"}, {&__pyx_n_ValueError, "ValueError"}, {&__pyx_n___RandomState_ctor, "__RandomState_ctor"}, {&__pyx_n__rand, "_rand"}, @@ -7716,6 +9556,7 @@ {&__pyx_n_exponential, "exponential"}, {&__pyx_n_f, "f"}, {&__pyx_n_float64, "float64"}, + {&__pyx_n_fscale, "fscale"}, {&__pyx_n_gamma, "gamma"}, {&__pyx_n_geometric, "geometric"}, {&__pyx_n_get_state, "get_state"}, @@ -7839,7 +9680,53 @@ {&__pyx_k120p, __pyx_k120, sizeof(__pyx_k120)}, {&__pyx_k121p, __pyx_k121, sizeof(__pyx_k121)}, {&__pyx_k122p, __pyx_k122, sizeof(__pyx_k122)}, + {&__pyx_k123p, __pyx_k123, sizeof(__pyx_k123)}, {&__pyx_k124p, __pyx_k124, sizeof(__pyx_k124)}, + {&__pyx_k125p, __pyx_k125, sizeof(__pyx_k125)}, + {&__pyx_k126p, __pyx_k126, sizeof(__pyx_k126)}, + {&__pyx_k127p, __pyx_k127, sizeof(__pyx_k127)}, + {&__pyx_k128p, __pyx_k128, sizeof(__pyx_k128)}, + {&__pyx_k129p, __pyx_k129, sizeof(__pyx_k129)}, + {&__pyx_k130p, __pyx_k130, sizeof(__pyx_k130)}, + {&__pyx_k131p, __pyx_k131, sizeof(__pyx_k131)}, + {&__pyx_k132p, __pyx_k132, sizeof(__pyx_k132)}, + {&__pyx_k133p, __pyx_k133, sizeof(__pyx_k133)}, + {&__pyx_k134p, __pyx_k134, sizeof(__pyx_k134)}, + {&__pyx_k135p, __pyx_k135, sizeof(__pyx_k135)}, + {&__pyx_k136p, __pyx_k136, sizeof(__pyx_k136)}, + {&__pyx_k137p, __pyx_k137, sizeof(__pyx_k137)}, + {&__pyx_k138p, __pyx_k138, sizeof(__pyx_k138)}, + {&__pyx_k139p, __pyx_k139, sizeof(__pyx_k139)}, + {&__pyx_k140p, __pyx_k140, sizeof(__pyx_k140)}, + {&__pyx_k141p, __pyx_k141, sizeof(__pyx_k141)}, + {&__pyx_k142p, __pyx_k142, sizeof(__pyx_k142)}, + {&__pyx_k143p, __pyx_k143, sizeof(__pyx_k143)}, + {&__pyx_k144p, __pyx_k144, sizeof(__pyx_k144)}, + {&__pyx_k145p, __pyx_k145, sizeof(__pyx_k145)}, + {&__pyx_k146p, __pyx_k146, sizeof(__pyx_k146)}, + {&__pyx_k147p, __pyx_k147, sizeof(__pyx_k147)}, + {&__pyx_k148p, __pyx_k148, sizeof(__pyx_k148)}, + {&__pyx_k149p, __pyx_k149, sizeof(__pyx_k149)}, + {&__pyx_k150p, __pyx_k150, sizeof(__pyx_k150)}, + {&__pyx_k151p, __pyx_k151, sizeof(__pyx_k151)}, + {&__pyx_k152p, __pyx_k152, sizeof(__pyx_k152)}, + {&__pyx_k153p, __pyx_k153, sizeof(__pyx_k153)}, + {&__pyx_k154p, __pyx_k154, sizeof(__pyx_k154)}, + {&__pyx_k155p, __pyx_k155, sizeof(__pyx_k155)}, + {&__pyx_k156p, __pyx_k156, sizeof(__pyx_k156)}, + {&__pyx_k157p, __pyx_k157, sizeof(__pyx_k157)}, + {&__pyx_k158p, __pyx_k158, sizeof(__pyx_k158)}, + {&__pyx_k159p, __pyx_k159, sizeof(__pyx_k159)}, + {&__pyx_k160p, __pyx_k160, sizeof(__pyx_k160)}, + {&__pyx_k161p, __pyx_k161, sizeof(__pyx_k161)}, + {&__pyx_k162p, __pyx_k162, sizeof(__pyx_k162)}, + {&__pyx_k163p, __pyx_k163, sizeof(__pyx_k163)}, + {&__pyx_k164p, __pyx_k164, sizeof(__pyx_k164)}, + {&__pyx_k165p, __pyx_k165, sizeof(__pyx_k165)}, + {&__pyx_k166p, __pyx_k166, sizeof(__pyx_k166)}, + {&__pyx_k167p, __pyx_k167, sizeof(__pyx_k167)}, + {&__pyx_k168p, __pyx_k168, sizeof(__pyx_k168)}, + {&__pyx_k170p, __pyx_k170, sizeof(__pyx_k170)}, {0, 0, 0} }; @@ -8077,8 +9964,8 @@ __pyx_ptype_6mtrand_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (!__pyx_ptype_6mtrand_ndarray) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; goto __pyx_L1;} __pyx_ptype_6mtrand_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject)); if (!__pyx_ptype_6mtrand_flatiter) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; goto __pyx_L1;} __pyx_ptype_6mtrand_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject)); if (!__pyx_ptype_6mtrand_broadcast) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 94; goto __pyx_L1;} - if (PyType_Ready(&__pyx_type_6mtrand_RandomState) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "RandomState", (PyObject *)&__pyx_type_6mtrand_RandomState) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;} + if (PyType_Ready(&__pyx_type_6mtrand_RandomState) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; goto __pyx_L1;} + if (PyObject_SetAttrString(__pyx_m, "RandomState", (PyObject *)&__pyx_type_6mtrand_RandomState) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; goto __pyx_L1;} __pyx_ptype_6mtrand_RandomState = &__pyx_type_6mtrand_RandomState; /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":119 */ @@ -8089,547 +9976,547 @@ if (PyObject_SetAttr(__pyx_m, __pyx_n__sp, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":476 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":488 */ Py_INCREF(Py_None); __pyx_k2 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":486 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":498 */ Py_INCREF(Py_None); __pyx_k3 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":547 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":559 */ Py_INCREF(Py_None); __pyx_k4 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":554 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":566 */ Py_INCREF(Py_None); __pyx_k5 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":561 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":573 */ Py_INCREF(Py_None); __pyx_k6 = Py_None; Py_INCREF(Py_None); __pyx_k7 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":607 */ - __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":618 */ + __pyx_1 = PyFloat_FromDouble(0.0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; goto __pyx_L1;} __pyx_k8 = __pyx_1; __pyx_1 = 0; - __pyx_2 = PyFloat_FromDouble(1.0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; goto __pyx_L1;} + __pyx_2 = PyFloat_FromDouble(1.0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; goto __pyx_L1;} __pyx_k9 = __pyx_2; __pyx_2 = 0; Py_INCREF(Py_None); __pyx_k10 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":655 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":671 */ Py_INCREF(Py_None); __pyx_k11 = Py_None; Py_INCREF(Py_None); __pyx_k12 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":668 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":684 */ Py_INCREF(Py_None); __pyx_k13 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":675 */ - __pyx_3 = PyFloat_FromDouble(0.0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":691 */ + __pyx_3 = PyFloat_FromDouble(0.0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; goto __pyx_L1;} __pyx_k14 = __pyx_3; __pyx_3 = 0; - __pyx_4 = PyFloat_FromDouble(1.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; goto __pyx_L1;} + __pyx_4 = PyFloat_FromDouble(1.0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; goto __pyx_L1;} __pyx_k15 = __pyx_4; __pyx_4 = 0; Py_INCREF(Py_None); __pyx_k16 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":688 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":714 */ Py_INCREF(Py_None); __pyx_k17 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":704 */ - __pyx_5 = PyFloat_FromDouble(1.0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":741 */ + __pyx_5 = PyFloat_FromDouble(1.0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; goto __pyx_L1;} __pyx_k18 = __pyx_5; __pyx_5 = 0; Py_INCREF(Py_None); __pyx_k19 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":715 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":762 */ Py_INCREF(Py_None); __pyx_k20 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":722 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":769 */ Py_INCREF(Py_None); __pyx_k21 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":733 */ - __pyx_6 = PyFloat_FromDouble(1.0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":789 */ + __pyx_6 = PyFloat_FromDouble(1.0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; goto __pyx_L1;} __pyx_k22 = __pyx_6; __pyx_6 = 0; Py_INCREF(Py_None); __pyx_k23 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":748 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":815 */ Py_INCREF(Py_None); __pyx_k24 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":763 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":842 */ Py_INCREF(Py_None); __pyx_k25 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":784 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":878 */ Py_INCREF(Py_None); __pyx_k26 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":795 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":899 */ Py_INCREF(Py_None); __pyx_k27 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":811 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":927 */ Py_INCREF(Py_None); __pyx_k28 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":818 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":934 */ Py_INCREF(Py_None); __pyx_k29 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":829 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":955 */ Py_INCREF(Py_None); __pyx_k30 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":843 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":979 */ Py_INCREF(Py_None); __pyx_k31 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":854 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1000 */ Py_INCREF(Py_None); __pyx_k32 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":865 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1021 */ Py_INCREF(Py_None); __pyx_k33 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":876 */ - __pyx_7 = PyFloat_FromDouble(0.0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1042 */ + __pyx_7 = PyFloat_FromDouble(0.0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; goto __pyx_L1;} __pyx_k34 = __pyx_7; __pyx_7 = 0; - __pyx_8 = PyFloat_FromDouble(1.0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; goto __pyx_L1;} + __pyx_8 = PyFloat_FromDouble(1.0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; goto __pyx_L1;} __pyx_k35 = __pyx_8; __pyx_8 = 0; Py_INCREF(Py_None); __pyx_k36 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":889 */ - __pyx_9 = PyFloat_FromDouble(0.0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1064 */ + __pyx_9 = PyFloat_FromDouble(0.0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; goto __pyx_L1;} __pyx_k37 = __pyx_9; __pyx_9 = 0; - __pyx_10 = PyFloat_FromDouble(1.0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; goto __pyx_L1;} + __pyx_10 = PyFloat_FromDouble(1.0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; goto __pyx_L1;} __pyx_k38 = __pyx_10; __pyx_10 = 0; Py_INCREF(Py_None); __pyx_k39 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":902 */ - __pyx_11 = PyFloat_FromDouble(0.0); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1086 */ + __pyx_11 = PyFloat_FromDouble(0.0); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; goto __pyx_L1;} __pyx_k40 = __pyx_11; __pyx_11 = 0; - __pyx_12 = PyFloat_FromDouble(1.0); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;} + __pyx_12 = PyFloat_FromDouble(1.0); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; goto __pyx_L1;} __pyx_k41 = __pyx_12; __pyx_12 = 0; Py_INCREF(Py_None); __pyx_k42 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":915 */ - __pyx_13 = PyFloat_FromDouble(0.0); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1108 */ + __pyx_13 = PyFloat_FromDouble(0.0); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; goto __pyx_L1;} __pyx_k43 = __pyx_13; __pyx_13 = 0; - __pyx_14 = PyFloat_FromDouble(1.0); if (!__pyx_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; goto __pyx_L1;} + __pyx_14 = PyFloat_FromDouble(1.0); if (!__pyx_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; goto __pyx_L1;} __pyx_k44 = __pyx_14; __pyx_14 = 0; Py_INCREF(Py_None); __pyx_k45 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":933 */ - __pyx_15 = PyFloat_FromDouble(1.0); if (!__pyx_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1137 */ + __pyx_15 = PyFloat_FromDouble(1.0); if (!__pyx_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; goto __pyx_L1;} __pyx_k46 = __pyx_15; __pyx_15 = 0; Py_INCREF(Py_None); __pyx_k47 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":944 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1159 */ Py_INCREF(Py_None); __pyx_k48 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":959 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1187 */ Py_INCREF(Py_None); __pyx_k49 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":982 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1224 */ Py_INCREF(Py_None); __pyx_k50 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":999 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1256 */ Py_INCREF(Py_None); __pyx_k51 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1017 */ - __pyx_16 = PyFloat_FromDouble(1.0); if (!__pyx_16) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1291 */ + __pyx_16 = PyFloat_FromDouble(1.0); if (!__pyx_16) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; goto __pyx_L1;} __pyx_k52 = __pyx_16; __pyx_16 = 0; Py_INCREF(Py_None); __pyx_k53 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1028 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1311 */ Py_INCREF(Py_None); __pyx_k54 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1039 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1332 */ Py_INCREF(Py_None); __pyx_k55 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1053 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1359 */ Py_INCREF(Py_None); __pyx_k56 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1081 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1404 */ Py_INCREF(Py_None); __pyx_k57 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1095 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1430 */ Py_INCREF(Py_None); __pyx_k58 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1153 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1488 */ Py_INCREF(Py_None); __pyx_k59 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1203 */ + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1538 */ Py_INCREF(Py_None); __pyx_k60 = Py_None; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1335 */ - __pyx_17 = PyObject_CallObject(((PyObject*)__pyx_ptype_6mtrand_RandomState), 0); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;} - if (PyObject_SetAttr(__pyx_m, __pyx_n__rand, __pyx_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1670 */ + __pyx_17 = PyObject_CallObject(((PyObject*)__pyx_ptype_6mtrand_RandomState), 0); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n__rand, __pyx_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1336 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_seed); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1671 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_seed); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_seed, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_seed, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1337 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_get_state); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1672 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_get_state); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_get_state, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_get_state, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1338 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_set_state); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1673 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_set_state); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_set_state, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_set_state, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1673; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1339 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_random_sample); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1674 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_random_sample); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_random_sample, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_random_sample, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1340 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_randint); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1675 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_randint); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_randint, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_randint, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1341 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_bytes); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1676 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_bytes); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_bytes, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_bytes, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1342 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_uniform); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1677 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_uniform); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_uniform, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_uniform, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1343 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_rand); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1678 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_rand); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_rand, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_rand, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1344 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_randn); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1679 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_randn); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_randn, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_randn, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1345 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_random_integers); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1680 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_random_integers); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_random_integers, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_random_integers, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1346 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_standard_normal); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1681 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_standard_normal); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_standard_normal, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_standard_normal, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1347 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_normal); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1682 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_normal); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_normal, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_normal, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1348 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_beta); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1683 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_beta); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_beta, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_beta, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1349 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_exponential); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1684 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_exponential); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_exponential, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_exponential, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1350 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_standard_exponential); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1685 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_standard_exponential); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_standard_exponential, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_standard_exponential, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1351 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_standard_gamma); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1686 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_standard_gamma); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_standard_gamma, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_standard_gamma, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1352 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_gamma); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1687 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_gamma); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_gamma, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_gamma, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1687; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1353 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_f); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1688 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_f); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_f, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_f, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1354 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_noncentral_f); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1689 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_noncentral_f); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_noncentral_f, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_noncentral_f, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1355 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_chisquare); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1690 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1690; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_chisquare); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1690; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_chisquare, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_chisquare, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1690; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1356 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_noncentral_chisquare); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1691 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_noncentral_chisquare); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_noncentral_chisquare, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_noncentral_chisquare, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1357 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_standard_cauchy); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1692 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_standard_cauchy); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_standard_cauchy, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_standard_cauchy, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1358 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_standard_t); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1693 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_standard_t); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_standard_t, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_standard_t, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1359 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_vonmises); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1694 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_vonmises); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_vonmises, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_vonmises, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1360 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_pareto); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1695 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_pareto); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_pareto, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_pareto, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1361 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_weibull); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1696 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_weibull); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_weibull, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_weibull, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1362 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_power); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1697 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_power); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_power, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_power, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1363 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_laplace); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1698 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_laplace); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_laplace, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_laplace, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1364 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_gumbel); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1699 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_gumbel); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_gumbel, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_gumbel, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1365 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_logistic); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1700 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_logistic); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_logistic, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_logistic, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1366 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_lognormal); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1701 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_lognormal); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_lognormal, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_lognormal, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1367 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_rayleigh); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1702 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_rayleigh); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_rayleigh, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_rayleigh, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1368 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_wald); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1703 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_wald); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_wald, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_wald, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1369 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_triangular); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1704 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_triangular); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_triangular, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_triangular, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1371 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_binomial); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1706 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_binomial); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_binomial, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_binomial, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1372 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_negative_binomial); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1707 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_negative_binomial); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_negative_binomial, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_negative_binomial, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1373 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_poisson); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1708 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_poisson); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_poisson, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_poisson, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1708; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1374 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_zipf); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1709 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_zipf); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_zipf, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_zipf, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1375 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_geometric); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1710 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_geometric); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_geometric, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_geometric, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1376 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_hypergeometric); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1711 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_hypergeometric); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_hypergeometric, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_hypergeometric, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1377 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_logseries); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1712 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_logseries); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_logseries, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_logseries, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1379 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_multivariate_normal); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1714 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_multivariate_normal); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_multivariate_normal, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_multivariate_normal, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1380 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_multinomial); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1715 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_multinomial); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_multinomial, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_multinomial, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1381 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_dirichlet); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1716 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_dirichlet); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_dirichlet, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_dirichlet, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1383 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_shuffle); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1718 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1718; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_shuffle); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1718; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_shuffle, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_shuffle, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1718; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; - /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1384 */ - __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1384; goto __pyx_L1;} - __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_permutation); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1384; goto __pyx_L1;} + /* "/home/oliphant/numpy/numpy/random/mtrand/mtrand.pyx":1719 */ + __pyx_17 = __Pyx_GetName(__pyx_m, __pyx_n__rand); if (!__pyx_17) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;} + __pyx_18 = PyObject_GetAttr(__pyx_17, __pyx_n_permutation); if (!__pyx_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;} Py_DECREF(__pyx_17); __pyx_17 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_permutation, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1384; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_permutation, __pyx_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;} Py_DECREF(__pyx_18); __pyx_18 = 0; return; __pyx_L1:; Modified: trunk/numpy/random/mtrand/mtrand.pyx =================================================================== --- trunk/numpy/random/mtrand/mtrand.pyx 2007-03-16 12:53:05 UTC (rev 3581) +++ trunk/numpy/random/mtrand/mtrand.pyx 2007-03-19 17:19:39 UTC (rev 3582) @@ -136,6 +136,23 @@ array_data[i] = func(state) return array + +cdef object cont1_array_sc(rk_state *state, rk_cont1 func, object size, double a): + cdef double *array_data + cdef ndarray array "arrayObject" + cdef long length + cdef long i + + if size is None: + return func(state, a) + else: + array = _sp.empty(size, _sp.Float64) + length = PyArray_SIZE(array) + array_data = array.data + for i from 0 <= i < length: + array_data[i] = func(state, a) + return array + cdef object cont1_array(rk_state *state, rk_cont1 func, object size, ndarray oa): cdef double *array_data cdef double *oa_data @@ -144,42 +161,46 @@ cdef npy_intp i cdef flatiter itera cdef broadcast multi - cdef int scalar - scalar = 0 - if oa.nd == 0: - oa_data = oa.data - scalar = 1 - if size is None: - if scalar: - return func(state, oa_data[0]) - else: - array = PyArray_SimpleNew(oa.nd, oa.dimensions, NPY_DOUBLE) - length = PyArray_SIZE(array) - array_data = array.data - itera = PyArray_IterNew(oa) - for i from 0 <= i < length: - array_data[i] = func(state, ((itera.dataptr))[0]) - PyArray_ITER_NEXT(itera) + array = PyArray_SimpleNew(oa.nd, oa.dimensions, NPY_DOUBLE) + length = PyArray_SIZE(array) + array_data = array.data + itera = PyArray_IterNew(oa) + for i from 0 <= i < length: + array_data[i] = func(state, ((itera.dataptr))[0]) + PyArray_ITER_NEXT(itera) else: array = _sp.empty(size, _sp.float64) array_data = array.data - if scalar: - length = PyArray_SIZE(array) - for i from 0 <= i < length: - array_data[i] = func(state, oa_data[0]) - else: - multi = PyArray_MultiIterNew(2, array, - oa) - if (multi.size != PyArray_SIZE(array)): - raise ValueError("size is not compatible with inputs") - for i from 0 <= i < multi.size: - oa_data = PyArray_MultiIter_DATA(multi, 1) - array_data[i] = func(state, oa_data[0]) - PyArray_MultiIter_NEXTi(multi, 1) + multi = PyArray_MultiIterNew(2, array, + oa) + if (multi.size != PyArray_SIZE(array)): + raise ValueError("size is not compatible with inputs") + for i from 0 <= i < multi.size: + oa_data = PyArray_MultiIter_DATA(multi, 1) + array_data[i] = func(state, oa_data[0]) + PyArray_MultiIter_NEXTi(multi, 1) return array +cdef object cont2_array_sc(rk_state *state, rk_cont2 func, object size, double a, + double b): + cdef double *array_data + cdef ndarray array "arrayObject" + cdef long length + cdef long i + + if size is None: + return func(state, a, b) + else: + array = _sp.empty(size, _sp.float64) + length = PyArray_SIZE(array) + array_data = array.data + for i from 0 <= i < length: + array_data[i] = func(state, a, b) + return array + + cdef object cont2_array(rk_state *state, rk_cont2 func, object size, ndarray oa, ndarray ob): cdef double *array_data @@ -189,45 +210,48 @@ cdef npy_intp length cdef npy_intp i cdef broadcast multi - cdef int scalar - - scalar = 0 - if oa.nd == 0 and ob.nd == 0: - oa_data = oa.data - ob_data = ob.data - scalar = 1 if size is None: - if scalar: - return func(state, oa_data[0], ob_data[0]) - else: - multi = PyArray_MultiIterNew(2, oa, ob) - array = PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_DOUBLE) - array_data = array.data - for i from 0 <= i < multi.size: - oa_data = PyArray_MultiIter_DATA(multi, 0) - ob_data = PyArray_MultiIter_DATA(multi, 1) - array_data[i] = func(state, oa_data[0], ob_data[0]) - PyArray_MultiIter_NEXT(multi) + multi = PyArray_MultiIterNew(2, oa, ob) + array = PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_DOUBLE) + array_data = array.data + for i from 0 <= i < multi.size: + oa_data = PyArray_MultiIter_DATA(multi, 0) + ob_data = PyArray_MultiIter_DATA(multi, 1) + array_data[i] = func(state, oa_data[0], ob_data[0]) + PyArray_MultiIter_NEXT(multi) else: array = _sp.empty(size, _sp.float64) array_data = array.data - if scalar: - length = PyArray_SIZE(array) - for i from 0 <= i < length: - array_data[i] = func(state, oa_data[0], ob_data[0]) - else: - multi = PyArray_MultiIterNew(3, array, oa, ob) - if (multi.size != PyArray_SIZE(array)): - raise ValueError("size is not compatible with inputs") - for i from 0 <= i < multi.size: - oa_data = PyArray_MultiIter_DATA(multi, 1) - ob_data = PyArray_MultiIter_DATA(multi, 2) - array_data[i] = func(state, oa_data[0], ob_data[0]) - PyArray_MultiIter_NEXTi(multi, 1) - PyArray_MultiIter_NEXTi(multi, 2) + multi = PyArray_MultiIterNew(3, array, oa, ob) + if (multi.size != PyArray_SIZE(array)): + raise ValueError("size is not compatible with inputs") + for i from 0 <= i < multi.size: + oa_data = PyArray_MultiIter_DATA(multi, 1) + ob_data = PyArray_MultiIter_DATA(multi, 2) + array_data[i] = func(state, oa_data[0], ob_data[0]) + PyArray_MultiIter_NEXTi(multi, 1) + PyArray_MultiIter_NEXTi(multi, 2) return array +cdef object cont3_array_sc(rk_state *state, rk_cont3 func, object size, double a, + double b, double c): + + cdef double *array_data + cdef ndarray array "arrayObject" + cdef long length + cdef long i + + if size is None: + return func(state, a, b, c) + else: + array = _sp.empty(size, _sp.Float64) + length = PyArray_SIZE(array) + array_data = array.data + for i from 0 <= i < length: + array_data[i] = func(state, a, b, c) + return array + cdef object cont3_array(rk_state *state, rk_cont3 func, object size, ndarray oa, ndarray ob, ndarray oc): @@ -239,46 +263,30 @@ cdef npy_intp length cdef npy_intp i cdef broadcast multi - cdef int scalar - - scalar = 0 - if (oa.nd ==0 and ob.nd==0 and oc.nd == 0): - oa_data = oa.data - ob_data = ob.data - oc_data = oc.data - scalar = 1 if size is None: - if scalar: - return func(state, oa_data[0], ob_data[0], oc_data[0]) - else: - multi = PyArray_MultiIterNew(3, oa, ob, oc) - array = PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_DOUBLE) - array_data = array.data - for i from 0 <= i < multi.size: - oa_data = PyArray_MultiIter_DATA(multi, 0) - ob_data = PyArray_MultiIter_DATA(multi, 1) - oc_data = PyArray_MultiIter_DATA(multi, 2) - array_data[i] = func(state, oa_data[0], ob_data[0], oc_data[0]) - PyArray_MultiIter_NEXT(multi) + multi = PyArray_MultiIterNew(3, oa, ob, oc) + array = PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_DOUBLE) + array_data = array.data + for i from 0 <= i < multi.size: + oa_data = PyArray_MultiIter_DATA(multi, 0) + ob_data = PyArray_MultiIter_DATA(multi, 1) + oc_data = PyArray_MultiIter_DATA(multi, 2) + array_data[i] = func(state, oa_data[0], ob_data[0], oc_data[0]) + PyArray_MultiIter_NEXT(multi) else: array = _sp.empty(size, _sp.float64) array_data = array.data - if scalar: - length = PyArray_SIZE(array) - for i from 0 <= i < length: - array_data[i] = func(state, oa_data[0], ob_data[0], oc_data[0]) - else: - multi = PyArray_MultiIterNew(4, array, oa, - ob, oc) - if (multi.size != PyArray_SIZE(array)): - raise ValueError("size is not compatible with inputs") - for i from 0 <= i < multi.size: - oa_data = PyArray_MultiIter_DATA(multi, 1) - ob_data = PyArray_MultiIter_DATA(multi, 2) - oc_data = PyArray_MultiIter_DATA(multi, 3) - array_data[i] = func(state, oa_data[0], ob_data[0], oc_data[0]) - PyArray_MultiIter_NEXT(multi) + multi = PyArray_MultiIterNew(4, array, oa, + ob, oc) + if (multi.size != PyArray_SIZE(array)): + raise ValueError("size is not compatible with inputs") + for i from 0 <= i < multi.size: + oa_data = PyArray_MultiIter_DATA(multi, 1) + ob_data = PyArray_MultiIter_DATA(multi, 2) + oc_data = PyArray_MultiIter_DATA(multi, 3) + array_data[i] = func(state, oa_data[0], ob_data[0], oc_data[0]) + PyArray_MultiIter_NEXT(multi) return array cdef object disc0_array(rk_state *state, rk_disc0 func, object size): @@ -297,6 +305,22 @@ array_data[i] = func(state) return array +cdef object discnp_array_sc(rk_state *state, rk_discnp func, object size, long n, double p): + cdef long *array_data + cdef ndarray array "arrayObject" + cdef long length + cdef long i + + if size is None: + return func(state, n, p) + else: + array = _sp.empty(size, _sp.Int) + length = PyArray_SIZE(array) + array_data = array.data + for i from 0 <= i < length: + array_data[i] = func(state, n, p) + return array + cdef object discnp_array(rk_state *state, rk_discnp func, object size, ndarray on, ndarray op): cdef long *array_data cdef ndarray array "arrayObject" @@ -304,47 +328,49 @@ cdef npy_intp i cdef double *op_data cdef long *on_data - cdef int scalar cdef broadcast multi - - scalar = 0 - if (on.nd == 0 and op.nd == 0): - on_data = on.data - op_data = op.data - scalar = 1 if size is None: - if (scalar): - return func(state, on_data[0], op_data[0]) - else: - multi = PyArray_MultiIterNew(2, on, op) - array = PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_LONG) - array_data = array.data - for i from 0 <= i < multi.size: - on_data = PyArray_MultiIter_DATA(multi, 0) - op_data = PyArray_MultiIter_DATA(multi, 1) - array_data[i] = func(state, on_data[0], op_data[0]) - PyArray_MultiIter_NEXT(multi) + multi = PyArray_MultiIterNew(2, on, op) + array = PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_LONG) + array_data = array.data + for i from 0 <= i < multi.size: + on_data = PyArray_MultiIter_DATA(multi, 0) + op_data = PyArray_MultiIter_DATA(multi, 1) + array_data[i] = func(state, on_data[0], op_data[0]) + PyArray_MultiIter_NEXT(multi) else: - array = _sp.empty(size, int) - if (scalar): - length = PyArray_SIZE(array) - array_data = array.data - for i from 0 <= i < length: - array_data[i] = func(state, on_data[0], op_data[0]) - else: - multi = PyArray_MultiIterNew(3, array, on, op) - if (multi.size != PyArray_SIZE(array)): - raise ValueError("size is not compatible with inputs") - for i from 0 <= i < multi.size: - on_data = PyArray_MultiIter_DATA(multi, 1) - op_data = PyArray_MultiIter_DATA(multi, 2) - array_data[i] = func(state, on_data[0], op_data[0]) - PyArray_MultiIter_NEXTi(multi, 1) - PyArray_MultiIter_NEXTi(multi, 2) + array = _sp.empty(size, int) + array_data = array.data + multi = PyArray_MultiIterNew(3, array, on, op) + if (multi.size != PyArray_SIZE(array)): + raise ValueError("size is not compatible with inputs") + for i from 0 <= i < multi.size: + on_data = PyArray_MultiIter_DATA(multi, 1) + op_data = PyArray_MultiIter_DATA(multi, 2) + array_data[i] = func(state, on_data[0], op_data[0]) + PyArray_MultiIter_NEXTi(multi, 1) + PyArray_MultiIter_NEXTi(multi, 2) return array +cdef object discnmN_array_sc(rk_state *state, rk_discnmN func, object size, + long n, long m, long N): + cdef long *array_data + cdef ndarray array "arrayObject" + cdef long length + cdef long i + + if size is None: + return func(state, n, m, N) + else: + array = _sp.empty(size, _sp.Int) + length = PyArray_SIZE(array) + array_data = array.data + for i from 0 <= i < length: + array_data[i] = func(state, n, m, N) + return array + cdef object discnmN_array(rk_state *state, rk_discnmN func, object size, ndarray on, ndarray om, ndarray oN): cdef long *array_data @@ -355,49 +381,49 @@ cdef npy_intp length cdef npy_intp i cdef broadcast multi - cdef int scalar - scalar = 0 - if (on.nd == 0 and om.nd == 0 and oN.nd==0): - scalar = 1 - on_data = on.data - om_data = om.data - oN_data = oN.data - if size is None: - if (scalar): - return func(state, on_data[0], om_data[0], oN_data[0]) - else: - multi = PyArray_MultiIterNew(3, on, om, oN) - array = PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_LONG) - array_data = array.data - for i from 0 <= i < multi.size: - on_data = PyArray_MultiIter_DATA(multi, 0) - om_data = PyArray_MultiIter_DATA(multi, 1) - oN_data = PyArray_MultiIter_DATA(multi, 2) - array_data[i] = func(state, on_data[0], om_data[0], oN_data[0]) - PyArray_MultiIter_NEXT(multi) + multi = PyArray_MultiIterNew(3, on, om, oN) + array = PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_LONG) + array_data = array.data + for i from 0 <= i < multi.size: + on_data = PyArray_MultiIter_DATA(multi, 0) + om_data = PyArray_MultiIter_DATA(multi, 1) + oN_data = PyArray_MultiIter_DATA(multi, 2) + array_data[i] = func(state, on_data[0], om_data[0], oN_data[0]) + PyArray_MultiIter_NEXT(multi) else: array = _sp.empty(size, int) array_data = array.data - if (scalar): - length = PyArray_SIZE(array) - for i from 0 <= i < length: - array_data[i] = func(state, on_data[0], om_data[0], oN_data[0]) - else: - multi = PyArray_MultiIterNew(4, array, on, om, - oN) - if (multi.size != PyArray_SIZE(array)): - raise ValueError("size is not compatible with inputs") - for i from 0 <= i < multi.size: - on_data = PyArray_MultiIter_DATA(multi, 1) - om_data = PyArray_MultiIter_DATA(multi, 2) - oN_data = PyArray_MultiIter_DATA(multi, 3) - array_data[i] = func(state, on_data[0], om_data[0], oN_data[0]) - PyArray_MultiIter_NEXT(multi) + multi = PyArray_MultiIterNew(4, array, on, om, + oN) + if (multi.size != PyArray_SIZE(array)): + raise ValueError("size is not compatible with inputs") + for i from 0 <= i < multi.size: + on_data = PyArray_MultiIter_DATA(multi, 1) + om_data = PyArray_MultiIter_DATA(multi, 2) + oN_data = PyArray_MultiIter_DATA(multi, 3) + array_data[i] = func(state, on_data[0], om_data[0], oN_data[0]) + PyArray_MultiIter_NEXT(multi) return array +cdef object discd_array_sc(rk_state *state, rk_discd func, object size, double a): + cdef long *array_data + cdef ndarray array "arrayObject" + cdef long length + cdef long i + + if size is None: + return func(state, a) + else: + array = _sp.empty(size, _sp.Int) + length = PyArray_SIZE(array) + array_data = array.data + for i from 0 <= i < length: + array_data[i] = func(state, a) + return array + cdef object discd_array(rk_state *state, rk_discd func, object size, ndarray oa): cdef long *array_data cdef double *oa_data @@ -406,39 +432,25 @@ cdef npy_intp i cdef broadcast multi cdef flatiter itera - cdef int scalar - scalar = 0 - if (oa.nd == 0): - oa_data = oa.data - scalar =1 - if size is None: - if (scalar): - return func(state, oa_data[0]) - else: - array = PyArray_SimpleNew(oa.nd, oa.dimensions, NPY_LONG) - length = PyArray_SIZE(array) - array_data = array.data - itera = PyArray_IterNew(oa) - for i from 0 <= i < length: - array_data[i] = func(state, ((itera.dataptr))[0]) - PyArray_ITER_NEXT(itera) + array = PyArray_SimpleNew(oa.nd, oa.dimensions, NPY_LONG) + length = PyArray_SIZE(array) + array_data = array.data + itera = PyArray_IterNew(oa) + for i from 0 <= i < length: + array_data[i] = func(state, ((itera.dataptr))[0]) + PyArray_ITER_NEXT(itera) else: array = _sp.empty(size, int) array_data = array.data - if (scalar): - length = PyArray_SIZE(array) - for i from 0 <= i < length: - array_data[i] = func(state, oa_data[0]) - else: - multi = PyArray_MultiIterNew(2, array, oa) - if (multi.size != PyArray_SIZE(array)): - raise ValueError("size is not compatible with inputs") - for i from 0 <= i < multi.size: - oa_data = PyArray_MultiIter_DATA(multi, 1) - array_data[i] = func(state, oa_data[0]) - PyArray_MultiIter_NEXTi(multi, 1) + multi = PyArray_MultiIterNew(2, array, oa) + if (multi.size != PyArray_SIZE(array)): + raise ValueError("size is not compatible with inputs") + for i from 0 <= i < multi.size: + oa_data = PyArray_MultiIter_DATA(multi, 1) + array_data[i] = func(state, oa_data[0]) + PyArray_MultiIter_NEXTi(multi, 1) return array cdef double kahan_sum(double *darr, long n): @@ -598,10 +610,9 @@ bytes(length) -> str """ cdef void *bytes - bytes = PyMem_Malloc(length) + bytestring = PyString_FromStringAndSize(NULL, length) + bytes = PyString_AS_STRING(bytestring) rk_fill(bytes, length, self.internal_state) - bytestring = PyString_FromStringAndSize(bytes, length) - PyMem_Free(bytes) return bytestring def uniform(self, low=0.0, high=1.0, size=None): @@ -609,10 +620,15 @@ uniform(low=0.0, high=1.0, size=None) -> random values """ - cdef ndarray olow - cdef ndarray ohigh - cdef ndarray odiff + cdef ndarray olow, ohigh, odiff + cdef double flow, fhigh cdef object temp + + flow = PyFloat_AsDouble(low) + fhigh = PyFloat_AsDouble(high) + if not PyErr_Occurred(): + return cont2_array_sc(self.internal_state, rk_uniform, size, flow, fhigh-flow) + PyErr_Clear() olow = PyArray_FROM_OTF(low, NPY_DOUBLE, NPY_ALIGNED) ohigh = PyArray_FROM_OTF(high, NPY_DOUBLE, NPY_ALIGNED) temp = _sp.subtract(ohigh, olow) @@ -677,8 +693,18 @@ normal(loc=0.0, scale=1.0, size=None) -> random values """ - cdef ndarray oloc - cdef ndarray oscale + cdef ndarray oloc, oscale + cdef double floc, fscale + + floc = PyFloat_AsDouble(loc) + fscale = PyFloat_AsDouble(scale) + if not PyErr_Occurred(): + if fscale <= 0: + raise ValueError("scale <= 0") + return cont2_array_sc(self.internal_state, rk_normal, size, floc, fscale) + + PyErr_Clear() + oloc = PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ALIGNED) oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(oscale, 0)): @@ -690,11 +716,22 @@ beta(a, b, size=None) -> random values """ - cdef ndarray oa - cdef ndarray ob + cdef ndarray oa, ob + cdef double fa, fb + + fa = PyFloat_AsDouble(a) + fb = PyFloat_AsDouble(b) + if not PyErr_Occurred(): + if fa <= 0: + raise ValueError("a <= 0") + if fb <= 0: + raise ValueError("b <= 0") + return cont2_array_sc(self.internal_state, rk_beta, size, fa, fb) + + PyErr_Clear() + oa = PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ALIGNED) ob = PyArray_FROM_OTF(b, NPY_DOUBLE, NPY_ALIGNED) - if _sp.any(_sp.less_equal(oa, 0)): raise ValueError("a <= 0") if _sp.any(_sp.less_equal(ob, 0)): @@ -707,6 +744,16 @@ exponential(scale=1.0, size=None) -> random values """ cdef ndarray oscale + cdef double fscale + + fscale = PyFloat_AsDouble(scale) + if not PyErr_Occurred(): + if fscale <= 0: + raise ValueError("scale <= 0") + return cont1_array_sc(self.internal_state, rk_exponential, size, fscale) + + PyErr_Clear() + oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(oscale, 0.0)): raise ValueError("scale <= 0") @@ -725,6 +772,15 @@ standard_gamma(shape, size=None) -> random values """ cdef ndarray oshape + cdef double fshape + + fshape = PyFloat_AsDouble(shape) + if not PyErr_Occurred(): + if fscale <= 0: + raise ValueError("shape <= 0") + return cont1_array_sc(self.internal_state, rk_standard_gamma, size, fshape) + + PyErr_Clear() oshape = PyArray_FROM_OTF(shape, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(oshape, 0.0)): raise ValueError("shape <= 0") @@ -735,8 +791,19 @@ gamma(shape, scale=1.0, size=None) -> random values """ - cdef ndarray oshape - cdef ndarray oscale + cdef ndarray oshape, oscale + cdef double fshape, fscale + + fshape = PyFloat_AsDouble(shape) + fscale = PyFloat_AsDouble(scale) + if not PyErr_Occurred(): + if fshape <= 0: + raise ValueError("shape <= 0") + if fscale <= 0: + raise ValueError("scale <= 0") + return cont2_array_sc(self.internal_state, rk_gamma, size, fshape, fscale) + + PyErr_Clear() oshape = PyArray_FROM_OTF(shape, NPY_DOUBLE, NPY_ALIGNED) oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(oshape, 0.0)): @@ -750,8 +817,20 @@ f(dfnum, dfden, size=None) -> random values """ - cdef ndarray odfnum - cdef ndarray odfden + cdef ndarray odfnum, odfden + cdef double fdfnum, fdfden + + fdfnum = PyFloat_AsDouble(dfnum) + fdfden = PyFloat_AsDouble(dfden) + if not PyErr_Occurred(): + if fdfnum <= 0: + raise ValueError("shape <= 0") + if fdfden <= 0: + raise ValueError("scale <= 0") + return cont2_array_sc(self.internal_state, rk_f, size, fdfnum, fdfden) + + PyErr_Clear() + odfnum = PyArray_FROM_OTF(dfnum, NPY_DOUBLE, NPY_ALIGNED) odfden = PyArray_FROM_OTF(dfden, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(odfnum, 0.0)): @@ -764,10 +843,25 @@ """Noncentral F distribution. noncentral_f(dfnum, dfden, nonc, size=None) -> random values - """ - cdef ndarray odfnum - cdef ndarray odfden - cdef ndarray ononc + """ + cdef ndarray odfnum, odfden, ononc + cdef double fdfnum, fdfden, fnonc + + fdfnum = PyFloat_AsDouble(dfnum) + fdfden = PyFloat_AsDouble(dfden) + fnonc = PyFloat_AsDouble(nonc) + if not PyErr_Occurred(): + if fdfnum <= 1: + raise ValueError("dfnum <= 1") + if fdfden <= 0: + raise ValueError("dfden <= 0") + if fnonc < 0: + raise ValueError("nonc < 0") + return cont3_array_sc(self.internal_state, rk_noncentral_f, size, + fdfnum, fdfden, fnonc) + + PyErr_Clear() + odfnum = PyArray_FROM_OTF(dfnum, NPY_DOUBLE, NPY_ALIGNED) odfden = PyArray_FROM_OTF(dfden, NPY_DOUBLE, NPY_ALIGNED) ononc = PyArray_FROM_OTF(nonc, NPY_DOUBLE, NPY_ALIGNED) @@ -787,6 +881,16 @@ chisquare(df, size=None) -> random values """ cdef ndarray odf + cdef double fdf + + fdf = PyFloat_AsDouble(df) + if not PyErr_Occurred(): + if fdf <= 0: + raise ValueError("df <= 0") + return cont1_array(self.internal_state, rk_chisquare, size, fdf) + + PyErr_Clear() + odf = PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(odf, 0.0)): raise ValueError("df <= 0") @@ -797,8 +901,20 @@ noncentral_chisquare(df, nonc, size=None) -> random values """ - cdef ndarray odf - cdef ndarray ononc + cdef ndarray odf, ononc + cdef double fdf, fnonc + fdf = PyFloat_AsDouble(df) + fnonc = PyFloat_AsDouble(nonc) + if not PyErr_Occurred(): + if fdf <= 1: + raise ValueError("df <= 0") + if fnonc <= 0: + raise ValueError("nonc <= 0") + return cont2_array_sc(self.internal_state, rk_noncentral_chisquare, + size, fdf, fnonc) + + PyErr_Clear() + odf = PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ALIGNED) ononc = PyArray_FROM_OTF(nonc, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(odf, 0.0)): @@ -821,6 +937,16 @@ standard_t(df, size=None) """ cdef ndarray odf + cdef double fdf + + fdf = PyFloat_AsDouble(df) + if not PyErr_Occurred(): + if fdf <= 0: + raise ValueError("df <= 0") + return cont1_array_sc(self.internal_state, rk_standard_t, size, fdf) + + PyErr_Clear() + odf = PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(odf, 0.0)): raise ValueError("df <= 0") @@ -832,11 +958,21 @@ vonmises(mu, kappa, size=None) """ - cdef ndarray omu - cdef ndarray okappa + cdef ndarray omu, okappa + cdef double fmu, fkappa + + fmu = PyFloat_AsDouble(mu) + fkappa = PyFloat_AsDouble(kappa) + if not PyErr_Occurred(): + if fkappa < 0: + raise ValueError("kappa < 0") + return cont2_array_sc(self.internal_state, rk_vonmises, size, fmu, fkappa) + + PyErr_Clear() + omu = PyArray_FROM_OTF(mu, NPY_DOUBLE, NPY_ALIGNED) okappa = PyArray_FROM_OTF(kappa, NPY_DOUBLE, NPY_ALIGNED) - if _sp.any(_sp.less_equal(okappa, 0.0)): + if _sp.any(_sp.less(okappa, 0.0)): raise ValueError("kappa < 0") return cont2_array(self.internal_state, rk_vonmises, size, omu, okappa) @@ -846,28 +982,58 @@ pareto(a, size=None) """ cdef ndarray oa + cdef double fa + + fa = PyFloat_AsDouble(a) + if not PyErr_Occurred(): + if fa <= 0: + raise ValueError("a <= 0") + return cont1_array_sc(self.internal_state, rk_pareto, size, fa) + + PyErr_Clear() + oa = PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(oa, 0.0)): raise ValueError("a <= 0") return cont1_array(self.internal_state, rk_pareto, size, oa) - def weibull(self, double a, size=None): + def weibull(self, a, size=None): """Weibull distribution. weibull(a, size=None) """ cdef ndarray oa + cdef double fa + + fa = PyFloat_AsDouble(a) + if not PyErr_Occurred(): + if fa <= 0: + raise ValueError("a <= 0") + return cont1_array_sc(self.internal_state, rk_weibull, size, fa) + + PyErr_Clear() + oa = PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(oa, 0.0)): raise ValueError("a <= 0") return cont1_array(self.internal_state, rk_weibull, size, oa) - def power(self, double a, size=None): + def power(self, a, size=None): """Power distribution. power(a, size=None) """ cdef ndarray oa + cdef double fa + + fa = PyFloat_AsDouble(a) + if not PyErr_Occurred(): + if fa <= 0: + raise ValueError("a <= 0") + return cont1_array_sc(self.internal_state, rk_power, size, fa) + + PyErr_Clear() + oa = PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(oa, 0.0)): raise ValueError("a <= 0") @@ -878,8 +1044,17 @@ laplace(loc=0.0, scale=1.0, size=None) """ - cdef ndarray oloc - cdef ndarray oscale + cdef ndarray oloc, oscale + cdef double floc, fscale + + floc = PyFloat_AsDouble(loc) + fscale = PyFloat_AsDouble(scale) + if not PyErr_Occurred(): + if fscale <= 0: + raise ValueError("scale <= 0") + return cont2_array_sc(self.internal_state, rk_laplace, size, floc, fscale) + + PyErr_Clear() oloc = PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ALIGNED) oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(oscale, 0.0)): @@ -891,8 +1066,17 @@ gumbel(loc=0.0, scale=1.0, size=None) """ - cdef ndarray oloc - cdef ndarray oscale + cdef ndarray oloc, oscale + cdef double floc, fscale + + floc = PyFloat_AsDouble(loc) + fscale = PyFloat_AsDouble(scale) + if not PyErr_Occurred(): + if fscale <= 0: + raise ValueError("scale <= 0") + return cont2_array_sc(self.internal_state, rk_gumbel, size, floc, fscale) + + PyErr_Clear() oloc = PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ALIGNED) oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(oscale, 0.0)): @@ -904,8 +1088,17 @@ logistic(loc=0.0, scale=1.0, size=None) """ - cdef ndarray oloc - cdef ndarray oscale + cdef ndarray oloc, oscale + cdef double floc, fscale + + floc = PyFloat_AsDouble(loc) + fscale = PyFloat_AsDouble(scale) + if not PyErr_Occurred(): + if fscale <= 0: + raise ValueError("scale <= 0") + return cont2_array_sc(self.internal_state, rk_logistic, size, floc, fscale) + + PyErr_Clear() oloc = PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ALIGNED) oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(oscale, 0.0)): @@ -922,8 +1115,19 @@ lognormal(mean=0.0, sigma=1.0, size=None) """ - cdef ndarray omean - cdef ndarray osigma + cdef ndarray omean, osigma + cdef double fmean, fsigma + + fmean = PyFloat_AsDouble(mean) + fsigma = PyFloat_AsDouble(sigma) + + if not PyErr_Occurred(): + if fsigma <= 0: + raise ValueError("sigma <= 0") + return cont2_array_sc(self.internal_state, rk_lognormal, size, fmean, fsigma) + + PyErr_Clear() + omean = PyArray_FROM_OTF(mean, NPY_DOUBLE, NPY_ALIGNED) osigma = PyArray_FROM_OTF(sigma, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(osigma, 0.0)): @@ -936,6 +1140,17 @@ rayleigh(scale=1.0, size=None) """ cdef ndarray oscale + cdef double fscale + + fscale = PyFloat_AsDouble(scale) + + if not PyErr_Occurred(): + if fscale <= 0: + raise ValueError("scale <= 0") + return cont1_array_sc(self.internal_state, rk_rayleigh, size, fscale) + + PyErr_Clear() + oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(oscale, 0.0)): raise ValueError("scale <= 0.0") @@ -946,8 +1161,19 @@ wald(mean, scale, size=None) """ - cdef ndarray omean - cdef ndarray oscale + cdef ndarray omean, oscale + cdef double fmean, fscale + + fmean = PyFloat_AsDouble(mean) + fscale = PyFloat_AsDouble(scale) + if not PyErr_Occurred(): + if fmean <= 0: + raise ValueError("mean <= 0") + if fscale <= 0: + raise ValueError("scale <= 0") + return cont2_array_sc(self.internal_state, rk_wald, size, fmean, fscale) + + PyErr_Clear() omean = PyArray_FROM_OTF(mean, NPY_DOUBLE, NPY_ALIGNED) oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(omean,0.0)): @@ -956,15 +1182,31 @@ raise ValueError("scale <= 0.0") return cont2_array(self.internal_state, rk_wald, size, omean, oscale) + + def triangular(self, left, mode, right, size=None): """Triangular distribution starting at left, peaking at mode, and ending at right (left <= mode <= right). triangular(left, mode, right, size=None) """ - cdef ndarray oleft - cdef ndarray omode - cdef ndarray oright + cdef ndarray oleft, omode, oright + cdef double fleft, fmode, fright + + fleft = PyFloat_AsDouble(left) + fright = PyFloat_AsDouble(right) + fmode = PyFloat_AsDouble(mode) + if not PyErr_Occurred(): + if fleft > fmode: + raise ValueError("left > mode") + if fmode > fright: + raise ValueError("mode > right") + if fleft == fright: + raise ValueError("left == right") + return cont3_array_sc(self.internal_state, rk_triangular, size, fleft, + fmode, fright) + + PyErr_Clear() oleft = PyArray_FROM_OTF(left, NPY_DOUBLE, NPY_ALIGNED) omode = PyArray_FROM_OTF(mode, NPY_DOUBLE, NPY_ALIGNED) oright = PyArray_FROM_OTF(right, NPY_DOUBLE, NPY_ALIGNED) @@ -984,8 +1226,23 @@ binomial(n, p, size=None) -> random values """ - cdef ndarray on - cdef ndarray op + cdef ndarray on, op + cdef long ln + cdef double fp + + fp = PyFloat_AsDouble(p) + ln = PyInt_AsLong(n) + if not PyErr_Occurred(): + if ln <= 0: + raise ValueError("n <= 0") + if fp < 0: + raise ValueError("p < 0") + elif fp > 1: + raise ValueError("p > 1") + return discnp_array_sc(self.internal_state, rk_binomial, size, ln, fp) + + PyErr_Clear() + on = PyArray_FROM_OTF(n, NPY_LONG, NPY_ALIGNED) op = PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(n, 0)): @@ -1003,6 +1260,23 @@ """ cdef ndarray on cdef ndarray op + cdef long ln + cdef double fp + + fp = PyFloat_AsDouble(p) + ln = PyInt_AsLong(n) + if not PyErr_Occurred(): + if ln <= 0: + raise ValueError("n <= 0") + if fp < 0: + raise ValueError("p < 0") + elif fp > 1: + raise ValueError("p > 1") + return discnp_array_sc(self.internal_state, rk_negative_binomial, + size, ln, fp) + + PyErr_Clear() + on = PyArray_FROM_OTF(n, NPY_LONG, NPY_ALIGNED) op = PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(n, 0)): @@ -1020,6 +1294,15 @@ poisson(lam=1.0, size=None) -> random values """ cdef ndarray olam + cdef double flam + flam = PyFloat_AsDouble(lam) + if not PyErr_Occurred(): + if lam < 0: + raise ValueError("lam < 0") + return discd_array_sc(self.internal_state, rk_poisson, size, flam) + + PyErr_Clear() + olam = PyArray_FROM_OTF(lam, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less(olam, 0)): raise ValueError("lam < 0") @@ -1031,6 +1314,16 @@ zipf(a, size=None) """ cdef ndarray oa + cdef double fa + + fa = PyFloat_AsDouble(a) + if not PyErr_Occurred(): + if fa <= 1.0: + raise ValueError("a <= 1.0") + return discd_array_sc(self.internal_state, rk_zipf, size, fa) + + PyErr_Clear() + oa = PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less_equal(oa, 1.0)): raise ValueError("a <= 1.0") @@ -1043,6 +1336,19 @@ geometric(p, size=None) """ cdef ndarray op + cdef double fp + + fp = PyFloat_AsDouble(p) + if not PyErr_Occurred(): + if fp < 0.0: + raise ValueError("p < 0.0") + if fp > 1.0: + raise ValueError("p > 1.0") + return discd_array_sc(self.internal_state, rk_geometric, size, fp) + + PyErr_Clear() + + op = PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less(op, 0.0)): raise ValueError("p < 0.0") @@ -1060,10 +1366,27 @@ hypergeometric(ngood, nbad, nsample, size=None) """ - cdef ndarray ongood - cdef ndarray onbad - cdef ndarray onsample + cdef ndarray ongood, onbad, onsample + cdef long lngood, lnbad, lnsample + lngood = PyInt_AsLong(ngood) + lnbad = PyInt_AsLong(nbad) + lnsample = PyInt_AsLong(nsample) + if not PyErr_Occurred(): + if ngood < 1: + raise ValueError("ngood < 1") + if nbad < 1: + raise ValueError("nbad < 1") + if nsample < 1: + raise ValueError("nsample < 1") + if ngood + nbad < nsample: + raise ValueError("ngood + nbad < nsample") + return discnmN_array_sc(self.internal_state, rk_hypergeometric, size, + lngood, lnbad, lnsample) + + + PyErr_Clear() + ongood = PyArray_FROM_OTF(ngood, NPY_LONG, NPY_ALIGNED) onbad = PyArray_FROM_OTF(nbad, NPY_LONG, NPY_ALIGNED) onsample = PyArray_FROM_OTF(nsample, NPY_LONG, NPY_ALIGNED) @@ -1071,10 +1394,10 @@ raise ValueError("ngood < 1") if _sp.any(_sp.less(onbad, 1)): raise ValueError("nbad < 1") + if _sp.any(_sp.less(onsample, 1)): + raise ValueError("nsample < 1") if _sp.any(_sp.less(_sp.add(ongood, onbad),onsample)): raise ValueError("ngood + nbad < nsample") - if _sp.any(_sp.less(onsample, 1)): - raise ValueError("nsample < 1") return discnmN_array(self.internal_state, rk_hypergeometric, size, ongood, onbad, onsample) @@ -1084,6 +1407,18 @@ logseries(p, size=None) """ cdef ndarray op + cdef double fp + + fp = PyFloat_AsDouble(p) + if not PyErr_Occurred(): + if fp < 0.0: + raise ValueError("p < 0.0") + if fp > 1.0: + raise ValueError("p > 1.0") + return discd_array_sc(self.internal_state, rk_logseries, size, fp) + + PyErr_Clear() + op = PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ALIGNED) if _sp.any(_sp.less(op, 0.0)): raise ValueError("p < 0.0") From numpy-svn at scipy.org Mon Mar 19 15:15:30 2007 From: numpy-svn at scipy.org (numpy-svn at scipy.org) Date: Mon, 19 Mar 2007 14:15:30 -0500 (CDT) Subject: [Numpy-svn] r3583 - trunk/numpy/doc/swig Message-ID: <20070319191530.EF87839C08E@new.scipy.org> Author: wfspotz at sandia.gov Date: 2007-03-19 14:15:23 -0500 (Mon, 19 Mar 2007) New Revision: 3583 Modified: trunk/numpy/doc/swig/README trunk/numpy/doc/swig/numpy.i trunk/numpy/doc/swig/numpy_swig.html trunk/numpy/doc/swig/numpy_swig.pdf trunk/numpy/doc/swig/numpy_swig.txt trunk/numpy/doc/swig/series.cxx trunk/numpy/doc/swig/series.h Log: Removed stubs for CHAR and OBJECT; added macro variable for dimension type; updated documentation Modified: trunk/numpy/doc/swig/README =================================================================== --- trunk/numpy/doc/swig/README 2007-03-19 17:19:39 UTC (rev 3582) +++ trunk/numpy/doc/swig/README 2007-03-19 19:15:23 UTC (rev 3583) @@ -13,6 +13,7 @@ series.h series.cxx + Series.i testSeries.py The series.h header file contains prototypes for functions that Modified: trunk/numpy/doc/swig/numpy.i =================================================================== --- trunk/numpy/doc/swig/numpy.i 2007-03-19 17:19:39 UTC (rev 3582) +++ trunk/numpy/doc/swig/numpy.i 2007-03-19 19:15:23 UTC (rev 3583) @@ -210,7 +210,7 @@ int success = 1; if (array_dimensions(ary) != exact_dimensions) { PyErr_Format(PyExc_TypeError, - "Array must be have %d dimensions. Given array has %d dimensions", + "Array must have %d dimensions. Given array has %d dimensions", exact_dimensions, array_dimensions(ary)); success = 0; } @@ -297,18 +297,19 @@ * This macro defines a family of typemaps that allow pure input C * arguments of the form * - * (TYPE* IN_ARRAY1, int DIM1) - * (TYPE* IN_ARRAY2, int DIM1, int DIM2) - * (TYPE* INPLACE_ARRAY1, int DIM1) - * (TYPE* INPLACE_ARRAY2, int DIM1, int DIM2) - * (TYPE* ARGOUT_ARRAY1[ANY]) - * (TYPE* ARGOUT_ARRAY2[ANY][ANY]) + * (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) + * (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) + * (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) + * (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) + * (DATA_TYPE* ARGOUT_ARRAY1[ANY]) + * (DATA_TYPE* ARGOUT_ARRAY2[ANY][ANY]) * - * (int DIM1, TYPE* IN_ARRAY1) - * (int DIM1, int DIM2, TYPE* IN_ARRAY2) - * (int DIM1, TYPE* INPLACE_ARRAY1) + * (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) + * (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) + * (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) + * (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY1) * - * where "TYPE" is any type supported by the NumPy module. In python, + * where "DATA_TYPE" is any type supported by the NumPy module. In python, * the dimensions will not need to be specified. The IN_ARRAYs can be * a numpy array or any sequence that can be converted to a numpy * array of the specified type. The INPLACE_ARRAYs must be numpy @@ -359,70 +360,70 @@ * void zeros(int DIM1, double* INPLACE_ARRAY1) */ -%define %numpy_typemaps(TYPE, TYPECODE) +%define %numpy_typemaps(DATA_TYPE, DATA_TYPECODE, DIM_TYPE) -/* Typemap suite for (TYPE* IN_ARRAY1, int DIM1) +/* Typemap suite for (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) */ -%typemap(in) (TYPE* IN_ARRAY1, int DIM1) +%typemap(in) (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) (PyArrayObject* array=NULL, int is_new_object=0) { - array = obj_to_array_contiguous_allow_conversion($input, TYPECODE, &is_new_object); + array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); npy_intp size[1] = {-1}; if (!array || !require_dimensions(array, 1) || !require_size(array, size, 1)) SWIG_fail; - $1 = (TYPE*) array->data; - $2 = (int) array->dimensions[0]; + $1 = (DATA_TYPE*) array->data; + $2 = (DIM_TYPE) array->dimensions[0]; } -%typemap(freearg) (TYPE* IN_ARRAY1, int DIM1) { +%typemap(freearg) (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) { if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); } -/* Typemap suite for (TYPE* IN_ARRAY2, int DIM1, int DIM2) +/* Typemap suite for (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) */ -%typemap(in) (TYPE* IN_ARRAY2, int DIM1, int DIM2) +%typemap(in) (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) (PyArrayObject* array=NULL, int is_new_object=0) { - array = obj_to_array_contiguous_allow_conversion($input, TYPECODE, &is_new_object); + array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); npy_intp size[2] = {-1,-1}; if (!array || !require_dimensions(array, 2) || !require_size(array, size, 1)) SWIG_fail; - $1 = (TYPE*) array->data; - $2 = (int) array->dimensions[0]; - $3 = (int) array->dimensions[1]; + $1 = (DATA_TYPE*) array->data; + $2 = (DIM_TYPE) array->dimensions[0]; + $3 = (DIM_TYPE) array->dimensions[1]; } -%typemap(freearg) (TYPE* IN_ARRAY2, int DIM1, int DIM2) { +%typemap(freearg) (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); } -/* Typemap suite for (TYPE* INPLACE_ARRAY1, int DIM1) +/* Typemap suite for (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) */ -%typemap(in) (TYPE* INPLACE_ARRAY1, int DIM1) (PyArrayObject* temp=NULL) { - temp = obj_to_array_no_conversion($input, TYPECODE); +%typemap(in) (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) (PyArrayObject* temp=NULL) { + temp = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!temp || !require_contiguous(temp)) SWIG_fail; - $1 = (TYPE*) temp->data; + $1 = (DATA_TYPE*) temp->data; $2 = 1; for (int i=0; ind; ++i) $2 *= temp->dimensions[i]; } -/* Typemap suite for (TYPE* INPLACE_ARRAY2, int DIM1, int DIM2) +/* Typemap suite for (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) */ -%typemap(in) (TYPE* INPLACE_ARRAY2, int DIM1, int DIM2) (PyArrayObject* temp=NULL) { - temp = obj_to_array_no_conversion($input, TYPECODE); +%typemap(in) (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) (PyArrayObject* temp=NULL) { + temp = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!temp || !require_contiguous(temp)) SWIG_fail; - $1 = (TYPE*) temp->data; - $2 = (int) temp->dimensions[0]; - $3 = (int) temp->dimensions[1]; + $1 = (DATA_TYPE*) temp->data; + $2 = (DIM_TYPE) temp->dimensions[0]; + $3 = (DIM_TYPE) temp->dimensions[1]; } -/* Typemap suite for (TYPE ARGOUT_ARRAY1[ANY]) +/* Typemap suite for (DATA_TYPE ARGOUT_ARRAY1[ANY]) */ -%typemap(in,numinputs=0) (TYPE ARGOUT_ARRAY1[ANY]) { - $1 = (TYPE*) malloc($1_dim0*sizeof(TYPE)); +%typemap(in,numinputs=0) (DATA_TYPE ARGOUT_ARRAY1[ANY]) { + $1 = (DATA_TYPE*) malloc($1_dim0*sizeof(DATA_TYPE)); if (!$1) { PyErr_SetString(PyExc_RuntimeError, "Failed to allocate memory"); SWIG_fail; } } -%typemap(argout) (TYPE ARGOUT_ARRAY1[ANY]) { +%typemap(argout) (DATA_TYPE ARGOUT_ARRAY1[ANY]) { PyObject * obj = NULL; npy_intp dimensions[1] = { $1_dim0 }; - PyObject* outArray = PyArray_FromDimsAndData(1, dimensions, TYPECODE, (char*)$1); + PyObject* outArray = PyArray_FromDimsAndData(1, dimensions, DATA_TYPECODE, (char*)$1); if ($result == Py_None) { Py_DECREF($result); $result = outArray; @@ -434,19 +435,19 @@ } } -/* Typemap suite for (TYPE ARGOUT_ARRAY2[ANY][ANY]) +/* Typemap suite for (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) */ -%typemap(in,numinputs=0) (TYPE ARGOUT_ARRAY2[ANY][ANY]) { - $1 = (TYPE*) malloc($1_dim0 * $1_dim1 * sizeof(TYPE)); +%typemap(in,numinputs=0) (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) { + $1 = (DATA_TYPE*) malloc($1_dim0 * $1_dim1 * sizeof(DATA_TYPE)); if (!$1) { PyErr_SetString(PyExc_RuntimeError, "Failed to allocate memory"); SWIG_fail; } } -%typemap(argout) (TYPE ARGOUT_ARRAY1[ANY][ANY]) { +%typemap(argout) (DATA_TYPE ARGOUT_ARRAY1[ANY][ANY]) { PyObject * obj = NULL; npy_intp dimensions[2] = { $1_dim0, $1_dim1 }; - PyObject* outArray = PyArray_FromDimsAndData(1, dimensions, TYPECODE, (char*)$1); + PyObject* outArray = PyArray_FromDimsAndData(1, dimensions, DATA_TYPECODE, (char*)$1); if ($result == Py_None) { Py_DECREF($result); $result = outArray; @@ -458,53 +459,53 @@ } } -/* Typemap suite for (int DIM1, TYPE* IN_ARRAY1) +/* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) */ -%typemap(in) (int DIM1, TYPE* IN_ARRAY1) +%typemap(in) (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) (PyArrayObject* array=NULL, int is_new_object=0) { - array = obj_to_array_contiguous_allow_conversion($input, TYPECODE, &is_new_object); + array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); npy_intp size[1] = {-1}; if (!array || !require_dimensions(array, 1) || !require_size(array, size, 1)) SWIG_fail; - $1 = (int) array->dimensions[0]; - $2 = (TYPE*) array->data; + $1 = (DIM_TYPE) array->dimensions[0]; + $2 = (DATA_TYPE*) array->data; } -%typemap(freearg) (int DIM1, TYPE* IN_ARRAY1) { +%typemap(freearg) (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) { if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); } -/* Typemap suite for (int DIM1, int DIM2, TYPE* IN_ARRAY2) +/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) */ -%typemap(in) (int DIM1, int DIM2, TYPE* IN_ARRAY2) +%typemap(in) (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) (PyArrayObject* array=NULL, int is_new_object=0) { - array = obj_to_array_contiguous_allow_conversion($input, TYPECODE, &is_new_object); + array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); npy_intp size[2] = {-1,-1}; if (!array || !require_dimensions(array, 2) || !require_size(array, size, 1)) SWIG_fail; - $1 = (int) array->dimensions[0]; - $2 = (int) array->dimensions[1]; - $3 = (TYPE*) array->data; + $1 = (DIM_TYPE) array->dimensions[0]; + $2 = (DIM_TYPE) array->dimensions[1]; + $3 = (DATA_TYPE*) array->data; } -%typemap(freearg) (int DIM1, int DIM2, TYPE* IN_ARRAY2) { +%typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) { if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); } -/* Typemap suite for (int DIM1, TYPE* INPLACE_ARRAY1) +/* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) */ -%typemap(in) (int DIM1, TYPE* INPLACE_ARRAY1) (PyArrayObject* temp=NULL) { - temp = obj_to_array_no_conversion($input, TYPECODE); +%typemap(in) (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) (PyArrayObject* temp=NULL) { + temp = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!temp || !require_contiguous(temp)) SWIG_fail; $1 = 1; for (int i=0; ind; ++i) $1 *= temp->dimensions[i]; - $2 = (TYPE*) temp->data; + $2 = (DATA_TYPE*) temp->data; } -/* Typemap suite for (int DIM1, int DIM2, TYPE* INPLACE_ARRAY2) +/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) */ -%typemap(in) (int DIM1, int DIM2, TYPE* INPLACE_ARRAY2) (PyArrayObject* temp=NULL) { - temp = obj_to_array_no_conversion($input, TYPECODE); +%typemap(in) (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) (PyArrayObject* temp=NULL) { + temp = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!temp || !require_contiguous(temp)) SWIG_fail; - $1 = (int) temp->dimensions[0]; - $2 = (int) temp->dimensions[1]; - $3 = (TYPE*) temp->data; + $1 = (DIM_TYPE) temp->dimensions[0]; + $2 = (DIM_TYPE) temp->dimensions[1]; + $3 = (DATA_TYPE*) temp->data; } %enddef /* %numpy_typemaps() macro */ @@ -513,20 +514,18 @@ /* Concrete instances of the %numpy_typemaps() macro: Each invocation * below applies all of the typemaps above to the specified data type. */ -%numpy_typemaps(signed char, NPY_BYTE ) /**/ -%numpy_typemaps(unsigned char, NPY_UBYTE ) /**/ -%numpy_typemaps(short, NPY_SHORT ) /**/ -%numpy_typemaps(unsigned short, NPY_USHORT ) /**/ -%numpy_typemaps(int, NPY_INT ) /**/ -%numpy_typemaps(unsigned int, NPY_UINT ) /**/ -%numpy_typemaps(long, NPY_LONG ) /**/ -%numpy_typemaps(unsigned long, NPY_ULONG ) /**/ -%numpy_typemaps(long long, NPY_LONGLONG ) /**/ -%numpy_typemaps(unsigned long long, NPY_ULONGLONG) /**/ -%numpy_typemaps(float, NPY_FLOAT ) /**/ -%numpy_typemaps(double, NPY_DOUBLE ) /**/ -%numpy_typemaps(PyObject, NPY_OBJECT ) -%numpy_typemaps(char, NPY_CHAR ) +%numpy_typemaps(signed char , NPY_BYTE , int) +%numpy_typemaps(unsigned char , NPY_UBYTE , int) +%numpy_typemaps(short , NPY_SHORT , int) +%numpy_typemaps(unsigned short , NPY_USHORT , int) +%numpy_typemaps(int , NPY_INT , int) +%numpy_typemaps(unsigned int , NPY_UINT , int) +%numpy_typemaps(long , NPY_LONG , int) +%numpy_typemaps(unsigned long , NPY_ULONG , int) +%numpy_typemaps(long long , NPY_LONGLONG , int) +%numpy_typemaps(unsigned long long, NPY_ULONGLONG, int) +%numpy_typemaps(float , NPY_FLOAT , int) +%numpy_typemaps(double , NPY_DOUBLE , int) /* *************************************************************** * The follow macro expansion does not work, because C++ bool is 4 Modified: trunk/numpy/doc/swig/numpy_swig.html =================================================================== --- trunk/numpy/doc/swig/numpy_swig.html 2007-03-19 17:19:39 UTC (rev 3582) +++ trunk/numpy/doc/swig/numpy_swig.html 2007-03-19 19:15:23 UTC (rev 3583) @@ -5,7 +5,7 @@ numpy.i: a SWIG Interface File for NumPy - +