# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1364092472 18000
#      Sat Mar 23 21:34:32 2013 -0500
# Node ID 75efd583378d2b69379db8e07a7efd01008dd3fc
# Parent  58f2aa0d00ae6eb03f33a59e8dde04eef1b8570b
py-numpy: update to 1.7.0

diff --git a/dports/python/py-numpy/Portfile b/dports/python/py-numpy/Portfile
--- a/dports/python/py-numpy/Portfile
+++ b/dports/python/py-numpy/Portfile
@@ -3,38 +3,31 @@
 
 PortSystem              1.0
 PortGroup               python 1.0
 PortGroup               github 1.0
 
-github.setup            numpy numpy 1.6.2 v
+github.setup            numpy numpy 1.7.0 v
 name                    py-numpy
-revision                1
+revision                0
 dist_subdir             ${name}/${version}_1
 
 categories-append       math
 license                 BSD
 platforms               darwin
 maintainers             dh openmaintainer
 description             The core utilities for the scientific library scipy for Python
 long_description        ${description}
 
-checksums               rmd160  9643c04a2e8fbb99cdb047281eedbbfb99423553 \
-                        sha256  0992d326147d0ed83bd059519897e7a8ee52dea5ee66bbe04c0ea1c502cd8618
+checksums               rmd160  f64215a07b35b7791a20ca236cdce45d4747473e \
+                        sha256  757b91f89e2b9946a325ea4ae6955a7629c65a68e10ed751b98a50e21c13ff5e
 
 python.versions         24 25 26 27 31 32 33
 
 if {$subport != $name} {
     patchfiles              patch-f2py_setup.py.diff \
                             patch-fcompiler_g95.diff
 
-    if {${python.version} == 33} {
-        patchfiles-append   patch-python33-unicode.diff \
-                            patch-python33-mtrand.diff \
-                            patch-python33-shape.diff \
-                            patch-python33-methods.diff
-    }
-
     depends_lib-append      port:fftw-3 \
                             port:py${python.version}-nose
 
     if {[variant_isset universal]} {
         build.env-append        ARCHFLAGS="${configure.universal_ldflags}"
@@ -184,6 +177,5 @@
 
     livecheck.type        none
 } else {
     livecheck.regex       archive/[join ${github.tag_prefix} ""](\[\\d+(?:\\.\\d+)*"\]+)${extract.suffix}"
 }
-
diff --git a/dports/python/py-numpy/files/patch-f2py_setup.py.diff b/dports/python/py-numpy/files/patch-f2py_setup.py.diff
--- a/dports/python/py-numpy/files/patch-f2py_setup.py.diff
+++ b/dports/python/py-numpy/files/patch-f2py_setup.py.diff
@@ -1,7 +1,16 @@
---- numpy/f2py/setup.py	2011-02-27 23:40:29.000000000 -0600
-+++ numpy/f2py/setup.py	2011-05-15 09:18:40.000000000 -0500
+--- numpy/f2py/setup.py.orig	2013-02-10 00:51:36.000000000 +0400
++++ numpy/f2py/setup.py	2013-03-19 15:27:15.000000000 +0400
+@@ -41,7 +41,7 @@
+     config.make_svn_version_py()
+ 
+     def generate_f2py_py(build_dir):
+-        f2py_exe = 'f2py'+os.path.basename(sys.executable)[6:]
++        f2py_exe = 'f2py'
+         if f2py_exe[-4:]=='.exe':
+             f2py_exe = f2py_exe[:-4] + '.py'
+         if 'bdist_wininst' in sys.argv and f2py_exe[-3:] != '.py':
 @@ -51,7 +51,7 @@
              log.info('Creating %s', target)
              f = open(target,'w')
              f.write('''\
 -#!/usr/bin/env %s
diff --git a/dports/python/py-numpy/files/patch-fcompiler_g95.diff b/dports/python/py-numpy/files/patch-fcompiler_g95.diff
--- a/dports/python/py-numpy/files/patch-fcompiler_g95.diff
+++ b/dports/python/py-numpy/files/patch-fcompiler_g95.diff
@@ -1,11 +1,11 @@
---- numpy/distutils/fcompiler/__init__.py	2011-03-15 00:22:25.000000000 -0500
-+++ numpy/distutils/fcompiler/__init__.py	2011-05-15 09:21:14.000000000 -0500
-@@ -698,7 +698,7 @@
+--- numpy/distutils/fcompiler/__init__.py.orig	2013-03-19 13:35:03.000000000 +0400
++++ numpy/distutils/fcompiler/__init__.py	2013-03-19 13:35:27.000000000 +0400
+@@ -708,7 +708,7 @@
      ('cygwin.*', ('gnu','intelv','absoft','compaqv','intelev','gnu95','g95')),
-     ('linux.*', ('gnu','intel','lahey','pg','absoft','nag','vast','compaq',
-                 'intele','intelem','gnu95','g95','pathf95')),
--    ('darwin.*', ('nag', 'absoft', 'ibm', 'intel', 'gnu', 'gnu95', 'g95', 'pg')),
-+    ('darwin.*', ('nag', 'absoft', 'ibm', 'intel', 'gnu', 'gnu95', 'pg')),
+     ('linux.*', ('gnu95','intel','lahey','pg','absoft','nag','vast','compaq',
+                 'intele','intelem','gnu','g95','pathf95')),
+-    ('darwin.*', ('gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'g95', 'pg')),
++    ('darwin.*', ('gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'pg')),
      ('sunos.*', ('sun','gnu','gnu95','g95')),
      ('irix.*', ('mips','gnu','gnu95',)),
      ('aix.*', ('ibm','gnu','gnu95',)),
diff --git a/dports/python/py-numpy/files/patch-python33-methods.diff b/dports/python/py-numpy/files/patch-python33-methods.diff
deleted file mode 100644
--- a/dports/python/py-numpy/files/patch-python33-methods.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- numpy/core/src/multiarray/methods.old.c	2012-12-06 16:49:23.000000000 -0600
-+++ numpy/core/src/multiarray/methods.c	2012-12-06 16:48:07.000000000 -0600
-@@ -1476,7 +1476,7 @@
-     if (!PyDataType_FLAGCHK(typecode, NPY_LIST_PICKLE)) {
-         int swap=!PyArray_ISNOTSWAPPED(self);
-         self->data = datastr;
--        if (!_IsAligned(self) || swap) {
-+        if (!_IsAligned(self) || swap || (len <= 1000)) {
-             intp num = PyArray_NBYTES(self);
-             self->data = PyDataMem_NEW(num);
-             if (self->data == NULL) {
diff --git a/dports/python/py-numpy/files/patch-python33-mtrand.diff b/dports/python/py-numpy/files/patch-python33-mtrand.diff
deleted file mode 100644
--- a/dports/python/py-numpy/files/patch-python33-mtrand.diff
+++ /dev/null
@@ -1,12300 +0,0 @@
---- numpy/random/mtrand/mtrand.old.c	2012-05-19 08:41:41.000000000 -0500
-+++ numpy/random/mtrand/mtrand.c	2012-12-06 15:02:43.000000000 -0600
-@@ -1,16 +1,16 @@
--/* Generated by Cython 0.15.1 on Tue May  1 15:44:50 2012 */
-+/* Generated by Cython 0.17.1 on Thu Dec  6 15:02:42 2012 */
- 
- #define PY_SSIZE_T_CLEAN
- #include "Python.h"
- #ifndef Py_PYTHON_H
-     #error Python headers needed to compile C extensions, please install development version of Python.
-+#elif PY_VERSION_HEX < 0x02040000
-+    #error Cython requires Python 2.4+.
- #else
--
- #include <stddef.h> /* For offsetof */
- #ifndef offsetof
- #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
- #endif
--
- #if !defined(WIN32) && !defined(MS_WINDOWS)
-   #ifndef __stdcall
-     #define __stdcall
-@@ -22,36 +22,44 @@
-     #define __fastcall
-   #endif
- #endif
--
- #ifndef DL_IMPORT
-   #define DL_IMPORT(t) t
- #endif
- #ifndef DL_EXPORT
-   #define DL_EXPORT(t) t
- #endif
--
- #ifndef PY_LONG_LONG
-   #define PY_LONG_LONG LONG_LONG
- #endif
--
--#if PY_VERSION_HEX < 0x02040000
--  #define METH_COEXIST 0
--  #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
--  #define PyDict_Contains(d,o)   PySequence_Contains(d,o)
-+#ifndef Py_HUGE_VAL
-+  #define Py_HUGE_VAL HUGE_VAL
-+#endif
-+#ifdef PYPY_VERSION
-+#define CYTHON_COMPILING_IN_PYPY 1
-+#define CYTHON_COMPILING_IN_CPYTHON 0
-+#else
-+#define CYTHON_COMPILING_IN_PYPY 0
-+#define CYTHON_COMPILING_IN_CPYTHON 1
- #endif
--
- #if PY_VERSION_HEX < 0x02050000
-   typedef int Py_ssize_t;
-   #define PY_SSIZE_T_MAX INT_MAX
-   #define PY_SSIZE_T_MIN INT_MIN
-   #define PY_FORMAT_SIZE_T ""
-+  #define CYTHON_FORMAT_SSIZE_T ""
-   #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
-   #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
--  #define PyNumber_Index(o)    PyNumber_Int(o)
--  #define PyIndex_Check(o)     PyNumber_Check(o)
-+  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
-+                                (PyErr_Format(PyExc_TypeError, \
-+                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
-+                                 (PyObject*)0))
-+  #define PyIndex_Check(o)     (PyNumber_Check(o) && !PyFloat_Check(o) && !PyComplex_Check(o))
-   #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
-+  #define __PYX_BUILD_PY_SSIZE_T "i"
-+#else
-+  #define __PYX_BUILD_PY_SSIZE_T "n"
-+  #define CYTHON_FORMAT_SSIZE_T "z"
- #endif
--
- #if PY_VERSION_HEX < 0x02060000
-   #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
-   #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
-@@ -59,7 +67,6 @@
-   #define PyVarObject_HEAD_INIT(type, size) \
-           PyObject_HEAD_INIT(type) size,
-   #define PyType_Modified(t)
--
-   typedef struct {
-      void *buf;
-      PyObject *obj;
-@@ -73,7 +80,6 @@
-      Py_ssize_t *suboffsets;
-      void *internal;
-   } Py_buffer;
--
-   #define PyBUF_SIMPLE 0
-   #define PyBUF_WRITABLE 0x0001
-   #define PyBUF_FORMAT 0x0004
-@@ -83,24 +89,44 @@
-   #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
-   #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
-   #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
--
-+  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
-+  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
-+  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
-+  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
- #endif
--
- #if PY_MAJOR_VERSION < 3
-   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
-+  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
-+          PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
- #else
-   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
-+  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
-+          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
-+#endif
-+#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
-+  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
- #endif
--
- #if PY_MAJOR_VERSION >= 3
-   #define Py_TPFLAGS_CHECKTYPES 0
-   #define Py_TPFLAGS_HAVE_INDEX 0
- #endif
--
- #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
-   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
- #endif
--
-+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
-+  #define CYTHON_PEP393_ENABLED 1
-+  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
-+                                              0 : _PyUnicode_Ready((PyObject *)(op)))
-+  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
-+  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
-+  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
-+#else
-+  #define CYTHON_PEP393_ENABLED 0
-+  #define __Pyx_PyUnicode_READY(op)       (0)
-+  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
-+  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
-+  #define __Pyx_PyUnicode_READ(k, d, i)   ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
-+#endif
- #if PY_MAJOR_VERSION >= 3
-   #define PyBaseString_Type            PyUnicode_Type
-   #define PyStringObject               PyUnicodeObject
-@@ -108,7 +134,6 @@
-   #define PyString_Check               PyUnicode_Check
-   #define PyString_CheckExact          PyUnicode_CheckExact
- #endif
--
- #if PY_VERSION_HEX < 0x02060000
-   #define PyBytesObject                PyStringObject
-   #define PyBytes_Type                 PyString_Type
-@@ -127,7 +152,6 @@
-   #define PyBytes_Concat               PyString_Concat
-   #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
- #endif
--
- #if PY_VERSION_HEX < 0x02060000
-   #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
-   #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
-@@ -135,9 +159,7 @@
- #ifndef PySet_CheckExact
-   #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
- #endif
--
- #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
--
- #if PY_MAJOR_VERSION >= 3
-   #define PyIntObject                  PyLongObject
-   #define PyInt_Type                   PyLong_Type
-@@ -154,11 +176,9 @@
-   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
-   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
- #endif
--
- #if PY_MAJOR_VERSION >= 3
-   #define PyBoolObject                 PyLongObject
- #endif
--
- #if PY_VERSION_HEX < 0x03020000
-   typedef long Py_hash_t;
-   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
-@@ -167,16 +187,6 @@
-   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
-   #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
- #endif
--
--
--#if PY_MAJOR_VERSION >= 3
--  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
--  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
--#else
--  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
--  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
--#endif
--
- #if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
-   #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
-   #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
-@@ -195,11 +205,9 @@
-         (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
-             (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
- #endif
--
- #if PY_MAJOR_VERSION >= 3
-   #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
- #endif
--
- #if PY_VERSION_HEX < 0x02050000
-   #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
-   #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
-@@ -209,7 +217,6 @@
-   #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
-   #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
- #endif
--
- #if PY_VERSION_HEX < 0x02050000
-   #define __Pyx_NAMESTR(n) ((char *)(n))
-   #define __Pyx_DOCSTR(n)  ((char *)(n))
-@@ -218,6 +225,15 @@
-   #define __Pyx_DOCSTR(n)  (n)
- #endif
- 
-+
-+#if PY_MAJOR_VERSION >= 3
-+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
-+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
-+#else
-+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
-+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
-+#endif
-+
- #ifndef __PYX_EXTERN_C
-   #ifdef __cplusplus
-     #define __PYX_EXTERN_C extern "C"
-@@ -269,7 +285,7 @@
- #   else
- #     define CYTHON_UNUSED
- #   endif
--# elif defined(__ICC) || defined(__INTEL_COMPILER)
-+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
- #   define CYTHON_UNUSED __attribute__ ((__unused__))
- # else
- #   define CYTHON_UNUSED
-@@ -293,8 +309,12 @@
- static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
- static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
- 
-+#if CYTHON_COMPILING_IN_CPYTHON
- #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
--
-+#else
-+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
-+#endif
-+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
- 
- #ifdef __GNUC__
-   /* Test for GCC > 2.95 */
-@@ -421,11 +441,9 @@
-   rk_state *internal_state;
- };
- 
--
- #ifndef CYTHON_REFNANNY
-   #define CYTHON_REFNANNY 0
- #endif
--
- #if CYTHON_REFNANNY
-   typedef struct {
-     void (*INCREF)(void*, PyObject*, int);
-@@ -438,8 +456,21 @@
-   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
-   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
-   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
--  #define __Pyx_RefNannySetupContext(name)           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
--  #define __Pyx_RefNannyFinishContext()           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
-+#ifdef WITH_THREAD
-+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
-+          if (acquire_gil) { \
-+              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
-+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
-+              PyGILState_Release(__pyx_gilstate_save); \
-+          } else { \
-+              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
-+          }
-+#else
-+  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
-+          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
-+#endif
-+  #define __Pyx_RefNannyFinishContext() \
-+          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
-   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
-   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
-   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
-@@ -450,7 +481,7 @@
-   #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
- #else
-   #define __Pyx_RefNannyDeclarations
--  #define __Pyx_RefNannySetupContext(name)
-+  #define __Pyx_RefNannySetupContext(name, acquire_gil)
-   #define __Pyx_RefNannyFinishContext()
-   #define __Pyx_INCREF(r) Py_INCREF(r)
-   #define __Pyx_DECREF(r) Py_DECREF(r)
-@@ -461,6 +492,8 @@
-   #define __Pyx_XGOTREF(r)
-   #define __Pyx_XGIVEREF(r)
- #endif /* CYTHON_REFNANNY */
-+#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
-+#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
- 
- static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
- 
-@@ -469,15 +502,15 @@
- 
- static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
- 
--static void __Pyx_RaiseDoubleKeywordsError(
--    const char* func_name, PyObject* kw_name); /*proto*/
-+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/
- 
--static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/
-+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
-+    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
-+    const char* function_name); /*proto*/
- 
- static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
-     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
- 
--
- static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
-     PyObject *r;
-     if (!j) return NULL;
-@@ -485,89 +518,102 @@
-     Py_DECREF(j);
-     return r;
- }
--
--
- #define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                     __Pyx_GetItemInt_List_Fast(o, i) : \
-                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
--
- static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
--    if (likely(o != Py_None)) {
--        if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
--            PyObject *r = PyList_GET_ITEM(o, i);
--            Py_INCREF(r);
--            return r;
--        }
--        else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
--            PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
--            Py_INCREF(r);
--            return r;
--        }
-+#if CYTHON_COMPILING_IN_CPYTHON
-+    if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
-+        PyObject *r = PyList_GET_ITEM(o, i);
-+        Py_INCREF(r);
-+        return r;
-+    }
-+    else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
-+        PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
-+        Py_INCREF(r);
-+        return r;
-     }
-     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-+#else
-+    return PySequence_GetItem(o, i);
-+#endif
- }
--
- #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                     __Pyx_GetItemInt_Tuple_Fast(o, i) : \
-                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
--
- static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
--    if (likely(o != Py_None)) {
--        if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
--            PyObject *r = PyTuple_GET_ITEM(o, i);
--            Py_INCREF(r);
--            return r;
--        }
--        else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
--            PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
--            Py_INCREF(r);
--            return r;
--        }
-+#if CYTHON_COMPILING_IN_CPYTHON
-+    if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
-+        PyObject *r = PyTuple_GET_ITEM(o, i);
-+        Py_INCREF(r);
-+        return r;
-+    }
-+    else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
-+        PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
-+        Py_INCREF(r);
-+        return r;
-     }
-     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-+#else
-+    return PySequence_GetItem(o, i);
-+#endif
- }
--
--
- #define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                     __Pyx_GetItemInt_Fast(o, i) : \
-                                                     __Pyx_GetItemInt_Generic(o, to_py_func(i)))
--
- static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
--    PyObject *r;
--    if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
--        r = PyList_GET_ITEM(o, i);
--        Py_INCREF(r);
--    }
--    else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
--        r = PyTuple_GET_ITEM(o, i);
--        Py_INCREF(r);
-+#if CYTHON_COMPILING_IN_CPYTHON
-+    if (PyList_CheckExact(o)) {
-+        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
-+        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
-+            PyObject *r = PyList_GET_ITEM(o, n);
-+            Py_INCREF(r);
-+            return r;
-+        }
-     }
--    else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
--        r = PySequence_GetItem(o, i);
-+    else if (PyTuple_CheckExact(o)) {
-+        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
-+        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
-+            PyObject *r = PyTuple_GET_ITEM(o, n);
-+            Py_INCREF(r);
-+            return r;
-+        }
-+    } else {  /* inlined PySequence_GetItem() */
-+        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-+        if (likely(m && m->sq_item)) {
-+            if (unlikely(i < 0) && likely(m->sq_length)) {
-+                Py_ssize_t l = m->sq_length(o);
-+                if (unlikely(l < 0)) return NULL;
-+                i += l;
-+            }
-+            return m->sq_item(o, i);
-+        }
-     }
--    else {
--        r = __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-+#else
-+    if (PySequence_Check(o)) {
-+        return PySequence_GetItem(o, i);
-     }
--    return r;
-+#endif
-+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
- }
- 
-+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
-+
- static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
- 
--static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
-+static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/
- 
- static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/
- 
- static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
- 
--static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict,
--    const char* function_name, int kw_allowed); /*proto*/
-+static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/
- 
- static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
- 
- #define __Pyx_SetItemInt(o, i, v, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                     __Pyx_SetItemInt_Fast(o, i, v) : \
-                                                     __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
--
- static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
-     int r;
-     if (!j) return -1;
-@@ -575,20 +621,38 @@
-     Py_DECREF(j);
-     return r;
- }
--
- static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v) {
--    if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
--        Py_INCREF(v);
--        Py_DECREF(PyList_GET_ITEM(o, i));
--        PyList_SET_ITEM(o, i, v);
--        return 1;
-+#if CYTHON_COMPILING_IN_CPYTHON
-+    if (PyList_CheckExact(o)) {
-+        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
-+        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
-+            PyObject* old = PyList_GET_ITEM(o, n);
-+            Py_INCREF(v);
-+            PyList_SET_ITEM(o, n, v);
-+            Py_DECREF(old);
-+            return 1;
-+        }
-+    } else {  /* inlined PySequence_SetItem() */
-+        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-+        if (likely(m && m->sq_ass_item)) {
-+            if (unlikely(i < 0) && likely(m->sq_length)) {
-+                Py_ssize_t l = m->sq_length(o);
-+                if (unlikely(l < 0)) return -1;
-+                i += l;
-+            }
-+            return m->sq_ass_item(o, i, v);
-+        }
-     }
--    else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_ass_item && (likely(i >= 0)))
-+#else
-+#if CYTHON_COMPILING_IN_PYPY
-+    if (PySequence_Check(o) && !PyDict_Check(o)) {
-+#else
-+    if (PySequence_Check(o)) {
-+#endif
-         return PySequence_SetItem(o, i, v);
--    else {
--        PyObject *j = PyInt_FromSsize_t(i);
--        return __Pyx_SetItemInt_Generic(o, j, v);
-     }
-+#endif
-+    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
- }
- 
- static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
-@@ -596,17 +660,9 @@
- 
- static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/
- 
--#include <string.h>
--
--static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
--
--static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
-+static CYTHON_INLINE npy_intp __Pyx_PyInt_from_py_npy_intp(PyObject *);
- 
--#if PY_MAJOR_VERSION >= 3
--#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
--#else
--#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
--#endif
-+static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name);
- 
- static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp);
- 
-@@ -642,19 +698,40 @@
- 
- static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
- 
--static CYTHON_INLINE npy_intp __Pyx_PyInt_from_py_npy_intp(PyObject *);
--
- static int __Pyx_check_binary_version(void);
- 
--static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/
-+#if !defined(__Pyx_PyIdentifier_FromString)
-+#if PY_MAJOR_VERSION < 3
-+  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
-+#else
-+  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
-+#endif
-+#endif
- 
- static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
- 
--static void __Pyx_AddTraceback(const char *funcname, int __pyx_clineno,
--                               int __pyx_lineno, const char *__pyx_filename); /*proto*/
-+static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/
-+
-+typedef struct {
-+    int code_line;
-+    PyCodeObject* code_object;
-+} __Pyx_CodeObjectCacheEntry;
-+struct __Pyx_CodeObjectCache {
-+    int count;
-+    int max_count;
-+    __Pyx_CodeObjectCacheEntry* entries;
-+};
-+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
-+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
-+static PyCodeObject *__pyx_find_code_object(int code_line);
-+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
-+
-+static void __Pyx_AddTraceback(const char *funcname, int c_line,
-+                               int py_line, const char *filename); /*proto*/
- 
- static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
- 
-+
- /* Module declarations from 'numpy' */
- 
- /* Module declarations from 'mtrand' */
-@@ -686,6 +763,58 @@
- /* Implementation of 'mtrand' */
- static PyObject *__pyx_builtin_ValueError;
- static PyObject *__pyx_builtin_TypeError;
-+static int __pyx_pf_6mtrand_11RandomState___init__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_seed); /* proto */
-+static void __pyx_pf_6mtrand_11RandomState_2__dealloc__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_4seed(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_seed); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_6get_state(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_8set_state(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_10__getstate__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_12__setstate__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_14__reduce__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_16random_sample(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_18tomaxint(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_20randint(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_low, PyObject *__pyx_v_high, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_22bytes(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, npy_intp __pyx_v_length); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_24uniform(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_low, PyObject *__pyx_v_high, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_26rand(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_28randn(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_30random_integers(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_low, PyObject *__pyx_v_high, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_32standard_normal(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_34normal(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_loc, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_36beta(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_38exponential(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_40standard_exponential(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_42standard_gamma(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_shape, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_44gamma(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_shape, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_46f(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_dfnum, PyObject *__pyx_v_dfden, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_48noncentral_f(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_dfnum, PyObject *__pyx_v_dfden, PyObject *__pyx_v_nonc, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_50chisquare(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_df, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_52noncentral_chisquare(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_df, PyObject *__pyx_v_nonc, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_54standard_cauchy(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_56standard_t(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_df, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_58vonmises(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_mu, PyObject *__pyx_v_kappa, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_60pareto(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_62weibull(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_64power(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_66laplace(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_loc, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_68gumbel(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_loc, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_70logistic(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_loc, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_72lognormal(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_mean, PyObject *__pyx_v_sigma, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_74rayleigh(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_76wald(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_mean, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_78triangular(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_left, PyObject *__pyx_v_mode, PyObject *__pyx_v_right, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_80binomial(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_p, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_82negative_binomial(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_p, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_84poisson(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_lam, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_86zipf(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_88geometric(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_p, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_90hypergeometric(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_ngood, PyObject *__pyx_v_nbad, PyObject *__pyx_v_nsample, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_92logseries(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_p, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_94multivariate_normal(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_mean, PyObject *__pyx_v_cov, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_96multinomial(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, npy_intp __pyx_v_n, PyObject *__pyx_v_pvals, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_98dirichlet(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_size); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_100shuffle(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
-+static PyObject *__pyx_pf_6mtrand_11RandomState_102permutation(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
- static char __pyx_k_1[] = "size is not compatible with inputs";
- static char __pyx_k_9[] = "algorithm must be 'MT19937'";
- static char __pyx_k_11[] = "state must be 624 longs";
-@@ -1318,7 +1447,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("cont0_array");
-+  __Pyx_RefNannySetupContext("cont0_array", 0);
- 
-   /* "mtrand.pyx":134
-  *     cdef npy_intp i
-@@ -1365,7 +1494,7 @@
-     __Pyx_GOTREF(__pyx_t_4);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -1470,7 +1599,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("cont1_array_sc");
-+  __Pyx_RefNannySetupContext("cont1_array_sc", 0);
- 
-   /* "mtrand.pyx":151
-  *     cdef npy_intp i
-@@ -1517,7 +1646,7 @@
-     __Pyx_GOTREF(__pyx_t_4);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -1625,7 +1754,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("cont1_array");
-+  __Pyx_RefNannySetupContext("cont1_array", 0);
- 
-   /* "mtrand.pyx":170
-  *     cdef broadcast multi
-@@ -1731,7 +1860,7 @@
-     __Pyx_GOTREF(__pyx_t_5);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -1886,7 +2015,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("cont2_array_sc");
-+  __Pyx_RefNannySetupContext("cont2_array_sc", 0);
- 
-   /* "mtrand.pyx":198
-  *     cdef npy_intp i
-@@ -1933,7 +2062,7 @@
-     __Pyx_GOTREF(__pyx_t_4);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -2040,7 +2169,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("cont2_array");
-+  __Pyx_RefNannySetupContext("cont2_array", 0);
- 
-   /* "mtrand.pyx":219
-  *     cdef broadcast multi
-@@ -2155,7 +2284,7 @@
-     __Pyx_GOTREF(__pyx_t_5);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -2327,7 +2456,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("cont3_array_sc");
-+  __Pyx_RefNannySetupContext("cont3_array_sc", 0);
- 
-   /* "mtrand.pyx":250
-  *     cdef npy_intp i
-@@ -2374,7 +2503,7 @@
-     __Pyx_GOTREF(__pyx_t_4);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -2482,7 +2611,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("cont3_array");
-+  __Pyx_RefNannySetupContext("cont3_array", 0);
- 
-   /* "mtrand.pyx":272
-  *     cdef broadcast multi
-@@ -2606,7 +2735,7 @@
-     __Pyx_GOTREF(__pyx_t_5);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -2778,7 +2907,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("disc0_array");
-+  __Pyx_RefNannySetupContext("disc0_array", 0);
- 
-   /* "mtrand.pyx":303
-  *     cdef npy_intp i
-@@ -2820,7 +2949,7 @@
-     __Pyx_GOTREF(__pyx_t_3);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -2925,7 +3054,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("discnp_array_sc");
-+  __Pyx_RefNannySetupContext("discnp_array_sc", 0);
- 
-   /* "mtrand.pyx":319
-  *     cdef npy_intp i
-@@ -2967,7 +3096,7 @@
-     __Pyx_GOTREF(__pyx_t_3);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -3074,7 +3203,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("discnp_array");
-+  __Pyx_RefNannySetupContext("discnp_array", 0);
- 
-   /* "mtrand.pyx":338
-  *     cdef broadcast multi
-@@ -3184,7 +3313,7 @@
-     __Pyx_GOTREF(__pyx_t_4);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -3356,7 +3485,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("discdd_array_sc");
-+  __Pyx_RefNannySetupContext("discdd_array_sc", 0);
- 
-   /* "mtrand.pyx":368
-  *     cdef npy_intp i
-@@ -3398,7 +3527,7 @@
-     __Pyx_GOTREF(__pyx_t_3);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -3505,7 +3634,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("discdd_array");
-+  __Pyx_RefNannySetupContext("discdd_array", 0);
- 
-   /* "mtrand.pyx":387
-  *     cdef broadcast multi
-@@ -3615,7 +3744,7 @@
-     __Pyx_GOTREF(__pyx_t_4);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -3787,7 +3916,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("discnmN_array_sc");
-+  __Pyx_RefNannySetupContext("discnmN_array_sc", 0);
- 
-   /* "mtrand.pyx":418
-  *     cdef npy_intp i
-@@ -3829,7 +3958,7 @@
-     __Pyx_GOTREF(__pyx_t_3);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -3937,7 +4066,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("discnmN_array");
-+  __Pyx_RefNannySetupContext("discnmN_array", 0);
- 
-   /* "mtrand.pyx":439
-  *     cdef broadcast multi
-@@ -4056,7 +4185,7 @@
-     __Pyx_GOTREF(__pyx_t_4);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -4228,7 +4357,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("discd_array_sc");
-+  __Pyx_RefNannySetupContext("discd_array_sc", 0);
- 
-   /* "mtrand.pyx":471
-  *     cdef npy_intp i
-@@ -4270,7 +4399,7 @@
-     __Pyx_GOTREF(__pyx_t_3);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -4378,7 +4507,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("discd_array");
-+  __Pyx_RefNannySetupContext("discd_array", 0);
- 
-   /* "mtrand.pyx":490
-  *     cdef flatiter itera
-@@ -4479,7 +4608,7 @@
-     __Pyx_GOTREF(__pyx_t_4);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -4628,7 +4757,7 @@
-   double __pyx_r;
-   __Pyx_RefNannyDeclarations
-   npy_intp __pyx_t_1;
--  __Pyx_RefNannySetupContext("kahan_sum");
-+  __Pyx_RefNannySetupContext("kahan_sum", 0);
- 
-   /* "mtrand.pyx":513
-  *     cdef double c, y, t, sum
-@@ -4711,39 +4840,35 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":558
-+/* Python wrapper */
-+static int __pyx_pw_6mtrand_11RandomState_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static int __pyx_pw_6mtrand_11RandomState_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_seed = 0;
-+  int __pyx_r;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__seed,0};
-+    PyObject* values[1] = {0};
-+
-+    /* "mtrand.pyx":558
-  *     poisson_lam_max = np.iinfo('l').max - np.sqrt(np.iinfo('l').max)*10
-  * 
-  *     def __init__(self, seed=None):             # <<<<<<<<<<<<<<
-  *         self.internal_state = <rk_state*>PyMem_Malloc(sizeof(rk_state))
-  * 
-  */
--
--static int __pyx_pf_6mtrand_11RandomState___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static int __pyx_pf_6mtrand_11RandomState___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_seed = 0;
--  int __pyx_r;
--  __Pyx_RefNannyDeclarations
--  PyObject *__pyx_t_1 = NULL;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__seed,0};
--  __Pyx_RefNannySetupContext("__init__");
--  {
--    PyObject* values[1] = {0};
-     values[0] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__seed);
-@@ -4751,7 +4876,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -4770,6 +4895,21 @@
-   __Pyx_RefNannyFinishContext();
-   return -1;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState___init__(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_seed);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static int __pyx_pf_6mtrand_11RandomState___init__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_seed) {
-+  int __pyx_r;
-+  __Pyx_RefNannyDeclarations
-+  PyObject *__pyx_t_1 = NULL;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("__init__", 0);
- 
-   /* "mtrand.pyx":559
-  * 
-@@ -4778,7 +4918,7 @@
-  * 
-  *         self.seed(seed)
-  */
--  ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state = ((rk_state *)PyMem_Malloc((sizeof(rk_state))));
-+  __pyx_v_self->internal_state = ((rk_state *)PyMem_Malloc((sizeof(rk_state))));
- 
-   /* "mtrand.pyx":561
-  *         self.internal_state = <rk_state*>PyMem_Malloc(sizeof(rk_state))
-@@ -4787,10 +4927,10 @@
-  * 
-  *     def __dealloc__(self):
-  */
--  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__seed); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__seed); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_1);
-   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_INCREF(__pyx_v_seed);
-   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_seed);
-   __Pyx_GIVEREF(__pyx_v_seed);
-@@ -4813,6 +4953,15 @@
-   return __pyx_r;
- }
- 
-+/* Python wrapper */
-+static void __pyx_pw_6mtrand_11RandomState_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
-+static void __pyx_pw_6mtrand_11RandomState_3__dealloc__(PyObject *__pyx_v_self) {
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-+  __pyx_pf_6mtrand_11RandomState_2__dealloc__(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self));
-+  __Pyx_RefNannyFinishContext();
-+}
-+
- /* "mtrand.pyx":563
-  *         self.seed(seed)
-  * 
-@@ -4821,11 +4970,10 @@
-  *             PyMem_Free(self.internal_state)
-  */
- 
--static void __pyx_pf_6mtrand_11RandomState_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
--static void __pyx_pf_6mtrand_11RandomState_1__dealloc__(PyObject *__pyx_v_self) {
-+static void __pyx_pf_6mtrand_11RandomState_2__dealloc__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self) {
-   __Pyx_RefNannyDeclarations
-   int __pyx_t_1;
--  __Pyx_RefNannySetupContext("__dealloc__");
-+  __Pyx_RefNannySetupContext("__dealloc__", 0);
- 
-   /* "mtrand.pyx":564
-  * 
-@@ -4834,7 +4982,7 @@
-  *             PyMem_Free(self.internal_state)
-  *             self.internal_state = NULL
-  */
--  __pyx_t_1 = (((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state != NULL);
-+  __pyx_t_1 = (__pyx_v_self->internal_state != NULL);
-   if (__pyx_t_1) {
- 
-     /* "mtrand.pyx":565
-@@ -4844,7 +4992,7 @@
-  *             self.internal_state = NULL
-  * 
-  */
--    PyMem_Free(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state);
-+    PyMem_Free(__pyx_v_self->internal_state);
- 
-     /* "mtrand.pyx":566
-  *         if self.internal_state != NULL:
-@@ -4853,52 +5001,44 @@
-  * 
-  *     def seed(self, seed=None):
-  */
--    ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state = NULL;
--    goto __pyx_L5;
-+    __pyx_v_self->internal_state = NULL;
-+    goto __pyx_L3;
-   }
--  __pyx_L5:;
-+  __pyx_L3:;
- 
-   __Pyx_RefNannyFinishContext();
- }
- 
--/* "mtrand.pyx":568
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_5seed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_4seed[] = "\n        seed(seed=None)\n\n        Seed the generator.\n\n        This method is called when `RandomState` is initialized. It can be\n        called again to re-seed the generator. For details, see `RandomState`.\n\n        Parameters\n        ----------\n        seed : int or array_like, optional\n            Seed for `RandomState`.\n\n        See Also\n        --------\n        RandomState\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_5seed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_seed = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("seed (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__seed,0};
-+    PyObject* values[1] = {0};
-+
-+    /* "mtrand.pyx":568
-  *             self.internal_state = NULL
-  * 
-  *     def seed(self, seed=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         seed(seed=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_2seed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_2seed[] = "\n        seed(seed=None)\n\n        Seed the generator.\n\n        This method is called when `RandomState` is initialized. It can be\n        called again to re-seed the generator. For details, see `RandomState`.\n\n        Parameters\n        ----------\n        seed : int or array_like, optional\n            Seed for `RandomState`.\n\n        See Also\n        --------\n        RandomState\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_2seed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_seed = 0;
--  rk_error __pyx_v_errcode;
--  PyArrayObject *arrayObject_obj = 0;
--  PyObject *__pyx_v_iseed = NULL;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  unsigned long __pyx_t_2;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__seed,0};
--  __Pyx_RefNannySetupContext("seed");
--  {
--    PyObject* values[1] = {0};
-     values[0] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__seed);
-@@ -4906,7 +5046,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "seed") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "seed") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -4925,6 +5065,25 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_4seed(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_seed);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_4seed(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_seed) {
-+  CYTHON_UNUSED rk_error __pyx_v_errcode;
-+  PyArrayObject *arrayObject_obj = 0;
-+  PyObject *__pyx_v_iseed = NULL;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  unsigned long __pyx_t_2;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("seed", 0);
- 
-   /* "mtrand.pyx":589
-  *         cdef rk_error errcode
-@@ -4943,8 +5102,8 @@
-  *         elif type(seed) is int:
-  *             rk_seed(seed, self.internal_state)
-  */
--    __pyx_v_errcode = rk_randomseed(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state);
--    goto __pyx_L6;
-+    __pyx_v_errcode = rk_randomseed(__pyx_v_self->internal_state);
-+    goto __pyx_L3;
-   }
- 
-   /* "mtrand.pyx":591
-@@ -4965,8 +5124,8 @@
-  *             iseed = int(seed)
-  */
-     __pyx_t_2 = __Pyx_PyInt_AsUnsignedLong(__pyx_v_seed); if (unlikely((__pyx_t_2 == (unsigned long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    rk_seed(__pyx_t_2, ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state);
--    goto __pyx_L6;
-+    rk_seed(__pyx_t_2, __pyx_v_self->internal_state);
-+    goto __pyx_L3;
-   }
- 
-   /* "mtrand.pyx":593
-@@ -4993,7 +5152,7 @@
-  *         else:
-  */
-     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+    __Pyx_GOTREF(__pyx_t_4);
-     __Pyx_INCREF(__pyx_v_seed);
-     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_seed);
-     __Pyx_GIVEREF(__pyx_v_seed);
-@@ -5011,8 +5170,8 @@
-  *             obj = <ndarray>PyArray_ContiguousFromObject(seed, NPY_LONG, 1, 1)
-  */
-     __pyx_t_2 = __Pyx_PyInt_AsUnsignedLong(__pyx_v_iseed); if (unlikely((__pyx_t_2 == (unsigned long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    rk_seed(__pyx_t_2, ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state);
--    goto __pyx_L6;
-+    rk_seed(__pyx_t_2, __pyx_v_self->internal_state);
-+    goto __pyx_L3;
-   }
-   /*else*/ {
- 
-@@ -5036,9 +5195,9 @@
-  * 
-  *     def get_state(self):
-  */
--    init_by_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, ((unsigned long *)arrayObject_obj->data), (arrayObject_obj->dimensions[0]));
-+    init_by_array(__pyx_v_self->internal_state, ((unsigned long *)arrayObject_obj->data), (arrayObject_obj->dimensions[0]));
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-   goto __pyx_L0;
-@@ -5055,6 +5214,18 @@
-   return __pyx_r;
- }
- 
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_7get_state(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_6get_state[] = "\n        get_state()\n\n        Return a tuple representing the internal state of the generator.\n\n        For more details, see `set_state`.\n\n        Returns\n        -------\n        out : tuple(str, ndarray of 624 uints, int, int, float)\n            The returned tuple has the following items:\n\n            1. the string 'MT19937'.\n            2. a 1-D array of 624 unsigned integer keys.\n            3. an integer ``pos``.\n            4. an integer ``has_gauss``.\n            5. a float ``cached_gaussian``.\n\n        See Also\n        --------\n        set_state\n\n        Notes\n        -----\n        `set_state` and `get_state` are not needed to work with any of the\n        random distributions in NumPy. If the internal state is manually altered,\n        the user should know exactly what he/she is doing.\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_7get_state(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("get_state (wrapper)", 0);
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_6get_state(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self));
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
- /* "mtrand.pyx":601
-  *                 obj.dimensions[0])
-  * 
-@@ -5063,9 +5234,7 @@
-  *         get_state()
-  */
- 
--static PyObject *__pyx_pf_6mtrand_11RandomState_3get_state(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_3get_state[] = "\n        get_state()\n\n        Return a tuple representing the internal state of the generator.\n\n        For more details, see `set_state`.\n\n        Returns\n        -------\n        out : tuple(str, ndarray of 624 uints, int, int, float)\n            The returned tuple has the following items:\n\n            1. the string 'MT19937'.\n            2. a 1-D array of 624 unsigned integer keys.\n            3. an integer ``pos``.\n            4. an integer ``has_gauss``.\n            5. a float ``cached_gaussian``.\n\n        See Also\n        --------\n        set_state\n\n        Notes\n        -----\n        `set_state` and `get_state` are not needed to work with any of the\n        random distributions in NumPy. If the internal state is manually altered,\n        the user should know exactly what he/she is doing.\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_3get_state(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pf_6mtrand_11RandomState_6get_state(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self) {
-   PyArrayObject *arrayObject_state = 0;
-   PyObject *__pyx_r = NULL;
-   __Pyx_RefNannyDeclarations
-@@ -5076,7 +5245,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("get_state");
-+  __Pyx_RefNannySetupContext("get_state", 0);
- 
-   /* "mtrand.pyx":632
-  *         """
-@@ -5096,7 +5265,7 @@
-   __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-   __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-+  __Pyx_GOTREF(__pyx_t_1);
-   __Pyx_INCREF(__pyx_int_624);
-   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_624);
-   __Pyx_GIVEREF(__pyx_int_624);
-@@ -5118,7 +5287,7 @@
-  *         state = <ndarray>np.asarray(state, np.uint32)
-  *         return ('MT19937', state, self.internal_state.pos,
-  */
--  memcpy(((void *)arrayObject_state->data), ((void *)((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state->key), (624 * (sizeof(long))));
-+  memcpy(((void *)arrayObject_state->data), ((void *)__pyx_v_self->internal_state->key), (624 * (sizeof(long))));
- 
-   /* "mtrand.pyx":634
-  *         state = <ndarray>np.empty(624, np.uint)
-@@ -5138,7 +5307,7 @@
-   __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+  __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_INCREF(((PyObject *)arrayObject_state));
-   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)arrayObject_state));
-   __Pyx_GIVEREF(((PyObject *)arrayObject_state));
-@@ -5162,7 +5331,7 @@
-  * 
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = PyInt_FromLong(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state->pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = PyInt_FromLong(__pyx_v_self->internal_state->pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
- 
-   /* "mtrand.pyx":636
-@@ -5172,12 +5341,12 @@
-  * 
-  *     def set_state(self, state):
-  */
--  __pyx_t_3 = PyInt_FromLong(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state->has_gauss); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_3 = PyInt_FromLong(__pyx_v_self->internal_state->has_gauss); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_3);
--  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state->gauss); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->internal_state->gauss); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_1);
-   __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(((PyObject *)__pyx_n_s__MT19937));
-   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__MT19937));
-   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__MT19937));
-@@ -5213,6 +5382,18 @@
-   return __pyx_r;
- }
- 
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_9set_state(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_8set_state[] = "\n        set_state(state)\n\n        Set the internal state of the generator from a tuple.\n\n        For use if one has reason to manually (re-)set the internal state of the\n        \"Mersenne Twister\"[1]_ pseudo-random number generating algorithm.\n\n        Parameters\n        ----------\n        state : tuple(str, ndarray of 624 uints, int, int, float)\n            The `state` tuple has the following items:\n\n            1. the string 'MT19937', specifying the Mersenne Twister algorithm.\n            2. a 1-D array of 624 unsigned integers ``keys``.\n            3. an integer ``pos``.\n            4. an integer ``has_gauss``.\n            5. a float ``cached_gaussian``.\n\n        Returns\n        -------\n        out : None\n            Returns 'None' on success.\n\n        See Also\n        --------\n        get_state\n\n        Notes\n        -----\n        `set_state` and `get_state` are not needed to work with any of the\n        random distributions in NumPy. If the internal state is manually altered,\n        the user should know exactly what he/she is doing.\n\n        For backwards compatibility, the form (str, array of 624 uints, int) is\n        also accepted although it is missing some information about the cached\n        Gaussian value: ``state = ('MT19937', keys, pos)``.\n\n        References\n        ----------\n        .. [1] M. Matsumoto and T. Nishimura, \"Mersenne Twister: A\n           623-dimensionally equidistributed uniform pseudorandom number\n           generator,\" *ACM Trans. on Modeling and Computer Simulation*,\n           Vol. 8, No. 1, pp. 3-30, Jan. 1998.\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_9set_state(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("set_state (wrapper)", 0);
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_8set_state(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), ((PyObject *)__pyx_v_state));
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
- /* "mtrand.pyx":638
-  *             self.internal_state.has_gauss, self.internal_state.gauss)
-  * 
-@@ -5221,9 +5402,7 @@
-  *         set_state(state)
-  */
- 
--static PyObject *__pyx_pf_6mtrand_11RandomState_4set_state(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_4set_state[] = "\n        set_state(state)\n\n        Set the internal state of the generator from a tuple.\n\n        For use if one has reason to manually (re-)set the internal state of the\n        \"Mersenne Twister\"[1]_ pseudo-random number generating algorithm.\n\n        Parameters\n        ----------\n        state : tuple(str, ndarray of 624 uints, int, int, float)\n            The `state` tuple has the following items:\n\n            1. the string 'MT19937', specifying the Mersenne Twister algorithm.\n            2. a 1-D array of 624 unsigned integers ``keys``.\n            3. an integer ``pos``.\n            4. an integer ``has_gauss``.\n            5. a float ``cached_gaussian``.\n\n        Returns\n        -------\n        out : None\n            Returns 'None' on success.\n\n        See Also\n        --------\n        get_state\n\n        Notes\n        -----\n        `set_state` and `get_state` are not needed to work with any of the\n        random distributions in NumPy. If the internal state is manually altered,\n        the user should know exactly what he/she is doing.\n\n        For backwards compatibility, the form (str, array of 624 uints, int) is\n        also accepted although it is missing some information about the cached\n        Gaussian value: ``state = ('MT19937', keys, pos)``.\n\n        References\n        ----------\n        .. [1] M. Matsumoto and T. Nishimura, \"Mersenne Twister: A\n           623-dimensionally equidistributed uniform pseudorandom number\n           generator,\" *ACM Trans. on Modeling and Computer Simulation*,\n           Vol. 8, No. 1, pp. 3-30, Jan. 1998.\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_4set_state(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
-+static PyObject *__pyx_pf_6mtrand_11RandomState_8set_state(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_state) {
-   PyArrayObject *arrayObject_obj = 0;
-   int __pyx_v_pos;
-   PyObject *__pyx_v_algorithm_name = NULL;
-@@ -5247,7 +5426,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("set_state");
-+  __Pyx_RefNannySetupContext("set_state", 0);
- 
-   /* "mtrand.pyx":687
-  *         cdef ndarray obj "arrayObject_obj"
-@@ -5268,7 +5447,9 @@
-  *             raise ValueError("algorithm must be 'MT19937'")
-  *         key, pos = state[1:3]
-  */
--  __pyx_t_2 = __Pyx_PyString_Equals(__pyx_v_algorithm_name, ((PyObject *)__pyx_n_s__MT19937), Py_NE); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_1 = PyObject_RichCompare(__pyx_v_algorithm_name, ((PyObject *)__pyx_n_s__MT19937), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-   if (__pyx_t_2) {
- 
-     /* "mtrand.pyx":689
-@@ -5283,9 +5464,9 @@
-     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L5;
-+    goto __pyx_L3;
-   }
--  __pyx_L5:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":690
-  *         if algorithm_name != 'MT19937':
-@@ -5298,45 +5479,52 @@
-   __Pyx_GOTREF(__pyx_t_1);
-   if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
-     PyObject* sequence = __pyx_t_1;
-+    #if CYTHON_COMPILING_IN_CPYTHON
-+    Py_ssize_t size = Py_SIZE(sequence);
-+    #else
-+    Py_ssize_t size = PySequence_Size(sequence);
-+    #endif
-+    if (unlikely(size != 2)) {
-+      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
-+      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    }
-+    #if CYTHON_COMPILING_IN_CPYTHON
-     if (likely(PyTuple_CheckExact(sequence))) {
--      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
--        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
--        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
--        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      }
-       __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
-       __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
-     } else {
--      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
--        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
--        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
--        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      }
-       __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
-       __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
-     }
-     __Pyx_INCREF(__pyx_t_3);
-     __Pyx_INCREF(__pyx_t_4);
-+    #else
-+    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    #endif
-     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--  } else {
-+  } else
-+  {
-     Py_ssize_t index = -1;
-     __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_5);
-     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-     __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
--    index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
-+    index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
-     __Pyx_GOTREF(__pyx_t_3);
--    index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
-+    index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
-     __Pyx_GOTREF(__pyx_t_4);
-     if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_6 = NULL;
-     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
--    goto __pyx_L7_unpacking_done;
--    __pyx_L6_unpacking_failed:;
-+    goto __pyx_L5_unpacking_done;
-+    __pyx_L4_unpacking_failed:;
-     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
--    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
--    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
-+    __pyx_t_6 = NULL;
-+    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __pyx_L7_unpacking_done:;
-+    __pyx_L5_unpacking_done:;
-   }
-   __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-@@ -5376,7 +5564,7 @@
-     __Pyx_GOTREF(__pyx_t_1);
-     __pyx_v_cached_gaussian = __pyx_t_1;
-     __pyx_t_1 = 0;
--    goto __pyx_L8;
-+    goto __pyx_L6;
-   }
-   /*else*/ {
- 
-@@ -5391,52 +5579,59 @@
-     __Pyx_GOTREF(__pyx_t_1);
-     if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
-       PyObject* sequence = __pyx_t_1;
-+      #if CYTHON_COMPILING_IN_CPYTHON
-+      Py_ssize_t size = Py_SIZE(sequence);
-+      #else
-+      Py_ssize_t size = PySequence_Size(sequence);
-+      #endif
-+      if (unlikely(size != 2)) {
-+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
-+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+      }
-+      #if CYTHON_COMPILING_IN_CPYTHON
-       if (likely(PyTuple_CheckExact(sequence))) {
--        if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
--          if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
--          else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
--          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--        }
-         __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
-         __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
-       } else {
--        if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
--          if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
--          else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
--          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--        }
-         __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
-         __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
-       }
-       __Pyx_INCREF(__pyx_t_4);
-       __Pyx_INCREF(__pyx_t_3);
-+      #else
-+      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+      #endif
-       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--    } else {
-+    } else
-+    {
-       Py_ssize_t index = -1;
-       __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-       __Pyx_GOTREF(__pyx_t_5);
-       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-       __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
--      index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L9_unpacking_failed;
-+      index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
-       __Pyx_GOTREF(__pyx_t_4);
--      index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L9_unpacking_failed;
-+      index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed;
-       __Pyx_GOTREF(__pyx_t_3);
-       if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+      __pyx_t_6 = NULL;
-       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
--      goto __pyx_L10_unpacking_done;
--      __pyx_L9_unpacking_failed:;
-+      goto __pyx_L8_unpacking_done;
-+      __pyx_L7_unpacking_failed:;
-       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
--      if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
--      if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
-+      __pyx_t_6 = NULL;
-+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      __pyx_L10_unpacking_done:;
-+      __pyx_L8_unpacking_done:;
-     }
-     __pyx_v_has_gauss = __pyx_t_4;
-     __pyx_t_4 = 0;
-     __pyx_v_cached_gaussian = __pyx_t_3;
-     __pyx_t_3 = 0;
-   }
--  __pyx_L8:;
-+  __pyx_L6:;
- 
-   /* "mtrand.pyx":696
-  *         else:
-@@ -5459,7 +5654,7 @@
-  *         except TypeError:
-  *             # compatibility -- could be an older pickle
-  */
--      __pyx_t_1 = PyArray_ContiguousFromObject(__pyx_v_key, NPY_ULONG, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
-+      __pyx_t_1 = PyArray_ContiguousFromObject(__pyx_v_key, NPY_ULONG, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
-       __Pyx_GOTREF(__pyx_t_1);
-       __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_1)));
-       arrayObject_obj = ((PyArrayObject *)__pyx_t_1);
-@@ -5468,8 +5663,8 @@
-     __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-     __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
-     __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
--    goto __pyx_L18_try_end;
--    __pyx_L11_error:;
-+    goto __pyx_L16_try_end;
-+    __pyx_L9_error:;
-     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-@@ -5485,7 +5680,7 @@
-     __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
-     if (__pyx_t_7) {
-       __Pyx_AddTraceback("mtrand.RandomState.set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
--      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;}
-+      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
-       __Pyx_GOTREF(__pyx_t_1);
-       __Pyx_GOTREF(__pyx_t_3);
-       __Pyx_GOTREF(__pyx_t_4);
-@@ -5497,7 +5692,7 @@
-  *         if obj.dimensions[0] != 624:
-  *             raise ValueError("state must be 624 longs")
-  */
--      __pyx_t_5 = PyArray_ContiguousFromObject(__pyx_v_key, NPY_LONG, 1, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;}
-+      __pyx_t_5 = PyArray_ContiguousFromObject(__pyx_v_key, NPY_LONG, 1, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
-       __Pyx_GOTREF(__pyx_t_5);
-       __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_5)));
-       __Pyx_XDECREF(((PyObject *)arrayObject_obj));
-@@ -5506,20 +5701,20 @@
-       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
--      goto __pyx_L12_exception_handled;
-+      goto __pyx_L10_exception_handled;
-     }
--    __pyx_L13_except_error:;
-+    __pyx_L11_except_error:;
-     __Pyx_XGIVEREF(__pyx_t_9);
-     __Pyx_XGIVEREF(__pyx_t_10);
-     __Pyx_XGIVEREF(__pyx_t_11);
-     __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
-     goto __pyx_L1_error;
--    __pyx_L12_exception_handled:;
-+    __pyx_L10_exception_handled:;
-     __Pyx_XGIVEREF(__pyx_t_9);
-     __Pyx_XGIVEREF(__pyx_t_10);
-     __Pyx_XGIVEREF(__pyx_t_11);
-     __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
--    __pyx_L18_try_end:;
-+    __pyx_L16_try_end:;
-   }
- 
-   /* "mtrand.pyx":701
-@@ -5544,9 +5739,9 @@
-     __Pyx_Raise(__pyx_t_4, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L21;
-+    goto __pyx_L19;
-   }
--  __pyx_L21:;
-+  __pyx_L19:;
- 
-   /* "mtrand.pyx":703
-  *         if obj.dimensions[0] != 624:
-@@ -5555,7 +5750,7 @@
-  *         self.internal_state.pos = pos
-  *         self.internal_state.has_gauss = has_gauss
-  */
--  memcpy(((void *)((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state->key), ((void *)arrayObject_obj->data), (624 * (sizeof(long))));
-+  memcpy(((void *)__pyx_v_self->internal_state->key), ((void *)arrayObject_obj->data), (624 * (sizeof(long))));
- 
-   /* "mtrand.pyx":704
-  *             raise ValueError("state must be 624 longs")
-@@ -5564,7 +5759,7 @@
-  *         self.internal_state.has_gauss = has_gauss
-  *         self.internal_state.gauss = cached_gaussian
-  */
--  ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state->pos = __pyx_v_pos;
-+  __pyx_v_self->internal_state->pos = __pyx_v_pos;
- 
-   /* "mtrand.pyx":705
-  *         memcpy(<void*>(self.internal_state.key), <void*>(obj.data), 624*sizeof(long))
-@@ -5574,7 +5769,7 @@
-  * 
-  */
-   __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_v_has_gauss); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state->has_gauss = __pyx_t_7;
-+  __pyx_v_self->internal_state->has_gauss = __pyx_t_7;
- 
-   /* "mtrand.pyx":706
-  *         self.internal_state.pos = pos
-@@ -5584,7 +5779,7 @@
-  *     # Pickling support:
-  */
-   __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_v_cached_gaussian); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state->gauss = __pyx_t_12;
-+  __pyx_v_self->internal_state->gauss = __pyx_t_12;
- 
-   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-   goto __pyx_L0;
-@@ -5606,6 +5801,17 @@
-   return __pyx_r;
- }
- 
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_11__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_6mtrand_11RandomState_11__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_10__getstate__(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self));
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
- /* "mtrand.pyx":709
-  * 
-  *     # Pickling support:
-@@ -5614,8 +5820,7 @@
-  * 
-  */
- 
--static PyObject *__pyx_pf_6mtrand_11RandomState_5__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pf_6mtrand_11RandomState_5__getstate__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pf_6mtrand_11RandomState_10__getstate__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self) {
-   PyObject *__pyx_r = NULL;
-   __Pyx_RefNannyDeclarations
-   PyObject *__pyx_t_1 = NULL;
-@@ -5623,7 +5828,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("__getstate__");
-+  __Pyx_RefNannySetupContext("__getstate__", 0);
- 
-   /* "mtrand.pyx":710
-  *     # Pickling support:
-@@ -5633,7 +5838,7 @@
-  *     def __setstate__(self, state):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__get_state); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_state); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_1);
-   __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-@@ -5655,6 +5860,17 @@
-   return __pyx_r;
- }
- 
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_13__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
-+static PyObject *__pyx_pw_6mtrand_11RandomState_13__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_12__setstate__(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), ((PyObject *)__pyx_v_state));
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
- /* "mtrand.pyx":712
-  *         return self.get_state()
-  * 
-@@ -5663,8 +5879,7 @@
-  * 
-  */
- 
--static PyObject *__pyx_pf_6mtrand_11RandomState_6__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
--static PyObject *__pyx_pf_6mtrand_11RandomState_6__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
-+static PyObject *__pyx_pf_6mtrand_11RandomState_12__setstate__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_state) {
-   PyObject *__pyx_r = NULL;
-   __Pyx_RefNannyDeclarations
-   PyObject *__pyx_t_1 = NULL;
-@@ -5673,7 +5888,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("__setstate__");
-+  __Pyx_RefNannySetupContext("__setstate__", 0);
- 
-   /* "mtrand.pyx":713
-  * 
-@@ -5682,10 +5897,10 @@
-  * 
-  *     def __reduce__(self):
-  */
--  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__set_state); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__set_state); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_1);
-   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_INCREF(__pyx_v_state);
-   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_state);
-   __Pyx_GIVEREF(__pyx_v_state);
-@@ -5709,6 +5924,17 @@
-   return __pyx_r;
- }
- 
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_15__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_6mtrand_11RandomState_15__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_14__reduce__(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self));
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
- /* "mtrand.pyx":715
-  *         self.set_state(state)
-  * 
-@@ -5717,8 +5943,7 @@
-  * 
-  */
- 
--static PyObject *__pyx_pf_6mtrand_11RandomState_7__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pf_6mtrand_11RandomState_7__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pf_6mtrand_11RandomState_14__reduce__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self) {
-   PyObject *__pyx_r = NULL;
-   __Pyx_RefNannyDeclarations
-   PyObject *__pyx_t_1 = NULL;
-@@ -5727,7 +5952,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("__reduce__");
-+  __Pyx_RefNannySetupContext("__reduce__", 0);
- 
-   /* "mtrand.pyx":716
-  * 
-@@ -5745,13 +5970,13 @@
-   __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____RandomState_ctor); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_1);
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
--  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__get_state); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_state); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
-   __Pyx_GIVEREF(__pyx_t_1);
-   __Pyx_INCREF(((PyObject *)__pyx_empty_tuple));
-@@ -5779,38 +6004,36 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":719
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_17random_sample(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_16random_sample[] = "\n        random_sample(size=None)\n\n        Return random floats in the half-open interval [0.0, 1.0).\n\n        Results are from the \"continuous uniform\" distribution over the\n        stated interval.  To sample :math:`Unif[a, b), b > a` multiply\n        the output of `random_sample` by `(b-a)` and add `a`::\n\n          (b - a) * random_sample() + a\n\n        Parameters\n        ----------\n        size : int or tuple of ints, optional\n            Defines the shape of the returned array of random floats. If None\n            (the default), returns a single float.\n\n        Returns\n        -------\n        out : float or ndarray of floats\n            Array of random floats of shape `size` (unless ``size=None``, in which\n            case a single float is returned).\n\n        Examples\n        --------\n        >>> np.random.random_sample()\n        0.47108547995356098\n        >>> type(np.random.random_sample())\n        <type 'float'>\n        >>> np.random.random_sample((5,))\n        array([ 0.30220482,  0.86820401,  0.1654503 ,  0.11659149,  0.54323428])\n\n        Three-by-two array of random numbers from [-5, 0):\n\n        >>> 5 * np.random.random_sample((3, 2)) - 5\n        array([[-3.99149989, -0.52338984],\n               [-2.99091858, -0.79479508],\n               [-1.23204345, -1.75224494]])\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_17random_sample(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("random_sample (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0};
-+    PyObject* values[1] = {0};
-+
-+    /* "mtrand.pyx":719
-  * 
-  *     # Basic distributions:
-  *     def random_sample(self, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         random_sample(size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_8random_sample(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_8random_sample[] = "\n        random_sample(size=None)\n\n        Return random floats in the half-open interval [0.0, 1.0).\n\n        Results are from the \"continuous uniform\" distribution over the\n        stated interval.  To sample :math:`Unif[a, b), b > a` multiply\n        the output of `random_sample` by `(b-a)` and add `a`::\n\n          (b - a) * random_sample() + a\n\n        Parameters\n        ----------\n        size : int or tuple of ints, optional\n            Defines the shape of the returned array of random floats. If None\n            (the default), returns a single float.\n\n        Returns\n        -------\n        out : float or ndarray of floats\n            Array of random floats of shape `size` (unless ``size=None``, in which\n            case a single float is returned).\n\n        Examples\n        --------\n        >>> np.random.random_sample()\n        0.47108547995356098\n        >>> type(np.random.random_sample())\n        <type 'float'>\n        >>> np.random.random_sample((5,))\n        array([ 0.30220482,  0.86820401,  0.1654503 ,  0.11659149,  0.54323428])\n\n        Three-by-two array of random numbers from [-5, 0):\n\n        >>> 5 * np.random.random_sample((3, 2)) - 5\n        array([[-3.99149989, -0.52338984],\n               [-2.99091858, -0.79479508],\n               [-1.23204345, -1.75224494]])\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_8random_sample(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_size = 0;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  PyObject *__pyx_t_1 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("random_sample");
--  {
--    PyObject* values[1] = {0};
-     values[0] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size);
-@@ -5818,7 +6041,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "random_sample") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_sample") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -5837,6 +6060,19 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_16random_sample(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_16random_sample(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size) {
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  PyObject *__pyx_t_1 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("random_sample", 0);
- 
-   /* "mtrand.pyx":760
-  * 
-@@ -5846,7 +6082,7 @@
-  *     def tomaxint(self, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_1 = __pyx_f_6mtrand_cont0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_double, __pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_1 = __pyx_f_6mtrand_cont0_array(__pyx_v_self->internal_state, rk_double, __pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_1);
-   __pyx_r = __pyx_t_1;
-   __pyx_t_1 = 0;
-@@ -5864,38 +6100,36 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":762
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_19tomaxint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_18tomaxint[] = "\n        tomaxint(size=None)\n\n        Random integers between 0 and ``sys.maxint``, inclusive.\n\n        Return a sample of uniformly distributed random integers in the interval\n        [0, ``sys.maxint``].\n\n        Parameters\n        ----------\n        size : tuple of ints, int, optional\n            Shape of output.  If this is, for example, (m,n,k), m*n*k samples\n            are generated.  If no shape is specified, a single sample is\n            returned.\n\n        Returns\n        -------\n        out : ndarray\n            Drawn samples, with shape `size`.\n\n        See Also\n        --------\n        randint : Uniform sampling over a given half-open interval of integers.\n        random_integers : Uniform sampling over a given closed interval of\n            integers.\n\n        Examples\n        --------\n        >>> RS = np.random.mtrand.RandomState() # need a RandomState object\n        >>> RS.tomaxint((2,2,2))\n        array([[[1170048599, 1600360186],\n                [ 739731006, 1947757578]],\n               [[1871712945,  752307660],\n                [1601631370, 1479324245]]])\n        >>> import sys\n        >>> sys.maxint\n        2147483647\n        >>> RS.tomaxint((2,2,2)) < sys.maxint\n        array([[[ True,  True],\n                [ True,  True]],\n               [[ True,  True],\n                [ True,  True]]], dtype=bool)\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_19tomaxint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("tomaxint (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0};
-+    PyObject* values[1] = {0};
-+
-+    /* "mtrand.pyx":762
-  *         return cont0_array(self.internal_state, rk_double, size)
-  * 
-  *     def tomaxint(self, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         tomaxint(size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_9tomaxint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_9tomaxint[] = "\n        tomaxint(size=None)\n\n        Random integers between 0 and ``sys.maxint``, inclusive.\n\n        Return a sample of uniformly distributed random integers in the interval\n        [0, ``sys.maxint``].\n\n        Parameters\n        ----------\n        size : tuple of ints, int, optional\n            Shape of output.  If this is, for example, (m,n,k), m*n*k samples\n            are generated.  If no shape is specified, a single sample is\n            returned.\n\n        Returns\n        -------\n        out : ndarray\n            Drawn samples, with shape `size`.\n\n        See Also\n        --------\n        randint : Uniform sampling over a given half-open interval of integers.\n        random_integers : Uniform sampling over a given closed interval of\n            integers.\n\n        Examples\n        --------\n        >>> RS = np.random.mtrand.RandomState() # need a RandomState object\n        >>> RS.tomaxint((2,2,2))\n        array([[[1170048599, 1600360186],\n                [ 739731006, 1947757578]],\n               [[1871712945,  752307660],\n                [1601631370, 1479324245]]])\n        >>> import sys\n        >>> sys.maxint\n        2147483647\n        >>> RS.tomaxint((2,2,2)) < sys.maxint\n        array([[[ True,  True],\n                [ True,  True]],\n               [[ True,  True],\n                [ True,  True]]], dtype=bool)\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_9tomaxint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_size = 0;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  PyObject *__pyx_t_1 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("tomaxint");
--  {
--    PyObject* values[1] = {0};
-     values[0] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size);
-@@ -5903,7 +6137,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "tomaxint") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tomaxint") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -5922,6 +6156,19 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_18tomaxint(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_18tomaxint(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size) {
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  PyObject *__pyx_t_1 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("tomaxint", 0);
- 
-   /* "mtrand.pyx":807
-  * 
-@@ -5931,7 +6178,7 @@
-  *     def randint(self, low, high=None, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_1 = __pyx_f_6mtrand_disc0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_long, __pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_1 = __pyx_f_6mtrand_disc0_array(__pyx_v_self->internal_state, rk_long, __pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_1);
-   __pyx_r = __pyx_t_1;
-   __pyx_t_1 = 0;
-@@ -5949,48 +6196,33 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":809
-- *         return disc0_array(self.internal_state, rk_long, size)
-- * 
-- *     def randint(self, low, high=None, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         randint(low, high=None, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_10randint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_10randint[] = "\n        randint(low, high=None, size=None)\n\n        Return random integers from `low` (inclusive) to `high` (exclusive).\n\n        Return random integers from the \"discrete uniform\" distribution in the\n        \"half-open\" interval [`low`, `high`). If `high` is None (the default),\n        then results are from [0, `low`).\n\n        Parameters\n        ----------\n        low : int\n            Lowest (signed) integer to be drawn from the distribution (unless\n            ``high=None``, in which case this parameter is the *highest* such\n            integer).\n        high : int, optional\n            If provided, one above the largest (signed) integer to be drawn\n            from the distribution (see above for behavior if ``high=None``).\n        size : int or tuple of ints, optional\n            Output shape. Default is None, in which case a single int is\n            returned.\n\n        Returns\n        -------\n        out : int or ndarray of ints\n            `size`-shaped array of random integers from the appropriate\n            distribution, or a single such random int if `size` not provided.\n\n        See Also\n        --------\n        random.random_integers : similar to `randint`, only for the closed\n            interval [`low`, `high`], and 1 is the lowest value if `high` is\n            omitted. In particular, this other one is the one to use to generate\n            uniformly distributed discrete non-integers.\n\n        Examples\n        --------\n        >>> np.random.randint(2, size=10)\n        array([1, 0, 0, 0, 1, 1, 0, 0, 1, 0])\n        >>> np.random.randint(1, size=10)\n        array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n\n        Generate a 2 x 4 array of ints between 0 and 4, inclusive:\n\n        >>> np.random.randint(5, size=(2, 4))\n        array([[4, 0, 2, 1],\n               [3, 2, 2, 0]])\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_10randint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_21randint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_20randint[] = "\n        randint(low, high=None, size=None)\n\n        Return random integers from `low` (inclusive) to `high` (exclusive).\n\n        Return random integers from the \"discrete uniform\" distribution in the\n        \"half-open\" interval [`low`, `high`). If `high` is None (the default),\n        then results are from [0, `low`).\n\n        Parameters\n        ----------\n        low : int\n            Lowest (signed) integer to be drawn from the distribution (unless\n            ``high=None``, in which case this parameter is the *highest* such\n            integer).\n        high : int, optional\n            If provided, one above the largest (signed) integer to be drawn\n            from the distribution (see above for behavior if ``high=None``).\n        size : int or tuple of ints, optional\n            Output shape. Default is None, in which case a single int is\n            returned.\n\n        Returns\n        -------\n        out : int or ndarray of ints\n            `size`-shaped array of random integers from the appropriate\n            distribution, or a single such random int if `size` not provided.\n\n        See Also\n        --------\n        random.random_integers : similar to `randint`, only for the closed\n            interval [`low`, `high`], and 1 is the lowest value if `high` is\n            omitted. In particular, this other one is the one to use to generate\n            uniformly distributed discrete non-integers.\n\n        Examples\n        --------\n        >>> np.random.randint(2, size=10)\n        array([1, 0, 0, 0, 1, 1, 0, 0, 1, 0])\n        >>> np.random.randint(1, size=10)\n        array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n\n        Generate a 2 x 4 array of ints between 0 and 4, inclusive:\n\n        >>> np.random.randint(5, size=(2, 4))\n        array([[4, 0, 2, 1],\n               [3, 2, 2, 0]])\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_21randint(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_low = 0;
-   PyObject *__pyx_v_high = 0;
-   PyObject *__pyx_v_size = 0;
--  long __pyx_v_lo;
--  long __pyx_v_hi;
--  long __pyx_v_rv;
--  unsigned long __pyx_v_diff;
--  long *__pyx_v_array_data;
--  PyArrayObject *arrayObject = 0;
--  npy_intp __pyx_v_length;
--  npy_intp __pyx_v_i;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  long __pyx_t_2;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  npy_intp __pyx_t_6;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__low,&__pyx_n_s__high,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("randint");
-+  __Pyx_RefNannySetupContext("randint (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__low,&__pyx_n_s__high,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-+
-+    /* "mtrand.pyx":809
-+ *         return disc0_array(self.internal_state, rk_long, size)
-+ * 
-+ *     def randint(self, low, high=None, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         randint(low, high=None, size=None)
-+ */
-     values[1] = ((PyObject *)Py_None);
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -5998,10 +6230,9 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__low);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__low)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
-         if (kw_args > 0) {
-@@ -6015,7 +6246,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "randint") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "randint") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -6038,6 +6269,32 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_20randint(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_low, __pyx_v_high, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_20randint(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_low, PyObject *__pyx_v_high, PyObject *__pyx_v_size) {
-+  long __pyx_v_lo;
-+  long __pyx_v_hi;
-+  long __pyx_v_rv;
-+  unsigned long __pyx_v_diff;
-+  long *__pyx_v_array_data;
-+  PyArrayObject *arrayObject = 0;
-+  npy_intp __pyx_v_length;
-+  npy_intp __pyx_v_i;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  long __pyx_t_2;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  npy_intp __pyx_t_6;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("randint", 0);
- 
-   /* "mtrand.pyx":866
-  *         cdef npy_intp i
-@@ -6067,7 +6324,7 @@
-  */
-     __pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_v_low); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __pyx_v_hi = __pyx_t_2;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
-   /*else*/ {
- 
-@@ -6091,7 +6348,7 @@
-     __pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_v_high); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __pyx_v_hi = __pyx_t_2;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":873
-  *             hi = high
-@@ -6115,9 +6372,9 @@
-     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L7;
-+    goto __pyx_L4;
-   }
--  __pyx_L7:;
-+  __pyx_L4:;
- 
-   /* "mtrand.pyx":876
-  *             raise ValueError("low >= high")
-@@ -6145,7 +6402,7 @@
-  *             return rv
-  *         else:
-  */
--    __pyx_v_rv = (__pyx_v_lo + ((long)rk_interval(__pyx_v_diff, ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state)));
-+    __pyx_v_rv = (__pyx_v_lo + ((long)rk_interval(__pyx_v_diff, __pyx_v_self->internal_state)));
- 
-     /* "mtrand.pyx":879
-  *         if size is None:
-@@ -6160,7 +6417,7 @@
-     __pyx_r = __pyx_t_3;
-     __pyx_t_3 = 0;
-     goto __pyx_L0;
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
-   /*else*/ {
- 
-@@ -6177,7 +6434,7 @@
-     __Pyx_GOTREF(__pyx_t_4);
-     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-     __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+    __Pyx_GOTREF(__pyx_t_3);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -6227,7 +6484,7 @@
-  *                 array_data[i] = rv
-  *             return array
-  */
--      __pyx_v_rv = (__pyx_v_lo + ((long)rk_interval(__pyx_v_diff, ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state)));
-+      __pyx_v_rv = (__pyx_v_lo + ((long)rk_interval(__pyx_v_diff, __pyx_v_self->internal_state)));
- 
-       /* "mtrand.pyx":886
-  *             for i from 0 <= i < length:
-@@ -6251,7 +6508,7 @@
-     __pyx_r = ((PyObject *)arrayObject);
-     goto __pyx_L0;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-   goto __pyx_L0;
-@@ -6268,6 +6525,28 @@
-   return __pyx_r;
- }
- 
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_23bytes(PyObject *__pyx_v_self, PyObject *__pyx_arg_length); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_22bytes[] = "\n        bytes(length)\n\n        Return random bytes.\n\n        Parameters\n        ----------\n        length : int\n            Number of random bytes.\n\n        Returns\n        -------\n        out : str\n            String of length `length`.\n\n        Examples\n        --------\n        >>> np.random.bytes(10)\n        ' eh\\x85\\x022SZ\\xbf\\xa4' #random\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_23bytes(PyObject *__pyx_v_self, PyObject *__pyx_arg_length) {
-+  npy_intp __pyx_v_length;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("bytes (wrapper)", 0);
-+  assert(__pyx_arg_length); {
-+    __pyx_v_length = __Pyx_PyInt_from_py_npy_intp(__pyx_arg_length); if (unlikely((__pyx_v_length == (npy_intp)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+  }
-+  goto __pyx_L4_argument_unpacking_done;
-+  __pyx_L3_error:;
-+  __Pyx_AddTraceback("mtrand.RandomState.bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+  __Pyx_RefNannyFinishContext();
-+  return NULL;
-+  __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_22bytes(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), ((npy_intp)__pyx_v_length));
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
- /* "mtrand.pyx":889
-  *             return array
-  * 
-@@ -6276,10 +6555,7 @@
-  *         bytes(length)
-  */
- 
--static PyObject *__pyx_pf_6mtrand_11RandomState_11bytes(PyObject *__pyx_v_self, PyObject *__pyx_arg_length); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_11bytes[] = "\n        bytes(length)\n\n        Return random bytes.\n\n        Parameters\n        ----------\n        length : int\n            Number of random bytes.\n\n        Returns\n        -------\n        out : str\n            String of length `length`.\n\n        Examples\n        --------\n        >>> np.random.bytes(10)\n        ' eh\\x85\\x022SZ\\xbf\\xa4' #random\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_11bytes(PyObject *__pyx_v_self, PyObject *__pyx_arg_length) {
--  npy_intp __pyx_v_length;
-+static PyObject *__pyx_pf_6mtrand_11RandomState_22bytes(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, npy_intp __pyx_v_length) {
-   void *__pyx_v_bytes;
-   PyObject *__pyx_v_bytestring = NULL;
-   PyObject *__pyx_r = NULL;
-@@ -6288,16 +6564,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("bytes");
--  assert(__pyx_arg_length); {
--    __pyx_v_length = __Pyx_PyInt_from_py_npy_intp(__pyx_arg_length); if (unlikely((__pyx_v_length == (npy_intp)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
--  }
--  goto __pyx_L4_argument_unpacking_done;
--  __pyx_L3_error:;
--  __Pyx_AddTraceback("mtrand.RandomState.bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
--  __Pyx_RefNannyFinishContext();
--  return NULL;
--  __pyx_L4_argument_unpacking_done:;
-+  __Pyx_RefNannySetupContext("bytes", 0);
- 
-   /* "mtrand.pyx":912
-  *         """
-@@ -6318,7 +6585,7 @@
-  *         return bytestring
-  * 
-  */
--  rk_fill(__pyx_v_bytes, __pyx_v_length, ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state);
-+  rk_fill(__pyx_v_bytes, __pyx_v_length, __pyx_v_self->internal_state);
- 
-   /* "mtrand.pyx":914
-  *         bytestring = empty_py_bytes(length, &bytes)
-@@ -6345,45 +6612,34 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":916
-- *         return bytestring
-- * 
-- *     def uniform(self, low=0.0, high=1.0, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         uniform(low=0.0, high=1.0, size=1)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_12uniform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_12uniform[] = "\n        uniform(low=0.0, high=1.0, size=1)\n\n        Draw samples from a uniform distribution.\n\n        Samples are uniformly distributed over the half-open interval\n        ``[low, high)`` (includes low, but excludes high).  In other words,\n        any value within the given interval is equally likely to be drawn\n        by `uniform`.\n\n        Parameters\n        ----------\n        low : float, optional\n            Lower boundary of the output interval.  All values generated will be\n            greater than or equal to low.  The default value is 0.\n        high : float\n            Upper boundary of the output interval.  All values generated will be\n            less than high.  The default value is 1.0.\n        size : int or tuple of ints, optional\n            Shape of output.  If the given size is, for example, (m,n,k),\n            m*n*k samples are generated.  If no shape is specified, a single sample\n            is returned.\n\n        Returns\n        -------\n        out : ndarray\n            Drawn samples, with shape `size`.\n\n        See Also\n        --------\n        randint : Discrete uniform distribution, yielding integers.\n        random_integers : Discrete uniform distribution over the closed\n                          interval ``[low, high]``.\n        random_sample : Floats uniformly distributed over ``[0, 1)``.\n        random : Alias for `random_sample`.\n        rand : Convenience function that accepts dimensions as input, e.g.,\n               ``rand(2,2)`` would generate a 2-by-2 array of floats,\n               uniformly distributed over ``[0, 1)``.\n\n        Notes\n        -----\n        The probability density function of the uniform distribution is\n\n        .. math:: p(x) = \\frac{1}{b - a}\n\n        anywhere within the interval ``[a, b)``, and zero elsewhere.\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> s = np.random.uniform(-1,0,1000)\n\n        All values are w""ithin the given interval:\n\n        >>> np.all(s >= -1)\n        True\n        >>> np.all(s < 0)\n        True\n\n        Display the histogram of the samples, along with the\n        probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 15, normed=True)\n        >>> plt.plot(bins, np.ones_like(bins), linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_12uniform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_25uniform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_24uniform[] = "\n        uniform(low=0.0, high=1.0, size=1)\n\n        Draw samples from a uniform distribution.\n\n        Samples are uniformly distributed over the half-open interval\n        ``[low, high)`` (includes low, but excludes high).  In other words,\n        any value within the given interval is equally likely to be drawn\n        by `uniform`.\n\n        Parameters\n        ----------\n        low : float, optional\n            Lower boundary of the output interval.  All values generated will be\n            greater than or equal to low.  The default value is 0.\n        high : float\n            Upper boundary of the output interval.  All values generated will be\n            less than high.  The default value is 1.0.\n        size : int or tuple of ints, optional\n            Shape of output.  If the given size is, for example, (m,n,k),\n            m*n*k samples are generated.  If no shape is specified, a single sample\n            is returned.\n\n        Returns\n        -------\n        out : ndarray\n            Drawn samples, with shape `size`.\n\n        See Also\n        --------\n        randint : Discrete uniform distribution, yielding integers.\n        random_integers : Discrete uniform distribution over the closed\n                          interval ``[low, high]``.\n        random_sample : Floats uniformly distributed over ``[0, 1)``.\n        random : Alias for `random_sample`.\n        rand : Convenience function that accepts dimensions as input, e.g.,\n               ``rand(2,2)`` would generate a 2-by-2 array of floats,\n               uniformly distributed over ``[0, 1)``.\n\n        Notes\n        -----\n        The probability density function of the uniform distribution is\n\n        .. math:: p(x) = \\frac{1}{b - a}\n\n        anywhere within the interval ``[a, b)``, and zero elsewhere.\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> s = np.random.uniform(-1,0,1000)\n\n        All values are w""ithin the given interval:\n\n        >>> np.all(s >= -1)\n        True\n        >>> np.all(s < 0)\n        True\n\n        Display the histogram of the samples, along with the\n        probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 15, normed=True)\n        >>> plt.plot(bins, np.ones_like(bins), linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_25uniform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_low = 0;
-   PyObject *__pyx_v_high = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_olow = 0;
--  PyArrayObject *__pyx_v_ohigh = 0;
--  PyArrayObject *__pyx_v_odiff = 0;
--  double __pyx_v_flow;
--  double __pyx_v_fhigh;
--  PyObject *__pyx_v_temp = 0;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__low,&__pyx_n_s__high,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("uniform");
-+  __Pyx_RefNannySetupContext("uniform (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__low,&__pyx_n_s__high,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-     values[0] = __pyx_k_15;
-     values[1] = __pyx_k_16;
-+
-+    /* "mtrand.pyx":916
-+ *         return bytestring
-+ * 
-+ *     def uniform(self, low=0.0, high=1.0, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         uniform(low=0.0, high=1.0, size=1)
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -6391,7 +6647,7 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__low);
-@@ -6409,7 +6665,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "uniform") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "uniform") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -6432,6 +6688,28 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_24uniform(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_low, __pyx_v_high, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_24uniform(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_low, PyObject *__pyx_v_high, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_olow = 0;
-+  PyArrayObject *__pyx_v_ohigh = 0;
-+  PyArrayObject *__pyx_v_odiff = 0;
-+  double __pyx_v_flow;
-+  double __pyx_v_fhigh;
-+  PyObject *__pyx_v_temp = 0;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("uniform", 0);
- 
-   /* "mtrand.pyx":990
-  *         cdef object temp
-@@ -6469,14 +6747,14 @@
-  *         olow = <ndarray>PyArray_FROM_OTF(low, NPY_DOUBLE, NPY_ALIGNED)
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont2_array_sc(__pyx_v_self->internal_state, rk_uniform, __pyx_v_size, __pyx_v_flow, (__pyx_v_fhigh - __pyx_v_flow)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":994
-  *         if not PyErr_Occurred():
-@@ -6526,7 +6804,7 @@
-   __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_INCREF(((PyObject *)__pyx_v_ohigh));
-   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_ohigh));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_ohigh));
-@@ -6570,7 +6848,7 @@
-  *     def rand(self, *args):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_4 = __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 (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_4 = __pyx_f_6mtrand_cont2_array(__pyx_v_self->internal_state, rk_uniform, __pyx_v_size, __pyx_v_olow, __pyx_v_odiff); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_4);
-   __pyx_r = __pyx_t_4;
-   __pyx_t_4 = 0;
-@@ -6594,6 +6872,23 @@
-   return __pyx_r;
- }
- 
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_27rand(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_26rand[] = "\n        rand(d0, d1, ..., dn)\n\n        Random values in a given shape.\n\n        Create an array of the given shape and propagate it with\n        random samples from a uniform distribution\n        over ``[0, 1)``.\n\n        Parameters\n        ----------\n        d0, d1, ..., dn : int\n            Shape of the output.\n\n        Returns\n        -------\n        out : ndarray, shape ``(d0, d1, ..., dn)``\n            Random values.\n\n        See Also\n        --------\n        random\n\n        Notes\n        -----\n        This is a convenience function. If you want an interface that\n        takes a shape-tuple as the first argument, refer to\n        `random`.\n\n        Examples\n        --------\n        >>> np.random.rand(3,2)\n        array([[ 0.14022471,  0.96360618],  #random\n               [ 0.37601032,  0.25528411],  #random\n               [ 0.49313049,  0.94909878]]) #random\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_27rand(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_args = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("rand (wrapper)", 0);
-+  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "rand", 0))) return NULL;
-+  __Pyx_INCREF(__pyx_args);
-+  __pyx_v_args = __pyx_args;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_26rand(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_args);
-+  __Pyx_XDECREF(__pyx_v_args);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
- /* "mtrand.pyx":1003
-  *         return cont2_array(self.internal_state, rk_uniform, size, olow, odiff)
-  * 
-@@ -6602,10 +6897,7 @@
-  *         rand(d0, d1, ..., dn)
-  */
- 
--static PyObject *__pyx_pf_6mtrand_11RandomState_13rand(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_13rand[] = "\n        rand(d0, d1, ..., dn)\n\n        Random values in a given shape.\n\n        Create an array of the given shape and propagate it with\n        random samples from a uniform distribution\n        over ``[0, 1)``.\n\n        Parameters\n        ----------\n        d0, d1, ..., dn : int\n            Shape of the output.\n\n        Returns\n        -------\n        out : ndarray, shape ``(d0, d1, ..., dn)``\n            Random values.\n\n        See Also\n        --------\n        random\n\n        Notes\n        -----\n        This is a convenience function. If you want an interface that\n        takes a shape-tuple as the first argument, refer to\n        `random`.\n\n        Examples\n        --------\n        >>> np.random.rand(3,2)\n        array([[ 0.14022471,  0.96360618],  #random\n               [ 0.37601032,  0.25528411],  #random\n               [ 0.49313049,  0.94909878]]) #random\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_13rand(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_args = 0;
-+static PyObject *__pyx_pf_6mtrand_11RandomState_26rand(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_args) {
-   PyObject *__pyx_r = NULL;
-   __Pyx_RefNannyDeclarations
-   Py_ssize_t __pyx_t_1;
-@@ -6616,10 +6908,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("rand");
--  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "rand", 0))) return NULL;
--  __Pyx_INCREF(__pyx_args);
--  __pyx_v_args = __pyx_args;
-+  __Pyx_RefNannySetupContext("rand", 0);
- 
-   /* "mtrand.pyx":1041
-  * 
-@@ -6628,10 +6917,7 @@
-  *             return self.random_sample()
-  *         else:
-  */
--  if (unlikely(((PyObject *)__pyx_v_args) == Py_None)) {
--    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
--  }
--  __pyx_t_1 = PyTuple_GET_SIZE(((PyObject *)__pyx_v_args)); 
-+  __pyx_t_1 = PyTuple_GET_SIZE(((PyObject *)__pyx_v_args)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __pyx_t_2 = (__pyx_t_1 == 0);
-   if (__pyx_t_2) {
- 
-@@ -6643,7 +6929,7 @@
-  *             return self.random_sample(size=args)
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__random_sample); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__random_sample); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_3);
-     __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_4);
-@@ -6651,7 +6937,7 @@
-     __pyx_r = __pyx_t_4;
-     __pyx_t_4 = 0;
-     goto __pyx_L0;
--    goto __pyx_L5;
-+    goto __pyx_L3;
-   }
-   /*else*/ {
- 
-@@ -6663,12 +6949,12 @@
-  *     def randn(self, *args):
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__random_sample); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__random_sample); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_4);
-     __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-     if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__size), ((PyObject *)__pyx_v_args)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_5);
-     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-     __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-@@ -6676,7 +6962,7 @@
-     __pyx_t_5 = 0;
-     goto __pyx_L0;
-   }
--  __pyx_L5:;
-+  __pyx_L3:;
- 
-   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-   goto __pyx_L0;
-@@ -6687,12 +6973,28 @@
-   __Pyx_AddTraceback("mtrand.RandomState.rand", __pyx_clineno, __pyx_lineno, __pyx_filename);
-   __pyx_r = NULL;
-   __pyx_L0:;
--  __Pyx_XDECREF(__pyx_v_args);
-   __Pyx_XGIVEREF(__pyx_r);
-   __Pyx_RefNannyFinishContext();
-   return __pyx_r;
- }
- 
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_29randn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_28randn[] = "\n        randn([d1, ..., dn])\n\n        Return a sample (or samples) from the \"standard normal\" distribution.\n\n        If positive, int_like or int-convertible arguments are provided,\n        `randn` generates an array of shape ``(d1, ..., dn)``, filled\n        with random floats sampled from a univariate \"normal\" (Gaussian)\n        distribution of mean 0 and variance 1 (if any of the :math:`d_i` are\n        floats, they are first converted to integers by truncation). A single\n        float randomly sampled from the distribution is returned if no\n        argument is provided.\n\n        This is a convenience function.  If you want an interface that takes a\n        tuple as the first argument, use `numpy.random.standard_normal` instead.\n\n        Parameters\n        ----------\n        d1, ..., dn : `n` ints, optional\n            The dimensions of the returned array, should be all positive.\n\n        Returns\n        -------\n        Z : ndarray or float\n            A ``(d1, ..., dn)``-shaped array of floating-point samples from\n            the standard normal distribution, or a single such float if\n            no parameters were supplied.\n\n        See Also\n        --------\n        random.standard_normal : Similar, but takes a tuple as its argument.\n\n        Notes\n        -----\n        For random samples from :math:`N(\\mu, \\sigma^2)`, use:\n\n        ``sigma * np.random.randn(...) + mu``\n\n        Examples\n        --------\n        >>> np.random.randn()\n        2.1923875335537315 #random\n\n        Two-by-four array of samples from N(3, 6.25):\n\n        >>> 2.5 * np.random.randn(2, 4) + 3\n        array([[-4.49401501,  4.00950034, -1.81814867,  7.29718677],  #random\n               [ 0.39924804,  4.68456316,  4.99394529,  4.84057254]]) #random\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_29randn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_args = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("randn (wrapper)", 0);
-+  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "randn", 0))) return NULL;
-+  __Pyx_INCREF(__pyx_args);
-+  __pyx_v_args = __pyx_args;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_28randn(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_args);
-+  __Pyx_XDECREF(__pyx_v_args);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
- /* "mtrand.pyx":1046
-  *             return self.random_sample(size=args)
-  * 
-@@ -6701,10 +7003,7 @@
-  *         randn([d1, ..., dn])
-  */
- 
--static PyObject *__pyx_pf_6mtrand_11RandomState_14randn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_14randn[] = "\n        randn([d1, ..., dn])\n\n        Return a sample (or samples) from the \"standard normal\" distribution.\n\n        If positive, int_like or int-convertible arguments are provided,\n        `randn` generates an array of shape ``(d1, ..., dn)``, filled\n        with random floats sampled from a univariate \"normal\" (Gaussian)\n        distribution of mean 0 and variance 1 (if any of the :math:`d_i` are\n        floats, they are first converted to integers by truncation). A single\n        float randomly sampled from the distribution is returned if no\n        argument is provided.\n\n        This is a convenience function.  If you want an interface that takes a\n        tuple as the first argument, use `numpy.random.standard_normal` instead.\n\n        Parameters\n        ----------\n        d1, ..., dn : `n` ints, optional\n            The dimensions of the returned array, should be all positive.\n\n        Returns\n        -------\n        Z : ndarray or float\n            A ``(d1, ..., dn)``-shaped array of floating-point samples from\n            the standard normal distribution, or a single such float if\n            no parameters were supplied.\n\n        See Also\n        --------\n        random.standard_normal : Similar, but takes a tuple as its argument.\n\n        Notes\n        -----\n        For random samples from :math:`N(\\mu, \\sigma^2)`, use:\n\n        ``sigma * np.random.randn(...) + mu``\n\n        Examples\n        --------\n        >>> np.random.randn()\n        2.1923875335537315 #random\n\n        Two-by-four array of samples from N(3, 6.25):\n\n        >>> 2.5 * np.random.randn(2, 4) + 3\n        array([[-4.49401501,  4.00950034, -1.81814867,  7.29718677],  #random\n               [ 0.39924804,  4.68456316,  4.99394529,  4.84057254]]) #random\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_14randn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_args = 0;
-+static PyObject *__pyx_pf_6mtrand_11RandomState_28randn(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_args) {
-   PyObject *__pyx_r = NULL;
-   __Pyx_RefNannyDeclarations
-   Py_ssize_t __pyx_t_1;
-@@ -6715,10 +7014,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("randn");
--  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "randn", 0))) return NULL;
--  __Pyx_INCREF(__pyx_args);
--  __pyx_v_args = __pyx_args;
-+  __Pyx_RefNannySetupContext("randn", 0);
- 
-   /* "mtrand.pyx":1097
-  * 
-@@ -6727,10 +7023,7 @@
-  *             return self.standard_normal()
-  *         else:
-  */
--  if (unlikely(((PyObject *)__pyx_v_args) == Py_None)) {
--    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
--  }
--  __pyx_t_1 = PyTuple_GET_SIZE(((PyObject *)__pyx_v_args)); 
-+  __pyx_t_1 = PyTuple_GET_SIZE(((PyObject *)__pyx_v_args)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __pyx_t_2 = (__pyx_t_1 == 0);
-   if (__pyx_t_2) {
- 
-@@ -6742,7 +7035,7 @@
-  *             return self.standard_normal(args)
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__standard_normal); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__standard_normal); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_3);
-     __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_4);
-@@ -6750,7 +7043,7 @@
-     __pyx_r = __pyx_t_4;
-     __pyx_t_4 = 0;
-     goto __pyx_L0;
--    goto __pyx_L5;
-+    goto __pyx_L3;
-   }
-   /*else*/ {
- 
-@@ -6762,10 +7055,10 @@
-  *     def random_integers(self, low, high=None, size=None):
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__standard_normal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__standard_normal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_4);
-     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+    __Pyx_GOTREF(__pyx_t_3);
-     __Pyx_INCREF(((PyObject *)__pyx_v_args));
-     PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_args));
-     __Pyx_GIVEREF(((PyObject *)__pyx_v_args));
-@@ -6777,7 +7070,7 @@
-     __pyx_t_5 = 0;
-     goto __pyx_L0;
-   }
--  __pyx_L5:;
-+  __pyx_L3:;
- 
-   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-   goto __pyx_L0;
-@@ -6788,44 +7081,38 @@
-   __Pyx_AddTraceback("mtrand.RandomState.randn", __pyx_clineno, __pyx_lineno, __pyx_filename);
-   __pyx_r = NULL;
-   __pyx_L0:;
--  __Pyx_XDECREF(__pyx_v_args);
-   __Pyx_XGIVEREF(__pyx_r);
-   __Pyx_RefNannyFinishContext();
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":1102
-- *             return self.standard_normal(args)
-- * 
-- *     def random_integers(self, low, high=None, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         random_integers(low, high=None, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_15random_integers(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_15random_integers[] = "\n        random_integers(low, high=None, size=None)\n\n        Return random integers between `low` and `high`, inclusive.\n\n        Return random integers from the \"discrete uniform\" distribution in the\n        closed interval [`low`, `high`].  If `high` is None (the default),\n        then results are from [1, `low`].\n\n        Parameters\n        ----------\n        low : int\n            Lowest (signed) integer to be drawn from the distribution (unless\n            ``high=None``, in which case this parameter is the *highest* such\n            integer).\n        high : int, optional\n            If provided, the largest (signed) integer to be drawn from the\n            distribution (see above for behavior if ``high=None``).\n        size : int or tuple of ints, optional\n            Output shape. Default is None, in which case a single int is returned.\n\n        Returns\n        -------\n        out : int or ndarray of ints\n            `size`-shaped array of random integers from the appropriate\n            distribution, or a single such random int if `size` not provided.\n\n        See Also\n        --------\n        random.randint : Similar to `random_integers`, only for the half-open\n            interval [`low`, `high`), and 0 is the lowest value if `high` is\n            omitted.\n\n        Notes\n        -----\n        To sample from N evenly spaced floating-point numbers between a and b,\n        use::\n\n          a + (b - a) * (np.random.random_integers(N) - 1) / (N - 1.)\n\n        Examples\n        --------\n        >>> np.random.random_integers(5)\n        4\n        >>> type(np.random.random_integers(5))\n        <type 'int'>\n        >>> np.random.random_integers(5, size=(3.,2.))\n        array([[5, 4],\n               [3, 3],\n               [4, 5]])\n\n        Choose five random numbers from the set of five evenly-spaced\n        numbers between 0 and 2.5, inclusive (*i.e.*, from the set\n        :math:`{0, 5/8, 10/8, 15/8, 20/8}`):\n""\n        >>> 2.5 * (np.random.random_integers(5, size=(5,)) - 1) / 4.\n        array([ 0.625,  1.25 ,  0.625,  0.625,  2.5  ])\n\n        Roll two six sided dice 1000 times and sum the results:\n\n        >>> d1 = np.random.random_integers(1, 6, 1000)\n        >>> d2 = np.random.random_integers(1, 6, 1000)\n        >>> dsums = d1 + d2\n\n        Display results as a histogram:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(dsums, 11, normed=True)\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_15random_integers(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_31random_integers(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_30random_integers[] = "\n        random_integers(low, high=None, size=None)\n\n        Return random integers between `low` and `high`, inclusive.\n\n        Return random integers from the \"discrete uniform\" distribution in the\n        closed interval [`low`, `high`].  If `high` is None (the default),\n        then results are from [1, `low`].\n\n        Parameters\n        ----------\n        low : int\n            Lowest (signed) integer to be drawn from the distribution (unless\n            ``high=None``, in which case this parameter is the *highest* such\n            integer).\n        high : int, optional\n            If provided, the largest (signed) integer to be drawn from the\n            distribution (see above for behavior if ``high=None``).\n        size : int or tuple of ints, optional\n            Output shape. Default is None, in which case a single int is returned.\n\n        Returns\n        -------\n        out : int or ndarray of ints\n            `size`-shaped array of random integers from the appropriate\n            distribution, or a single such random int if `size` not provided.\n\n        See Also\n        --------\n        random.randint : Similar to `random_integers`, only for the half-open\n            interval [`low`, `high`), and 0 is the lowest value if `high` is\n            omitted.\n\n        Notes\n        -----\n        To sample from N evenly spaced floating-point numbers between a and b,\n        use::\n\n          a + (b - a) * (np.random.random_integers(N) - 1) / (N - 1.)\n\n        Examples\n        --------\n        >>> np.random.random_integers(5)\n        4\n        >>> type(np.random.random_integers(5))\n        <type 'int'>\n        >>> np.random.random_integers(5, size=(3.,2.))\n        array([[5, 4],\n               [3, 3],\n               [4, 5]])\n\n        Choose five random numbers from the set of five evenly-spaced\n        numbers between 0 and 2.5, inclusive (*i.e.*, from the set\n        :math:`{0, 5/8, 10/8, 15/8, 20/8}`):\n""\n        >>> 2.5 * (np.random.random_integers(5, size=(5,)) - 1) / 4.\n        array([ 0.625,  1.25 ,  0.625,  0.625,  2.5  ])\n\n        Roll two six sided dice 1000 times and sum the results:\n\n        >>> d1 = np.random.random_integers(1, 6, 1000)\n        >>> d2 = np.random.random_integers(1, 6, 1000)\n        >>> dsums = d1 + d2\n\n        Display results as a histogram:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(dsums, 11, normed=True)\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_31random_integers(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_low = 0;
-   PyObject *__pyx_v_high = 0;
-   PyObject *__pyx_v_size = 0;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__low,&__pyx_n_s__high,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("random_integers");
-+  __Pyx_RefNannySetupContext("random_integers (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__low,&__pyx_n_s__high,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-+
-+    /* "mtrand.pyx":1102
-+ *             return self.standard_normal(args)
-+ * 
-+ *     def random_integers(self, low, high=None, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         random_integers(low, high=None, size=None)
-+ */
-     values[1] = ((PyObject *)Py_None);
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -6833,10 +7120,9 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__low);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__low)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
-         if (kw_args > 0) {
-@@ -6850,7 +7136,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "random_integers") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_integers") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -6873,6 +7159,22 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_30random_integers(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_low, __pyx_v_high, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_30random_integers(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_low, PyObject *__pyx_v_high, PyObject *__pyx_v_size) {
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("random_integers", 0);
-   __Pyx_INCREF(__pyx_v_low);
-   __Pyx_INCREF(__pyx_v_high);
- 
-@@ -6907,9 +7209,9 @@
-     __Pyx_INCREF(__pyx_int_1);
-     __Pyx_DECREF(__pyx_v_low);
-     __pyx_v_low = __pyx_int_1;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":1177
-  *             high = low
-@@ -6919,12 +7221,12 @@
-  *     # Complicated, continuous distributions:
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__randint); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__randint); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_3 = PyNumber_Add(__pyx_v_high, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_3);
-   __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(__pyx_v_low);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_low);
-   __Pyx_GIVEREF(__pyx_v_low);
-@@ -6958,38 +7260,36 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":1180
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_33standard_normal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_32standard_normal[] = "\n        standard_normal(size=None)\n\n        Returns samples from a Standard Normal distribution (mean=0, stdev=1).\n\n        Parameters\n        ----------\n        size : int or tuple of ints, optional\n            Output shape. Default is None, in which case a single value is\n            returned.\n\n        Returns\n        -------\n        out : float or ndarray\n            Drawn samples.\n\n        Examples\n        --------\n        >>> s = np.random.standard_normal(8000)\n        >>> s\n        array([ 0.6888893 ,  0.78096262, -0.89086505, ...,  0.49876311, #random\n               -0.38672696, -0.4685006 ])                               #random\n        >>> s.shape\n        (8000,)\n        >>> s = np.random.standard_normal(size=(3, 4, 2))\n        >>> s.shape\n        (3, 4, 2)\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_33standard_normal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("standard_normal (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0};
-+    PyObject* values[1] = {0};
-+
-+    /* "mtrand.pyx":1180
-  * 
-  *     # Complicated, continuous distributions:
-  *     def standard_normal(self, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         standard_normal(size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_16standard_normal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_16standard_normal[] = "\n        standard_normal(size=None)\n\n        Returns samples from a Standard Normal distribution (mean=0, stdev=1).\n\n        Parameters\n        ----------\n        size : int or tuple of ints, optional\n            Output shape. Default is None, in which case a single value is\n            returned.\n\n        Returns\n        -------\n        out : float or ndarray\n            Drawn samples.\n\n        Examples\n        --------\n        >>> s = np.random.standard_normal(8000)\n        >>> s\n        array([ 0.6888893 ,  0.78096262, -0.89086505, ...,  0.49876311, #random\n               -0.38672696, -0.4685006 ])                               #random\n        >>> s.shape\n        (8000,)\n        >>> s = np.random.standard_normal(size=(3, 4, 2))\n        >>> s.shape\n        (3, 4, 2)\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_16standard_normal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_size = 0;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  PyObject *__pyx_t_1 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("standard_normal");
--  {
--    PyObject* values[1] = {0};
-     values[0] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size);
-@@ -6997,7 +7297,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "standard_normal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "standard_normal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -7016,6 +7316,19 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_32standard_normal(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_32standard_normal(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size) {
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  PyObject *__pyx_t_1 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("standard_normal", 0);
- 
-   /* "mtrand.pyx":1210
-  * 
-@@ -7025,7 +7338,7 @@
-  *     def normal(self, loc=0.0, scale=1.0, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_1 = __pyx_f_6mtrand_cont0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_gauss, __pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_1 = __pyx_f_6mtrand_cont0_array(__pyx_v_self->internal_state, rk_gauss, __pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_1);
-   __pyx_r = __pyx_t_1;
-   __pyx_t_1 = 0;
-@@ -7043,44 +7356,34 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":1212
-- *         return cont0_array(self.internal_state, rk_gauss, size)
-- * 
-- *     def normal(self, loc=0.0, scale=1.0, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         normal(loc=0.0, scale=1.0, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_17normal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_17normal[] = "\n        normal(loc=0.0, scale=1.0, size=None)\n\n        Draw random samples from a normal (Gaussian) distribution.\n\n        The probability density function of the normal distribution, first\n        derived by De Moivre and 200 years later by both Gauss and Laplace\n        independently [2]_, is often called the bell curve because of\n        its characteristic shape (see the example below).\n\n        The normal distributions occurs often in nature.  For example, it\n        describes the commonly occurring distribution of samples influenced\n        by a large number of tiny, random disturbances, each with its own\n        unique distribution [2]_.\n\n        Parameters\n        ----------\n        loc : float\n            Mean (\"centre\") of the distribution.\n        scale : float\n            Standard deviation (spread or \"width\") of the distribution.\n        size : tuple of ints\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        See Also\n        --------\n        scipy.stats.distributions.norm : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Gaussian distribution is\n\n        .. math:: p(x) = \\frac{1}{\\sqrt{ 2 \\pi \\sigma^2 }}\n                         e^{ - \\frac{ (x - \\mu)^2 } {2 \\sigma^2} },\n\n        where :math:`\\mu` is the mean and :math:`\\sigma` the standard deviation.\n        The square of the standard deviation, :math:`\\sigma^2`, is called the\n        variance.\n\n        The function has its peak at the mean, and its \"spread\" increases with\n        the standard deviation (the function reaches 0.607 times its maximum at\n        :math:`x + \\sigma` and :math:`x - \\sigma` [2]_).  This implies that\n        `numpy.random.normal` is more likely to return samples lying close to the\n        mean, rather than those far away.\n""\n        References\n        ----------\n        .. [1] Wikipedia, \"Normal distribution\",\n               http://en.wikipedia.org/wiki/Normal_distribution\n        .. [2] P. R. Peebles Jr., \"Central Limit Theorem\" in \"Probability, Random\n               Variables and Random Signal Principles\", 4th ed., 2001,\n               pp. 51, 51, 125.\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> mu, sigma = 0, 0.1 # mean and standard deviation\n        >>> s = np.random.normal(mu, sigma, 1000)\n\n        Verify the mean and the variance:\n\n        >>> abs(mu - np.mean(s)) < 0.01\n        True\n\n        >>> abs(sigma - np.std(s, ddof=1)) < 0.01\n        True\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 30, normed=True)\n        >>> plt.plot(bins, 1/(sigma * np.sqrt(2 * np.pi)) *\n        ...                np.exp( - (bins - mu)**2 / (2 * sigma**2) ),\n        ...          linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_17normal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_35normal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_34normal[] = "\n        normal(loc=0.0, scale=1.0, size=None)\n\n        Draw random samples from a normal (Gaussian) distribution.\n\n        The probability density function of the normal distribution, first\n        derived by De Moivre and 200 years later by both Gauss and Laplace\n        independently [2]_, is often called the bell curve because of\n        its characteristic shape (see the example below).\n\n        The normal distributions occurs often in nature.  For example, it\n        describes the commonly occurring distribution of samples influenced\n        by a large number of tiny, random disturbances, each with its own\n        unique distribution [2]_.\n\n        Parameters\n        ----------\n        loc : float\n            Mean (\"centre\") of the distribution.\n        scale : float\n            Standard deviation (spread or \"width\") of the distribution.\n        size : tuple of ints\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        See Also\n        --------\n        scipy.stats.distributions.norm : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Gaussian distribution is\n\n        .. math:: p(x) = \\frac{1}{\\sqrt{ 2 \\pi \\sigma^2 }}\n                         e^{ - \\frac{ (x - \\mu)^2 } {2 \\sigma^2} },\n\n        where :math:`\\mu` is the mean and :math:`\\sigma` the standard deviation.\n        The square of the standard deviation, :math:`\\sigma^2`, is called the\n        variance.\n\n        The function has its peak at the mean, and its \"spread\" increases with\n        the standard deviation (the function reaches 0.607 times its maximum at\n        :math:`x + \\sigma` and :math:`x - \\sigma` [2]_).  This implies that\n        `numpy.random.normal` is more likely to return samples lying close to the\n        mean, rather than those far away.\n""\n        References\n        ----------\n        .. [1] Wikipedia, \"Normal distribution\",\n               http://en.wikipedia.org/wiki/Normal_distribution\n        .. [2] P. R. Peebles Jr., \"Central Limit Theorem\" in \"Probability, Random\n               Variables and Random Signal Principles\", 4th ed., 2001,\n               pp. 51, 51, 125.\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> mu, sigma = 0, 0.1 # mean and standard deviation\n        >>> s = np.random.normal(mu, sigma, 1000)\n\n        Verify the mean and the variance:\n\n        >>> abs(mu - np.mean(s)) < 0.01\n        True\n\n        >>> abs(sigma - np.std(s, ddof=1)) < 0.01\n        True\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 30, normed=True)\n        >>> plt.plot(bins, 1/(sigma * np.sqrt(2 * np.pi)) *\n        ...                np.exp( - (bins - mu)**2 / (2 * sigma**2) ),\n        ...          linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_35normal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_loc = 0;
-   PyObject *__pyx_v_scale = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_oloc = 0;
--  PyArrayObject *__pyx_v_oscale = 0;
--  double __pyx_v_floc;
--  double __pyx_v_fscale;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__loc,&__pyx_n_s__scale,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("normal");
-+  __Pyx_RefNannySetupContext("normal (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__loc,&__pyx_n_s__scale,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-     values[0] = __pyx_k_17;
-     values[1] = __pyx_k_18;
-+
-+    /* "mtrand.pyx":1212
-+ *         return cont0_array(self.internal_state, rk_gauss, size)
-+ * 
-+ *     def normal(self, loc=0.0, scale=1.0, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         normal(loc=0.0, scale=1.0, size=None)
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -7088,7 +7391,7 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__loc);
-@@ -7106,7 +7409,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "normal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "normal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -7129,6 +7432,27 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_34normal(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_loc, __pyx_v_scale, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_34normal(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_loc, PyObject *__pyx_v_scale, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_oloc = 0;
-+  PyArrayObject *__pyx_v_oscale = 0;
-+  double __pyx_v_floc;
-+  double __pyx_v_fscale;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("normal", 0);
- 
-   /* "mtrand.pyx":1297
-  *         cdef double floc, fscale
-@@ -7180,9 +7504,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":1302
-  *             if fscale <= 0:
-@@ -7192,14 +7516,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont2_array_sc(__pyx_v_self->internal_state, rk_normal, __pyx_v_size, __pyx_v_floc, __pyx_v_fscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":1304
-  *             return cont2_array_sc(self.internal_state, rk_normal, size, floc, fscale)
-@@ -7254,7 +7578,7 @@
-   __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oscale));
-   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_oscale));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oscale));
-@@ -7266,7 +7590,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
-   __Pyx_GIVEREF(__pyx_t_5);
-   __pyx_t_5 = 0;
-@@ -7290,9 +7614,9 @@
-     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":1310
-  *         if np.any(np.less_equal(oscale, 0)):
-@@ -7302,7 +7626,7 @@
-  *     def beta(self, a, b, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_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 (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_5 = __pyx_f_6mtrand_cont2_array(__pyx_v_self->internal_state, rk_normal, __pyx_v_size, __pyx_v_oloc, __pyx_v_oscale); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_5);
-   __pyx_r = __pyx_t_5;
-   __pyx_t_5 = 0;
-@@ -7325,42 +7649,32 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":1312
-- *         return cont2_array(self.internal_state, rk_normal, size, oloc, oscale)
-- * 
-- *     def beta(self, a, b, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         beta(a, b, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_18beta(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_18beta[] = "\n        beta(a, b, size=None)\n\n        The Beta distribution over ``[0, 1]``.\n\n        The Beta distribution is a special case of the Dirichlet distribution,\n        and is related to the Gamma distribution.  It has the probability\n        distribution function\n\n        .. math:: f(x; a,b) = \\frac{1}{B(\\alpha, \\beta)} x^{\\alpha - 1}\n                                                         (1 - x)^{\\beta - 1},\n\n        where the normalisation, B, is the beta function,\n\n        .. math:: B(\\alpha, \\beta) = \\int_0^1 t^{\\alpha - 1}\n                                     (1 - t)^{\\beta - 1} dt.\n\n        It is often seen in Bayesian inference and order statistics.\n\n        Parameters\n        ----------\n        a : float\n            Alpha, non-negative.\n        b : float\n            Beta, non-negative.\n        size : tuple of ints, optional\n            The number of samples to draw.  The ouput is packed according to\n            the size given.\n\n        Returns\n        -------\n        out : ndarray\n            Array of the given shape, containing values drawn from a\n            Beta distribution.\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_18beta(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_37beta(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_36beta[] = "\n        beta(a, b, size=None)\n\n        The Beta distribution over ``[0, 1]``.\n\n        The Beta distribution is a special case of the Dirichlet distribution,\n        and is related to the Gamma distribution.  It has the probability\n        distribution function\n\n        .. math:: f(x; a,b) = \\frac{1}{B(\\alpha, \\beta)} x^{\\alpha - 1}\n                                                         (1 - x)^{\\beta - 1},\n\n        where the normalisation, B, is the beta function,\n\n        .. math:: B(\\alpha, \\beta) = \\int_0^1 t^{\\alpha - 1}\n                                     (1 - t)^{\\beta - 1} dt.\n\n        It is often seen in Bayesian inference and order statistics.\n\n        Parameters\n        ----------\n        a : float\n            Alpha, non-negative.\n        b : float\n            Beta, non-negative.\n        size : tuple of ints, optional\n            The number of samples to draw.  The ouput is packed according to\n            the size given.\n\n        Returns\n        -------\n        out : ndarray\n            Array of the given shape, containing values drawn from a\n            Beta distribution.\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_37beta(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_a = 0;
-   PyObject *__pyx_v_b = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_oa = 0;
--  PyArrayObject *__pyx_v_ob = 0;
--  double __pyx_v_fa;
--  double __pyx_v_fb;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__b,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("beta");
-+  __Pyx_RefNannySetupContext("beta (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__b,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-+
-+    /* "mtrand.pyx":1312
-+ *         return cont2_array(self.internal_state, rk_normal, size, oloc, oscale)
-+ * 
-+ *     def beta(self, a, b, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         beta(a, b, size=None)
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -7368,14 +7682,12 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
--        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__b);
--        if (likely(values[1])) kw_args--;
-+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__b)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("beta", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-@@ -7386,7 +7698,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "beta") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "beta") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -7409,6 +7721,27 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_36beta(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_a, __pyx_v_b, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_36beta(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_oa = 0;
-+  PyArrayObject *__pyx_v_ob = 0;
-+  double __pyx_v_fa;
-+  double __pyx_v_fb;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("beta", 0);
- 
-   /* "mtrand.pyx":1352
-  *         cdef double fa, fb
-@@ -7460,9 +7793,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":1357
-  *             if fa <= 0:
-@@ -7486,9 +7819,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
--    __pyx_L8:;
-+    __pyx_L5:;
- 
-     /* "mtrand.pyx":1359
-  *             if fb <= 0:
-@@ -7498,14 +7831,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont2_array_sc(__pyx_v_self->internal_state, rk_beta, __pyx_v_size, __pyx_v_fa, __pyx_v_fb); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":1361
-  *             return cont2_array_sc(self.internal_state, rk_beta, size, fa, fb)
-@@ -7560,7 +7893,7 @@
-   __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oa));
-   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_oa));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oa));
-@@ -7572,7 +7905,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
-   __Pyx_GIVEREF(__pyx_t_5);
-   __pyx_t_5 = 0;
-@@ -7596,9 +7929,9 @@
-     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L9;
-+    goto __pyx_L6;
-   }
--  __pyx_L9:;
-+  __pyx_L6:;
- 
-   /* "mtrand.pyx":1367
-  *         if np.any(np.less_equal(oa, 0)):
-@@ -7618,7 +7951,7 @@
-   __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_ob));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_ob));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_ob));
-@@ -7630,7 +7963,7 @@
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
-   __Pyx_GIVEREF(__pyx_t_4);
-   __pyx_t_4 = 0;
-@@ -7654,9 +7987,9 @@
-     __Pyx_Raise(__pyx_t_4, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L10;
-+    goto __pyx_L7;
-   }
--  __pyx_L10:;
-+  __pyx_L7:;
- 
-   /* "mtrand.pyx":1369
-  *         if np.any(np.less_equal(ob, 0)):
-@@ -7666,7 +7999,7 @@
-  *     def exponential(self, scale=1.0, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_4 = __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 (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_4 = __pyx_f_6mtrand_cont2_array(__pyx_v_self->internal_state, rk_beta, __pyx_v_size, __pyx_v_oa, __pyx_v_ob); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_4);
-   __pyx_r = __pyx_t_4;
-   __pyx_t_4 = 0;
-@@ -7689,47 +8022,39 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":1371
-- *         return cont2_array(self.internal_state, rk_beta, size, oa, ob)
-- * 
-- *     def exponential(self, scale=1.0, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         exponential(scale=1.0, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_19exponential(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_19exponential[] = "\n        exponential(scale=1.0, size=None)\n\n        Exponential distribution.\n\n        Its probability density function is\n\n        .. math:: f(x; \\frac{1}{\\beta}) = \\frac{1}{\\beta} \\exp(-\\frac{x}{\\beta}),\n\n        for ``x > 0`` and 0 elsewhere. :math:`\\beta` is the scale parameter,\n        which is the inverse of the rate parameter :math:`\\lambda = 1/\\beta`.\n        The rate parameter is an alternative, widely used parameterization\n        of the exponential distribution [3]_.\n\n        The exponential distribution is a continuous analogue of the\n        geometric distribution.  It describes many common situations, such as\n        the size of raindrops measured over many rainstorms [1]_, or the time\n        between page requests to Wikipedia [2]_.\n\n        Parameters\n        ----------\n        scale : float\n            The scale parameter, :math:`\\beta = 1/\\lambda`.\n        size : tuple of ints\n            Number of samples to draw.  The output is shaped\n            according to `size`.\n\n        References\n        ----------\n        .. [1] Peyton Z. Peebles Jr., \"Probability, Random Variables and\n               Random Signal Principles\", 4th ed, 2001, p. 57.\n        .. [2] \"Poisson Process\", Wikipedia,\n               http://en.wikipedia.org/wiki/Poisson_process\n        .. [3] \"Exponential Distribution, Wikipedia,\n               http://en.wikipedia.org/wiki/Exponential_distribution\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_19exponential(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_39exponential(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_38exponential[] = "\n        exponential(scale=1.0, size=None)\n\n        Exponential distribution.\n\n        Its probability density function is\n\n        .. math:: f(x; \\frac{1}{\\beta}) = \\frac{1}{\\beta} \\exp(-\\frac{x}{\\beta}),\n\n        for ``x > 0`` and 0 elsewhere. :math:`\\beta` is the scale parameter,\n        which is the inverse of the rate parameter :math:`\\lambda = 1/\\beta`.\n        The rate parameter is an alternative, widely used parameterization\n        of the exponential distribution [3]_.\n\n        The exponential distribution is a continuous analogue of the\n        geometric distribution.  It describes many common situations, such as\n        the size of raindrops measured over many rainstorms [1]_, or the time\n        between page requests to Wikipedia [2]_.\n\n        Parameters\n        ----------\n        scale : float\n            The scale parameter, :math:`\\beta = 1/\\lambda`.\n        size : tuple of ints\n            Number of samples to draw.  The output is shaped\n            according to `size`.\n\n        References\n        ----------\n        .. [1] Peyton Z. Peebles Jr., \"Probability, Random Variables and\n               Random Signal Principles\", 4th ed, 2001, p. 57.\n        .. [2] \"Poisson Process\", Wikipedia,\n               http://en.wikipedia.org/wiki/Poisson_process\n        .. [3] \"Exponential Distribution, Wikipedia,\n               http://en.wikipedia.org/wiki/Exponential_distribution\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_39exponential(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_scale = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_oscale = 0;
--  double __pyx_v_fscale;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__scale,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("exponential");
-+  __Pyx_RefNannySetupContext("exponential (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__scale,&__pyx_n_s__size,0};
-     PyObject* values[2] = {0,0};
-     values[0] = __pyx_k_28;
-+
-+    /* "mtrand.pyx":1371
-+ *         return cont2_array(self.internal_state, rk_beta, size, oa, ob)
-+ * 
-+ *     def exponential(self, scale=1.0, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         exponential(scale=1.0, size=None)
-+ */
-     values[1] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__scale);
-@@ -7742,7 +8067,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "exponential") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "exponential") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -7763,7 +8088,26 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
--
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_38exponential(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_scale, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_38exponential(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_scale, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_oscale = 0;
-+  double __pyx_v_fscale;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("exponential", 0);
-+
-   /* "mtrand.pyx":1412
-  *         cdef double fscale
-  * 
-@@ -7805,9 +8149,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":1416
-  *             if fscale <= 0:
-@@ -7817,14 +8161,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont1_array_sc(__pyx_v_self->internal_state, rk_exponential, __pyx_v_size, __pyx_v_fscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":1418
-  *             return cont1_array_sc(self.internal_state, rk_exponential, size, fscale)
-@@ -7868,7 +8212,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oscale));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_oscale));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oscale));
-@@ -7880,7 +8224,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -7904,9 +8248,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":1423
-  *         if np.any(np.less_equal(oscale, 0.0)):
-@@ -7916,7 +8260,7 @@
-  *     def standard_exponential(self, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_exponential, __pyx_v_size, __pyx_v_oscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont1_array(__pyx_v_self->internal_state, rk_exponential, __pyx_v_size, __pyx_v_oscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -7938,38 +8282,36 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":1425
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_41standard_exponential(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_40standard_exponential[] = "\n        standard_exponential(size=None)\n\n        Draw samples from the standard exponential distribution.\n\n        `standard_exponential` is identical to the exponential distribution\n        with a scale parameter of 1.\n\n        Parameters\n        ----------\n        size : int or tuple of ints\n            Shape of the output.\n\n        Returns\n        -------\n        out : float or ndarray\n            Drawn samples.\n\n        Examples\n        --------\n        Output a 3x8000 array:\n\n        >>> n = np.random.standard_exponential((3, 8000))\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_41standard_exponential(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("standard_exponential (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0};
-+    PyObject* values[1] = {0};
-+
-+    /* "mtrand.pyx":1425
-  *         return cont1_array(self.internal_state, rk_exponential, size, oscale)
-  * 
-  *     def standard_exponential(self, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         standard_exponential(size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_20standard_exponential(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_20standard_exponential[] = "\n        standard_exponential(size=None)\n\n        Draw samples from the standard exponential distribution.\n\n        `standard_exponential` is identical to the exponential distribution\n        with a scale parameter of 1.\n\n        Parameters\n        ----------\n        size : int or tuple of ints\n            Shape of the output.\n\n        Returns\n        -------\n        out : float or ndarray\n            Drawn samples.\n\n        Examples\n        --------\n        Output a 3x8000 array:\n\n        >>> n = np.random.standard_exponential((3, 8000))\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_20standard_exponential(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_size = 0;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  PyObject *__pyx_t_1 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("standard_exponential");
--  {
--    PyObject* values[1] = {0};
-     values[0] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size);
-@@ -7977,7 +8319,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "standard_exponential") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "standard_exponential") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -7996,6 +8338,19 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_40standard_exponential(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_40standard_exponential(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size) {
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  PyObject *__pyx_t_1 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("standard_exponential", 0);
- 
-   /* "mtrand.pyx":1451
-  * 
-@@ -8005,7 +8360,7 @@
-  *     def standard_gamma(self, shape, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_1 = __pyx_f_6mtrand_cont0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_standard_exponential, __pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_1 = __pyx_f_6mtrand_cont0_array(__pyx_v_self->internal_state, rk_standard_exponential, __pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_1);
-   __pyx_r = __pyx_t_1;
-   __pyx_t_1 = 0;
-@@ -8023,49 +8378,40 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":1453
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_43standard_gamma(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_42standard_gamma[] = "\n        standard_gamma(shape, size=None)\n\n        Draw samples from a Standard Gamma distribution.\n\n        Samples are drawn from a Gamma distribution with specified parameters,\n        shape (sometimes designated \"k\") and scale=1.\n\n        Parameters\n        ----------\n        shape : float\n            Parameter, should be > 0.\n        size : int or tuple of ints\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : ndarray or scalar\n            The drawn samples.\n\n        See Also\n        --------\n        scipy.stats.distributions.gamma : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Gamma distribution is\n\n        .. math:: p(x) = x^{k-1}\\frac{e^{-x/\\theta}}{\\theta^k\\Gamma(k)},\n\n        where :math:`k` is the shape and :math:`\\theta` the scale,\n        and :math:`\\Gamma` is the Gamma function.\n\n        The Gamma distribution is often used to model the times to failure of\n        electronic components, and arises naturally in processes for which the\n        waiting times between Poisson distributed events are relevant.\n\n        References\n        ----------\n        .. [1] Weisstein, Eric W. \"Gamma Distribution.\" From MathWorld--A\n               Wolfram Web Resource.\n               http://mathworld.wolfram.com/GammaDistribution.html\n        .. [2] Wikipedia, \"Gamma-distribution\",\n               http://en.wikipedia.org/wiki/Gamma-distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> shape, scale = 2., 1. # mean and width\n        >>> s = np.random.standard_gamma(shape, 1000000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt""\n        >>> import scipy.special as sps\n        >>> count, bins, ignored = plt.hist(s, 50, normed=True)\n        >>> y = bins**(shape-1) * ((np.exp(-bins/scale))/ \\\n        ...                       (sps.gamma(shape) * scale**shape))\n        >>> plt.plot(bins, y, linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_43standard_gamma(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_shape = 0;
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("standard_gamma (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__shape,&__pyx_n_s__size,0};
-+    PyObject* values[2] = {0,0};
-+
-+    /* "mtrand.pyx":1453
-  *         return cont0_array(self.internal_state, rk_standard_exponential, size)
-  * 
-  *     def standard_gamma(self, shape, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         standard_gamma(shape, size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_21standard_gamma(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_21standard_gamma[] = "\n        standard_gamma(shape, size=None)\n\n        Draw samples from a Standard Gamma distribution.\n\n        Samples are drawn from a Gamma distribution with specified parameters,\n        shape (sometimes designated \"k\") and scale=1.\n\n        Parameters\n        ----------\n        shape : float\n            Parameter, should be > 0.\n        size : int or tuple of ints\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : ndarray or scalar\n            The drawn samples.\n\n        See Also\n        --------\n        scipy.stats.distributions.gamma : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Gamma distribution is\n\n        .. math:: p(x) = x^{k-1}\\frac{e^{-x/\\theta}}{\\theta^k\\Gamma(k)},\n\n        where :math:`k` is the shape and :math:`\\theta` the scale,\n        and :math:`\\Gamma` is the Gamma function.\n\n        The Gamma distribution is often used to model the times to failure of\n        electronic components, and arises naturally in processes for which the\n        waiting times between Poisson distributed events are relevant.\n\n        References\n        ----------\n        .. [1] Weisstein, Eric W. \"Gamma Distribution.\" From MathWorld--A\n               Wolfram Web Resource.\n               http://mathworld.wolfram.com/GammaDistribution.html\n        .. [2] Wikipedia, \"Gamma-distribution\",\n               http://en.wikipedia.org/wiki/Gamma-distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> shape, scale = 2., 1. # mean and width\n        >>> s = np.random.standard_gamma(shape, 1000000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt""\n        >>> import scipy.special as sps\n        >>> count, bins, ignored = plt.hist(s, 50, normed=True)\n        >>> y = bins**(shape-1) * ((np.exp(-bins/scale))/ \\\n        ...                       (sps.gamma(shape) * scale**shape))\n        >>> plt.plot(bins, y, linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_21standard_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 = 0;
--  double __pyx_v_fshape;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__shape,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("standard_gamma");
--  {
--    PyObject* values[2] = {0,0};
-     values[1] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__shape);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__shape)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
-         if (kw_args > 0) {
-@@ -8074,7 +8420,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "standard_gamma") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "standard_gamma") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -8095,6 +8441,25 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_42standard_gamma(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_shape, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_42standard_gamma(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_shape, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_oshape = 0;
-+  double __pyx_v_fshape;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("standard_gamma", 0);
- 
-   /* "mtrand.pyx":1523
-  *         cdef double fshape
-@@ -8137,9 +8502,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":1527
-  *             if fshape <= 0:
-@@ -8149,14 +8514,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont1_array_sc(__pyx_v_self->internal_state, rk_standard_gamma, __pyx_v_size, __pyx_v_fshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":1529
-  *             return cont1_array_sc(self.internal_state, rk_standard_gamma, size, fshape)
-@@ -8200,7 +8565,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oshape));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_oshape));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oshape));
-@@ -8212,7 +8577,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -8236,9 +8601,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":1533
-  *         if np.any(np.less_equal(oshape, 0.0)):
-@@ -8248,7 +8613,7 @@
-  *     def gamma(self, shape, scale=1.0, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = __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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont1_array(__pyx_v_self->internal_state, rk_standard_gamma, __pyx_v_size, __pyx_v_oshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -8270,43 +8635,33 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":1535
-- *         return cont1_array(self.internal_state, rk_standard_gamma, size, oshape)
-- * 
-- *     def gamma(self, shape, scale=1.0, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         gamma(shape, scale=1.0, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_22gamma(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_22gamma[] = "\n        gamma(shape, scale=1.0, size=None)\n\n        Draw samples from a Gamma distribution.\n\n        Samples are drawn from a Gamma distribution with specified parameters,\n        `shape` (sometimes designated \"k\") and `scale` (sometimes designated\n        \"theta\"), where both parameters are > 0.\n\n        Parameters\n        ----------\n        shape : scalar > 0\n            The shape of the gamma distribution.\n        scale : scalar > 0, optional\n            The scale of the gamma distribution.  Default is equal to 1.\n        size : shape_tuple, optional\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray, float\n            Returns one sample unless `size` parameter is specified.\n\n        See Also\n        --------\n        scipy.stats.distributions.gamma : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Gamma distribution is\n\n        .. math:: p(x) = x^{k-1}\\frac{e^{-x/\\theta}}{\\theta^k\\Gamma(k)},\n\n        where :math:`k` is the shape and :math:`\\theta` the scale,\n        and :math:`\\Gamma` is the Gamma function.\n\n        The Gamma distribution is often used to model the times to failure of\n        electronic components, and arises naturally in processes for which the\n        waiting times between Poisson distributed events are relevant.\n\n        References\n        ----------\n        .. [1] Weisstein, Eric W. \"Gamma Distribution.\" From MathWorld--A\n               Wolfram Web Resource.\n               http://mathworld.wolfram.com/GammaDistribution.html\n        .. [2] Wikipedia, \"Gamma-distribution\",\n               http://en.wikipedia.org/wiki/Gamma-distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> shape, scale = 2.,"" 2. # mean and dispersion\n        >>> s = np.random.gamma(shape, scale, 1000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> import scipy.special as sps\n        >>> count, bins, ignored = plt.hist(s, 50, normed=True)\n        >>> y = bins**(shape-1)*(np.exp(-bins/scale) /\n        ...                      (sps.gamma(shape)*scale**shape))\n        >>> plt.plot(bins, y, linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_22gamma(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_45gamma(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_44gamma[] = "\n        gamma(shape, scale=1.0, size=None)\n\n        Draw samples from a Gamma distribution.\n\n        Samples are drawn from a Gamma distribution with specified parameters,\n        `shape` (sometimes designated \"k\") and `scale` (sometimes designated\n        \"theta\"), where both parameters are > 0.\n\n        Parameters\n        ----------\n        shape : scalar > 0\n            The shape of the gamma distribution.\n        scale : scalar > 0, optional\n            The scale of the gamma distribution.  Default is equal to 1.\n        size : shape_tuple, optional\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray, float\n            Returns one sample unless `size` parameter is specified.\n\n        See Also\n        --------\n        scipy.stats.distributions.gamma : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Gamma distribution is\n\n        .. math:: p(x) = x^{k-1}\\frac{e^{-x/\\theta}}{\\theta^k\\Gamma(k)},\n\n        where :math:`k` is the shape and :math:`\\theta` the scale,\n        and :math:`\\Gamma` is the Gamma function.\n\n        The Gamma distribution is often used to model the times to failure of\n        electronic components, and arises naturally in processes for which the\n        waiting times between Poisson distributed events are relevant.\n\n        References\n        ----------\n        .. [1] Weisstein, Eric W. \"Gamma Distribution.\" From MathWorld--A\n               Wolfram Web Resource.\n               http://mathworld.wolfram.com/GammaDistribution.html\n        .. [2] Wikipedia, \"Gamma-distribution\",\n               http://en.wikipedia.org/wiki/Gamma-distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> shape, scale = 2.,"" 2. # mean and dispersion\n        >>> s = np.random.gamma(shape, scale, 1000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> import scipy.special as sps\n        >>> count, bins, ignored = plt.hist(s, 50, normed=True)\n        >>> y = bins**(shape-1)*(np.exp(-bins/scale) /\n        ...                      (sps.gamma(shape)*scale**shape))\n        >>> plt.plot(bins, y, linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_45gamma(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_shape = 0;
-   PyObject *__pyx_v_scale = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_oshape = 0;
--  PyArrayObject *__pyx_v_oscale = 0;
--  double __pyx_v_fshape;
--  double __pyx_v_fscale;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__shape,&__pyx_n_s__scale,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("gamma");
-+  __Pyx_RefNannySetupContext("gamma (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__shape,&__pyx_n_s__scale,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-     values[1] = __pyx_k_34;
-+
-+    /* "mtrand.pyx":1535
-+ *         return cont1_array(self.internal_state, rk_standard_gamma, size, oshape)
-+ * 
-+ *     def gamma(self, shape, scale=1.0, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         gamma(shape, scale=1.0, size=None)
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -8314,10 +8669,9 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__shape);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__shape)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
-         if (kw_args > 0) {
-@@ -8331,7 +8685,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "gamma") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gamma") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -8354,6 +8708,27 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_44gamma(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_shape, __pyx_v_scale, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_44gamma(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_shape, PyObject *__pyx_v_scale, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_oshape = 0;
-+  PyArrayObject *__pyx_v_oscale = 0;
-+  double __pyx_v_fshape;
-+  double __pyx_v_fscale;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("gamma", 0);
- 
-   /* "mtrand.pyx":1608
-  *         cdef double fshape, fscale
-@@ -8405,9 +8780,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":1613
-  *             if fshape <= 0:
-@@ -8431,9 +8806,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
--    __pyx_L8:;
-+    __pyx_L5:;
- 
-     /* "mtrand.pyx":1615
-  *             if fscale <= 0:
-@@ -8443,14 +8818,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont2_array_sc(__pyx_v_self->internal_state, rk_gamma, __pyx_v_size, __pyx_v_fshape, __pyx_v_fscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":1617
-  *             return cont2_array_sc(self.internal_state, rk_gamma, size, fshape, fscale)
-@@ -8507,7 +8882,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oshape));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_oshape));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oshape));
-@@ -8519,7 +8894,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -8543,9 +8918,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L9;
-+    goto __pyx_L6;
-   }
--  __pyx_L9:;
-+  __pyx_L6:;
- 
-   /* "mtrand.pyx":1622
-  *         if np.any(np.less_equal(oshape, 0.0)):
-@@ -8567,7 +8942,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oscale));
-   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_oscale));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oscale));
-@@ -8579,7 +8954,7 @@
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -8603,9 +8978,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L10;
-+    goto __pyx_L7;
-   }
--  __pyx_L10:;
-+  __pyx_L7:;
- 
-   /* "mtrand.pyx":1624
-  *         if np.any(np.less_equal(oscale, 0.0)):
-@@ -8615,7 +8990,7 @@
-  *     def f(self, dfnum, dfden, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont2_array(__pyx_v_self->internal_state, rk_gamma, __pyx_v_size, __pyx_v_oshape, __pyx_v_oscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -8638,42 +9013,32 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":1626
-- *         return cont2_array(self.internal_state, rk_gamma, size, oshape, oscale)
-- * 
-- *     def f(self, dfnum, dfden, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         f(dfnum, dfden, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_23f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_23f[] = "\n        f(dfnum, dfden, size=None)\n\n        Draw samples from a F distribution.\n\n        Samples are drawn from an F distribution with specified parameters,\n        `dfnum` (degrees of freedom in numerator) and `dfden` (degrees of freedom\n        in denominator), where both parameters should be greater than zero.\n\n        The random variate of the F distribution (also known as the\n        Fisher distribution) is a continuous probability distribution\n        that arises in ANOVA tests, and is the ratio of two chi-square\n        variates.\n\n        Parameters\n        ----------\n        dfnum : float\n            Degrees of freedom in numerator. Should be greater than zero.\n        dfden : float\n            Degrees of freedom in denominator. Should be greater than zero.\n        size : {tuple, int}, optional\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``,\n            then ``m * n * k`` samples are drawn. By default only one sample\n            is returned.\n\n        Returns\n        -------\n        samples : {ndarray, scalar}\n            Samples from the Fisher distribution.\n\n        See Also\n        --------\n        scipy.stats.distributions.f : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n\n        The F statistic is used to compare in-group variances to between-group\n        variances. Calculating the distribution depends on the sampling, and\n        so it is a function of the respective degrees of freedom in the\n        problem.  The variable `dfnum` is the number of samples minus one, the\n        between-groups degrees of freedom, while `dfden` is the within-groups\n        degrees of freedom, the sum of the number of samples in each group\n        minus the number of groups.\n\n        References\n        ----------\n        .. [1] Glantz, Stanton A. \"Primer of Biostatistics.\", McGraw-Hill,\n               Fifth Edition, 2002.""\n        .. [2] Wikipedia, \"F-distribution\",\n               http://en.wikipedia.org/wiki/F-distribution\n\n        Examples\n        --------\n        An example from Glantz[1], pp 47-40.\n        Two groups, children of diabetics (25 people) and children from people\n        without diabetes (25 controls). Fasting blood glucose was measured,\n        case group had a mean value of 86.1, controls had a mean value of\n        82.2. Standard deviations were 2.09 and 2.49 respectively. Are these\n        data consistent with the null hypothesis that the parents diabetic\n        status does not affect their children's blood glucose levels?\n        Calculating the F statistic from the data gives a value of 36.01.\n\n        Draw samples from the distribution:\n\n        >>> dfnum = 1. # between group degrees of freedom\n        >>> dfden = 48. # within groups degrees of freedom\n        >>> s = np.random.f(dfnum, dfden, 1000)\n\n        The lower bound for the top 1% of the samples is :\n\n        >>> sort(s)[-10]\n        7.61988120985\n\n        So there is about a 1% chance that the F statistic will exceed 7.62,\n        the measured value is 36, so the null hypothesis is rejected at the 1%\n        level.\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_23f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_47f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_46f[] = "\n        f(dfnum, dfden, size=None)\n\n        Draw samples from a F distribution.\n\n        Samples are drawn from an F distribution with specified parameters,\n        `dfnum` (degrees of freedom in numerator) and `dfden` (degrees of freedom\n        in denominator), where both parameters should be greater than zero.\n\n        The random variate of the F distribution (also known as the\n        Fisher distribution) is a continuous probability distribution\n        that arises in ANOVA tests, and is the ratio of two chi-square\n        variates.\n\n        Parameters\n        ----------\n        dfnum : float\n            Degrees of freedom in numerator. Should be greater than zero.\n        dfden : float\n            Degrees of freedom in denominator. Should be greater than zero.\n        size : {tuple, int}, optional\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``,\n            then ``m * n * k`` samples are drawn. By default only one sample\n            is returned.\n\n        Returns\n        -------\n        samples : {ndarray, scalar}\n            Samples from the Fisher distribution.\n\n        See Also\n        --------\n        scipy.stats.distributions.f : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n\n        The F statistic is used to compare in-group variances to between-group\n        variances. Calculating the distribution depends on the sampling, and\n        so it is a function of the respective degrees of freedom in the\n        problem.  The variable `dfnum` is the number of samples minus one, the\n        between-groups degrees of freedom, while `dfden` is the within-groups\n        degrees of freedom, the sum of the number of samples in each group\n        minus the number of groups.\n\n        References\n        ----------\n        .. [1] Glantz, Stanton A. \"Primer of Biostatistics.\", McGraw-Hill,\n               Fifth Edition, 2002.""\n        .. [2] Wikipedia, \"F-distribution\",\n               http://en.wikipedia.org/wiki/F-distribution\n\n        Examples\n        --------\n        An example from Glantz[1], pp 47-40.\n        Two groups, children of diabetics (25 people) and children from people\n        without diabetes (25 controls). Fasting blood glucose was measured,\n        case group had a mean value of 86.1, controls had a mean value of\n        82.2. Standard deviations were 2.09 and 2.49 respectively. Are these\n        data consistent with the null hypothesis that the parents diabetic\n        status does not affect their children's blood glucose levels?\n        Calculating the F statistic from the data gives a value of 36.01.\n\n        Draw samples from the distribution:\n\n        >>> dfnum = 1. # between group degrees of freedom\n        >>> dfden = 48. # within groups degrees of freedom\n        >>> s = np.random.f(dfnum, dfden, 1000)\n\n        The lower bound for the top 1% of the samples is :\n\n        >>> sort(s)[-10]\n        7.61988120985\n\n        So there is about a 1% chance that the F statistic will exceed 7.62,\n        the measured value is 36, so the null hypothesis is rejected at the 1%\n        level.\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_47f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_dfnum = 0;
-   PyObject *__pyx_v_dfden = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_odfnum = 0;
--  PyArrayObject *__pyx_v_odfden = 0;
--  double __pyx_v_fdfnum;
--  double __pyx_v_fdfden;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dfnum,&__pyx_n_s__dfden,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("f");
-+  __Pyx_RefNannySetupContext("f (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dfnum,&__pyx_n_s__dfden,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-+
-+    /* "mtrand.pyx":1626
-+ *         return cont2_array(self.internal_state, rk_gamma, size, oshape, oscale)
-+ * 
-+ *     def f(self, dfnum, dfden, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         f(dfnum, dfden, size=None)
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -8681,14 +9046,12 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dfnum);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dfnum)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
--        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dfden);
--        if (likely(values[1])) kw_args--;
-+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dfden)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("f", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-@@ -8699,7 +9062,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "f") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -8722,6 +9085,27 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_46f(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_dfnum, __pyx_v_dfden, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_46f(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_dfnum, PyObject *__pyx_v_dfden, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_odfnum = 0;
-+  PyArrayObject *__pyx_v_odfden = 0;
-+  double __pyx_v_fdfnum;
-+  double __pyx_v_fdfden;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("f", 0);
- 
-   /* "mtrand.pyx":1710
-  *         cdef double fdfnum, fdfden
-@@ -8773,9 +9157,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":1715
-  *             if fdfnum <= 0:
-@@ -8799,9 +9183,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
--    __pyx_L8:;
-+    __pyx_L5:;
- 
-     /* "mtrand.pyx":1717
-  *             if fdfden <= 0:
-@@ -8811,14 +9195,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont2_array_sc(__pyx_v_self->internal_state, rk_f, __pyx_v_size, __pyx_v_fdfnum, __pyx_v_fdfden); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":1719
-  *             return cont2_array_sc(self.internal_state, rk_f, size, fdfnum, fdfden)
-@@ -8875,7 +9259,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_odfnum));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_odfnum));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_odfnum));
-@@ -8887,7 +9271,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -8911,9 +9295,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L9;
-+    goto __pyx_L6;
-   }
--  __pyx_L9:;
-+  __pyx_L6:;
- 
-   /* "mtrand.pyx":1725
-  *         if np.any(np.less_equal(odfnum, 0.0)):
-@@ -8935,7 +9319,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(((PyObject *)__pyx_v_odfden));
-   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_odfden));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_odfden));
-@@ -8947,7 +9331,7 @@
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -8971,9 +9355,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L10;
-+    goto __pyx_L7;
-   }
--  __pyx_L10:;
-+  __pyx_L7:;
- 
-   /* "mtrand.pyx":1727
-  *         if np.any(np.less_equal(odfden, 0.0)):
-@@ -8983,7 +9367,7 @@
-  *     def noncentral_f(self, dfnum, dfden, nonc, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont2_array(__pyx_v_self->internal_state, rk_f, __pyx_v_size, __pyx_v_odfnum, __pyx_v_odfden); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -9006,45 +9390,33 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":1729
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_49noncentral_f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_48noncentral_f[] = "\n        noncentral_f(dfnum, dfden, nonc, size=None)\n\n        Draw samples from the noncentral F distribution.\n\n        Samples are drawn from an F distribution with specified parameters,\n        `dfnum` (degrees of freedom in numerator) and `dfden` (degrees of\n        freedom in denominator), where both parameters > 1.\n        `nonc` is the non-centrality parameter.\n\n        Parameters\n        ----------\n        dfnum : int\n            Parameter, should be > 1.\n        dfden : int\n            Parameter, should be > 1.\n        nonc : float\n            Parameter, should be >= 0.\n        size : int or tuple of ints\n            Output shape. If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : scalar or ndarray\n            Drawn samples.\n\n        Notes\n        -----\n        When calculating the power of an experiment (power = probability of\n        rejecting the null hypothesis when a specific alternative is true) the\n        non-central F statistic becomes important.  When the null hypothesis is\n        true, the F statistic follows a central F distribution. When the null\n        hypothesis is not true, then it follows a non-central F statistic.\n\n        References\n        ----------\n        Weisstein, Eric W. \"Noncentral F-Distribution.\" From MathWorld--A Wolfram\n        Web Resource.  http://mathworld.wolfram.com/NoncentralF-Distribution.html\n\n        Wikipedia, \"Noncentral F distribution\",\n        http://en.wikipedia.org/wiki/Noncentral_F-distribution\n\n        Examples\n        --------\n        In a study, testing for a specific alternative to the null hypothesis\n        requires use of the Noncentral F distribution. We need to calculate the\n        area in the tail of the distribution that exceeds the value of the F\n        distribution for the null hypothesis.  We'll plot the two probability\n        distributions for comp""arison.\n\n        >>> dfnum = 3 # between group deg of freedom\n        >>> dfden = 20 # within groups degrees of freedom\n        >>> nonc = 3.0\n        >>> nc_vals = np.random.noncentral_f(dfnum, dfden, nonc, 1000000)\n        >>> NF = np.histogram(nc_vals, bins=50, normed=True)\n        >>> c_vals = np.random.f(dfnum, dfden, 1000000)\n        >>> F = np.histogram(c_vals, bins=50, normed=True)\n        >>> plt.plot(F[1][1:], F[0])\n        >>> plt.plot(NF[1][1:], NF[0])\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_49noncentral_f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_dfnum = 0;
-+  PyObject *__pyx_v_dfden = 0;
-+  PyObject *__pyx_v_nonc = 0;
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("noncentral_f (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dfnum,&__pyx_n_s__dfden,&__pyx_n_s__nonc,&__pyx_n_s__size,0};
-+    PyObject* values[4] = {0,0,0,0};
-+
-+    /* "mtrand.pyx":1729
-  *         return cont2_array(self.internal_state, rk_f, size, odfnum, odfden)
-  * 
-  *     def noncentral_f(self, dfnum, dfden, nonc, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         noncentral_f(dfnum, dfden, nonc, size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_24noncentral_f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_24noncentral_f[] = "\n        noncentral_f(dfnum, dfden, nonc, size=None)\n\n        Draw samples from the noncentral F distribution.\n\n        Samples are drawn from an F distribution with specified parameters,\n        `dfnum` (degrees of freedom in numerator) and `dfden` (degrees of\n        freedom in denominator), where both parameters > 1.\n        `nonc` is the non-centrality parameter.\n\n        Parameters\n        ----------\n        dfnum : int\n            Parameter, should be > 1.\n        dfden : int\n            Parameter, should be > 1.\n        nonc : float\n            Parameter, should be >= 0.\n        size : int or tuple of ints\n            Output shape. If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : scalar or ndarray\n            Drawn samples.\n\n        Notes\n        -----\n        When calculating the power of an experiment (power = probability of\n        rejecting the null hypothesis when a specific alternative is true) the\n        non-central F statistic becomes important.  When the null hypothesis is\n        true, the F statistic follows a central F distribution. When the null\n        hypothesis is not true, then it follows a non-central F statistic.\n\n        References\n        ----------\n        Weisstein, Eric W. \"Noncentral F-Distribution.\" From MathWorld--A Wolfram\n        Web Resource.  http://mathworld.wolfram.com/NoncentralF-Distribution.html\n\n        Wikipedia, \"Noncentral F distribution\",\n        http://en.wikipedia.org/wiki/Noncentral_F-distribution\n\n        Examples\n        --------\n        In a study, testing for a specific alternative to the null hypothesis\n        requires use of the Noncentral F distribution. We need to calculate the\n        area in the tail of the distribution that exceeds the value of the F\n        distribution for the null hypothesis.  We'll plot the two probability\n        distributions for comp""arison.\n\n        >>> dfnum = 3 # between group deg of freedom\n        >>> dfden = 20 # within groups degrees of freedom\n        >>> nonc = 3.0\n        >>> nc_vals = np.random.noncentral_f(dfnum, dfden, nonc, 1000000)\n        >>> NF = np.histogram(nc_vals, bins=50, normed=True)\n        >>> c_vals = np.random.f(dfnum, dfden, 1000000)\n        >>> F = np.histogram(c_vals, bins=50, normed=True)\n        >>> plt.plot(F[1][1:], F[0])\n        >>> plt.plot(NF[1][1:], NF[0])\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_24noncentral_f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_dfnum = 0;
--  PyObject *__pyx_v_dfden = 0;
--  PyObject *__pyx_v_nonc = 0;
--  PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_odfnum = 0;
--  PyArrayObject *__pyx_v_odfden = 0;
--  PyArrayObject *__pyx_v_ononc = 0;
--  double __pyx_v_fdfnum;
--  double __pyx_v_fdfden;
--  double __pyx_v_fnonc;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dfnum,&__pyx_n_s__dfden,&__pyx_n_s__nonc,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("noncentral_f");
--  {
--    PyObject* values[4] = {0,0,0,0};
-     values[3] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-@@ -9053,20 +9425,17 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dfnum);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dfnum)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
--        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dfden);
--        if (likely(values[1])) kw_args--;
-+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dfden)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("noncentral_f", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-         case  2:
--        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nonc);
--        if (likely(values[2])) kw_args--;
-+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nonc)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("noncentral_f", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-@@ -9077,7 +9446,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "noncentral_f") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "noncentral_f") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -9102,6 +9471,29 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_48noncentral_f(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_dfnum, __pyx_v_dfden, __pyx_v_nonc, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_48noncentral_f(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_dfnum, PyObject *__pyx_v_dfden, PyObject *__pyx_v_nonc, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_odfnum = 0;
-+  PyArrayObject *__pyx_v_odfden = 0;
-+  PyArrayObject *__pyx_v_ononc = 0;
-+  double __pyx_v_fdfnum;
-+  double __pyx_v_fdfden;
-+  double __pyx_v_fnonc;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("noncentral_f", 0);
- 
-   /* "mtrand.pyx":1796
-  *         cdef double fdfnum, fdfden, fnonc
-@@ -9162,9 +9554,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":1802
-  *             if fdfnum <= 1:
-@@ -9188,9 +9580,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
--    __pyx_L8:;
-+    __pyx_L5:;
- 
-     /* "mtrand.pyx":1804
-  *             if fdfden <= 0:
-@@ -9214,9 +9606,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L9;
-+      goto __pyx_L6;
-     }
--    __pyx_L9:;
-+    __pyx_L6:;
- 
-     /* "mtrand.pyx":1806
-  *             if fnonc < 0:
-@@ -9234,14 +9626,14 @@
-  * 
-  *         PyErr_Clear()
-  */
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont3_array_sc(__pyx_v_self->internal_state, rk_noncentral_f, __pyx_v_size, __pyx_v_fdfnum, __pyx_v_fdfden, __pyx_v_fnonc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":1809
-  *                                   fdfnum, fdfden, fnonc)
-@@ -9311,7 +9703,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_odfnum));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_odfnum));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_odfnum));
-@@ -9323,7 +9715,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -9347,9 +9739,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L10;
-+    goto __pyx_L7;
-   }
--  __pyx_L10:;
-+  __pyx_L7:;
- 
-   /* "mtrand.pyx":1817
-  *         if np.any(np.less_equal(odfnum, 1.0)):
-@@ -9371,7 +9763,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(((PyObject *)__pyx_v_odfden));
-   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_odfden));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_odfden));
-@@ -9383,7 +9775,7 @@
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -9407,9 +9799,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L11;
-+    goto __pyx_L8;
-   }
--  __pyx_L11:;
-+  __pyx_L8:;
- 
-   /* "mtrand.pyx":1819
-  *         if np.any(np.less_equal(odfden, 0.0)):
-@@ -9431,7 +9823,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+  __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_INCREF(((PyObject *)__pyx_v_ononc));
-   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_ononc));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_ononc));
-@@ -9443,7 +9835,7 @@
-   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+  __Pyx_GOTREF(__pyx_t_3);
-   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -9467,9 +9859,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L12;
-+    goto __pyx_L9;
-   }
--  __pyx_L12:;
-+  __pyx_L9:;
- 
-   /* "mtrand.pyx":1821
-  *         if np.any(np.less(ononc, 0.0)):
-@@ -9487,7 +9879,7 @@
-  * 
-  *     def chisquare(self, df, size=None):
-  */
--  __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont3_array(__pyx_v_self->internal_state, rk_noncentral_f, __pyx_v_size, __pyx_v_odfnum, __pyx_v_odfden, __pyx_v_ononc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -9511,49 +9903,40 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":1824
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_51chisquare(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_50chisquare[] = "\n        chisquare(df, size=None)\n\n        Draw samples from a chi-square distribution.\n\n        When `df` independent random variables, each with standard normal\n        distributions (mean 0, variance 1), are squared and summed, the\n        resulting distribution is chi-square (see Notes).  This distribution\n        is often used in hypothesis testing.\n\n        Parameters\n        ----------\n        df : int\n             Number of degrees of freedom.\n        size : tuple of ints, int, optional\n             Size of the returned array.  By default, a scalar is\n             returned.\n\n        Returns\n        -------\n        output : ndarray\n            Samples drawn from the distribution, packed in a `size`-shaped\n            array.\n\n        Raises\n        ------\n        ValueError\n            When `df` <= 0 or when an inappropriate `size` (e.g. ``size=-1``)\n            is given.\n\n        Notes\n        -----\n        The variable obtained by summing the squares of `df` independent,\n        standard normally distributed random variables:\n\n        .. math:: Q = \\sum_{i=0}^{\\mathtt{df}} X^2_i\n\n        is chi-square distributed, denoted\n\n        .. math:: Q \\sim \\chi^2_k.\n\n        The probability density function of the chi-squared distribution is\n\n        .. math:: p(x) = \\frac{(1/2)^{k/2}}{\\Gamma(k/2)}\n                         x^{k/2 - 1} e^{-x/2},\n\n        where :math:`\\Gamma` is the gamma function,\n\n        .. math:: \\Gamma(x) = \\int_0^{-\\infty} t^{x - 1} e^{-t} dt.\n\n        References\n        ----------\n        `NIST/SEMATECH e-Handbook of Statistical Methods\n        <http://www.itl.nist.gov/div898/handbook/eda/section3/eda3666.htm>`_\n\n        Examples\n        --------\n        >>> np.random.chisquare(2,4)\n        array([ 1.89920014,  9.00867716,  3.13710533,  5.62318272])\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_51chisquare(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_df = 0;
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("chisquare (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__df,&__pyx_n_s__size,0};
-+    PyObject* values[2] = {0,0};
-+
-+    /* "mtrand.pyx":1824
-  *             odfden, ononc)
-  * 
-  *     def chisquare(self, df, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         chisquare(df, size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_25chisquare(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_25chisquare[] = "\n        chisquare(df, size=None)\n\n        Draw samples from a chi-square distribution.\n\n        When `df` independent random variables, each with standard normal\n        distributions (mean 0, variance 1), are squared and summed, the\n        resulting distribution is chi-square (see Notes).  This distribution\n        is often used in hypothesis testing.\n\n        Parameters\n        ----------\n        df : int\n             Number of degrees of freedom.\n        size : tuple of ints, int, optional\n             Size of the returned array.  By default, a scalar is\n             returned.\n\n        Returns\n        -------\n        output : ndarray\n            Samples drawn from the distribution, packed in a `size`-shaped\n            array.\n\n        Raises\n        ------\n        ValueError\n            When `df` <= 0 or when an inappropriate `size` (e.g. ``size=-1``)\n            is given.\n\n        Notes\n        -----\n        The variable obtained by summing the squares of `df` independent,\n        standard normally distributed random variables:\n\n        .. math:: Q = \\sum_{i=0}^{\\mathtt{df}} X^2_i\n\n        is chi-square distributed, denoted\n\n        .. math:: Q \\sim \\chi^2_k.\n\n        The probability density function of the chi-squared distribution is\n\n        .. math:: p(x) = \\frac{(1/2)^{k/2}}{\\Gamma(k/2)}\n                         x^{k/2 - 1} e^{-x/2},\n\n        where :math:`\\Gamma` is the gamma function,\n\n        .. math:: \\Gamma(x) = \\int_0^{-\\infty} t^{x - 1} e^{-t} dt.\n\n        References\n        ----------\n        `NIST/SEMATECH e-Handbook of Statistical Methods\n        <http://www.itl.nist.gov/div898/handbook/eda/section3/eda3666.htm>`_\n\n        Examples\n        --------\n        >>> np.random.chisquare(2,4)\n        array([ 1.89920014,  9.00867716,  3.13710533,  5.62318272])\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_25chisquare(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_df = 0;
--  PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_odf = 0;
--  double __pyx_v_fdf;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__df,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("chisquare");
--  {
--    PyObject* values[2] = {0,0};
-     values[1] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__df);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__df)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
-         if (kw_args > 0) {
-@@ -9562,7 +9945,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "chisquare") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "chisquare") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -9583,6 +9966,25 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_50chisquare(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_df, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_50chisquare(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_df, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_odf = 0;
-+  double __pyx_v_fdf;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("chisquare", 0);
- 
-   /* "mtrand.pyx":1889
-  *         cdef double fdf
-@@ -9625,9 +10027,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":1893
-  *             if fdf <= 0:
-@@ -9637,14 +10039,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_2 = __pyx_f_6mtrand_cont1_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_chisquare, __pyx_v_size, __pyx_v_fdf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont1_array_sc(__pyx_v_self->internal_state, rk_chisquare, __pyx_v_size, __pyx_v_fdf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":1895
-  *             return cont1_array_sc(self.internal_state, rk_chisquare, size, fdf)
-@@ -9688,7 +10090,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_odf));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_odf));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_odf));
-@@ -9700,7 +10102,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -9724,9 +10126,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":1900
-  *         if np.any(np.less_equal(odf, 0.0)):
-@@ -9736,7 +10138,7 @@
-  *     def noncentral_chisquare(self, df, nonc, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_chisquare, __pyx_v_size, __pyx_v_odf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont1_array(__pyx_v_self->internal_state, rk_chisquare, __pyx_v_size, __pyx_v_odf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -9758,42 +10160,32 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":1902
-- *         return cont1_array(self.internal_state, rk_chisquare, size, odf)
-- * 
-- *     def noncentral_chisquare(self, df, nonc, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         noncentral_chisquare(df, nonc, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_26noncentral_chisquare(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_26noncentral_chisquare[] = "\n        noncentral_chisquare(df, nonc, size=None)\n\n        Draw samples from a noncentral chi-square distribution.\n\n        The noncentral :math:`\\chi^2` distribution is a generalisation of\n        the :math:`\\chi^2` distribution.\n\n        Parameters\n        ----------\n        df : int\n            Degrees of freedom, should be >= 1.\n        nonc : float\n            Non-centrality, should be > 0.\n        size : int or tuple of ints\n            Shape of the output.\n\n        Notes\n        -----\n        The probability density function for the noncentral Chi-square distribution\n        is\n\n        .. math:: P(x;df,nonc) = \\sum^{\\infty}_{i=0}\n                               \\frac{e^{-nonc/2}(nonc/2)^{i}}{i!}P_{Y_{df+2i}}(x),\n\n        where :math:`Y_{q}` is the Chi-square with q degrees of freedom.\n\n        In Delhi (2007), it is noted that the noncentral chi-square is useful in\n        bombing and coverage problems, the probability of killing the point target\n        given by the noncentral chi-squared distribution.\n\n        References\n        ----------\n        .. [1] Delhi, M.S. Holla, \"On a noncentral chi-square distribution in the\n               analysis of weapon systems effectiveness\", Metrika, Volume 15,\n               Number 1 / December, 1970.\n        .. [2] Wikipedia, \"Noncentral chi-square distribution\"\n               http://en.wikipedia.org/wiki/Noncentral_chi-square_distribution\n\n        Examples\n        --------\n        Draw values from the distribution and plot the histogram\n\n        >>> import matplotlib.pyplot as plt\n        >>> values = plt.hist(np.random.noncentral_chisquare(3, 20, 100000),\n        ...                   bins=200, normed=True)\n        >>> plt.show()\n\n        Draw values from a noncentral chisquare with very small noncentrality,\n        and compare to a chisquare.\n\n        >>> plt.figure()\n        >>> values = plt.hist(np.random.noncentral_chisquare(3, .0000001, 100000),\n     ""   ...                   bins=np.arange(0., 25, .1), normed=True)\n        >>> values2 = plt.hist(np.random.chisquare(3, 100000),\n        ...                    bins=np.arange(0., 25, .1), normed=True)\n        >>> plt.plot(values[1][0:-1], values[0]-values2[0], 'ob')\n        >>> plt.show()\n\n        Demonstrate how large values of non-centrality lead to a more symmetric\n        distribution.\n\n        >>> plt.figure()\n        >>> values = plt.hist(np.random.noncentral_chisquare(3, 20, 100000),\n        ...                   bins=200, normed=True)\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_26noncentral_chisquare(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_53noncentral_chisquare(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_52noncentral_chisquare[] = "\n        noncentral_chisquare(df, nonc, size=None)\n\n        Draw samples from a noncentral chi-square distribution.\n\n        The noncentral :math:`\\chi^2` distribution is a generalisation of\n        the :math:`\\chi^2` distribution.\n\n        Parameters\n        ----------\n        df : int\n            Degrees of freedom, should be >= 1.\n        nonc : float\n            Non-centrality, should be > 0.\n        size : int or tuple of ints\n            Shape of the output.\n\n        Notes\n        -----\n        The probability density function for the noncentral Chi-square distribution\n        is\n\n        .. math:: P(x;df,nonc) = \\sum^{\\infty}_{i=0}\n                               \\frac{e^{-nonc/2}(nonc/2)^{i}}{i!}P_{Y_{df+2i}}(x),\n\n        where :math:`Y_{q}` is the Chi-square with q degrees of freedom.\n\n        In Delhi (2007), it is noted that the noncentral chi-square is useful in\n        bombing and coverage problems, the probability of killing the point target\n        given by the noncentral chi-squared distribution.\n\n        References\n        ----------\n        .. [1] Delhi, M.S. Holla, \"On a noncentral chi-square distribution in the\n               analysis of weapon systems effectiveness\", Metrika, Volume 15,\n               Number 1 / December, 1970.\n        .. [2] Wikipedia, \"Noncentral chi-square distribution\"\n               http://en.wikipedia.org/wiki/Noncentral_chi-square_distribution\n\n        Examples\n        --------\n        Draw values from the distribution and plot the histogram\n\n        >>> import matplotlib.pyplot as plt\n        >>> values = plt.hist(np.random.noncentral_chisquare(3, 20, 100000),\n        ...                   bins=200, normed=True)\n        >>> plt.show()\n\n        Draw values from a noncentral chisquare with very small noncentrality,\n        and compare to a chisquare.\n\n        >>> plt.figure()\n        >>> values = plt.hist(np.random.noncentral_chisquare(3, .0000001, 100000),\n     ""   ...                   bins=np.arange(0., 25, .1), normed=True)\n        >>> values2 = plt.hist(np.random.chisquare(3, 100000),\n        ...                    bins=np.arange(0., 25, .1), normed=True)\n        >>> plt.plot(values[1][0:-1], values[0]-values2[0], 'ob')\n        >>> plt.show()\n\n        Demonstrate how large values of non-centrality lead to a more symmetric\n        distribution.\n\n        >>> plt.figure()\n        >>> values = plt.hist(np.random.noncentral_chisquare(3, 20, 100000),\n        ...                   bins=200, normed=True)\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_53noncentral_chisquare(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_df = 0;
-   PyObject *__pyx_v_nonc = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_odf = 0;
--  PyArrayObject *__pyx_v_ononc = 0;
--  double __pyx_v_fdf;
--  double __pyx_v_fnonc;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__df,&__pyx_n_s__nonc,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("noncentral_chisquare");
-+  __Pyx_RefNannySetupContext("noncentral_chisquare (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__df,&__pyx_n_s__nonc,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-+
-+    /* "mtrand.pyx":1902
-+ *         return cont1_array(self.internal_state, rk_chisquare, size, odf)
-+ * 
-+ *     def noncentral_chisquare(self, df, nonc, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         noncentral_chisquare(df, nonc, size=None)
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -9801,14 +10193,12 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__df);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__df)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
--        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nonc);
--        if (likely(values[1])) kw_args--;
-+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nonc)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("noncentral_chisquare", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-@@ -9819,7 +10209,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "noncentral_chisquare") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "noncentral_chisquare") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -9842,6 +10232,27 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_52noncentral_chisquare(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_df, __pyx_v_nonc, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_52noncentral_chisquare(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_df, PyObject *__pyx_v_nonc, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_odf = 0;
-+  PyArrayObject *__pyx_v_ononc = 0;
-+  double __pyx_v_fdf;
-+  double __pyx_v_fnonc;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("noncentral_chisquare", 0);
- 
-   /* "mtrand.pyx":1973
-  *         cdef ndarray odf, ononc
-@@ -9893,9 +10304,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":1978
-  *             if fdf <= 1:
-@@ -9919,9 +10330,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
--    __pyx_L8:;
-+    __pyx_L5:;
- 
-     /* "mtrand.pyx":1980
-  *             if fnonc <= 0:
-@@ -9939,14 +10350,14 @@
-  * 
-  *         PyErr_Clear()
-  */
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont2_array_sc(__pyx_v_self->internal_state, rk_noncentral_chisquare, __pyx_v_size, __pyx_v_fdf, __pyx_v_fnonc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":1983
-  *                                   size, fdf, fnonc)
-@@ -10003,7 +10414,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_odf));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_odf));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_odf));
-@@ -10015,7 +10426,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -10039,9 +10450,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L9;
-+    goto __pyx_L6;
-   }
--  __pyx_L9:;
-+  __pyx_L6:;
- 
-   /* "mtrand.pyx":1989
-  *         if np.any(np.less_equal(odf, 0.0)):
-@@ -10063,7 +10474,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(((PyObject *)__pyx_v_ononc));
-   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_ononc));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_ononc));
-@@ -10075,7 +10486,7 @@
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -10099,9 +10510,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L10;
-+    goto __pyx_L7;
-   }
--  __pyx_L10:;
-+  __pyx_L7:;
- 
-   /* "mtrand.pyx":1991
-  *         if np.any(np.less_equal(ononc, 0.0)):
-@@ -10119,7 +10530,7 @@
-  * 
-  *     def standard_cauchy(self, size=None):
-  */
--  __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont2_array(__pyx_v_self->internal_state, rk_noncentral_chisquare, __pyx_v_size, __pyx_v_odf, __pyx_v_ononc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -10142,38 +10553,36 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":1994
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_55standard_cauchy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_54standard_cauchy[] = "\n        standard_cauchy(size=None)\n\n        Standard Cauchy distribution with mode = 0.\n\n        Also known as the Lorentz distribution.\n\n        Parameters\n        ----------\n        size : int or tuple of ints\n            Shape of the output.\n\n        Returns\n        -------\n        samples : ndarray or scalar\n            The drawn samples.\n\n        Notes\n        -----\n        The probability density function for the full Cauchy distribution is\n\n        .. math:: P(x; x_0, \\gamma) = \\frac{1}{\\pi \\gamma \\bigl[ 1+\n                  (\\frac{x-x_0}{\\gamma})^2 \\bigr] }\n\n        and the Standard Cauchy distribution just sets :math:`x_0=0` and\n        :math:`\\gamma=1`\n\n        The Cauchy distribution arises in the solution to the driven harmonic\n        oscillator problem, and also describes spectral line broadening. It\n        also describes the distribution of values at which a line tilted at\n        a random angle will cut the x axis.\n\n        When studying hypothesis tests that assume normality, seeing how the\n        tests perform on data from a Cauchy distribution is a good indicator of\n        their sensitivity to a heavy-tailed distribution, since the Cauchy looks\n        very much like a Gaussian distribution, but with heavier tails.\n\n        References\n        ----------\n        ..[1] NIST/SEMATECH e-Handbook of Statistical Methods, \"Cauchy\n              Distribution\",\n              http://www.itl.nist.gov/div898/handbook/eda/section3/eda3663.htm\n        ..[2] Weisstein, Eric W. \"Cauchy Distribution.\" From MathWorld--A\n              Wolfram Web Resource.\n              http://mathworld.wolfram.com/CauchyDistribution.html\n        ..[3] Wikipedia, \"Cauchy distribution\"\n              http://en.wikipedia.org/wiki/Cauchy_distribution\n\n        Examples\n        --------\n        Draw samples and plot the distribution:\n\n        >>> s = np.random.standard_cauchy(1000000)\n        >>> s = s[(s>-25) & (s<25)""]  # truncate distribution so it plots well\n        >>> plt.hist(s, bins=100)\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_55standard_cauchy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("standard_cauchy (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0};
-+    PyObject* values[1] = {0};
-+
-+    /* "mtrand.pyx":1994
-  *             odf, ononc)
-  * 
-  *     def standard_cauchy(self, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         standard_cauchy(size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_27standard_cauchy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_27standard_cauchy[] = "\n        standard_cauchy(size=None)\n\n        Standard Cauchy distribution with mode = 0.\n\n        Also known as the Lorentz distribution.\n\n        Parameters\n        ----------\n        size : int or tuple of ints\n            Shape of the output.\n\n        Returns\n        -------\n        samples : ndarray or scalar\n            The drawn samples.\n\n        Notes\n        -----\n        The probability density function for the full Cauchy distribution is\n\n        .. math:: P(x; x_0, \\gamma) = \\frac{1}{\\pi \\gamma \\bigl[ 1+\n                  (\\frac{x-x_0}{\\gamma})^2 \\bigr] }\n\n        and the Standard Cauchy distribution just sets :math:`x_0=0` and\n        :math:`\\gamma=1`\n\n        The Cauchy distribution arises in the solution to the driven harmonic\n        oscillator problem, and also describes spectral line broadening. It\n        also describes the distribution of values at which a line tilted at\n        a random angle will cut the x axis.\n\n        When studying hypothesis tests that assume normality, seeing how the\n        tests perform on data from a Cauchy distribution is a good indicator of\n        their sensitivity to a heavy-tailed distribution, since the Cauchy looks\n        very much like a Gaussian distribution, but with heavier tails.\n\n        References\n        ----------\n        ..[1] NIST/SEMATECH e-Handbook of Statistical Methods, \"Cauchy\n              Distribution\",\n              http://www.itl.nist.gov/div898/handbook/eda/section3/eda3663.htm\n        ..[2] Weisstein, Eric W. \"Cauchy Distribution.\" From MathWorld--A\n              Wolfram Web Resource.\n              http://mathworld.wolfram.com/CauchyDistribution.html\n        ..[3] Wikipedia, \"Cauchy distribution\"\n              http://en.wikipedia.org/wiki/Cauchy_distribution\n\n        Examples\n        --------\n        Draw samples and plot the distribution:\n\n        >>> s = np.random.standard_cauchy(1000000)\n        >>> s = s[(s>-25) & (s<25)""]  # truncate distribution so it plots well\n        >>> plt.hist(s, bins=100)\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_27standard_cauchy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_size = 0;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  PyObject *__pyx_t_1 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("standard_cauchy");
--  {
--    PyObject* values[1] = {0};
-     values[0] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size);
-@@ -10181,7 +10590,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "standard_cauchy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "standard_cauchy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -10200,6 +10609,19 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_54standard_cauchy(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_54standard_cauchy(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size) {
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  PyObject *__pyx_t_1 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("standard_cauchy", 0);
- 
-   /* "mtrand.pyx":2053
-  * 
-@@ -10209,7 +10631,7 @@
-  *     def standard_t(self, df, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_1 = __pyx_f_6mtrand_cont0_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_standard_cauchy, __pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_1 = __pyx_f_6mtrand_cont0_array(__pyx_v_self->internal_state, rk_standard_cauchy, __pyx_v_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_1);
-   __pyx_r = __pyx_t_1;
-   __pyx_t_1 = 0;
-@@ -10227,49 +10649,40 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":2055
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_57standard_t(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_56standard_t[] = "\n        standard_t(df, size=None)\n\n        Standard Student's t distribution with df degrees of freedom.\n\n        A special case of the hyperbolic distribution.\n        As `df` gets large, the result resembles that of the standard normal\n        distribution (`standard_normal`).\n\n        Parameters\n        ----------\n        df : int\n            Degrees of freedom, should be > 0.\n        size : int or tuple of ints, optional\n            Output shape. Default is None, in which case a single value is\n            returned.\n\n        Returns\n        -------\n        samples : ndarray or scalar\n            Drawn samples.\n\n        Notes\n        -----\n        The probability density function for the t distribution is\n\n        .. math:: P(x, df) = \\frac{\\Gamma(\\frac{df+1}{2})}{\\sqrt{\\pi df}\n                  \\Gamma(\\frac{df}{2})}\\Bigl( 1+\\frac{x^2}{df} \\Bigr)^{-(df+1)/2}\n\n        The t test is based on an assumption that the data come from a Normal\n        distribution. The t test provides a way to test whether the sample mean\n        (that is the mean calculated from the data) is a good estimate of the true\n        mean.\n\n        The derivation of the t-distribution was forst published in 1908 by William\n        Gisset while working for the Guinness Brewery in Dublin. Due to proprietary\n        issues, he had to publish under a pseudonym, and so he used the name\n        Student.\n\n        References\n        ----------\n        .. [1] Dalgaard, Peter, \"Introductory Statistics With R\",\n               Springer, 2002.\n        .. [2] Wikipedia, \"Student's t-distribution\"\n               http://en.wikipedia.org/wiki/Student's_t-distribution\n\n        Examples\n        --------\n        From Dalgaard page 83 [1]_, suppose the daily energy intake for 11\n        women in Kj is:\n\n        >>> intake = np.array([5260., 5470, 5640, 6180, 6390, 6515, 6805, 7515, \\\n        ...                    7515, 8230, 8770])\n\n        Doe""s their energy intake deviate systematically from the recommended\n        value of 7725 kJ?\n\n        We have 10 degrees of freedom, so is the sample mean within 95% of the\n        recommended value?\n\n        >>> s = np.random.standard_t(10, size=100000)\n        >>> np.mean(intake)\n        6753.636363636364\n        >>> intake.std(ddof=1)\n        1142.1232221373727\n\n        Calculate the t statistic, setting the ddof parameter to the unbiased\n        value so the divisor in the standard deviation will be degrees of\n        freedom, N-1.\n\n        >>> t = (np.mean(intake)-7725)/(intake.std(ddof=1)/np.sqrt(len(intake)))\n        >>> import matplotlib.pyplot as plt\n        >>> h = plt.hist(s, bins=100, normed=True)\n\n        For a one-sided t-test, how far out in the distribution does the t\n        statistic appear?\n\n        >>> >>> np.sum(s<t) / float(len(s))\n        0.0090699999999999999  #random\n\n        So the p-value is about 0.009, which says the null hypothesis has a\n        probability of about 99% of being true.\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_57standard_t(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_df = 0;
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("standard_t (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__df,&__pyx_n_s__size,0};
-+    PyObject* values[2] = {0,0};
-+
-+    /* "mtrand.pyx":2055
-  *         return cont0_array(self.internal_state, rk_standard_cauchy, size)
-  * 
-  *     def standard_t(self, df, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         standard_t(df, size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_28standard_t(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_28standard_t[] = "\n        standard_t(df, size=None)\n\n        Standard Student's t distribution with df degrees of freedom.\n\n        A special case of the hyperbolic distribution.\n        As `df` gets large, the result resembles that of the standard normal\n        distribution (`standard_normal`).\n\n        Parameters\n        ----------\n        df : int\n            Degrees of freedom, should be > 0.\n        size : int or tuple of ints, optional\n            Output shape. Default is None, in which case a single value is\n            returned.\n\n        Returns\n        -------\n        samples : ndarray or scalar\n            Drawn samples.\n\n        Notes\n        -----\n        The probability density function for the t distribution is\n\n        .. math:: P(x, df) = \\frac{\\Gamma(\\frac{df+1}{2})}{\\sqrt{\\pi df}\n                  \\Gamma(\\frac{df}{2})}\\Bigl( 1+\\frac{x^2}{df} \\Bigr)^{-(df+1)/2}\n\n        The t test is based on an assumption that the data come from a Normal\n        distribution. The t test provides a way to test whether the sample mean\n        (that is the mean calculated from the data) is a good estimate of the true\n        mean.\n\n        The derivation of the t-distribution was forst published in 1908 by William\n        Gisset while working for the Guinness Brewery in Dublin. Due to proprietary\n        issues, he had to publish under a pseudonym, and so he used the name\n        Student.\n\n        References\n        ----------\n        .. [1] Dalgaard, Peter, \"Introductory Statistics With R\",\n               Springer, 2002.\n        .. [2] Wikipedia, \"Student's t-distribution\"\n               http://en.wikipedia.org/wiki/Student's_t-distribution\n\n        Examples\n        --------\n        From Dalgaard page 83 [1]_, suppose the daily energy intake for 11\n        women in Kj is:\n\n        >>> intake = np.array([5260., 5470, 5640, 6180, 6390, 6515, 6805, 7515, \\\n        ...                    7515, 8230, 8770])\n\n        Doe""s their energy intake deviate systematically from the recommended\n        value of 7725 kJ?\n\n        We have 10 degrees of freedom, so is the sample mean within 95% of the\n        recommended value?\n\n        >>> s = np.random.standard_t(10, size=100000)\n        >>> np.mean(intake)\n        6753.636363636364\n        >>> intake.std(ddof=1)\n        1142.1232221373727\n\n        Calculate the t statistic, setting the ddof parameter to the unbiased\n        value so the divisor in the standard deviation will be degrees of\n        freedom, N-1.\n\n        >>> t = (np.mean(intake)-7725)/(intake.std(ddof=1)/np.sqrt(len(intake)))\n        >>> import matplotlib.pyplot as plt\n        >>> h = plt.hist(s, bins=100, normed=True)\n\n        For a one-sided t-test, how far out in the distribution does the t\n        statistic appear?\n\n        >>> >>> np.sum(s<t) / float(len(s))\n        0.0090699999999999999  #random\n\n        So the p-value is about 0.009, which says the null hypothesis has a\n        probability of about 99% of being true.\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_28standard_t(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_df = 0;
--  PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_odf = 0;
--  double __pyx_v_fdf;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__df,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("standard_t");
--  {
--    PyObject* values[2] = {0,0};
-     values[1] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__df);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__df)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
-         if (kw_args > 0) {
-@@ -10278,7 +10691,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "standard_t") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "standard_t") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -10299,6 +10712,25 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_56standard_t(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_df, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_56standard_t(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_df, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_odf = 0;
-+  double __pyx_v_fdf;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("standard_t", 0);
- 
-   /* "mtrand.pyx":2143
-  *         cdef double fdf
-@@ -10341,9 +10773,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":2147
-  *             if fdf <= 0:
-@@ -10353,14 +10785,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont1_array_sc(__pyx_v_self->internal_state, rk_standard_t, __pyx_v_size, __pyx_v_fdf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":2149
-  *             return cont1_array_sc(self.internal_state, rk_standard_t, size, fdf)
-@@ -10404,7 +10836,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_odf));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_odf));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_odf));
-@@ -10416,7 +10848,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -10440,9 +10872,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":2154
-  *         if np.any(np.less_equal(odf, 0.0)):
-@@ -10452,7 +10884,7 @@
-  *     def vonmises(self, mu, kappa, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = __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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont1_array(__pyx_v_self->internal_state, rk_standard_t, __pyx_v_size, __pyx_v_odf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -10474,42 +10906,32 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":2156
-- *         return cont1_array(self.internal_state, rk_standard_t, size, odf)
-- * 
-- *     def vonmises(self, mu, kappa, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         vonmises(mu, kappa, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_29vonmises(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_29vonmises[] = "\n        vonmises(mu, kappa, size=None)\n\n        Draw samples from a von Mises distribution.\n\n        Samples are drawn from a von Mises distribution with specified mode\n        (mu) and dispersion (kappa), on the interval [-pi, pi].\n\n        The von Mises distribution (also known as the circular normal\n        distribution) is a continuous probability distribution on the unit\n        circle.  It may be thought of as the circular analogue of the normal\n        distribution.\n\n        Parameters\n        ----------\n        mu : float\n            Mode (\"center\") of the distribution.\n        kappa : float\n            Dispersion of the distribution, has to be >=0.\n        size : int or tuple of int\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : scalar or ndarray\n            The returned samples, which are in the interval [-pi, pi].\n\n        See Also\n        --------\n        scipy.stats.distributions.vonmises : probability density function,\n            distribution, or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the von Mises distribution is\n\n        .. math:: p(x) = \\frac{e^{\\kappa cos(x-\\mu)}}{2\\pi I_0(\\kappa)},\n\n        where :math:`\\mu` is the mode and :math:`\\kappa` the dispersion,\n        and :math:`I_0(\\kappa)` is the modified Bessel function of order 0.\n\n        The von Mises is named for Richard Edler von Mises, who was born in\n        Austria-Hungary, in what is now the Ukraine.  He fled to the United\n        States in 1939 and became a professor at Harvard.  He worked in\n        probability theory, aerodynamics, fluid mechanics, and philosophy of\n        science.\n\n        References\n        ----------\n        Abramowitz, M. and Stegun, I. A. (ed.), *Handbook of Mathematical\n        Functions*, New York: Dover, 1965.\n\n      ""  von Mises, R., *Mathematical Theory of Probability and Statistics*,\n        New York: Academic Press, 1964.\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> mu, kappa = 0.0, 4.0 # mean and dispersion\n        >>> s = np.random.vonmises(mu, kappa, 1000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> import scipy.special as sps\n        >>> count, bins, ignored = plt.hist(s, 50, normed=True)\n        >>> x = np.arange(-np.pi, np.pi, 2*np.pi/50.)\n        >>> y = -np.exp(kappa*np.cos(x-mu))/(2*np.pi*sps.jn(0,kappa))\n        >>> plt.plot(x, y/max(y), linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_29vonmises(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_59vonmises(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_58vonmises[] = "\n        vonmises(mu, kappa, size=None)\n\n        Draw samples from a von Mises distribution.\n\n        Samples are drawn from a von Mises distribution with specified mode\n        (mu) and dispersion (kappa), on the interval [-pi, pi].\n\n        The von Mises distribution (also known as the circular normal\n        distribution) is a continuous probability distribution on the unit\n        circle.  It may be thought of as the circular analogue of the normal\n        distribution.\n\n        Parameters\n        ----------\n        mu : float\n            Mode (\"center\") of the distribution.\n        kappa : float\n            Dispersion of the distribution, has to be >=0.\n        size : int or tuple of int\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : scalar or ndarray\n            The returned samples, which are in the interval [-pi, pi].\n\n        See Also\n        --------\n        scipy.stats.distributions.vonmises : probability density function,\n            distribution, or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the von Mises distribution is\n\n        .. math:: p(x) = \\frac{e^{\\kappa cos(x-\\mu)}}{2\\pi I_0(\\kappa)},\n\n        where :math:`\\mu` is the mode and :math:`\\kappa` the dispersion,\n        and :math:`I_0(\\kappa)` is the modified Bessel function of order 0.\n\n        The von Mises is named for Richard Edler von Mises, who was born in\n        Austria-Hungary, in what is now the Ukraine.  He fled to the United\n        States in 1939 and became a professor at Harvard.  He worked in\n        probability theory, aerodynamics, fluid mechanics, and philosophy of\n        science.\n\n        References\n        ----------\n        Abramowitz, M. and Stegun, I. A. (ed.), *Handbook of Mathematical\n        Functions*, New York: Dover, 1965.\n\n      ""  von Mises, R., *Mathematical Theory of Probability and Statistics*,\n        New York: Academic Press, 1964.\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> mu, kappa = 0.0, 4.0 # mean and dispersion\n        >>> s = np.random.vonmises(mu, kappa, 1000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> import scipy.special as sps\n        >>> count, bins, ignored = plt.hist(s, 50, normed=True)\n        >>> x = np.arange(-np.pi, np.pi, 2*np.pi/50.)\n        >>> y = -np.exp(kappa*np.cos(x-mu))/(2*np.pi*sps.jn(0,kappa))\n        >>> plt.plot(x, y/max(y), linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_59vonmises(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_mu = 0;
-   PyObject *__pyx_v_kappa = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_omu = 0;
--  PyArrayObject *__pyx_v_okappa = 0;
--  double __pyx_v_fmu;
--  double __pyx_v_fkappa;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mu,&__pyx_n_s__kappa,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("vonmises");
-+  __Pyx_RefNannySetupContext("vonmises (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mu,&__pyx_n_s__kappa,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-+
-+    /* "mtrand.pyx":2156
-+ *         return cont1_array(self.internal_state, rk_standard_t, size, odf)
-+ * 
-+ *     def vonmises(self, mu, kappa, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         vonmises(mu, kappa, size=None)
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -10517,14 +10939,12 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mu);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mu)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
--        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__kappa);
--        if (likely(values[1])) kw_args--;
-+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__kappa)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("vonmises", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-@@ -10535,7 +10955,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "vonmises") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vonmises") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -10558,6 +10978,27 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_58vonmises(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_mu, __pyx_v_kappa, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_58vonmises(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_mu, PyObject *__pyx_v_kappa, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_omu = 0;
-+  PyArrayObject *__pyx_v_okappa = 0;
-+  double __pyx_v_fmu;
-+  double __pyx_v_fkappa;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("vonmises", 0);
- 
-   /* "mtrand.pyx":2235
-  *         cdef double fmu, fkappa
-@@ -10609,9 +11050,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":2240
-  *             if fkappa < 0:
-@@ -10621,14 +11062,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont2_array_sc(__pyx_v_self->internal_state, rk_vonmises, __pyx_v_size, __pyx_v_fmu, __pyx_v_fkappa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":2242
-  *             return cont2_array_sc(self.internal_state, rk_vonmises, size, fmu, fkappa)
-@@ -10685,7 +11126,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_okappa));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_okappa));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_okappa));
-@@ -10697,7 +11138,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -10721,9 +11162,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":2248
-  *         if np.any(np.less(okappa, 0.0)):
-@@ -10733,7 +11174,7 @@
-  *     def pareto(self, a, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = __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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont2_array(__pyx_v_self->internal_state, rk_vonmises, __pyx_v_size, __pyx_v_omu, __pyx_v_okappa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -10756,49 +11197,40 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":2250
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_61pareto(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_60pareto[] = "\n        pareto(a, size=None)\n\n        Draw samples from a Pareto II or Lomax distribution with specified shape.\n\n        The Lomax or Pareto II distribution is a shifted Pareto distribution. The\n        classical Pareto distribution can be obtained from the Lomax distribution\n        by adding the location parameter m, see below. The smallest value of the\n        Lomax distribution is zero while for the classical Pareto distribution it\n        is m, where the standard Pareto distribution has location m=1.\n        Lomax can also be considered as a simplified version of the Generalized\n        Pareto distribution (available in SciPy), with the scale set to one and\n        the location set to zero.\n\n        The Pareto distribution must be greater than zero, and is unbounded above.\n        It is also known as the \"80-20 rule\".  In this distribution, 80 percent of\n        the weights are in the lowest 20 percent of the range, while the other 20\n        percent fill the remaining 80 percent of the range.\n\n        Parameters\n        ----------\n        shape : float, > 0.\n            Shape of the distribution.\n        size : tuple of ints\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        See Also\n        --------\n        scipy.stats.distributions.lomax.pdf : probability density function,\n            distribution or cumulative density function, etc.\n        scipy.stats.distributions.genpareto.pdf : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Pareto distribution is\n\n        .. math:: p(x) = \\frac{am^a}{x^{a+1}}\n\n        where :math:`a` is the shape and :math:`m` the location\n\n        The Pareto distribution, named after the Italian economist Vilfredo Pareto,\n        is a power law probability distribution useful in many real world probl""ems.\n        Outside the field of economics it is generally referred to as the Bradford\n        distribution. Pareto developed the distribution to describe the\n        distribution of wealth in an economy.  It has also found use in insurance,\n        web page access statistics, oil field sizes, and many other problems,\n        including the download frequency for projects in Sourceforge [1].  It is\n        one of the so-called \"fat-tailed\" distributions.\n\n\n        References\n        ----------\n        .. [1] Francis Hunt and Paul Johnson, On the Pareto Distribution of\n               Sourceforge projects.\n        .. [2] Pareto, V. (1896). Course of Political Economy. Lausanne.\n        .. [3] Reiss, R.D., Thomas, M.(2001), Statistical Analysis of Extreme\n               Values, Birkhauser Verlag, Basel, pp 23-30.\n        .. [4] Wikipedia, \"Pareto distribution\",\n               http://en.wikipedia.org/wiki/Pareto_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> a, m = 3., 1. # shape and mode\n        >>> s = np.random.pareto(a, 1000) + m\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 100, normed=True, align='center')\n        >>> fit = a*m**a/bins**(a+1)\n        >>> plt.plot(bins, max(count)*fit/max(fit),linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_61pareto(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_a = 0;
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("pareto (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__size,0};
-+    PyObject* values[2] = {0,0};
-+
-+    /* "mtrand.pyx":2250
-  *         return cont2_array(self.internal_state, rk_vonmises, size, omu, okappa)
-  * 
-  *     def pareto(self, a, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         pareto(a, size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_30pareto(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_30pareto[] = "\n        pareto(a, size=None)\n\n        Draw samples from a Pareto II or Lomax distribution with specified shape.\n\n        The Lomax or Pareto II distribution is a shifted Pareto distribution. The\n        classical Pareto distribution can be obtained from the Lomax distribution\n        by adding the location parameter m, see below. The smallest value of the\n        Lomax distribution is zero while for the classical Pareto distribution it\n        is m, where the standard Pareto distribution has location m=1.\n        Lomax can also be considered as a simplified version of the Generalized\n        Pareto distribution (available in SciPy), with the scale set to one and\n        the location set to zero.\n\n        The Pareto distribution must be greater than zero, and is unbounded above.\n        It is also known as the \"80-20 rule\".  In this distribution, 80 percent of\n        the weights are in the lowest 20 percent of the range, while the other 20\n        percent fill the remaining 80 percent of the range.\n\n        Parameters\n        ----------\n        shape : float, > 0.\n            Shape of the distribution.\n        size : tuple of ints\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        See Also\n        --------\n        scipy.stats.distributions.lomax.pdf : probability density function,\n            distribution or cumulative density function, etc.\n        scipy.stats.distributions.genpareto.pdf : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Pareto distribution is\n\n        .. math:: p(x) = \\frac{am^a}{x^{a+1}}\n\n        where :math:`a` is the shape and :math:`m` the location\n\n        The Pareto distribution, named after the Italian economist Vilfredo Pareto,\n        is a power law probability distribution useful in many real world probl""ems.\n        Outside the field of economics it is generally referred to as the Bradford\n        distribution. Pareto developed the distribution to describe the\n        distribution of wealth in an economy.  It has also found use in insurance,\n        web page access statistics, oil field sizes, and many other problems,\n        including the download frequency for projects in Sourceforge [1].  It is\n        one of the so-called \"fat-tailed\" distributions.\n\n\n        References\n        ----------\n        .. [1] Francis Hunt and Paul Johnson, On the Pareto Distribution of\n               Sourceforge projects.\n        .. [2] Pareto, V. (1896). Course of Political Economy. Lausanne.\n        .. [3] Reiss, R.D., Thomas, M.(2001), Statistical Analysis of Extreme\n               Values, Birkhauser Verlag, Basel, pp 23-30.\n        .. [4] Wikipedia, \"Pareto distribution\",\n               http://en.wikipedia.org/wiki/Pareto_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> a, m = 3., 1. # shape and mode\n        >>> s = np.random.pareto(a, 1000) + m\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 100, normed=True, align='center')\n        >>> fit = a*m**a/bins**(a+1)\n        >>> plt.plot(bins, max(count)*fit/max(fit),linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_30pareto(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_a = 0;
--  PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_oa = 0;
--  double __pyx_v_fa;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("pareto");
--  {
--    PyObject* values[2] = {0,0};
-     values[1] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
-         if (kw_args > 0) {
-@@ -10807,7 +11239,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "pareto") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2250; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pareto") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2250; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -10828,6 +11260,25 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_60pareto(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_a, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_60pareto(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_oa = 0;
-+  double __pyx_v_fa;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("pareto", 0);
- 
-   /* "mtrand.pyx":2333
-  *         cdef double fa
-@@ -10870,9 +11321,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":2337
-  *             if fa <= 0:
-@@ -10882,14 +11333,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont1_array_sc(__pyx_v_self->internal_state, rk_pareto, __pyx_v_size, __pyx_v_fa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":2339
-  *             return cont1_array_sc(self.internal_state, rk_pareto, size, fa)
-@@ -10933,7 +11384,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oa));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_oa));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oa));
-@@ -10945,7 +11396,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -10969,9 +11420,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":2344
-  *         if np.any(np.less_equal(oa, 0.0)):
-@@ -10981,7 +11432,7 @@
-  *     def weibull(self, a, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_pareto, __pyx_v_size, __pyx_v_oa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont1_array(__pyx_v_self->internal_state, rk_pareto, __pyx_v_size, __pyx_v_oa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -11003,49 +11454,40 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":2346
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_63weibull(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_62weibull[] = "\n        weibull(a, size=None)\n\n        Weibull distribution.\n\n        Draw samples from a 1-parameter Weibull distribution with the given\n        shape parameter `a`.\n\n        .. math:: X = (-ln(U))^{1/a}\n\n        Here, U is drawn from the uniform distribution over (0,1].\n\n        The more common 2-parameter Weibull, including a scale parameter\n        :math:`\\lambda` is just :math:`X = \\lambda(-ln(U))^{1/a}`.\n\n        Parameters\n        ----------\n        a : float\n            Shape of the distribution.\n        size : tuple of ints\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        See Also\n        --------\n        scipy.stats.distributions.weibull : probability density function,\n            distribution or cumulative density function, etc.\n\n        gumbel, scipy.stats.distributions.genextreme\n\n        Notes\n        -----\n        The Weibull (or Type III asymptotic extreme value distribution for smallest\n        values, SEV Type III, or Rosin-Rammler distribution) is one of a class of\n        Generalized Extreme Value (GEV) distributions used in modeling extreme\n        value problems.  This class includes the Gumbel and Frechet distributions.\n\n        The probability density for the Weibull distribution is\n\n        .. math:: p(x) = \\frac{a}\n                         {\\lambda}(\\frac{x}{\\lambda})^{a-1}e^{-(x/\\lambda)^a},\n\n        where :math:`a` is the shape and :math:`\\lambda` the scale.\n\n        The function has its peak (the mode) at\n        :math:`\\lambda(\\frac{a-1}{a})^{1/a}`.\n\n        When ``a = 1``, the Weibull distribution reduces to the exponential\n        distribution.\n\n        References\n        ----------\n        .. [1] Waloddi Weibull, Professor, Royal Technical University, Stockholm,\n               1939 \"A Statistical Theory Of The Strength Of Materials\",\n               Ingeniorsvetenskapsakademiens Handlingar"" Nr 151, 1939,\n               Generalstabens Litografiska Anstalts Forlag, Stockholm.\n        .. [2] Waloddi Weibull, 1951 \"A Statistical Distribution Function of Wide\n               Applicability\",  Journal Of Applied Mechanics ASME Paper.\n        .. [3] Wikipedia, \"Weibull distribution\",\n               http://en.wikipedia.org/wiki/Weibull_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> a = 5. # shape\n        >>> s = np.random.weibull(a, 1000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> x = np.arange(1,100.)/50.\n        >>> def weib(x,n,a):\n        ...     return (a / n) * (x / n)**(a - 1) * np.exp(-(x / n)**a)\n\n        >>> count, bins, ignored = plt.hist(np.random.weibull(5.,1000))\n        >>> x = np.arange(1,100.)/50.\n        >>> scale = count.max()/weib(x, 1., 5.).max()\n        >>> plt.plot(x, weib(x, 1., 5.)*scale)\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_63weibull(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_a = 0;
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("weibull (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__size,0};
-+    PyObject* values[2] = {0,0};
-+
-+    /* "mtrand.pyx":2346
-  *         return cont1_array(self.internal_state, rk_pareto, size, oa)
-  * 
-  *     def weibull(self, a, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         weibull(a, size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_31weibull(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_31weibull[] = "\n        weibull(a, size=None)\n\n        Weibull distribution.\n\n        Draw samples from a 1-parameter Weibull distribution with the given\n        shape parameter `a`.\n\n        .. math:: X = (-ln(U))^{1/a}\n\n        Here, U is drawn from the uniform distribution over (0,1].\n\n        The more common 2-parameter Weibull, including a scale parameter\n        :math:`\\lambda` is just :math:`X = \\lambda(-ln(U))^{1/a}`.\n\n        Parameters\n        ----------\n        a : float\n            Shape of the distribution.\n        size : tuple of ints\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        See Also\n        --------\n        scipy.stats.distributions.weibull : probability density function,\n            distribution or cumulative density function, etc.\n\n        gumbel, scipy.stats.distributions.genextreme\n\n        Notes\n        -----\n        The Weibull (or Type III asymptotic extreme value distribution for smallest\n        values, SEV Type III, or Rosin-Rammler distribution) is one of a class of\n        Generalized Extreme Value (GEV) distributions used in modeling extreme\n        value problems.  This class includes the Gumbel and Frechet distributions.\n\n        The probability density for the Weibull distribution is\n\n        .. math:: p(x) = \\frac{a}\n                         {\\lambda}(\\frac{x}{\\lambda})^{a-1}e^{-(x/\\lambda)^a},\n\n        where :math:`a` is the shape and :math:`\\lambda` the scale.\n\n        The function has its peak (the mode) at\n        :math:`\\lambda(\\frac{a-1}{a})^{1/a}`.\n\n        When ``a = 1``, the Weibull distribution reduces to the exponential\n        distribution.\n\n        References\n        ----------\n        .. [1] Waloddi Weibull, Professor, Royal Technical University, Stockholm,\n               1939 \"A Statistical Theory Of The Strength Of Materials\",\n               Ingeniorsvetenskapsakademiens Handlingar"" Nr 151, 1939,\n               Generalstabens Litografiska Anstalts Forlag, Stockholm.\n        .. [2] Waloddi Weibull, 1951 \"A Statistical Distribution Function of Wide\n               Applicability\",  Journal Of Applied Mechanics ASME Paper.\n        .. [3] Wikipedia, \"Weibull distribution\",\n               http://en.wikipedia.org/wiki/Weibull_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> a = 5. # shape\n        >>> s = np.random.weibull(a, 1000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> x = np.arange(1,100.)/50.\n        >>> def weib(x,n,a):\n        ...     return (a / n) * (x / n)**(a - 1) * np.exp(-(x / n)**a)\n\n        >>> count, bins, ignored = plt.hist(np.random.weibull(5.,1000))\n        >>> x = np.arange(1,100.)/50.\n        >>> scale = count.max()/weib(x, 1., 5.).max()\n        >>> plt.plot(x, weib(x, 1., 5.)*scale)\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_31weibull(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_a = 0;
--  PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_oa = 0;
--  double __pyx_v_fa;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("weibull");
--  {
--    PyObject* values[2] = {0,0};
-     values[1] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
-         if (kw_args > 0) {
-@@ -11054,7 +11496,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "weibull") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2346; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "weibull") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2346; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -11075,6 +11517,25 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_62weibull(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_a, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_62weibull(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_oa = 0;
-+  double __pyx_v_fa;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("weibull", 0);
- 
-   /* "mtrand.pyx":2433
-  *         cdef double fa
-@@ -11117,9 +11578,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":2437
-  *             if fa <= 0:
-@@ -11129,14 +11590,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont1_array_sc(__pyx_v_self->internal_state, rk_weibull, __pyx_v_size, __pyx_v_fa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":2439
-  *             return cont1_array_sc(self.internal_state, rk_weibull, size, fa)
-@@ -11180,7 +11641,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oa));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_oa));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oa));
-@@ -11192,7 +11653,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -11216,9 +11677,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":2444
-  *         if np.any(np.less_equal(oa, 0.0)):
-@@ -11228,7 +11689,7 @@
-  *     def power(self, a, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_weibull, __pyx_v_size, __pyx_v_oa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont1_array(__pyx_v_self->internal_state, rk_weibull, __pyx_v_size, __pyx_v_oa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -11250,49 +11711,40 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":2446
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_65power(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_64power[] = "\n        power(a, size=None)\n\n        Draws samples in [0, 1] from a power distribution with positive\n        exponent a - 1.\n\n        Also known as the power function distribution.\n\n        Parameters\n        ----------\n        a : float\n            parameter, > 0\n        size : tuple of ints\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n                    ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : {ndarray, scalar}\n            The returned samples lie in [0, 1].\n\n        Raises\n        ------\n        ValueError\n            If a<1.\n\n        Notes\n        -----\n        The probability density function is\n\n        .. math:: P(x; a) = ax^{a-1}, 0 \\le x \\le 1, a>0.\n\n        The power function distribution is just the inverse of the Pareto\n        distribution. It may also be seen as a special case of the Beta\n        distribution.\n\n        It is used, for example, in modeling the over-reporting of insurance\n        claims.\n\n        References\n        ----------\n        .. [1] Christian Kleiber, Samuel Kotz, \"Statistical size distributions\n               in economics and actuarial sciences\", Wiley, 2003.\n        .. [2] Heckert, N. A. and Filliben, James J. (2003). NIST Handbook 148:\n               Dataplot Reference Manual, Volume 2: Let Subcommands and Library\n               Functions\", National Institute of Standards and Technology Handbook\n               Series, June 2003.\n               http://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/powpdf.pdf\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> a = 5. # shape\n        >>> samples = 1000\n        >>> s = np.random.power(a, samples)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, bins=""30)\n        >>> x = np.linspace(0, 1, 100)\n        >>> y = a*x**(a-1.)\n        >>> normed_y = samples*np.diff(bins)[0]*y\n        >>> plt.plot(x, normed_y)\n        >>> plt.show()\n\n        Compare the power function distribution to the inverse of the Pareto.\n\n        >>> from scipy import stats\n        >>> rvs = np.random.power(5, 1000000)\n        >>> rvsp = np.random.pareto(5, 1000000)\n        >>> xx = np.linspace(0,1,100)\n        >>> powpdf = stats.powerlaw.pdf(xx,5)\n\n        >>> plt.figure()\n        >>> plt.hist(rvs, bins=50, normed=True)\n        >>> plt.plot(xx,powpdf,'r-')\n        >>> plt.title('np.random.power(5)')\n\n        >>> plt.figure()\n        >>> plt.hist(1./(1.+rvsp), bins=50, normed=True)\n        >>> plt.plot(xx,powpdf,'r-')\n        >>> plt.title('inverse of 1 + np.random.pareto(5)')\n\n        >>> plt.figure()\n        >>> plt.hist(1./(1.+rvsp), bins=50, normed=True)\n        >>> plt.plot(xx,powpdf,'r-')\n        >>> plt.title('inverse of stats.pareto(5)')\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_65power(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_a = 0;
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("power (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__size,0};
-+    PyObject* values[2] = {0,0};
-+
-+    /* "mtrand.pyx":2446
-  *         return cont1_array(self.internal_state, rk_weibull, size, oa)
-  * 
-  *     def power(self, a, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         power(a, size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_32power(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_32power[] = "\n        power(a, size=None)\n\n        Draws samples in [0, 1] from a power distribution with positive\n        exponent a - 1.\n\n        Also known as the power function distribution.\n\n        Parameters\n        ----------\n        a : float\n            parameter, > 0\n        size : tuple of ints\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n                    ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : {ndarray, scalar}\n            The returned samples lie in [0, 1].\n\n        Raises\n        ------\n        ValueError\n            If a<1.\n\n        Notes\n        -----\n        The probability density function is\n\n        .. math:: P(x; a) = ax^{a-1}, 0 \\le x \\le 1, a>0.\n\n        The power function distribution is just the inverse of the Pareto\n        distribution. It may also be seen as a special case of the Beta\n        distribution.\n\n        It is used, for example, in modeling the over-reporting of insurance\n        claims.\n\n        References\n        ----------\n        .. [1] Christian Kleiber, Samuel Kotz, \"Statistical size distributions\n               in economics and actuarial sciences\", Wiley, 2003.\n        .. [2] Heckert, N. A. and Filliben, James J. (2003). NIST Handbook 148:\n               Dataplot Reference Manual, Volume 2: Let Subcommands and Library\n               Functions\", National Institute of Standards and Technology Handbook\n               Series, June 2003.\n               http://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/powpdf.pdf\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> a = 5. # shape\n        >>> samples = 1000\n        >>> s = np.random.power(a, samples)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, bins=""30)\n        >>> x = np.linspace(0, 1, 100)\n        >>> y = a*x**(a-1.)\n        >>> normed_y = samples*np.diff(bins)[0]*y\n        >>> plt.plot(x, normed_y)\n        >>> plt.show()\n\n        Compare the power function distribution to the inverse of the Pareto.\n\n        >>> from scipy import stats\n        >>> rvs = np.random.power(5, 1000000)\n        >>> rvsp = np.random.pareto(5, 1000000)\n        >>> xx = np.linspace(0,1,100)\n        >>> powpdf = stats.powerlaw.pdf(xx,5)\n\n        >>> plt.figure()\n        >>> plt.hist(rvs, bins=50, normed=True)\n        >>> plt.plot(xx,powpdf,'r-')\n        >>> plt.title('np.random.power(5)')\n\n        >>> plt.figure()\n        >>> plt.hist(1./(1.+rvsp), bins=50, normed=True)\n        >>> plt.plot(xx,powpdf,'r-')\n        >>> plt.title('inverse of 1 + np.random.pareto(5)')\n\n        >>> plt.figure()\n        >>> plt.hist(1./(1.+rvsp), bins=50, normed=True)\n        >>> plt.plot(xx,powpdf,'r-')\n        >>> plt.title('inverse of stats.pareto(5)')\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_32power(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_a = 0;
--  PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_oa = 0;
--  double __pyx_v_fa;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("power");
--  {
--    PyObject* values[2] = {0,0};
-     values[1] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
-         if (kw_args > 0) {
-@@ -11301,7 +11753,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "power") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "power") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2446; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -11322,6 +11774,25 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_64power(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_a, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_64power(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_oa = 0;
-+  double __pyx_v_fa;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("power", 0);
- 
-   /* "mtrand.pyx":2542
-  *         cdef double fa
-@@ -11364,9 +11835,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":2546
-  *             if fa <= 0:
-@@ -11376,14 +11847,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont1_array_sc(__pyx_v_self->internal_state, rk_power, __pyx_v_size, __pyx_v_fa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":2548
-  *             return cont1_array_sc(self.internal_state, rk_power, size, fa)
-@@ -11427,7 +11898,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oa));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_oa));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oa));
-@@ -11439,7 +11910,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -11463,9 +11934,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":2553
-  *         if np.any(np.less_equal(oa, 0.0)):
-@@ -11475,7 +11946,7 @@
-  *     def laplace(self, loc=0.0, scale=1.0, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_power, __pyx_v_size, __pyx_v_oa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont1_array(__pyx_v_self->internal_state, rk_power, __pyx_v_size, __pyx_v_oa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -11497,44 +11968,34 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":2555
-- *         return cont1_array(self.internal_state, rk_power, size, oa)
-- * 
-- *     def laplace(self, loc=0.0, scale=1.0, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         laplace(loc=0.0, scale=1.0, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_33laplace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_33laplace[] = "\n        laplace(loc=0.0, scale=1.0, size=None)\n\n        Draw samples from the Laplace or double exponential distribution with\n        specified location (or mean) and scale (decay).\n\n        The Laplace distribution is similar to the Gaussian/normal distribution,\n        but is sharper at the peak and has fatter tails. It represents the\n        difference between two independent, identically distributed exponential\n        random variables.\n\n        Parameters\n        ----------\n        loc : float\n            The position, :math:`\\mu`, of the distribution peak.\n        scale : float\n            :math:`\\lambda`, the exponential decay.\n\n        Notes\n        -----\n        It has the probability density function\n\n        .. math:: f(x; \\mu, \\lambda) = \\frac{1}{2\\lambda}\n                                       \\exp\\left(-\\frac{|x - \\mu|}{\\lambda}\\right).\n\n        The first law of Laplace, from 1774, states that the frequency of an error\n        can be expressed as an exponential function of the absolute magnitude of\n        the error, which leads to the Laplace distribution. For many problems in\n        Economics and Health sciences, this distribution seems to model the data\n        better than the standard Gaussian distribution\n\n\n        References\n        ----------\n        .. [1] Abramowitz, M. and Stegun, I. A. (Eds.). Handbook of Mathematical\n               Functions with Formulas, Graphs, and Mathematical Tables, 9th\n               printing.  New York: Dover, 1972.\n\n        .. [2] The Laplace distribution and generalizations\n               By Samuel Kotz, Tomasz J. Kozubowski, Krzysztof Podgorski,\n               Birkhauser, 2001.\n\n        .. [3] Weisstein, Eric W. \"Laplace Distribution.\"\n               From MathWorld--A Wolfram Web Resource.\n               http://mathworld.wolfram.com/LaplaceDistribution.html\n\n        .. [4] Wikipedia, \"Laplace distribution\",\n               http://en.wikipedia.org/wik""i/Laplace_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution\n\n        >>> loc, scale = 0., 1.\n        >>> s = np.random.laplace(loc, scale, 1000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 30, normed=True)\n        >>> x = np.arange(-8., 8., .01)\n        >>> pdf = np.exp(-abs(x-loc/scale))/(2.*scale)\n        >>> plt.plot(x, pdf)\n\n        Plot Gaussian for comparison:\n\n        >>> g = (1/(scale * np.sqrt(2 * np.pi)) * \n        ...      np.exp( - (x - loc)**2 / (2 * scale**2) ))\n        >>> plt.plot(x,g)\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_33laplace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_67laplace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_66laplace[] = "\n        laplace(loc=0.0, scale=1.0, size=None)\n\n        Draw samples from the Laplace or double exponential distribution with\n        specified location (or mean) and scale (decay).\n\n        The Laplace distribution is similar to the Gaussian/normal distribution,\n        but is sharper at the peak and has fatter tails. It represents the\n        difference between two independent, identically distributed exponential\n        random variables.\n\n        Parameters\n        ----------\n        loc : float\n            The position, :math:`\\mu`, of the distribution peak.\n        scale : float\n            :math:`\\lambda`, the exponential decay.\n\n        Notes\n        -----\n        It has the probability density function\n\n        .. math:: f(x; \\mu, \\lambda) = \\frac{1}{2\\lambda}\n                                       \\exp\\left(-\\frac{|x - \\mu|}{\\lambda}\\right).\n\n        The first law of Laplace, from 1774, states that the frequency of an error\n        can be expressed as an exponential function of the absolute magnitude of\n        the error, which leads to the Laplace distribution. For many problems in\n        Economics and Health sciences, this distribution seems to model the data\n        better than the standard Gaussian distribution\n\n\n        References\n        ----------\n        .. [1] Abramowitz, M. and Stegun, I. A. (Eds.). Handbook of Mathematical\n               Functions with Formulas, Graphs, and Mathematical Tables, 9th\n               printing.  New York: Dover, 1972.\n\n        .. [2] The Laplace distribution and generalizations\n               By Samuel Kotz, Tomasz J. Kozubowski, Krzysztof Podgorski,\n               Birkhauser, 2001.\n\n        .. [3] Weisstein, Eric W. \"Laplace Distribution.\"\n               From MathWorld--A Wolfram Web Resource.\n               http://mathworld.wolfram.com/LaplaceDistribution.html\n\n        .. [4] Wikipedia, \"Laplace distribution\",\n               http://en.wikipedia.org/wik""i/Laplace_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution\n\n        >>> loc, scale = 0., 1.\n        >>> s = np.random.laplace(loc, scale, 1000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 30, normed=True)\n        >>> x = np.arange(-8., 8., .01)\n        >>> pdf = np.exp(-abs(x-loc/scale))/(2.*scale)\n        >>> plt.plot(x, pdf)\n\n        Plot Gaussian for comparison:\n\n        >>> g = (1/(scale * np.sqrt(2 * np.pi)) * \n        ...      np.exp( - (x - loc)**2 / (2 * scale**2) ))\n        >>> plt.plot(x,g)\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_67laplace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_loc = 0;
-   PyObject *__pyx_v_scale = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_oloc = 0;
--  PyArrayObject *__pyx_v_oscale = 0;
--  double __pyx_v_floc;
--  double __pyx_v_fscale;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__loc,&__pyx_n_s__scale,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("laplace");
-+  __Pyx_RefNannySetupContext("laplace (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__loc,&__pyx_n_s__scale,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-     values[0] = __pyx_k_73;
-     values[1] = __pyx_k_74;
-+
-+    /* "mtrand.pyx":2555
-+ *         return cont1_array(self.internal_state, rk_power, size, oa)
-+ * 
-+ *     def laplace(self, loc=0.0, scale=1.0, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         laplace(loc=0.0, scale=1.0, size=None)
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -11542,7 +12003,7 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__loc);
-@@ -11560,7 +12021,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "laplace") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "laplace") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -11583,6 +12044,27 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_66laplace(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_loc, __pyx_v_scale, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_66laplace(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_loc, PyObject *__pyx_v_scale, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_oloc = 0;
-+  PyArrayObject *__pyx_v_oscale = 0;
-+  double __pyx_v_floc;
-+  double __pyx_v_fscale;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("laplace", 0);
- 
-   /* "mtrand.pyx":2631
-  *         cdef double floc, fscale
-@@ -11634,9 +12116,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":2636
-  *             if fscale <= 0:
-@@ -11646,14 +12128,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont2_array_sc(__pyx_v_self->internal_state, rk_laplace, __pyx_v_size, __pyx_v_floc, __pyx_v_fscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":2638
-  *             return cont2_array_sc(self.internal_state, rk_laplace, size, floc, fscale)
-@@ -11710,7 +12192,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oscale));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_oscale));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oscale));
-@@ -11722,7 +12204,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -11746,9 +12228,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":2643
-  *         if np.any(np.less_equal(oscale, 0.0)):
-@@ -11758,7 +12240,7 @@
-  *     def gumbel(self, loc=0.0, scale=1.0, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = __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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont2_array(__pyx_v_self->internal_state, rk_laplace, __pyx_v_size, __pyx_v_oloc, __pyx_v_oscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -11781,44 +12263,34 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":2645
-- *         return cont2_array(self.internal_state, rk_laplace, size, oloc, oscale)
-- * 
-- *     def gumbel(self, loc=0.0, scale=1.0, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         gumbel(loc=0.0, scale=1.0, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_34gumbel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_34gumbel[] = "\n        gumbel(loc=0.0, scale=1.0, size=None)\n\n        Gumbel distribution.\n\n        Draw samples from a Gumbel distribution with specified location and scale.\n        For more information on the Gumbel distribution, see Notes and References\n        below.\n\n        Parameters\n        ----------\n        loc : float\n            The location of the mode of the distribution.\n        scale : float\n            The scale parameter of the distribution.\n        size : tuple of ints\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray\n            The samples\n\n        See Also\n        --------\n        scipy.stats.gumbel_l\n        scipy.stats.gumbel_r\n        scipy.stats.genextreme\n            probability density function, distribution, or cumulative density\n            function, etc. for each of the above\n        weibull\n\n        Notes\n        -----\n        The Gumbel (or Smallest Extreme Value (SEV) or the Smallest Extreme Value\n        Type I) distribution is one of a class of Generalized Extreme Value (GEV)\n        distributions used in modeling extreme value problems.  The Gumbel is a\n        special case of the Extreme Value Type I distribution for maximums from\n        distributions with \"exponential-like\" tails.\n\n        The probability density for the Gumbel distribution is\n\n        .. math:: p(x) = \\frac{e^{-(x - \\mu)/ \\beta}}{\\beta} e^{ -e^{-(x - \\mu)/\n                  \\beta}},\n\n        where :math:`\\mu` is the mode, a location parameter, and :math:`\\beta` is\n        the scale parameter.\n\n        The Gumbel (named for German mathematician Emil Julius Gumbel) was used\n        very early in the hydrology literature, for modeling the occurrence of\n        flood events. It is also used for modeling maximum wind speed and rainfall\n        rates.  It is a \"fat-tailed\" distribution - the ""probability of an event in\n        the tail of the distribution is larger than if one used a Gaussian, hence\n        the surprisingly frequent occurrence of 100-year floods. Floods were\n        initially modeled as a Gaussian process, which underestimated the frequency\n        of extreme events.\n\n\n        It is one of a class of extreme value distributions, the Generalized\n        Extreme Value (GEV) distributions, which also includes the Weibull and\n        Frechet.\n\n        The function has a mean of :math:`\\mu + 0.57721\\beta` and a variance of\n        :math:`\\frac{\\pi^2}{6}\\beta^2`.\n\n        References\n        ----------\n        Gumbel, E. J., *Statistics of Extremes*, New York: Columbia University\n        Press, 1958.\n\n        Reiss, R.-D. and Thomas, M., *Statistical Analysis of Extreme Values from\n        Insurance, Finance, Hydrology and Other Fields*, Basel: Birkhauser Verlag,\n        2001.\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> mu, beta = 0, 0.1 # location and scale\n        >>> s = np.random.gumbel(mu, beta, 1000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 30, normed=True)\n        >>> plt.plot(bins, (1/beta)*np.exp(-(bins - mu)/beta)\n        ...          * np.exp( -np.exp( -(bins - mu) /beta) ),\n        ...          linewidth=2, color='r')\n        >>> plt.show()\n\n        Show how an extreme value distribution can arise from a Gaussian process\n        and compare to a Gaussian:\n\n        >>> means = []\n        >>> maxima = []\n        >>> for i in range(0,1000) :\n        ...    a = np.random.normal(mu, beta, 1000)\n        ...    means.append(a.mean())\n        ...    maxima.append(a.max())\n        >>> count, bins, ignored = plt.hist(maxima, 30, normed=True)\n        >>> beta = np.std(maxima)*np.pi/np.sqrt(6)""\n        >>> mu = np.mean(maxima) - 0.57721*beta\n        >>> plt.plot(bins, (1/beta)*np.exp(-(bins - mu)/beta)\n        ...          * np.exp(-np.exp(-(bins - mu)/beta)),\n        ...          linewidth=2, color='r')\n        >>> plt.plot(bins, 1/(beta * np.sqrt(2 * np.pi))\n        ...          * np.exp(-(bins - mu)**2 / (2 * beta**2)),\n        ...          linewidth=2, color='g')\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_34gumbel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_69gumbel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_68gumbel[] = "\n        gumbel(loc=0.0, scale=1.0, size=None)\n\n        Gumbel distribution.\n\n        Draw samples from a Gumbel distribution with specified location and scale.\n        For more information on the Gumbel distribution, see Notes and References\n        below.\n\n        Parameters\n        ----------\n        loc : float\n            The location of the mode of the distribution.\n        scale : float\n            The scale parameter of the distribution.\n        size : tuple of ints\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray\n            The samples\n\n        See Also\n        --------\n        scipy.stats.gumbel_l\n        scipy.stats.gumbel_r\n        scipy.stats.genextreme\n            probability density function, distribution, or cumulative density\n            function, etc. for each of the above\n        weibull\n\n        Notes\n        -----\n        The Gumbel (or Smallest Extreme Value (SEV) or the Smallest Extreme Value\n        Type I) distribution is one of a class of Generalized Extreme Value (GEV)\n        distributions used in modeling extreme value problems.  The Gumbel is a\n        special case of the Extreme Value Type I distribution for maximums from\n        distributions with \"exponential-like\" tails.\n\n        The probability density for the Gumbel distribution is\n\n        .. math:: p(x) = \\frac{e^{-(x - \\mu)/ \\beta}}{\\beta} e^{ -e^{-(x - \\mu)/\n                  \\beta}},\n\n        where :math:`\\mu` is the mode, a location parameter, and :math:`\\beta` is\n        the scale parameter.\n\n        The Gumbel (named for German mathematician Emil Julius Gumbel) was used\n        very early in the hydrology literature, for modeling the occurrence of\n        flood events. It is also used for modeling maximum wind speed and rainfall\n        rates.  It is a \"fat-tailed\" distribution - the ""probability of an event in\n        the tail of the distribution is larger than if one used a Gaussian, hence\n        the surprisingly frequent occurrence of 100-year floods. Floods were\n        initially modeled as a Gaussian process, which underestimated the frequency\n        of extreme events.\n\n\n        It is one of a class of extreme value distributions, the Generalized\n        Extreme Value (GEV) distributions, which also includes the Weibull and\n        Frechet.\n\n        The function has a mean of :math:`\\mu + 0.57721\\beta` and a variance of\n        :math:`\\frac{\\pi^2}{6}\\beta^2`.\n\n        References\n        ----------\n        Gumbel, E. J., *Statistics of Extremes*, New York: Columbia University\n        Press, 1958.\n\n        Reiss, R.-D. and Thomas, M., *Statistical Analysis of Extreme Values from\n        Insurance, Finance, Hydrology and Other Fields*, Basel: Birkhauser Verlag,\n        2001.\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> mu, beta = 0, 0.1 # location and scale\n        >>> s = np.random.gumbel(mu, beta, 1000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 30, normed=True)\n        >>> plt.plot(bins, (1/beta)*np.exp(-(bins - mu)/beta)\n        ...          * np.exp( -np.exp( -(bins - mu) /beta) ),\n        ...          linewidth=2, color='r')\n        >>> plt.show()\n\n        Show how an extreme value distribution can arise from a Gaussian process\n        and compare to a Gaussian:\n\n        >>> means = []\n        >>> maxima = []\n        >>> for i in range(0,1000) :\n        ...    a = np.random.normal(mu, beta, 1000)\n        ...    means.append(a.mean())\n        ...    maxima.append(a.max())\n        >>> count, bins, ignored = plt.hist(maxima, 30, normed=True)\n        >>> beta = np.std(maxima)*np.pi/np.sqrt(6)""\n        >>> mu = np.mean(maxima) - 0.57721*beta\n        >>> plt.plot(bins, (1/beta)*np.exp(-(bins - mu)/beta)\n        ...          * np.exp(-np.exp(-(bins - mu)/beta)),\n        ...          linewidth=2, color='r')\n        >>> plt.plot(bins, 1/(beta * np.sqrt(2 * np.pi))\n        ...          * np.exp(-(bins - mu)**2 / (2 * beta**2)),\n        ...          linewidth=2, color='g')\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_69gumbel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_loc = 0;
-   PyObject *__pyx_v_scale = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_oloc = 0;
--  PyArrayObject *__pyx_v_oscale = 0;
--  double __pyx_v_floc;
--  double __pyx_v_fscale;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__loc,&__pyx_n_s__scale,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("gumbel");
-+  __Pyx_RefNannySetupContext("gumbel (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__loc,&__pyx_n_s__scale,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-     values[0] = __pyx_k_77;
-     values[1] = __pyx_k_78;
-+
-+    /* "mtrand.pyx":2645
-+ *         return cont2_array(self.internal_state, rk_laplace, size, oloc, oscale)
-+ * 
-+ *     def gumbel(self, loc=0.0, scale=1.0, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         gumbel(loc=0.0, scale=1.0, size=None)
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -11826,7 +12298,7 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__loc);
-@@ -11844,7 +12316,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "gumbel") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2645; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gumbel") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2645; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -11867,6 +12339,27 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_68gumbel(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_loc, __pyx_v_scale, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_68gumbel(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_loc, PyObject *__pyx_v_scale, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_oloc = 0;
-+  PyArrayObject *__pyx_v_oscale = 0;
-+  double __pyx_v_floc;
-+  double __pyx_v_fscale;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("gumbel", 0);
- 
-   /* "mtrand.pyx":2762
-  *         cdef double floc, fscale
-@@ -11918,9 +12411,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":2767
-  *             if fscale <= 0:
-@@ -11930,14 +12423,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont2_array_sc(__pyx_v_self->internal_state, rk_gumbel, __pyx_v_size, __pyx_v_floc, __pyx_v_fscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":2769
-  *             return cont2_array_sc(self.internal_state, rk_gumbel, size, floc, fscale)
-@@ -11994,7 +12487,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oscale));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_oscale));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oscale));
-@@ -12006,7 +12499,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -12030,9 +12523,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":2774
-  *         if np.any(np.less_equal(oscale, 0.0)):
-@@ -12042,7 +12535,7 @@
-  *     def logistic(self, loc=0.0, scale=1.0, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = __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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont2_array(__pyx_v_self->internal_state, rk_gumbel, __pyx_v_size, __pyx_v_oloc, __pyx_v_oscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -12065,44 +12558,34 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":2776
-- *         return cont2_array(self.internal_state, rk_gumbel, size, oloc, oscale)
-- * 
-- *     def logistic(self, loc=0.0, scale=1.0, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         logistic(loc=0.0, scale=1.0, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_35logistic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_35logistic[] = "\n        logistic(loc=0.0, scale=1.0, size=None)\n\n        Draw samples from a Logistic distribution.\n\n        Samples are drawn from a Logistic distribution with specified\n        parameters, loc (location or mean, also median), and scale (>0).\n\n        Parameters\n        ----------\n        loc : float\n\n        scale : float > 0.\n\n        size : {tuple, int}\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : {ndarray, scalar}\n                  where the values are all integers in  [0, n].\n\n        See Also\n        --------\n        scipy.stats.distributions.logistic : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Logistic distribution is\n\n        .. math:: P(x) = P(x) = \\frac{e^{-(x-\\mu)/s}}{s(1+e^{-(x-\\mu)/s})^2},\n\n        where :math:`\\mu` = location and :math:`s` = scale.\n\n        The Logistic distribution is used in Extreme Value problems where it\n        can act as a mixture of Gumbel distributions, in Epidemiology, and by\n        the World Chess Federation (FIDE) where it is used in the Elo ranking\n        system, assuming the performance of each player is a logistically\n        distributed random variable.\n\n        References\n        ----------\n        .. [1] Reiss, R.-D. and Thomas M. (2001), Statistical Analysis of Extreme\n               Values, from Insurance, Finance, Hydrology and Other Fields,\n               Birkhauser Verlag, Basel, pp 132-133.\n        .. [2] Weisstein, Eric W. \"Logistic Distribution.\" From\n               MathWorld--A Wolfram Web Resource.\n               http://mathworld.wolfram.com/LogisticDistribution.html\n        .. [3] Wikipedia, \"Logistic-distribution\",\n               http://en.wikipedia.org/wiki/Logistic-distribution\n\n        Examples\n   ""     --------\n        Draw samples from the distribution:\n\n        >>> loc, scale = 10, 1\n        >>> s = np.random.logistic(loc, scale, 10000)\n        >>> count, bins, ignored = plt.hist(s, bins=50)\n\n        #   plot against distribution\n\n        >>> def logist(x, loc, scale):\n        ...     return exp((loc-x)/scale)/(scale*(1+exp((loc-x)/scale))**2)\n        >>> plt.plot(bins, logist(bins, loc, scale)*count.max()/\\\n        ... logist(bins, loc, scale).max())\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_35logistic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_71logistic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_70logistic[] = "\n        logistic(loc=0.0, scale=1.0, size=None)\n\n        Draw samples from a Logistic distribution.\n\n        Samples are drawn from a Logistic distribution with specified\n        parameters, loc (location or mean, also median), and scale (>0).\n\n        Parameters\n        ----------\n        loc : float\n\n        scale : float > 0.\n\n        size : {tuple, int}\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : {ndarray, scalar}\n                  where the values are all integers in  [0, n].\n\n        See Also\n        --------\n        scipy.stats.distributions.logistic : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Logistic distribution is\n\n        .. math:: P(x) = P(x) = \\frac{e^{-(x-\\mu)/s}}{s(1+e^{-(x-\\mu)/s})^2},\n\n        where :math:`\\mu` = location and :math:`s` = scale.\n\n        The Logistic distribution is used in Extreme Value problems where it\n        can act as a mixture of Gumbel distributions, in Epidemiology, and by\n        the World Chess Federation (FIDE) where it is used in the Elo ranking\n        system, assuming the performance of each player is a logistically\n        distributed random variable.\n\n        References\n        ----------\n        .. [1] Reiss, R.-D. and Thomas M. (2001), Statistical Analysis of Extreme\n               Values, from Insurance, Finance, Hydrology and Other Fields,\n               Birkhauser Verlag, Basel, pp 132-133.\n        .. [2] Weisstein, Eric W. \"Logistic Distribution.\" From\n               MathWorld--A Wolfram Web Resource.\n               http://mathworld.wolfram.com/LogisticDistribution.html\n        .. [3] Wikipedia, \"Logistic-distribution\",\n               http://en.wikipedia.org/wiki/Logistic-distribution\n\n        Examples\n   ""     --------\n        Draw samples from the distribution:\n\n        >>> loc, scale = 10, 1\n        >>> s = np.random.logistic(loc, scale, 10000)\n        >>> count, bins, ignored = plt.hist(s, bins=50)\n\n        #   plot against distribution\n\n        >>> def logist(x, loc, scale):\n        ...     return exp((loc-x)/scale)/(scale*(1+exp((loc-x)/scale))**2)\n        >>> plt.plot(bins, logist(bins, loc, scale)*count.max()/\\\n        ... logist(bins, loc, scale).max())\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_71logistic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_loc = 0;
-   PyObject *__pyx_v_scale = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_oloc = 0;
--  PyArrayObject *__pyx_v_oscale = 0;
--  double __pyx_v_floc;
--  double __pyx_v_fscale;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__loc,&__pyx_n_s__scale,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("logistic");
-+  __Pyx_RefNannySetupContext("logistic (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__loc,&__pyx_n_s__scale,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-     values[0] = __pyx_k_81;
-     values[1] = __pyx_k_82;
-+
-+    /* "mtrand.pyx":2776
-+ *         return cont2_array(self.internal_state, rk_gumbel, size, oloc, oscale)
-+ * 
-+ *     def logistic(self, loc=0.0, scale=1.0, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         logistic(loc=0.0, scale=1.0, size=None)
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -12110,7 +12593,7 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__loc);
-@@ -12128,7 +12611,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "logistic") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2776; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "logistic") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2776; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -12151,6 +12634,27 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_70logistic(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_loc, __pyx_v_scale, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_70logistic(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_loc, PyObject *__pyx_v_scale, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_oloc = 0;
-+  PyArrayObject *__pyx_v_oscale = 0;
-+  double __pyx_v_floc;
-+  double __pyx_v_fscale;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("logistic", 0);
- 
-   /* "mtrand.pyx":2850
-  *         cdef double floc, fscale
-@@ -12202,9 +12706,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":2855
-  *             if fscale <= 0:
-@@ -12214,14 +12718,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont2_array_sc(__pyx_v_self->internal_state, rk_logistic, __pyx_v_size, __pyx_v_floc, __pyx_v_fscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":2857
-  *             return cont2_array_sc(self.internal_state, rk_logistic, size, floc, fscale)
-@@ -12278,7 +12782,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oscale));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_oscale));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oscale));
-@@ -12290,7 +12794,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -12314,9 +12818,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":2862
-  *         if np.any(np.less_equal(oscale, 0.0)):
-@@ -12326,7 +12830,7 @@
-  *     def lognormal(self, mean=0.0, sigma=1.0, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = __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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont2_array(__pyx_v_self->internal_state, rk_logistic, __pyx_v_size, __pyx_v_oloc, __pyx_v_oscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -12349,44 +12853,34 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":2864
-- *         return cont2_array(self.internal_state, rk_logistic, size, oloc, oscale)
-- * 
-- *     def lognormal(self, mean=0.0, sigma=1.0, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         lognormal(mean=0.0, sigma=1.0, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_36lognormal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_36lognormal[] = "\n        lognormal(mean=0.0, sigma=1.0, size=None)\n\n        Return samples drawn from a log-normal distribution.\n\n        Draw samples from a log-normal distribution with specified mean, standard\n        deviation, and shape. Note that the mean and standard deviation are not the\n        values for the distribution itself, but of the underlying normal\n        distribution it is derived from.\n\n\n        Parameters\n        ----------\n        mean : float\n            Mean value of the underlying normal distribution\n        sigma : float, >0.\n            Standard deviation of the underlying normal distribution\n        size : tuple of ints\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        See Also\n        --------\n        scipy.stats.lognorm : probability density function, distribution,\n            cumulative density function, etc.\n\n        Notes\n        -----\n        A variable `x` has a log-normal distribution if `log(x)` is normally\n        distributed.\n\n        The probability density function for the log-normal distribution is\n\n        .. math:: p(x) = \\frac{1}{\\sigma x \\sqrt{2\\pi}}\n                         e^{(-\\frac{(ln(x)-\\mu)^2}{2\\sigma^2})}\n\n        where :math:`\\mu` is the mean and :math:`\\sigma` is the standard deviation\n        of the normally distributed logarithm of the variable.\n\n        A log-normal distribution results if a random variable is the *product* of\n        a large number of independent, identically-distributed variables in the\n        same way that a normal distribution results if the variable is the *sum*\n        of a large number of independent, identically-distributed variables\n        (see the last example). It is one of the so-called \"fat-tailed\"\n        distributions.\n\n        The log-normal distribution is commonly used to model the lifespan of units\n        with fatigue-stress failure modes. Since thi""s includes\n        most mechanical systems, the log-normal distribution has widespread\n        application.\n\n        It is also commonly used to model oil field sizes, species abundance, and\n        latent periods of infectious diseases.\n\n        References\n        ----------\n        .. [1] Eckhard Limpert, Werner A. Stahel, and Markus Abbt, \"Log-normal\n               Distributions across the Sciences: Keys and Clues\", May 2001\n               Vol. 51 No. 5 BioScience\n               http://stat.ethz.ch/~stahel/lognormal/bioscience.pdf\n        .. [2] Reiss, R.D., Thomas, M.(2001), Statistical Analysis of Extreme\n               Values, Birkhauser Verlag, Basel, pp 31-32.\n        .. [3] Wikipedia, \"Lognormal distribution\",\n               http://en.wikipedia.org/wiki/Lognormal_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> mu, sigma = 3., 1. # mean and standard deviation\n        >>> s = np.random.lognormal(mu, sigma, 1000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 100, normed=True, align='mid')\n\n        >>> x = np.linspace(min(bins), max(bins), 10000)\n        >>> pdf = (np.exp(-(np.log(x) - mu)**2 / (2 * sigma**2))\n        ...        / (x * sigma * np.sqrt(2 * np.pi)))\n\n        >>> plt.plot(x, pdf, linewidth=2, color='r')\n        >>> plt.axis('tight')\n        >>> plt.show()\n\n        Demonstrate that taking the products of random samples from a uniform\n        distribution can be fit well by a log-normal probability density function.\n\n        >>> # Generate a thousand samples: each is the product of 100 random\n        >>> # values, drawn from a normal distribution.\n        >>> b = []\n        >>> for i in range(1000):\n        ...    a = 10. + np.random.random(100)\n        ...    b.append(np.product(a))\n\n        >>> b"" = np.array(b) / np.min(b) # scale values to be positive\n\n        >>> count, bins, ignored = plt.hist(b, 100, normed=True, align='center')\n\n        >>> sigma = np.std(np.log(b))\n        >>> mu = np.mean(np.log(b))\n\n        >>> x = np.linspace(min(bins), max(bins), 10000)\n        >>> pdf = (np.exp(-(np.log(x) - mu)**2 / (2 * sigma**2))\n        ...        / (x * sigma * np.sqrt(2 * np.pi)))\n\n        >>> plt.plot(x, pdf, color='r', linewidth=2)\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_36lognormal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_73lognormal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_72lognormal[] = "\n        lognormal(mean=0.0, sigma=1.0, size=None)\n\n        Return samples drawn from a log-normal distribution.\n\n        Draw samples from a log-normal distribution with specified mean, standard\n        deviation, and shape. Note that the mean and standard deviation are not the\n        values for the distribution itself, but of the underlying normal\n        distribution it is derived from.\n\n\n        Parameters\n        ----------\n        mean : float\n            Mean value of the underlying normal distribution\n        sigma : float, >0.\n            Standard deviation of the underlying normal distribution\n        size : tuple of ints\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        See Also\n        --------\n        scipy.stats.lognorm : probability density function, distribution,\n            cumulative density function, etc.\n\n        Notes\n        -----\n        A variable `x` has a log-normal distribution if `log(x)` is normally\n        distributed.\n\n        The probability density function for the log-normal distribution is\n\n        .. math:: p(x) = \\frac{1}{\\sigma x \\sqrt{2\\pi}}\n                         e^{(-\\frac{(ln(x)-\\mu)^2}{2\\sigma^2})}\n\n        where :math:`\\mu` is the mean and :math:`\\sigma` is the standard deviation\n        of the normally distributed logarithm of the variable.\n\n        A log-normal distribution results if a random variable is the *product* of\n        a large number of independent, identically-distributed variables in the\n        same way that a normal distribution results if the variable is the *sum*\n        of a large number of independent, identically-distributed variables\n        (see the last example). It is one of the so-called \"fat-tailed\"\n        distributions.\n\n        The log-normal distribution is commonly used to model the lifespan of units\n        with fatigue-stress failure modes. Since thi""s includes\n        most mechanical systems, the log-normal distribution has widespread\n        application.\n\n        It is also commonly used to model oil field sizes, species abundance, and\n        latent periods of infectious diseases.\n\n        References\n        ----------\n        .. [1] Eckhard Limpert, Werner A. Stahel, and Markus Abbt, \"Log-normal\n               Distributions across the Sciences: Keys and Clues\", May 2001\n               Vol. 51 No. 5 BioScience\n               http://stat.ethz.ch/~stahel/lognormal/bioscience.pdf\n        .. [2] Reiss, R.D., Thomas, M.(2001), Statistical Analysis of Extreme\n               Values, Birkhauser Verlag, Basel, pp 31-32.\n        .. [3] Wikipedia, \"Lognormal distribution\",\n               http://en.wikipedia.org/wiki/Lognormal_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> mu, sigma = 3., 1. # mean and standard deviation\n        >>> s = np.random.lognormal(mu, sigma, 1000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 100, normed=True, align='mid')\n\n        >>> x = np.linspace(min(bins), max(bins), 10000)\n        >>> pdf = (np.exp(-(np.log(x) - mu)**2 / (2 * sigma**2))\n        ...        / (x * sigma * np.sqrt(2 * np.pi)))\n\n        >>> plt.plot(x, pdf, linewidth=2, color='r')\n        >>> plt.axis('tight')\n        >>> plt.show()\n\n        Demonstrate that taking the products of random samples from a uniform\n        distribution can be fit well by a log-normal probability density function.\n\n        >>> # Generate a thousand samples: each is the product of 100 random\n        >>> # values, drawn from a normal distribution.\n        >>> b = []\n        >>> for i in range(1000):\n        ...    a = 10. + np.random.random(100)\n        ...    b.append(np.product(a))\n\n        >>> b"" = np.array(b) / np.min(b) # scale values to be positive\n\n        >>> count, bins, ignored = plt.hist(b, 100, normed=True, align='center')\n\n        >>> sigma = np.std(np.log(b))\n        >>> mu = np.mean(np.log(b))\n\n        >>> x = np.linspace(min(bins), max(bins), 10000)\n        >>> pdf = (np.exp(-(np.log(x) - mu)**2 / (2 * sigma**2))\n        ...        / (x * sigma * np.sqrt(2 * np.pi)))\n\n        >>> plt.plot(x, pdf, color='r', linewidth=2)\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_73lognormal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_mean = 0;
-   PyObject *__pyx_v_sigma = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_omean = 0;
--  PyArrayObject *__pyx_v_osigma = 0;
--  double __pyx_v_fmean;
--  double __pyx_v_fsigma;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mean,&__pyx_n_s__sigma,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("lognormal");
-+  __Pyx_RefNannySetupContext("lognormal (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mean,&__pyx_n_s__sigma,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-     values[0] = __pyx_k_85;
-     values[1] = __pyx_k_86;
-+
-+    /* "mtrand.pyx":2864
-+ *         return cont2_array(self.internal_state, rk_logistic, size, oloc, oscale)
-+ * 
-+ *     def lognormal(self, mean=0.0, sigma=1.0, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         lognormal(mean=0.0, sigma=1.0, size=None)
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -12394,7 +12888,7 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mean);
-@@ -12412,7 +12906,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "lognormal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lognormal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -12435,6 +12929,27 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_72lognormal(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_mean, __pyx_v_sigma, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_72lognormal(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_mean, PyObject *__pyx_v_sigma, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_omean = 0;
-+  PyArrayObject *__pyx_v_osigma = 0;
-+  double __pyx_v_fmean;
-+  double __pyx_v_fsigma;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("lognormal", 0);
- 
-   /* "mtrand.pyx":2979
-  *         cdef double fmean, fsigma
-@@ -12486,9 +13001,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":2985
-  *             if fsigma <= 0:
-@@ -12498,14 +13013,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont2_array_sc(__pyx_v_self->internal_state, rk_lognormal, __pyx_v_size, __pyx_v_fmean, __pyx_v_fsigma); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":2987
-  *             return cont2_array_sc(self.internal_state, rk_lognormal, size, fmean, fsigma)
-@@ -12562,7 +13077,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_osigma));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_osigma));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_osigma));
-@@ -12574,7 +13089,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -12598,9 +13113,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":2993
-  *         if np.any(np.less_equal(osigma, 0.0)):
-@@ -12610,7 +13125,7 @@
-  *     def rayleigh(self, scale=1.0, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = __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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont2_array(__pyx_v_self->internal_state, rk_lognormal, __pyx_v_size, __pyx_v_omean, __pyx_v_osigma); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -12633,47 +13148,39 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":2995
-- *         return cont2_array(self.internal_state, rk_lognormal, size, omean, osigma)
-- * 
-- *     def rayleigh(self, scale=1.0, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         rayleigh(scale=1.0, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_37rayleigh(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_37rayleigh[] = "\n        rayleigh(scale=1.0, size=None)\n\n        Draw samples from a Rayleigh distribution.\n\n        The :math:`\\chi` and Weibull distributions are generalizations of the\n        Rayleigh.\n\n        Parameters\n        ----------\n        scale : scalar\n            Scale, also equals the mode. Should be >= 0.\n        size : int or tuple of ints, optional\n            Shape of the output. Default is None, in which case a single\n            value is returned.\n\n        Notes\n        -----\n        The probability density function for the Rayleigh distribution is\n\n        .. math:: P(x;scale) = \\frac{x}{scale^2}e^{\\frac{-x^2}{2 \\cdotp scale^2}}\n\n        The Rayleigh distribution arises if the wind speed and wind direction are\n        both gaussian variables, then the vector wind velocity forms a Rayleigh\n        distribution. The Rayleigh distribution is used to model the expected\n        output from wind turbines.\n\n        References\n        ----------\n        ..[1] Brighton Webs Ltd., Rayleigh Distribution,\n              http://www.brighton-webs.co.uk/distributions/rayleigh.asp\n        ..[2] Wikipedia, \"Rayleigh distribution\"\n              http://en.wikipedia.org/wiki/Rayleigh_distribution\n\n        Examples\n        --------\n        Draw values from the distribution and plot the histogram\n\n        >>> values = hist(np.random.rayleigh(3, 100000), bins=200, normed=True)\n\n        Wave heights tend to follow a Rayleigh distribution. If the mean wave\n        height is 1 meter, what fraction of waves are likely to be larger than 3\n        meters?\n\n        >>> meanvalue = 1\n        >>> modevalue = np.sqrt(2 / np.pi) * meanvalue\n        >>> s = np.random.rayleigh(modevalue, 1000000)\n\n        The percentage of waves larger than 3 meters is:\n\n        >>> 100.*sum(s>3)/1000000.\n        0.087300000000000003\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_37rayleigh(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_75rayleigh(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_74rayleigh[] = "\n        rayleigh(scale=1.0, size=None)\n\n        Draw samples from a Rayleigh distribution.\n\n        The :math:`\\chi` and Weibull distributions are generalizations of the\n        Rayleigh.\n\n        Parameters\n        ----------\n        scale : scalar\n            Scale, also equals the mode. Should be >= 0.\n        size : int or tuple of ints, optional\n            Shape of the output. Default is None, in which case a single\n            value is returned.\n\n        Notes\n        -----\n        The probability density function for the Rayleigh distribution is\n\n        .. math:: P(x;scale) = \\frac{x}{scale^2}e^{\\frac{-x^2}{2 \\cdotp scale^2}}\n\n        The Rayleigh distribution arises if the wind speed and wind direction are\n        both gaussian variables, then the vector wind velocity forms a Rayleigh\n        distribution. The Rayleigh distribution is used to model the expected\n        output from wind turbines.\n\n        References\n        ----------\n        ..[1] Brighton Webs Ltd., Rayleigh Distribution,\n              http://www.brighton-webs.co.uk/distributions/rayleigh.asp\n        ..[2] Wikipedia, \"Rayleigh distribution\"\n              http://en.wikipedia.org/wiki/Rayleigh_distribution\n\n        Examples\n        --------\n        Draw values from the distribution and plot the histogram\n\n        >>> values = hist(np.random.rayleigh(3, 100000), bins=200, normed=True)\n\n        Wave heights tend to follow a Rayleigh distribution. If the mean wave\n        height is 1 meter, what fraction of waves are likely to be larger than 3\n        meters?\n\n        >>> meanvalue = 1\n        >>> modevalue = np.sqrt(2 / np.pi) * meanvalue\n        >>> s = np.random.rayleigh(modevalue, 1000000)\n\n        The percentage of waves larger than 3 meters is:\n\n        >>> 100.*sum(s>3)/1000000.\n        0.087300000000000003\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_75rayleigh(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_scale = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_oscale = 0;
--  double __pyx_v_fscale;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__scale,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("rayleigh");
-+  __Pyx_RefNannySetupContext("rayleigh (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__scale,&__pyx_n_s__size,0};
-     PyObject* values[2] = {0,0};
-     values[0] = __pyx_k_91;
-+
-+    /* "mtrand.pyx":2995
-+ *         return cont2_array(self.internal_state, rk_lognormal, size, omean, osigma)
-+ * 
-+ *     def rayleigh(self, scale=1.0, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         rayleigh(scale=1.0, size=None)
-+ */
-     values[1] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__scale);
-@@ -12686,7 +13193,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "rayleigh") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rayleigh") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2995; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -12707,6 +13214,25 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_74rayleigh(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_scale, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_74rayleigh(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_scale, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_oscale = 0;
-+  double __pyx_v_fscale;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("rayleigh", 0);
- 
-   /* "mtrand.pyx":3053
-  *         cdef double fscale
-@@ -12749,9 +13275,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":3058
-  *             if fscale <= 0:
-@@ -12761,14 +13287,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont1_array_sc(__pyx_v_self->internal_state, rk_rayleigh, __pyx_v_size, __pyx_v_fscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":3060
-  *             return cont1_array_sc(self.internal_state, rk_rayleigh, size, fscale)
-@@ -12812,7 +13338,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oscale));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_oscale));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oscale));
-@@ -12824,7 +13350,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -12848,9 +13374,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":3065
-  *         if np.any(np.less_equal(oscale, 0.0)):
-@@ -12860,7 +13386,7 @@
-  *     def wald(self, mean, scale, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = __pyx_f_6mtrand_cont1_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_rayleigh, __pyx_v_size, __pyx_v_oscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont1_array(__pyx_v_self->internal_state, rk_rayleigh, __pyx_v_size, __pyx_v_oscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -12882,42 +13408,32 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":3067
-- *         return cont1_array(self.internal_state, rk_rayleigh, size, oscale)
-- * 
-- *     def wald(self, mean, scale, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         wald(mean, scale, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_38wald(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_38wald[] = "\n        wald(mean, scale, size=None)\n\n        Draw samples from a Wald, or Inverse Gaussian, distribution.\n\n        As the scale approaches infinity, the distribution becomes more like a\n        Gaussian.\n\n        Some references claim that the Wald is an Inverse Gaussian with mean=1, but\n        this is by no means universal.\n\n        The Inverse Gaussian distribution was first studied in relationship to\n        Brownian motion. In 1956 M.C.K. Tweedie used the name Inverse Gaussian\n        because there is an inverse relationship between the time to cover a unit\n        distance and distance covered in unit time.\n\n        Parameters\n        ----------\n        mean : scalar\n            Distribution mean, should be > 0.\n        scale : scalar\n            Scale parameter, should be >= 0.\n        size : int or tuple of ints, optional\n            Output shape. Default is None, in which case a single value is\n            returned.\n\n        Returns\n        -------\n        samples : ndarray or scalar\n            Drawn sample, all greater than zero.\n\n        Notes\n        -----\n        The probability density function for the Wald distribution is\n\n        .. math:: P(x;mean,scale) = \\sqrt{\\frac{scale}{2\\pi x^3}}e^\n                                    \\frac{-scale(x-mean)^2}{2\\cdotp mean^2x}\n\n        As noted above the Inverse Gaussian distribution first arise from attempts\n        to model Brownian Motion. It is also a competitor to the Weibull for use in\n        reliability modeling and modeling stock returns and interest rate\n        processes.\n\n        References\n        ----------\n        ..[1] Brighton Webs Ltd., Wald Distribution,\n              http://www.brighton-webs.co.uk/distributions/wald.asp\n        ..[2] Chhikara, Raj S., and Folks, J. Leroy, \"The Inverse Gaussian\n              Distribution: Theory : Methodology, and Applications\", CRC Press,\n              1988.\n        ..[3] Wikipedia, \"Wald distributio""n\"\n              http://en.wikipedia.org/wiki/Wald_distribution\n\n        Examples\n        --------\n        Draw values from the distribution and plot the histogram:\n\n        >>> import matplotlib.pyplot as plt\n        >>> h = plt.hist(np.random.wald(3, 2, 100000), bins=200, normed=True)\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_38wald(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_77wald(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_76wald[] = "\n        wald(mean, scale, size=None)\n\n        Draw samples from a Wald, or Inverse Gaussian, distribution.\n\n        As the scale approaches infinity, the distribution becomes more like a\n        Gaussian.\n\n        Some references claim that the Wald is an Inverse Gaussian with mean=1, but\n        this is by no means universal.\n\n        The Inverse Gaussian distribution was first studied in relationship to\n        Brownian motion. In 1956 M.C.K. Tweedie used the name Inverse Gaussian\n        because there is an inverse relationship between the time to cover a unit\n        distance and distance covered in unit time.\n\n        Parameters\n        ----------\n        mean : scalar\n            Distribution mean, should be > 0.\n        scale : scalar\n            Scale parameter, should be >= 0.\n        size : int or tuple of ints, optional\n            Output shape. Default is None, in which case a single value is\n            returned.\n\n        Returns\n        -------\n        samples : ndarray or scalar\n            Drawn sample, all greater than zero.\n\n        Notes\n        -----\n        The probability density function for the Wald distribution is\n\n        .. math:: P(x;mean,scale) = \\sqrt{\\frac{scale}{2\\pi x^3}}e^\n                                    \\frac{-scale(x-mean)^2}{2\\cdotp mean^2x}\n\n        As noted above the Inverse Gaussian distribution first arise from attempts\n        to model Brownian Motion. It is also a competitor to the Weibull for use in\n        reliability modeling and modeling stock returns and interest rate\n        processes.\n\n        References\n        ----------\n        ..[1] Brighton Webs Ltd., Wald Distribution,\n              http://www.brighton-webs.co.uk/distributions/wald.asp\n        ..[2] Chhikara, Raj S., and Folks, J. Leroy, \"The Inverse Gaussian\n              Distribution: Theory : Methodology, and Applications\", CRC Press,\n              1988.\n        ..[3] Wikipedia, \"Wald distributio""n\"\n              http://en.wikipedia.org/wiki/Wald_distribution\n\n        Examples\n        --------\n        Draw values from the distribution and plot the histogram:\n\n        >>> import matplotlib.pyplot as plt\n        >>> h = plt.hist(np.random.wald(3, 2, 100000), bins=200, normed=True)\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_77wald(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_mean = 0;
-   PyObject *__pyx_v_scale = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_omean = 0;
--  PyArrayObject *__pyx_v_oscale = 0;
--  double __pyx_v_fmean;
--  double __pyx_v_fscale;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mean,&__pyx_n_s__scale,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("wald");
-+  __Pyx_RefNannySetupContext("wald (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mean,&__pyx_n_s__scale,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-+
-+    /* "mtrand.pyx":3067
-+ *         return cont1_array(self.internal_state, rk_rayleigh, size, oscale)
-+ * 
-+ *     def wald(self, mean, scale, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         wald(mean, scale, size=None)
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -12925,14 +13441,12 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mean);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mean)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
--        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__scale);
--        if (likely(values[1])) kw_args--;
-+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__scale)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("wald", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-@@ -12943,7 +13457,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "wald") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wald") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -12966,6 +13480,27 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_76wald(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_mean, __pyx_v_scale, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_76wald(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_mean, PyObject *__pyx_v_scale, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_omean = 0;
-+  PyArrayObject *__pyx_v_oscale = 0;
-+  double __pyx_v_fmean;
-+  double __pyx_v_fscale;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("wald", 0);
- 
-   /* "mtrand.pyx":3133
-  *         cdef double fmean, fscale
-@@ -13017,9 +13552,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":3138
-  *             if fmean <= 0:
-@@ -13043,9 +13578,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
--    __pyx_L8:;
-+    __pyx_L5:;
- 
-     /* "mtrand.pyx":3140
-  *             if fscale <= 0:
-@@ -13055,14 +13590,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont2_array_sc(__pyx_v_self->internal_state, rk_wald, __pyx_v_size, __pyx_v_fmean, __pyx_v_fscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":3142
-  *             return cont2_array_sc(self.internal_state, rk_wald, size, fmean, fscale)
-@@ -13119,7 +13654,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_omean));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_omean));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_omean));
-@@ -13131,7 +13666,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -13155,7 +13690,7 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L9;
-+    goto __pyx_L6;
-   }
- 
-   /* "mtrand.pyx":3147
-@@ -13178,7 +13713,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oscale));
-   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_oscale));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oscale));
-@@ -13190,7 +13725,7 @@
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -13214,9 +13749,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L9;
-+    goto __pyx_L6;
-   }
--  __pyx_L9:;
-+  __pyx_L6:;
- 
-   /* "mtrand.pyx":3149
-  *         elif np.any(np.less_equal(oscale,0.0)):
-@@ -13226,7 +13761,7 @@
-  * 
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_cont2_array(__pyx_v_self->internal_state, rk_wald, __pyx_v_size, __pyx_v_omean, __pyx_v_oscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -13249,45 +13784,33 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":3153
-- * 
-- * 
-- *     def triangular(self, left, mode, right, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         triangular(left, mode, right, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_39triangular(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_39triangular[] = "\n        triangular(left, mode, right, size=None)\n\n        Draw samples from the triangular distribution.\n\n        The triangular distribution is a continuous probability distribution with\n        lower limit left, peak at mode, and upper limit right. Unlike the other\n        distributions, these parameters directly define the shape of the pdf.\n\n        Parameters\n        ----------\n        left : scalar\n            Lower limit.\n        mode : scalar\n            The value where the peak of the distribution occurs.\n            The value should fulfill the condition ``left <= mode <= right``.\n        right : scalar\n            Upper limit, should be larger than `left`.\n        size : int or tuple of ints, optional\n            Output shape. Default is None, in which case a single value is\n            returned.\n\n        Returns\n        -------\n        samples : ndarray or scalar\n            The returned samples all lie in the interval [left, right].\n\n        Notes\n        -----\n        The probability density function for the Triangular distribution is\n\n        .. math:: P(x;l, m, r) = \\begin{cases}\n                  \\frac{2(x-l)}{(r-l)(m-l)}& \\text{for $l \\leq x \\leq m$},\\\\\n                  \\frac{2(m-x)}{(r-l)(r-m)}& \\text{for $m \\leq x \\leq r$},\\\\\n                  0& \\text{otherwise}.\n                  \\end{cases}\n\n        The triangular distribution is often used in ill-defined problems where the\n        underlying distribution is not known, but some knowledge of the limits and\n        mode exists. Often it is used in simulations.\n\n        References\n        ----------\n        ..[1] Wikipedia, \"Triangular distribution\"\n              http://en.wikipedia.org/wiki/Triangular_distribution\n\n        Examples\n        --------\n        Draw values from the distribution and plot the histogram:\n\n        >>> import matplotlib.pyplot as plt\n        >>> h = plt.hist(np.random.triangular(-3, 0, 8, 100000), bins=2""00,\n        ...              normed=True)\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_39triangular(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_79triangular(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_78triangular[] = "\n        triangular(left, mode, right, size=None)\n\n        Draw samples from the triangular distribution.\n\n        The triangular distribution is a continuous probability distribution with\n        lower limit left, peak at mode, and upper limit right. Unlike the other\n        distributions, these parameters directly define the shape of the pdf.\n\n        Parameters\n        ----------\n        left : scalar\n            Lower limit.\n        mode : scalar\n            The value where the peak of the distribution occurs.\n            The value should fulfill the condition ``left <= mode <= right``.\n        right : scalar\n            Upper limit, should be larger than `left`.\n        size : int or tuple of ints, optional\n            Output shape. Default is None, in which case a single value is\n            returned.\n\n        Returns\n        -------\n        samples : ndarray or scalar\n            The returned samples all lie in the interval [left, right].\n\n        Notes\n        -----\n        The probability density function for the Triangular distribution is\n\n        .. math:: P(x;l, m, r) = \\begin{cases}\n                  \\frac{2(x-l)}{(r-l)(m-l)}& \\text{for $l \\leq x \\leq m$},\\\\\n                  \\frac{2(m-x)}{(r-l)(r-m)}& \\text{for $m \\leq x \\leq r$},\\\\\n                  0& \\text{otherwise}.\n                  \\end{cases}\n\n        The triangular distribution is often used in ill-defined problems where the\n        underlying distribution is not known, but some knowledge of the limits and\n        mode exists. Often it is used in simulations.\n\n        References\n        ----------\n        ..[1] Wikipedia, \"Triangular distribution\"\n              http://en.wikipedia.org/wiki/Triangular_distribution\n\n        Examples\n        --------\n        Draw values from the distribution and plot the histogram:\n\n        >>> import matplotlib.pyplot as plt\n        >>> h = plt.hist(np.random.triangular(-3, 0, 8, 100000), bins=2""00,\n        ...              normed=True)\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_79triangular(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_left = 0;
-   PyObject *__pyx_v_mode = 0;
-   PyObject *__pyx_v_right = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_oleft = 0;
--  PyArrayObject *__pyx_v_omode = 0;
--  PyArrayObject *__pyx_v_oright = 0;
--  double __pyx_v_fleft;
--  double __pyx_v_fmode;
--  double __pyx_v_fright;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__mode,&__pyx_n_s__right,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("triangular");
-+  __Pyx_RefNannySetupContext("triangular (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__mode,&__pyx_n_s__right,&__pyx_n_s__size,0};
-     PyObject* values[4] = {0,0,0,0};
-+
-+    /* "mtrand.pyx":3153
-+ * 
-+ * 
-+ *     def triangular(self, left, mode, right, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         triangular(left, mode, right, size=None)
-+ */
-     values[3] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-@@ -13296,20 +13819,17 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
--        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mode);
--        if (likely(values[1])) kw_args--;
-+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mode)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("triangular", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-         case  2:
--        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
--        if (likely(values[2])) kw_args--;
-+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("triangular", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-@@ -13320,7 +13840,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "triangular") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "triangular") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -13345,6 +13865,29 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_78triangular(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_left, __pyx_v_mode, __pyx_v_right, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_78triangular(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_left, PyObject *__pyx_v_mode, PyObject *__pyx_v_right, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_oleft = 0;
-+  PyArrayObject *__pyx_v_omode = 0;
-+  PyArrayObject *__pyx_v_oright = 0;
-+  double __pyx_v_fleft;
-+  double __pyx_v_fmode;
-+  double __pyx_v_fright;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("triangular", 0);
- 
-   /* "mtrand.pyx":3213
-  *         cdef double fleft, fmode, fright
-@@ -13405,9 +13948,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":3219
-  *             if fleft > fmode:
-@@ -13431,9 +13974,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
--    __pyx_L8:;
-+    __pyx_L5:;
- 
-     /* "mtrand.pyx":3221
-  *             if fmode > fright:
-@@ -13457,9 +14000,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L9;
-+      goto __pyx_L6;
-     }
--    __pyx_L9:;
-+    __pyx_L6:;
- 
-     /* "mtrand.pyx":3223
-  *             if fleft == fright:
-@@ -13477,14 +14020,14 @@
-  * 
-  *         PyErr_Clear()
-  */
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_cont3_array_sc(__pyx_v_self->internal_state, rk_triangular, __pyx_v_size, __pyx_v_fleft, __pyx_v_fmode, __pyx_v_fright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":3226
-  *                                   fmode, fright)
-@@ -13552,7 +14095,7 @@
-   __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oleft));
-   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_oleft));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oleft));
-@@ -13564,7 +14107,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
-   __Pyx_GIVEREF(__pyx_t_5);
-   __pyx_t_5 = 0;
-@@ -13588,9 +14131,9 @@
-     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L10;
-+    goto __pyx_L7;
-   }
--  __pyx_L10:;
-+  __pyx_L7:;
- 
-   /* "mtrand.pyx":3233
-  *         if np.any(np.greater(oleft, omode)):
-@@ -13610,7 +14153,7 @@
-   __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_omode));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_omode));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_omode));
-@@ -13622,7 +14165,7 @@
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
-   __Pyx_GIVEREF(__pyx_t_4);
-   __pyx_t_4 = 0;
-@@ -13646,9 +14189,9 @@
-     __Pyx_Raise(__pyx_t_4, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L11;
-+    goto __pyx_L8;
-   }
--  __pyx_L11:;
-+  __pyx_L8:;
- 
-   /* "mtrand.pyx":3235
-  *         if np.any(np.greater(omode, oright)):
-@@ -13668,7 +14211,7 @@
-   __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oleft));
-   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_oleft));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oleft));
-@@ -13680,7 +14223,7 @@
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
-   __Pyx_GIVEREF(__pyx_t_3);
-   __pyx_t_3 = 0;
-@@ -13704,9 +14247,9 @@
-     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L12;
-+    goto __pyx_L9;
-   }
--  __pyx_L12:;
-+  __pyx_L9:;
- 
-   /* "mtrand.pyx":3237
-  *         if np.any(np.equal(oleft, oright)):
-@@ -13724,7 +14267,7 @@
-  * 
-  *     # Complicated, discrete distributions:
-  */
--  __pyx_t_3 = __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 (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_3 = __pyx_f_6mtrand_cont3_array(__pyx_v_self->internal_state, rk_triangular, __pyx_v_size, __pyx_v_oleft, __pyx_v_omode, __pyx_v_oright); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_3);
-   __pyx_r = __pyx_t_3;
-   __pyx_t_3 = 0;
-@@ -13748,42 +14291,32 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":3241
-- * 
-- *     # Complicated, discrete distributions:
-- *     def binomial(self, n, p, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         binomial(n, p, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_40binomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_40binomial[] = "\n        binomial(n, p, size=None)\n\n        Draw samples from a binomial distribution.\n\n        Samples are drawn from a Binomial distribution with specified\n        parameters, n trials and p probability of success where\n        n an integer > 0 and p is in the interval [0,1]. (n may be\n        input as a float, but it is truncated to an integer in use)\n\n        Parameters\n        ----------\n        n : float (but truncated to an integer)\n                parameter, > 0.\n        p : float\n                parameter, >= 0 and <=1.\n        size : {tuple, int}\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : {ndarray, scalar}\n                  where the values are all integers in  [0, n].\n\n        See Also\n        --------\n        scipy.stats.distributions.binom : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Binomial distribution is\n\n        .. math:: P(N) = \\binom{n}{N}p^N(1-p)^{n-N},\n\n        where :math:`n` is the number of trials, :math:`p` is the probability\n        of success, and :math:`N` is the number of successes.\n\n        When estimating the standard error of a proportion in a population by\n        using a random sample, the normal distribution works well unless the\n        product p*n <=5, where p = population proportion estimate, and n =\n        number of samples, in which case the binomial distribution is used\n        instead. For example, a sample of 15 people shows 4 who are left\n        handed, and 11 who are right handed. Then p = 4/15 = 27%. 0.27*15 = 4,\n        so the binomial distribution should be used in this case.\n\n        References\n        ----------\n        .. [1] Dalgaard, Peter, \"Introductory Statistics with R\",\n               Springer-Verlag, 2002.\n    ""    .. [2] Glantz, Stanton A. \"Primer of Biostatistics.\", McGraw-Hill,\n               Fifth Edition, 2002.\n        .. [3] Lentner, Marvin, \"Elementary Applied Statistics\", Bogden\n               and Quigley, 1972.\n        .. [4] Weisstein, Eric W. \"Binomial Distribution.\" From MathWorld--A\n               Wolfram Web Resource.\n               http://mathworld.wolfram.com/BinomialDistribution.html\n        .. [5] Wikipedia, \"Binomial-distribution\",\n               http://en.wikipedia.org/wiki/Binomial_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> n, p = 10, .5 # number of trials, probability of each trial\n        >>> s = np.random.binomial(n, p, 1000)\n        # result of flipping a coin 10 times, tested 1000 times.\n\n        A real world example. A company drills 9 wild-cat oil exploration\n        wells, each with an estimated probability of success of 0.1. All nine\n        wells fail. What is the probability of that happening?\n\n        Let's do 20,000 trials of the model, and count the number that\n        generate zero positive results.\n\n        >>> sum(np.random.binomial(9,0.1,20000)==0)/20000.\n        answer = 0.38885, or 38%.\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_40binomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_81binomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_80binomial[] = "\n        binomial(n, p, size=None)\n\n        Draw samples from a binomial distribution.\n\n        Samples are drawn from a Binomial distribution with specified\n        parameters, n trials and p probability of success where\n        n an integer > 0 and p is in the interval [0,1]. (n may be\n        input as a float, but it is truncated to an integer in use)\n\n        Parameters\n        ----------\n        n : float (but truncated to an integer)\n                parameter, > 0.\n        p : float\n                parameter, >= 0 and <=1.\n        size : {tuple, int}\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : {ndarray, scalar}\n                  where the values are all integers in  [0, n].\n\n        See Also\n        --------\n        scipy.stats.distributions.binom : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Binomial distribution is\n\n        .. math:: P(N) = \\binom{n}{N}p^N(1-p)^{n-N},\n\n        where :math:`n` is the number of trials, :math:`p` is the probability\n        of success, and :math:`N` is the number of successes.\n\n        When estimating the standard error of a proportion in a population by\n        using a random sample, the normal distribution works well unless the\n        product p*n <=5, where p = population proportion estimate, and n =\n        number of samples, in which case the binomial distribution is used\n        instead. For example, a sample of 15 people shows 4 who are left\n        handed, and 11 who are right handed. Then p = 4/15 = 27%. 0.27*15 = 4,\n        so the binomial distribution should be used in this case.\n\n        References\n        ----------\n        .. [1] Dalgaard, Peter, \"Introductory Statistics with R\",\n               Springer-Verlag, 2002.\n    ""    .. [2] Glantz, Stanton A. \"Primer of Biostatistics.\", McGraw-Hill,\n               Fifth Edition, 2002.\n        .. [3] Lentner, Marvin, \"Elementary Applied Statistics\", Bogden\n               and Quigley, 1972.\n        .. [4] Weisstein, Eric W. \"Binomial Distribution.\" From MathWorld--A\n               Wolfram Web Resource.\n               http://mathworld.wolfram.com/BinomialDistribution.html\n        .. [5] Wikipedia, \"Binomial-distribution\",\n               http://en.wikipedia.org/wiki/Binomial_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> n, p = 10, .5 # number of trials, probability of each trial\n        >>> s = np.random.binomial(n, p, 1000)\n        # result of flipping a coin 10 times, tested 1000 times.\n\n        A real world example. A company drills 9 wild-cat oil exploration\n        wells, each with an estimated probability of success of 0.1. All nine\n        wells fail. What is the probability of that happening?\n\n        Let's do 20,000 trials of the model, and count the number that\n        generate zero positive results.\n\n        >>> sum(np.random.binomial(9,0.1,20000)==0)/20000.\n        answer = 0.38885, or 38%.\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_81binomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_n = 0;
-   PyObject *__pyx_v_p = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_on = 0;
--  PyArrayObject *__pyx_v_op = 0;
--  long __pyx_v_ln;
--  double __pyx_v_fp;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__n,&__pyx_n_s__p,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("binomial");
-+  __Pyx_RefNannySetupContext("binomial (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__n,&__pyx_n_s__p,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-+
-+    /* "mtrand.pyx":3241
-+ * 
-+ *     # Complicated, discrete distributions:
-+ *     def binomial(self, n, p, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         binomial(n, p, size=None)
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -13791,14 +14324,12 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__n);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__n)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
--        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__p);
--        if (likely(values[1])) kw_args--;
-+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__p)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("binomial", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-@@ -13809,7 +14340,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "binomial") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "binomial") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -13832,6 +14363,27 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_80binomial(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_n, __pyx_v_p, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_80binomial(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_p, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_on = 0;
-+  PyArrayObject *__pyx_v_op = 0;
-+  long __pyx_v_ln;
-+  double __pyx_v_fp;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("binomial", 0);
- 
-   /* "mtrand.pyx":3326
-  *         cdef double fp
-@@ -13883,9 +14435,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":3331
-  *             if ln <= 0:
-@@ -13909,7 +14461,7 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
- 
-     /* "mtrand.pyx":3333
-@@ -13934,9 +14486,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
--    __pyx_L8:;
-+    __pyx_L5:;
- 
-     /* "mtrand.pyx":3335
-  *             elif fp > 1:
-@@ -13946,14 +14498,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_2 = __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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_discnp_array_sc(__pyx_v_self->internal_state, rk_binomial, __pyx_v_size, __pyx_v_ln, __pyx_v_fp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":3337
-  *             return discnp_array_sc(self.internal_state, rk_binomial, size, ln, fp)
-@@ -14008,7 +14560,7 @@
-   __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_INCREF(__pyx_v_n);
-   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_n);
-   __Pyx_GIVEREF(__pyx_v_n);
-@@ -14020,7 +14572,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
-   __Pyx_GIVEREF(__pyx_t_5);
-   __pyx_t_5 = 0;
-@@ -14044,9 +14596,9 @@
-     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L9;
-+    goto __pyx_L6;
-   }
--  __pyx_L9:;
-+  __pyx_L6:;
- 
-   /* "mtrand.pyx":3343
-  *         if np.any(np.less_equal(n, 0)):
-@@ -14066,7 +14618,7 @@
-   __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(__pyx_v_p);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_p);
-   __Pyx_GIVEREF(__pyx_v_p);
-@@ -14078,7 +14630,7 @@
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
-   __Pyx_GIVEREF(__pyx_t_4);
-   __pyx_t_4 = 0;
-@@ -14102,9 +14654,9 @@
-     __Pyx_Raise(__pyx_t_4, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L10;
-+    goto __pyx_L7;
-   }
--  __pyx_L10:;
-+  __pyx_L7:;
- 
-   /* "mtrand.pyx":3345
-  *         if np.any(np.less(p, 0)):
-@@ -14124,7 +14676,7 @@
-   __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(__pyx_v_p);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_p);
-   __Pyx_GIVEREF(__pyx_v_p);
-@@ -14136,7 +14688,7 @@
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
-   __Pyx_GIVEREF(__pyx_t_3);
-   __pyx_t_3 = 0;
-@@ -14160,9 +14712,9 @@
-     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L11;
-+    goto __pyx_L8;
-   }
--  __pyx_L11:;
-+  __pyx_L8:;
- 
-   /* "mtrand.pyx":3347
-  *         if np.any(np.greater(p, 1)):
-@@ -14172,7 +14724,7 @@
-  *     def negative_binomial(self, n, p, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_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 (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_3 = __pyx_f_6mtrand_discnp_array(__pyx_v_self->internal_state, rk_binomial, __pyx_v_size, __pyx_v_on, __pyx_v_op); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_3);
-   __pyx_r = __pyx_t_3;
-   __pyx_t_3 = 0;
-@@ -14195,42 +14747,32 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":3349
-- *         return discnp_array(self.internal_state, rk_binomial, size, on, op)
-- * 
-- *     def negative_binomial(self, n, p, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         negative_binomial(n, p, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_41negative_binomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_41negative_binomial[] = "\n        negative_binomial(n, p, size=None)\n\n        Draw samples from a negative_binomial distribution.\n\n        Samples are drawn from a negative_Binomial distribution with specified\n        parameters, `n` trials and `p` probability of success where `n` is an\n        integer > 0 and `p` is in the interval [0, 1].\n\n        Parameters\n        ----------\n        n : int\n            Parameter, > 0.\n        p : float\n            Parameter, >= 0 and <=1.\n        size : int or tuple of ints\n            Output shape. If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : int or ndarray of ints\n            Drawn samples.\n\n        Notes\n        -----\n        The probability density for the Negative Binomial distribution is\n\n        .. math:: P(N;n,p) = \\binom{N+n-1}{n-1}p^{n}(1-p)^{N},\n\n        where :math:`n-1` is the number of successes, :math:`p` is the probability\n        of success, and :math:`N+n-1` is the number of trials.\n\n        The negative binomial distribution gives the probability of n-1 successes\n        and N failures in N+n-1 trials, and success on the (N+n)th trial.\n\n        If one throws a die repeatedly until the third time a \"1\" appears, then the\n        probability distribution of the number of non-\"1\"s that appear before the\n        third \"1\" is a negative binomial distribution.\n\n        References\n        ----------\n        .. [1] Weisstein, Eric W. \"Negative Binomial Distribution.\" From\n               MathWorld--A Wolfram Web Resource.\n               http://mathworld.wolfram.com/NegativeBinomialDistribution.html\n        .. [2] Wikipedia, \"Negative binomial distribution\",\n               http://en.wikipedia.org/wiki/Negative_binomial_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        A real world example. A company drills wild-cat oil exploration well""s, each\n        with an estimated probability of success of 0.1.  What is the probability\n        of having one success for each successive well, that is what is the\n        probability of a single success after drilling 5 wells, after 6 wells,\n        etc.?\n\n        >>> s = np.random.negative_binomial(1, 0.1, 100000)\n        >>> for i in range(1, 11):\n        ...    probability = sum(s<i) / 100000.\n        ...    print i, \"wells drilled, probability of one success =\", probability\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_41negative_binomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_83negative_binomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_82negative_binomial[] = "\n        negative_binomial(n, p, size=None)\n\n        Draw samples from a negative_binomial distribution.\n\n        Samples are drawn from a negative_Binomial distribution with specified\n        parameters, `n` trials and `p` probability of success where `n` is an\n        integer > 0 and `p` is in the interval [0, 1].\n\n        Parameters\n        ----------\n        n : int\n            Parameter, > 0.\n        p : float\n            Parameter, >= 0 and <=1.\n        size : int or tuple of ints\n            Output shape. If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : int or ndarray of ints\n            Drawn samples.\n\n        Notes\n        -----\n        The probability density for the Negative Binomial distribution is\n\n        .. math:: P(N;n,p) = \\binom{N+n-1}{n-1}p^{n}(1-p)^{N},\n\n        where :math:`n-1` is the number of successes, :math:`p` is the probability\n        of success, and :math:`N+n-1` is the number of trials.\n\n        The negative binomial distribution gives the probability of n-1 successes\n        and N failures in N+n-1 trials, and success on the (N+n)th trial.\n\n        If one throws a die repeatedly until the third time a \"1\" appears, then the\n        probability distribution of the number of non-\"1\"s that appear before the\n        third \"1\" is a negative binomial distribution.\n\n        References\n        ----------\n        .. [1] Weisstein, Eric W. \"Negative Binomial Distribution.\" From\n               MathWorld--A Wolfram Web Resource.\n               http://mathworld.wolfram.com/NegativeBinomialDistribution.html\n        .. [2] Wikipedia, \"Negative binomial distribution\",\n               http://en.wikipedia.org/wiki/Negative_binomial_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        A real world example. A company drills wild-cat oil exploration well""s, each\n        with an estimated probability of success of 0.1.  What is the probability\n        of having one success for each successive well, that is what is the\n        probability of a single success after drilling 5 wells, after 6 wells,\n        etc.?\n\n        >>> s = np.random.negative_binomial(1, 0.1, 100000)\n        >>> for i in range(1, 11):\n        ...    probability = sum(s<i) / 100000.\n        ...    print i, \"wells drilled, probability of one success =\", probability\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_83negative_binomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_n = 0;
-   PyObject *__pyx_v_p = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_on = 0;
--  PyArrayObject *__pyx_v_op = 0;
--  double __pyx_v_fn;
--  double __pyx_v_fp;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__n,&__pyx_n_s__p,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("negative_binomial");
-+  __Pyx_RefNannySetupContext("negative_binomial (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__n,&__pyx_n_s__p,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-+
-+    /* "mtrand.pyx":3349
-+ *         return discnp_array(self.internal_state, rk_binomial, size, on, op)
-+ * 
-+ *     def negative_binomial(self, n, p, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         negative_binomial(n, p, size=None)
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -14238,14 +14780,12 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__n);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__n)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
--        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__p);
--        if (likely(values[1])) kw_args--;
-+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__p)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("negative_binomial", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-@@ -14256,7 +14796,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "negative_binomial") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "negative_binomial") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -14279,7 +14819,28 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
--
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_82negative_binomial(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_n, __pyx_v_p, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_82negative_binomial(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_p, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_on = 0;
-+  PyArrayObject *__pyx_v_op = 0;
-+  double __pyx_v_fn;
-+  double __pyx_v_fp;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("negative_binomial", 0);
-+
-   /* "mtrand.pyx":3419
-  *         cdef double fp
-  * 
-@@ -14330,9 +14891,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":3424
-  *             if fn <= 0:
-@@ -14356,7 +14917,7 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
- 
-     /* "mtrand.pyx":3426
-@@ -14381,9 +14942,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
--    __pyx_L8:;
-+    __pyx_L5:;
- 
-     /* "mtrand.pyx":3428
-  *             elif fp > 1:
-@@ -14401,14 +14962,14 @@
-  * 
-  *         PyErr_Clear()
-  */
--    __pyx_t_2 = __pyx_f_6mtrand_discdd_array_sc(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_negative_binomial, __pyx_v_size, __pyx_v_fn, __pyx_v_fp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_discdd_array_sc(__pyx_v_self->internal_state, rk_negative_binomial, __pyx_v_size, __pyx_v_fn, __pyx_v_fp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":3431
-  *                                    size, fn, fp)
-@@ -14463,7 +15024,7 @@
-   __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_INCREF(__pyx_v_n);
-   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_n);
-   __Pyx_GIVEREF(__pyx_v_n);
-@@ -14475,7 +15036,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
-   __Pyx_GIVEREF(__pyx_t_5);
-   __pyx_t_5 = 0;
-@@ -14499,9 +15060,9 @@
-     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L9;
-+    goto __pyx_L6;
-   }
--  __pyx_L9:;
-+  __pyx_L6:;
- 
-   /* "mtrand.pyx":3437
-  *         if np.any(np.less_equal(n, 0)):
-@@ -14521,7 +15082,7 @@
-   __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(__pyx_v_p);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_p);
-   __Pyx_GIVEREF(__pyx_v_p);
-@@ -14533,7 +15094,7 @@
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
-   __Pyx_GIVEREF(__pyx_t_4);
-   __pyx_t_4 = 0;
-@@ -14557,9 +15118,9 @@
-     __Pyx_Raise(__pyx_t_4, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L10;
-+    goto __pyx_L7;
-   }
--  __pyx_L10:;
-+  __pyx_L7:;
- 
-   /* "mtrand.pyx":3439
-  *         if np.any(np.less(p, 0)):
-@@ -14579,7 +15140,7 @@
-   __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(__pyx_v_p);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_p);
-   __Pyx_GIVEREF(__pyx_v_p);
-@@ -14591,7 +15152,7 @@
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
-   __Pyx_GIVEREF(__pyx_t_3);
-   __pyx_t_3 = 0;
-@@ -14615,9 +15176,9 @@
-     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L11;
-+    goto __pyx_L8;
-   }
--  __pyx_L11:;
-+  __pyx_L8:;
- 
-   /* "mtrand.pyx":3441
-  *         if np.any(np.greater(p, 1)):
-@@ -14635,7 +15196,7 @@
-  * 
-  *     def poisson(self, lam=1.0, size=None):
-  */
--  __pyx_t_3 = __pyx_f_6mtrand_discdd_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_negative_binomial, __pyx_v_size, __pyx_v_on, __pyx_v_op); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_3 = __pyx_f_6mtrand_discdd_array(__pyx_v_self->internal_state, rk_negative_binomial, __pyx_v_size, __pyx_v_on, __pyx_v_op); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_3);
-   __pyx_r = __pyx_t_3;
-   __pyx_t_3 = 0;
-@@ -14658,47 +15219,39 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":3444
-- *                             on, op)
-- * 
-- *     def poisson(self, lam=1.0, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         poisson(lam=1.0, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_42poisson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_42poisson[] = "\n        poisson(lam=1.0, size=None)\n\n        Draw samples from a Poisson distribution.\n\n        The Poisson distribution is the limit of the Binomial\n        distribution for large N.\n\n        Parameters\n        ----------\n        lam : float\n            Expectation of interval, should be >= 0.\n        size : int or tuple of ints, optional\n            Output shape. If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Notes\n        -----\n        The Poisson distribution\n\n        .. math:: f(k; \\lambda)=\\frac{\\lambda^k e^{-\\lambda}}{k!}\n\n        For events with an expected separation :math:`\\lambda` the Poisson\n        distribution :math:`f(k; \\lambda)` describes the probability of\n        :math:`k` events occurring within the observed interval :math:`\\lambda`.\n\n        Because the output is limited to the range of the C long type, a\n        ValueError is raised when `lam` is within 10 sigma of the maximum\n        representable value.\n\n        References\n        ----------\n        .. [1] Weisstein, Eric W. \"Poisson Distribution.\" From MathWorld--A Wolfram\n               Web Resource. http://mathworld.wolfram.com/PoissonDistribution.html\n        .. [2] Wikipedia, \"Poisson distribution\",\n           http://en.wikipedia.org/wiki/Poisson_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> import numpy as np\n        >>> s = np.random.poisson(5, 10000)\n\n        Display histogram of the sample:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 14, normed=True)\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_42poisson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_85poisson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_84poisson[] = "\n        poisson(lam=1.0, size=None)\n\n        Draw samples from a Poisson distribution.\n\n        The Poisson distribution is the limit of the Binomial\n        distribution for large N.\n\n        Parameters\n        ----------\n        lam : float\n            Expectation of interval, should be >= 0.\n        size : int or tuple of ints, optional\n            Output shape. If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Notes\n        -----\n        The Poisson distribution\n\n        .. math:: f(k; \\lambda)=\\frac{\\lambda^k e^{-\\lambda}}{k!}\n\n        For events with an expected separation :math:`\\lambda` the Poisson\n        distribution :math:`f(k; \\lambda)` describes the probability of\n        :math:`k` events occurring within the observed interval :math:`\\lambda`.\n\n        Because the output is limited to the range of the C long type, a\n        ValueError is raised when `lam` is within 10 sigma of the maximum\n        representable value.\n\n        References\n        ----------\n        .. [1] Weisstein, Eric W. \"Poisson Distribution.\" From MathWorld--A Wolfram\n               Web Resource. http://mathworld.wolfram.com/PoissonDistribution.html\n        .. [2] Wikipedia, \"Poisson distribution\",\n           http://en.wikipedia.org/wiki/Poisson_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> import numpy as np\n        >>> s = np.random.poisson(5, 10000)\n\n        Display histogram of the sample:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 14, normed=True)\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_85poisson(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_lam = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_olam = 0;
--  double __pyx_v_flam;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__lam,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("poisson");
-+  __Pyx_RefNannySetupContext("poisson (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__lam,&__pyx_n_s__size,0};
-     PyObject* values[2] = {0,0};
-     values[0] = __pyx_k_125;
-+
-+    /* "mtrand.pyx":3444
-+ *                             on, op)
-+ * 
-+ *     def poisson(self, lam=1.0, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         poisson(lam=1.0, size=None)
-+ */
-     values[1] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
-         if (kw_args > 0) {
-           PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lam);
-@@ -14711,7 +15264,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "poisson") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "poisson") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3444; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -14732,6 +15285,25 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_84poisson(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_lam, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_84poisson(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_lam, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_olam = 0;
-+  double __pyx_v_flam;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("poisson", 0);
- 
-   /* "mtrand.pyx":3498
-  *         cdef ndarray olam
-@@ -14759,8 +15331,7 @@
-  *                 raise ValueError("lam < 0")
-  *             if lam > self.poisson_lam_max:
-  */
--    __pyx_t_2 = PyObject_RichCompare(__pyx_v_lam, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(__pyx_t_2);
-+    __pyx_t_2 = PyObject_RichCompare(__pyx_v_lam, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     if (__pyx_t_1) {
-@@ -14777,9 +15348,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":3502
-  *             if lam < 0:
-@@ -14788,10 +15359,9 @@
-  *                 raise ValueError("lam value too large")
-  *             return discd_array_sc(self.internal_state, rk_poisson, size, flam)
-  */
--    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__poisson_lam_max); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__poisson_lam_max); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
--    __pyx_t_3 = PyObject_RichCompare(__pyx_v_lam, __pyx_t_2, Py_GT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(__pyx_t_3);
-+    __pyx_t_3 = PyObject_RichCompare(__pyx_v_lam, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-@@ -14809,9 +15379,9 @@
-       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
--    __pyx_L8:;
-+    __pyx_L5:;
- 
-     /* "mtrand.pyx":3504
-  *             if lam > self.poisson_lam_max:
-@@ -14821,14 +15391,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_3 = __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 (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_3 = __pyx_f_6mtrand_discd_array_sc(__pyx_v_self->internal_state, rk_poisson, __pyx_v_size, __pyx_v_flam); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_3);
-     __pyx_r = __pyx_t_3;
-     __pyx_t_3 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":3506
-  *             return discd_array_sc(self.internal_state, rk_poisson, size, flam)
-@@ -14870,7 +15440,7 @@
-   __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+  __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_INCREF(((PyObject *)__pyx_v_olam));
-   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_olam));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_olam));
-@@ -14882,7 +15452,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+  __Pyx_GOTREF(__pyx_t_3);
-   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
-   __Pyx_GIVEREF(__pyx_t_5);
-   __pyx_t_5 = 0;
-@@ -14906,9 +15476,9 @@
-     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L9;
-+    goto __pyx_L6;
-   }
--  __pyx_L9:;
-+  __pyx_L6:;
- 
-   /* "mtrand.pyx":3511
-  *         if np.any(np.less(olam, 0)):
-@@ -14927,10 +15497,10 @@
-   __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__greater); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
--  __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__poisson_lam_max); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__poisson_lam_max); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_5);
-   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(((PyObject *)__pyx_v_olam));
-   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_olam));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_olam));
-@@ -14942,7 +15512,7 @@
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
-   __Pyx_GIVEREF(__pyx_t_5);
-   __pyx_t_5 = 0;
-@@ -14966,9 +15536,9 @@
-     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L10;
-+    goto __pyx_L7;
-   }
--  __pyx_L10:;
-+  __pyx_L7:;
- 
-   /* "mtrand.pyx":3513
-  *         if np.any(np.greater(olam, self.poisson_lam_max)):
-@@ -14978,7 +15548,7 @@
-  *     def zipf(self, a, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_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 (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_5 = __pyx_f_6mtrand_discd_array(__pyx_v_self->internal_state, rk_poisson, __pyx_v_size, __pyx_v_olam); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_5);
-   __pyx_r = __pyx_t_5;
-   __pyx_t_5 = 0;
-@@ -15000,49 +15570,40 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":3515
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_87zipf(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_86zipf[] = "\n        zipf(a, size=None)\n\n        Draw samples from a Zipf distribution.\n\n        Samples are drawn from a Zipf distribution with specified parameter\n        `a` > 1.\n\n        The Zipf distribution (also known as the zeta distribution) is a\n        continuous probability distribution that satisfies Zipf's law: the\n        frequency of an item is inversely proportional to its rank in a\n        frequency table.\n\n        Parameters\n        ----------\n        a : float > 1\n            Distribution parameter.\n        size : int or tuple of int, optional\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn; a single integer is equivalent in\n            its result to providing a mono-tuple, i.e., a 1-D array of length\n            *size* is returned.  The default is None, in which case a single\n            scalar is returned.\n\n        Returns\n        -------\n        samples : scalar or ndarray\n            The returned samples are greater than or equal to one.\n\n        See Also\n        --------\n        scipy.stats.distributions.zipf : probability density function,\n            distribution, or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Zipf distribution is\n\n        .. math:: p(x) = \\frac{x^{-a}}{\\zeta(a)},\n\n        where :math:`\\zeta` is the Riemann Zeta function.\n\n        It is named for the American linguist George Kingsley Zipf, who noted\n        that the frequency of any word in a sample of a language is inversely\n        proportional to its rank in the frequency table.\n\n        References\n        ----------\n        Zipf, G. K., *Selected Studies of the Principle of Relative Frequency\n        in Language*, Cambridge, MA: Harvard Univ. Press, 1932.\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> a = 2. # parameter\n        >>> s = np.random.zipf""(a, 1000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> import scipy.special as sps\n        Truncate s values at 50 so plot is interesting\n        >>> count, bins, ignored = plt.hist(s[s<50], 50, normed=True)\n        >>> x = np.arange(1., 50.)\n        >>> y = x**(-a)/sps.zetac(a)\n        >>> plt.plot(x, y/max(y), linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_87zipf(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_a = 0;
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("zipf (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__size,0};
-+    PyObject* values[2] = {0,0};
-+
-+    /* "mtrand.pyx":3515
-  *         return discd_array(self.internal_state, rk_poisson, size, olam)
-  * 
-  *     def zipf(self, a, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         zipf(a, size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_43zipf(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_43zipf[] = "\n        zipf(a, size=None)\n\n        Draw samples from a Zipf distribution.\n\n        Samples are drawn from a Zipf distribution with specified parameter\n        `a` > 1.\n\n        The Zipf distribution (also known as the zeta distribution) is a\n        continuous probability distribution that satisfies Zipf's law: the\n        frequency of an item is inversely proportional to its rank in a\n        frequency table.\n\n        Parameters\n        ----------\n        a : float > 1\n            Distribution parameter.\n        size : int or tuple of int, optional\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn; a single integer is equivalent in\n            its result to providing a mono-tuple, i.e., a 1-D array of length\n            *size* is returned.  The default is None, in which case a single\n            scalar is returned.\n\n        Returns\n        -------\n        samples : scalar or ndarray\n            The returned samples are greater than or equal to one.\n\n        See Also\n        --------\n        scipy.stats.distributions.zipf : probability density function,\n            distribution, or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Zipf distribution is\n\n        .. math:: p(x) = \\frac{x^{-a}}{\\zeta(a)},\n\n        where :math:`\\zeta` is the Riemann Zeta function.\n\n        It is named for the American linguist George Kingsley Zipf, who noted\n        that the frequency of any word in a sample of a language is inversely\n        proportional to its rank in the frequency table.\n\n        References\n        ----------\n        Zipf, G. K., *Selected Studies of the Principle of Relative Frequency\n        in Language*, Cambridge, MA: Harvard Univ. Press, 1932.\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> a = 2. # parameter\n        >>> s = np.random.zipf""(a, 1000)\n\n        Display the histogram of the samples, along with\n        the probability density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> import scipy.special as sps\n        Truncate s values at 50 so plot is interesting\n        >>> count, bins, ignored = plt.hist(s[s<50], 50, normed=True)\n        >>> x = np.arange(1., 50.)\n        >>> y = x**(-a)/sps.zetac(a)\n        >>> plt.plot(x, y/max(y), linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_43zipf(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_a = 0;
--  PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_oa = 0;
--  double __pyx_v_fa;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("zipf");
--  {
--    PyObject* values[2] = {0,0};
-     values[1] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
-         if (kw_args > 0) {
-@@ -15051,7 +15612,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "zipf") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3515; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "zipf") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3515; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -15072,6 +15633,25 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_86zipf(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_a, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_86zipf(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_oa = 0;
-+  double __pyx_v_fa;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("zipf", 0);
- 
-   /* "mtrand.pyx":3590
-  *         cdef double fa
-@@ -15114,9 +15694,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":3594
-  *             if fa <= 1.0:
-@@ -15126,14 +15706,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_discd_array_sc(__pyx_v_self->internal_state, rk_zipf, __pyx_v_size, __pyx_v_fa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":3596
-  *             return discd_array_sc(self.internal_state, rk_zipf, size, fa)
-@@ -15177,7 +15757,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_oa));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_oa));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_oa));
-@@ -15189,7 +15769,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -15213,9 +15793,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":3601
-  *         if np.any(np.less_equal(oa, 1.0)):
-@@ -15225,7 +15805,7 @@
-  *     def geometric(self, p, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_2 = __pyx_f_6mtrand_discd_array(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state, rk_zipf, __pyx_v_size, __pyx_v_oa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_discd_array(__pyx_v_self->internal_state, rk_zipf, __pyx_v_size, __pyx_v_oa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -15247,49 +15827,40 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":3603
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_89geometric(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_88geometric[] = "\n        geometric(p, size=None)\n\n        Draw samples from the geometric distribution.\n\n        Bernoulli trials are experiments with one of two outcomes:\n        success or failure (an example of such an experiment is flipping\n        a coin).  The geometric distribution models the number of trials\n        that must be run in order to achieve success.  It is therefore\n        supported on the positive integers, ``k = 1, 2, ...``.\n\n        The probability mass function of the geometric distribution is\n\n        .. math:: f(k) = (1 - p)^{k - 1} p\n\n        where `p` is the probability of success of an individual trial.\n\n        Parameters\n        ----------\n        p : float\n            The probability of success of an individual trial.\n        size : tuple of ints\n            Number of values to draw from the distribution.  The output\n            is shaped according to `size`.\n\n        Returns\n        -------\n        out : ndarray\n            Samples from the geometric distribution, shaped according to\n            `size`.\n\n        Examples\n        --------\n        Draw ten thousand values from the geometric distribution,\n        with the probability of an individual success equal to 0.35:\n\n        >>> z = np.random.geometric(p=0.35, size=10000)\n\n        How many trials succeeded after a single run?\n\n        >>> (z == 1).sum() / 10000.\n        0.34889999999999999 #random\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_89geometric(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_p = 0;
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("geometric (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__p,&__pyx_n_s__size,0};
-+    PyObject* values[2] = {0,0};
-+
-+    /* "mtrand.pyx":3603
-  *         return discd_array(self.internal_state, rk_zipf, size, oa)
-  * 
-  *     def geometric(self, p, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         geometric(p, size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_44geometric(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_44geometric[] = "\n        geometric(p, size=None)\n\n        Draw samples from the geometric distribution.\n\n        Bernoulli trials are experiments with one of two outcomes:\n        success or failure (an example of such an experiment is flipping\n        a coin).  The geometric distribution models the number of trials\n        that must be run in order to achieve success.  It is therefore\n        supported on the positive integers, ``k = 1, 2, ...``.\n\n        The probability mass function of the geometric distribution is\n\n        .. math:: f(k) = (1 - p)^{k - 1} p\n\n        where `p` is the probability of success of an individual trial.\n\n        Parameters\n        ----------\n        p : float\n            The probability of success of an individual trial.\n        size : tuple of ints\n            Number of values to draw from the distribution.  The output\n            is shaped according to `size`.\n\n        Returns\n        -------\n        out : ndarray\n            Samples from the geometric distribution, shaped according to\n            `size`.\n\n        Examples\n        --------\n        Draw ten thousand values from the geometric distribution,\n        with the probability of an individual success equal to 0.35:\n\n        >>> z = np.random.geometric(p=0.35, size=10000)\n\n        How many trials succeeded after a single run?\n\n        >>> (z == 1).sum() / 10000.\n        0.34889999999999999 #random\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_44geometric(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_p = 0;
--  PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_op = 0;
--  double __pyx_v_fp;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__p,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("geometric");
--  {
--    PyObject* values[2] = {0,0};
-     values[1] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__p);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__p)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
-         if (kw_args > 0) {
-@@ -15298,7 +15869,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "geometric") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "geometric") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -15319,6 +15890,25 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_88geometric(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_p, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_88geometric(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_p, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_op = 0;
-+  double __pyx_v_fp;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("geometric", 0);
- 
-   /* "mtrand.pyx":3651
-  *         cdef double fp
-@@ -15361,9 +15951,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":3655
-  *             if fp < 0.0:
-@@ -15387,9 +15977,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
--    __pyx_L8:;
-+    __pyx_L5:;
- 
-     /* "mtrand.pyx":3657
-  *             if fp > 1.0:
-@@ -15399,14 +15989,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_discd_array_sc(__pyx_v_self->internal_state, rk_geometric, __pyx_v_size, __pyx_v_fp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":3659
-  *             return discd_array_sc(self.internal_state, rk_geometric, size, fp)
-@@ -15450,7 +16040,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_op));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_op));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_op));
-@@ -15462,7 +16052,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -15486,9 +16076,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L9;
-+    goto __pyx_L6;
-   }
--  __pyx_L9:;
-+  __pyx_L6:;
- 
-   /* "mtrand.pyx":3665
-  *         if np.any(np.less(op, 0.0)):
-@@ -15510,7 +16100,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(((PyObject *)__pyx_v_op));
-   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_op));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_op));
-@@ -15522,7 +16112,7 @@
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -15546,9 +16136,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L10;
-+    goto __pyx_L7;
-   }
--  __pyx_L10:;
-+  __pyx_L7:;
- 
-   /* "mtrand.pyx":3667
-  *         if np.any(np.greater(op, 1.0)):
-@@ -15558,7 +16148,7 @@
-  *     def hypergeometric(self, ngood, nbad, nsample, size=None):
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_discd_array(__pyx_v_self->internal_state, rk_geometric, __pyx_v_size, __pyx_v_op); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -15580,46 +16170,33 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":3669
-- *         return discd_array(self.internal_state, rk_geometric, size, op)
-- * 
-- *     def hypergeometric(self, ngood, nbad, nsample, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         hypergeometric(ngood, nbad, nsample, size=None)
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_45hypergeometric(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_45hypergeometric[] = "\n        hypergeometric(ngood, nbad, nsample, size=None)\n\n        Draw samples from a Hypergeometric distribution.\n\n        Samples are drawn from a Hypergeometric distribution with specified\n        parameters, ngood (ways to make a good selection), nbad (ways to make\n        a bad selection), and nsample = number of items sampled, which is less\n        than or equal to the sum ngood + nbad.\n\n        Parameters\n        ----------\n        ngood : float (but truncated to an integer)\n                parameter, > 0.\n        nbad  : float\n                parameter, >= 0.\n        nsample  : float\n                   parameter, > 0 and <= ngood+nbad\n        size : {tuple, int}\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : {ndarray, scalar}\n                  where the values are all integers in  [0, n].\n\n        See Also\n        --------\n        scipy.stats.distributions.hypergeom : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Hypergeometric distribution is\n\n        .. math:: P(x) = \\frac{\\binom{m}{n}\\binom{N-m}{n-x}}{\\binom{N}{n}},\n\n        where :math:`0 \\le x \\le m` and :math:`n+m-N \\le x \\le n`\n\n        for P(x) the probability of x successes, n = ngood, m = nbad, and\n        N = number of samples.\n\n        Consider an urn with black and white marbles in it, ngood of them\n        black and nbad are white. If you draw nsample balls without\n        replacement, then the Hypergeometric distribution describes the\n        distribution of black balls in the drawn sample.\n\n        Note that this distribution is very similar to the Binomial\n        distribution, except that in this case, samples are drawn without\n        replacement, whereas in the Binomial case samples are drawn wit""h\n        replacement (or the sample space is infinite). As the sample space\n        becomes large, this distribution approaches the Binomial.\n\n        References\n        ----------\n        .. [1] Lentner, Marvin, \"Elementary Applied Statistics\", Bogden\n               and Quigley, 1972.\n        .. [2] Weisstein, Eric W. \"Hypergeometric Distribution.\" From\n               MathWorld--A Wolfram Web Resource.\n               http://mathworld.wolfram.com/HypergeometricDistribution.html\n        .. [3] Wikipedia, \"Hypergeometric-distribution\",\n               http://en.wikipedia.org/wiki/Hypergeometric-distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> ngood, nbad, nsamp = 100, 2, 10\n        # number of good, number of bad, and number of samples\n        >>> s = np.random.hypergeometric(ngood, nbad, nsamp, 1000)\n        >>> hist(s)\n        #   note that it is very unlikely to grab both bad items\n\n        Suppose you have an urn with 15 white and 15 black marbles.\n        If you pull 15 marbles at random, how likely is it that\n        12 or more of them are one color?\n\n        >>> s = np.random.hypergeometric(15, 15, 15, 100000)\n        >>> sum(s>=12)/100000. + sum(s<=3)/100000.\n        #   answer = 0.003 ... pretty unlikely!\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_45hypergeometric(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_91hypergeometric(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_90hypergeometric[] = "\n        hypergeometric(ngood, nbad, nsample, size=None)\n\n        Draw samples from a Hypergeometric distribution.\n\n        Samples are drawn from a Hypergeometric distribution with specified\n        parameters, ngood (ways to make a good selection), nbad (ways to make\n        a bad selection), and nsample = number of items sampled, which is less\n        than or equal to the sum ngood + nbad.\n\n        Parameters\n        ----------\n        ngood : float (but truncated to an integer)\n                parameter, > 0.\n        nbad  : float\n                parameter, >= 0.\n        nsample  : float\n                   parameter, > 0 and <= ngood+nbad\n        size : {tuple, int}\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : {ndarray, scalar}\n                  where the values are all integers in  [0, n].\n\n        See Also\n        --------\n        scipy.stats.distributions.hypergeom : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Hypergeometric distribution is\n\n        .. math:: P(x) = \\frac{\\binom{m}{n}\\binom{N-m}{n-x}}{\\binom{N}{n}},\n\n        where :math:`0 \\le x \\le m` and :math:`n+m-N \\le x \\le n`\n\n        for P(x) the probability of x successes, n = ngood, m = nbad, and\n        N = number of samples.\n\n        Consider an urn with black and white marbles in it, ngood of them\n        black and nbad are white. If you draw nsample balls without\n        replacement, then the Hypergeometric distribution describes the\n        distribution of black balls in the drawn sample.\n\n        Note that this distribution is very similar to the Binomial\n        distribution, except that in this case, samples are drawn without\n        replacement, whereas in the Binomial case samples are drawn wit""h\n        replacement (or the sample space is infinite). As the sample space\n        becomes large, this distribution approaches the Binomial.\n\n        References\n        ----------\n        .. [1] Lentner, Marvin, \"Elementary Applied Statistics\", Bogden\n               and Quigley, 1972.\n        .. [2] Weisstein, Eric W. \"Hypergeometric Distribution.\" From\n               MathWorld--A Wolfram Web Resource.\n               http://mathworld.wolfram.com/HypergeometricDistribution.html\n        .. [3] Wikipedia, \"Hypergeometric-distribution\",\n               http://en.wikipedia.org/wiki/Hypergeometric-distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> ngood, nbad, nsamp = 100, 2, 10\n        # number of good, number of bad, and number of samples\n        >>> s = np.random.hypergeometric(ngood, nbad, nsamp, 1000)\n        >>> hist(s)\n        #   note that it is very unlikely to grab both bad items\n\n        Suppose you have an urn with 15 white and 15 black marbles.\n        If you pull 15 marbles at random, how likely is it that\n        12 or more of them are one color?\n\n        >>> s = np.random.hypergeometric(15, 15, 15, 100000)\n        >>> sum(s>=12)/100000. + sum(s<=3)/100000.\n        #   answer = 0.003 ... pretty unlikely!\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_91hypergeometric(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_ngood = 0;
-   PyObject *__pyx_v_nbad = 0;
-   PyObject *__pyx_v_nsample = 0;
-   PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_ongood = 0;
--  PyArrayObject *__pyx_v_onbad = 0;
--  PyArrayObject *__pyx_v_onsample = 0;
--  long __pyx_v_lngood;
--  long __pyx_v_lnbad;
--  long __pyx_v_lnsample;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  PyObject *__pyx_t_6 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ngood,&__pyx_n_s__nbad,&__pyx_n_s__nsample,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("hypergeometric");
-+  __Pyx_RefNannySetupContext("hypergeometric (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ngood,&__pyx_n_s__nbad,&__pyx_n_s__nsample,&__pyx_n_s__size,0};
-     PyObject* values[4] = {0,0,0,0};
-+
-+    /* "mtrand.pyx":3669
-+ *         return discd_array(self.internal_state, rk_geometric, size, op)
-+ * 
-+ *     def hypergeometric(self, ngood, nbad, nsample, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         hypergeometric(ngood, nbad, nsample, size=None)
-+ */
-     values[3] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-@@ -15628,20 +16205,17 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ngood);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ngood)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
--        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nbad);
--        if (likely(values[1])) kw_args--;
-+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nbad)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("hypergeometric", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3669; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-         case  2:
--        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nsample);
--        if (likely(values[2])) kw_args--;
-+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nsample)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("hypergeometric", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3669; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-@@ -15652,7 +16226,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "hypergeometric") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3669; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hypergeometric") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3669; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -15677,6 +16251,30 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_90hypergeometric(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_ngood, __pyx_v_nbad, __pyx_v_nsample, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_90hypergeometric(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_ngood, PyObject *__pyx_v_nbad, PyObject *__pyx_v_nsample, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_ongood = 0;
-+  PyArrayObject *__pyx_v_onbad = 0;
-+  PyArrayObject *__pyx_v_onsample = 0;
-+  long __pyx_v_lngood;
-+  long __pyx_v_lnbad;
-+  long __pyx_v_lnsample;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  PyObject *__pyx_t_6 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("hypergeometric", 0);
- 
-   /* "mtrand.pyx":3756
-  *         cdef long lngood, lnbad, lnsample
-@@ -15722,8 +16320,7 @@
-  *                 raise ValueError("ngood < 1")
-  *             if nbad < 1:
-  */
--    __pyx_t_2 = PyObject_RichCompare(__pyx_v_ngood, __pyx_int_1, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(__pyx_t_2);
-+    __pyx_t_2 = PyObject_RichCompare(__pyx_v_ngood, __pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     if (__pyx_t_1) {
-@@ -15740,9 +16337,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":3762
-  *             if ngood < 1:
-@@ -15751,8 +16348,7 @@
-  *                 raise ValueError("nbad < 1")
-  *             if nsample < 1:
-  */
--    __pyx_t_2 = PyObject_RichCompare(__pyx_v_nbad, __pyx_int_1, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(__pyx_t_2);
-+    __pyx_t_2 = PyObject_RichCompare(__pyx_v_nbad, __pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     if (__pyx_t_1) {
-@@ -15769,9 +16365,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
--    __pyx_L8:;
-+    __pyx_L5:;
- 
-     /* "mtrand.pyx":3764
-  *             if nbad < 1:
-@@ -15780,8 +16376,7 @@
-  *                 raise ValueError("nsample < 1")
-  *             if ngood + nbad < nsample:
-  */
--    __pyx_t_2 = PyObject_RichCompare(__pyx_v_nsample, __pyx_int_1, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(__pyx_t_2);
-+    __pyx_t_2 = PyObject_RichCompare(__pyx_v_nsample, __pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     if (__pyx_t_1) {
-@@ -15798,9 +16393,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L9;
-+      goto __pyx_L6;
-     }
--    __pyx_L9:;
-+    __pyx_L6:;
- 
-     /* "mtrand.pyx":3766
-  *             if nsample < 1:
-@@ -15811,8 +16406,7 @@
-  */
-     __pyx_t_2 = PyNumber_Add(__pyx_v_ngood, __pyx_v_nbad); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
--    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_nsample, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(__pyx_t_3);
-+    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_nsample, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-@@ -15830,9 +16424,9 @@
-       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L10;
-+      goto __pyx_L7;
-     }
--    __pyx_L10:;
-+    __pyx_L7:;
- 
-     /* "mtrand.pyx":3768
-  *             if ngood + nbad < nsample:
-@@ -15850,14 +16444,14 @@
-  * 
-  * 
-  */
--    __pyx_t_3 = __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 (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_3 = __pyx_f_6mtrand_discnmN_array_sc(__pyx_v_self->internal_state, rk_hypergeometric, __pyx_v_size, __pyx_v_lngood, __pyx_v_lnbad, __pyx_v_lnsample); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_3);
-     __pyx_r = __pyx_t_3;
-     __pyx_t_3 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":3772
-  * 
-@@ -15925,7 +16519,7 @@
-   __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+  __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_INCREF(((PyObject *)__pyx_v_ongood));
-   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_ongood));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_ongood));
-@@ -15937,7 +16531,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+  __Pyx_GOTREF(__pyx_t_3);
-   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
-   __Pyx_GIVEREF(__pyx_t_5);
-   __pyx_t_5 = 0;
-@@ -15961,9 +16555,9 @@
-     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L11;
-+    goto __pyx_L8;
-   }
--  __pyx_L11:;
-+  __pyx_L8:;
- 
-   /* "mtrand.pyx":3779
-  *         if np.any(np.less(ongood, 1)):
-@@ -15983,7 +16577,7 @@
-   __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_onbad));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_onbad));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_onbad));
-@@ -15995,7 +16589,7 @@
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
-   __Pyx_GIVEREF(__pyx_t_4);
-   __pyx_t_4 = 0;
-@@ -16019,9 +16613,9 @@
-     __Pyx_Raise(__pyx_t_4, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L12;
-+    goto __pyx_L9;
-   }
--  __pyx_L12:;
-+  __pyx_L9:;
- 
-   /* "mtrand.pyx":3781
-  *         if np.any(np.less(onbad, 1)):
-@@ -16041,7 +16635,7 @@
-   __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(((PyObject *)__pyx_v_onsample));
-   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_onsample));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_onsample));
-@@ -16053,7 +16647,7 @@
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -16077,9 +16671,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L13;
-+    goto __pyx_L10;
-   }
--  __pyx_L13:;
-+  __pyx_L10:;
- 
-   /* "mtrand.pyx":3783
-  *         if np.any(np.less(onsample, 1)):
-@@ -16104,7 +16698,7 @@
-   __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_INCREF(((PyObject *)__pyx_v_ongood));
-   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_ongood));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_ongood));
-@@ -16116,7 +16710,7 @@
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
-   __Pyx_GIVEREF(__pyx_t_6);
-   __Pyx_INCREF(((PyObject *)__pyx_v_onsample));
-@@ -16128,7 +16722,7 @@
-   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
-   __Pyx_GIVEREF(__pyx_t_6);
-   __pyx_t_6 = 0;
-@@ -16152,9 +16746,9 @@
-     __Pyx_Raise(__pyx_t_6, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L14;
-+    goto __pyx_L11;
-   }
--  __pyx_L14:;
-+  __pyx_L11:;
- 
-   /* "mtrand.pyx":3785
-  *         if np.any(np.less(np.add(ongood, onbad),onsample)):
-@@ -16172,7 +16766,7 @@
-  * 
-  *     def logseries(self, p, size=None):
-  */
--  __pyx_t_6 = __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 (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_6 = __pyx_f_6mtrand_discnmN_array(__pyx_v_self->internal_state, rk_hypergeometric, __pyx_v_size, __pyx_v_ongood, __pyx_v_onbad, __pyx_v_onsample); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_6);
-   __pyx_r = __pyx_t_6;
-   __pyx_t_6 = 0;
-@@ -16197,49 +16791,40 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":3788
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_93logseries(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_92logseries[] = "\n        logseries(p, size=None)\n\n        Draw samples from a Logarithmic Series distribution.\n\n        Samples are drawn from a Log Series distribution with specified\n        parameter, p (probability, 0 < p < 1).\n\n        Parameters\n        ----------\n        loc : float\n\n        scale : float > 0.\n\n        size : {tuple, int}\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : {ndarray, scalar}\n                  where the values are all integers in  [0, n].\n\n        See Also\n        --------\n        scipy.stats.distributions.logser : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Log Series distribution is\n\n        .. math:: P(k) = \\frac{-p^k}{k \\ln(1-p)},\n\n        where p = probability.\n\n        The Log Series distribution is frequently used to represent species\n        richness and occurrence, first proposed by Fisher, Corbet, and\n        Williams in 1943 [2].  It may also be used to model the numbers of\n        occupants seen in cars [3].\n\n        References\n        ----------\n        .. [1] Buzas, Martin A.; Culver, Stephen J.,  Understanding regional\n               species diversity through the log series distribution of\n               occurrences: BIODIVERSITY RESEARCH Diversity & Distributions,\n               Volume 5, Number 5, September 1999 , pp. 187-195(9).\n        .. [2] Fisher, R.A,, A.S. Corbet, and C.B. Williams. 1943. The\n               relation between the number of species and the number of\n               individuals in a random sample of an animal population.\n               Journal of Animal Ecology, 12:42-58.\n        .. [3] D. J. Hand, F. Daly, D. Lunn, E. Ostrowski, A Handbook of Small\n               Data Sets, CRC Press, 1994.\n        .. [4] Wikipedia, \"Log""arithmic-distribution\",\n               http://en.wikipedia.org/wiki/Logarithmic-distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> a = .6\n        >>> s = np.random.logseries(a, 10000)\n        >>> count, bins, ignored = plt.hist(s)\n\n        #   plot against distribution\n\n        >>> def logseries(k, p):\n        ...     return -p**k/(k*log(1-p))\n        >>> plt.plot(bins, logseries(bins, a)*count.max()/\n                     logseries(bins, a).max(), 'r')\n        >>> plt.show()\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_93logseries(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_p = 0;
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("logseries (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__p,&__pyx_n_s__size,0};
-+    PyObject* values[2] = {0,0};
-+
-+    /* "mtrand.pyx":3788
-  *             ongood, onbad, onsample)
-  * 
-  *     def logseries(self, p, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         logseries(p, size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_46logseries(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_46logseries[] = "\n        logseries(p, size=None)\n\n        Draw samples from a Logarithmic Series distribution.\n\n        Samples are drawn from a Log Series distribution with specified\n        parameter, p (probability, 0 < p < 1).\n\n        Parameters\n        ----------\n        loc : float\n\n        scale : float > 0.\n\n        size : {tuple, int}\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.\n\n        Returns\n        -------\n        samples : {ndarray, scalar}\n                  where the values are all integers in  [0, n].\n\n        See Also\n        --------\n        scipy.stats.distributions.logser : probability density function,\n            distribution or cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Log Series distribution is\n\n        .. math:: P(k) = \\frac{-p^k}{k \\ln(1-p)},\n\n        where p = probability.\n\n        The Log Series distribution is frequently used to represent species\n        richness and occurrence, first proposed by Fisher, Corbet, and\n        Williams in 1943 [2].  It may also be used to model the numbers of\n        occupants seen in cars [3].\n\n        References\n        ----------\n        .. [1] Buzas, Martin A.; Culver, Stephen J.,  Understanding regional\n               species diversity through the log series distribution of\n               occurrences: BIODIVERSITY RESEARCH Diversity & Distributions,\n               Volume 5, Number 5, September 1999 , pp. 187-195(9).\n        .. [2] Fisher, R.A,, A.S. Corbet, and C.B. Williams. 1943. The\n               relation between the number of species and the number of\n               individuals in a random sample of an animal population.\n               Journal of Animal Ecology, 12:42-58.\n        .. [3] D. J. Hand, F. Daly, D. Lunn, E. Ostrowski, A Handbook of Small\n               Data Sets, CRC Press, 1994.\n        .. [4] Wikipedia, \"Log""arithmic-distribution\",\n               http://en.wikipedia.org/wiki/Logarithmic-distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> a = .6\n        >>> s = np.random.logseries(a, 10000)\n        >>> count, bins, ignored = plt.hist(s)\n\n        #   plot against distribution\n\n        >>> def logseries(k, p):\n        ...     return -p**k/(k*log(1-p))\n        >>> plt.plot(bins, logseries(bins, a)*count.max()/\n                     logseries(bins, a).max(), 'r')\n        >>> plt.show()\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_46logseries(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_p = 0;
--  PyObject *__pyx_v_size = 0;
--  PyArrayObject *__pyx_v_op = 0;
--  double __pyx_v_fp;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  int __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__p,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("logseries");
--  {
--    PyObject* values[2] = {0,0};
-     values[1] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__p);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__p)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
-         if (kw_args > 0) {
-@@ -16248,7 +16833,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "logseries") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3788; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "logseries") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3788; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -16269,6 +16854,25 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_92logseries(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_p, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_92logseries(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_p, PyObject *__pyx_v_size) {
-+  PyArrayObject *__pyx_v_op = 0;
-+  double __pyx_v_fp;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  int __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("logseries", 0);
- 
-   /* "mtrand.pyx":3865
-  *         cdef double fp
-@@ -16311,9 +16915,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L7;
-+      goto __pyx_L4;
-     }
--    __pyx_L7:;
-+    __pyx_L4:;
- 
-     /* "mtrand.pyx":3869
-  *             if fp <= 0.0:
-@@ -16337,9 +16941,9 @@
-       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-       {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      goto __pyx_L8;
-+      goto __pyx_L5;
-     }
--    __pyx_L8:;
-+    __pyx_L5:;
- 
-     /* "mtrand.pyx":3871
-  *             if fp >= 1.0:
-@@ -16349,14 +16953,14 @@
-  *         PyErr_Clear()
-  */
-     __Pyx_XDECREF(__pyx_r);
--    __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = __pyx_f_6mtrand_discd_array_sc(__pyx_v_self->internal_state, rk_logseries, __pyx_v_size, __pyx_v_fp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_r = __pyx_t_2;
-     __pyx_t_2 = 0;
-     goto __pyx_L0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":3873
-  *             return discd_array_sc(self.internal_state, rk_logseries, size, fp)
-@@ -16400,7 +17004,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_INCREF(((PyObject *)__pyx_v_op));
-   PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_op));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_op));
-@@ -16412,7 +17016,7 @@
-   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
-   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
-+  __Pyx_GOTREF(__pyx_t_5);
-   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -16436,9 +17040,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L9;
-+    goto __pyx_L6;
-   }
--  __pyx_L9:;
-+  __pyx_L6:;
- 
-   /* "mtrand.pyx":3878
-  *         if np.any(np.less_equal(op, 0.0)):
-@@ -16460,7 +17064,7 @@
-   __pyx_t_2 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(((PyObject *)__pyx_v_op));
-   PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_op));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_op));
-@@ -16472,7 +17076,7 @@
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
-   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -16496,9 +17100,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L10;
-+    goto __pyx_L7;
-   }
--  __pyx_L10:;
-+  __pyx_L7:;
- 
-   /* "mtrand.pyx":3880
-  *         if np.any(np.greater_equal(op, 1.0)):
-@@ -16508,7 +17112,7 @@
-  *     # Multivariate distributions:
-  */
-   __Pyx_XDECREF(__pyx_r);
--  __pyx_t_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 (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = __pyx_f_6mtrand_discd_array(__pyx_v_self->internal_state, rk_logseries, __pyx_v_size, __pyx_v_op); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_r = __pyx_t_2;
-   __pyx_t_2 = 0;
-@@ -16530,51 +17134,32 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":3883
-- * 
-- *     # Multivariate distributions:
-- *     def multivariate_normal(self, mean, cov, size=None):             # <<<<<<<<<<<<<<
-- *         """
-- *         multivariate_normal(mean, cov[, size])
-- */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_47multivariate_normal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_47multivariate_normal[] = "\n        multivariate_normal(mean, cov[, size])\n\n        Draw random samples from a multivariate normal distribution.\n\n        The multivariate normal, multinormal or Gaussian distribution is a\n        generalization of the one-dimensional normal distribution to higher\n        dimensions.  Such a distribution is specified by its mean and\n        covariance matrix.  These parameters are analogous to the mean\n        (average or \"center\") and variance (standard deviation, or \"width,\"\n        squared) of the one-dimensional normal distribution.\n\n        Parameters\n        ----------\n        mean : 1-D array_like, of length N\n            Mean of the N-dimensional distribution.\n        cov : 2-D array_like, of shape (N, N)\n            Covariance matrix of the distribution.  Must be symmetric and\n            positive semi-definite for \"physically meaningful\" results.\n        size : tuple of ints, optional\n            Given a shape of, for example, ``(m,n,k)``, ``m*n*k`` samples are\n            generated, and packed in an `m`-by-`n`-by-`k` arrangement.  Because\n            each sample is `N`-dimensional, the output shape is ``(m,n,k,N)``.\n            If no shape is specified, a single (`N`-D) sample is returned.\n\n        Returns\n        -------\n        out : ndarray\n            The drawn samples, of shape *size*, if that was provided.  If not,\n            the shape is ``(N,)``.\n\n            In other words, each entry ``out[i,j,...,:]`` is an N-dimensional\n            value drawn from the distribution.\n\n        Notes\n        -----\n        The mean is a coordinate in N-dimensional space, which represents the\n        location where samples are most likely to be generated.  This is\n        analogous to the peak of the bell curve for the one-dimensional or\n        univariate normal distribution.\n\n        Covariance indicates the level to which two variables vary together.\n        From the multivariate normal distribution, we draw ""N-dimensional\n        samples, :math:`X = [x_1, x_2, ... x_N]`.  The covariance matrix\n        element :math:`C_{ij}` is the covariance of :math:`x_i` and :math:`x_j`.\n        The element :math:`C_{ii}` is the variance of :math:`x_i` (i.e. its\n        \"spread\").\n\n        Instead of specifying the full covariance matrix, popular\n        approximations include:\n\n          - Spherical covariance (*cov* is a multiple of the identity matrix)\n          - Diagonal covariance (*cov* has non-negative elements, and only on\n            the diagonal)\n\n        This geometrical property can be seen in two dimensions by plotting\n        generated data-points:\n\n        >>> mean = [0,0]\n        >>> cov = [[1,0],[0,100]] # diagonal covariance, points lie on x or y-axis\n\n        >>> import matplotlib.pyplot as plt\n        >>> x,y = np.random.multivariate_normal(mean,cov,5000).T\n        >>> plt.plot(x,y,'x'); plt.axis('equal'); plt.show()\n\n        Note that the covariance matrix must be non-negative definite.\n\n        References\n        ----------\n        Papoulis, A., *Probability, Random Variables, and Stochastic Processes*,\n        3rd ed., New York: McGraw-Hill, 1991.\n\n        Duda, R. O., Hart, P. E., and Stork, D. G., *Pattern Classification*,\n        2nd ed., New York: Wiley, 2001.\n\n        Examples\n        --------\n        >>> mean = (1,2)\n        >>> cov = [[1,0],[1,0]]\n        >>> x = np.random.multivariate_normal(mean,cov,(3,3))\n        >>> x.shape\n        (3, 3, 2)\n\n        The following is probably true, given that 0.6 is roughly twice the\n        standard deviation:\n\n        >>> print list( (x[0,0,:] - mean) < 0.6 )\n        [True, True]\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_47multivariate_normal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_95multivariate_normal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_94multivariate_normal[] = "\n        multivariate_normal(mean, cov[, size])\n\n        Draw random samples from a multivariate normal distribution.\n\n        The multivariate normal, multinormal or Gaussian distribution is a\n        generalization of the one-dimensional normal distribution to higher\n        dimensions.  Such a distribution is specified by its mean and\n        covariance matrix.  These parameters are analogous to the mean\n        (average or \"center\") and variance (standard deviation, or \"width,\"\n        squared) of the one-dimensional normal distribution.\n\n        Parameters\n        ----------\n        mean : 1-D array_like, of length N\n            Mean of the N-dimensional distribution.\n        cov : 2-D array_like, of shape (N, N)\n            Covariance matrix of the distribution.  Must be symmetric and\n            positive semi-definite for \"physically meaningful\" results.\n        size : tuple of ints, optional\n            Given a shape of, for example, ``(m,n,k)``, ``m*n*k`` samples are\n            generated, and packed in an `m`-by-`n`-by-`k` arrangement.  Because\n            each sample is `N`-dimensional, the output shape is ``(m,n,k,N)``.\n            If no shape is specified, a single (`N`-D) sample is returned.\n\n        Returns\n        -------\n        out : ndarray\n            The drawn samples, of shape *size*, if that was provided.  If not,\n            the shape is ``(N,)``.\n\n            In other words, each entry ``out[i,j,...,:]`` is an N-dimensional\n            value drawn from the distribution.\n\n        Notes\n        -----\n        The mean is a coordinate in N-dimensional space, which represents the\n        location where samples are most likely to be generated.  This is\n        analogous to the peak of the bell curve for the one-dimensional or\n        univariate normal distribution.\n\n        Covariance indicates the level to which two variables vary together.\n        From the multivariate normal distribution, we draw ""N-dimensional\n        samples, :math:`X = [x_1, x_2, ... x_N]`.  The covariance matrix\n        element :math:`C_{ij}` is the covariance of :math:`x_i` and :math:`x_j`.\n        The element :math:`C_{ii}` is the variance of :math:`x_i` (i.e. its\n        \"spread\").\n\n        Instead of specifying the full covariance matrix, popular\n        approximations include:\n\n          - Spherical covariance (*cov* is a multiple of the identity matrix)\n          - Diagonal covariance (*cov* has non-negative elements, and only on\n            the diagonal)\n\n        This geometrical property can be seen in two dimensions by plotting\n        generated data-points:\n\n        >>> mean = [0,0]\n        >>> cov = [[1,0],[0,100]] # diagonal covariance, points lie on x or y-axis\n\n        >>> import matplotlib.pyplot as plt\n        >>> x,y = np.random.multivariate_normal(mean,cov,5000).T\n        >>> plt.plot(x,y,'x'); plt.axis('equal'); plt.show()\n\n        Note that the covariance matrix must be non-negative definite.\n\n        References\n        ----------\n        Papoulis, A., *Probability, Random Variables, and Stochastic Processes*,\n        3rd ed., New York: McGraw-Hill, 1991.\n\n        Duda, R. O., Hart, P. E., and Stork, D. G., *Pattern Classification*,\n        2nd ed., New York: Wiley, 2001.\n\n        Examples\n        --------\n        >>> mean = (1,2)\n        >>> cov = [[1,0],[1,0]]\n        >>> x = np.random.multivariate_normal(mean,cov,(3,3))\n        >>> x.shape\n        (3, 3, 2)\n\n        The following is probably true, given that 0.6 is roughly twice the\n        standard deviation:\n\n        >>> print list( (x[0,0,:] - mean) < 0.6 )\n        [True, True]\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_95multivariate_normal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-   PyObject *__pyx_v_mean = 0;
-   PyObject *__pyx_v_cov = 0;
-   PyObject *__pyx_v_size = 0;
--  PyObject *__pyx_v_shape = NULL;
--  PyObject *__pyx_v_final_shape = NULL;
--  PyObject *__pyx_v_x = NULL;
--  PyObject *__pyx_v_svd = NULL;
--  PyObject *__pyx_v_u = NULL;
--  PyObject *__pyx_v_s = NULL;
--  PyObject *__pyx_v_v = NULL;
--  PyObject *__pyx_r = NULL;
-+  PyObject *__pyx_r = 0;
-   __Pyx_RefNannyDeclarations
--  PyObject *__pyx_t_1 = NULL;
--  PyObject *__pyx_t_2 = NULL;
--  PyObject *__pyx_t_3 = NULL;
--  int __pyx_t_4;
--  Py_ssize_t __pyx_t_5;
--  int __pyx_t_6;
--  int __pyx_t_7;
--  int __pyx_t_8;
--  PyObject *__pyx_t_9 = NULL;
--  PyObject *__pyx_t_10 = NULL;
--  PyObject *(*__pyx_t_11)(PyObject *);
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mean,&__pyx_n_s__cov,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("multivariate_normal");
-+  __Pyx_RefNannySetupContext("multivariate_normal (wrapper)", 0);
-   {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mean,&__pyx_n_s__cov,&__pyx_n_s__size,0};
-     PyObject* values[3] = {0,0,0};
-+
-+    /* "mtrand.pyx":3883
-+ * 
-+ *     # Multivariate distributions:
-+ *     def multivariate_normal(self, mean, cov, size=None):             # <<<<<<<<<<<<<<
-+ *         """
-+ *         multivariate_normal(mean, cov[, size])
-+ */
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -16582,14 +17167,12 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mean);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mean)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
--        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cov);
--        if (likely(values[1])) kw_args--;
-+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cov)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("multivariate_normal", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3883; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-@@ -16600,7 +17183,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "multivariate_normal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3883; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "multivariate_normal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3883; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -16623,6 +17206,36 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_94multivariate_normal(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_mean, __pyx_v_cov, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_94multivariate_normal(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_mean, PyObject *__pyx_v_cov, PyObject *__pyx_v_size) {
-+  PyObject *__pyx_v_shape = NULL;
-+  PyObject *__pyx_v_final_shape = NULL;
-+  PyObject *__pyx_v_x = NULL;
-+  PyObject *__pyx_v_svd = NULL;
-+  CYTHON_UNUSED PyObject *__pyx_v_u = NULL;
-+  PyObject *__pyx_v_s = NULL;
-+  PyObject *__pyx_v_v = NULL;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  PyObject *__pyx_t_1 = NULL;
-+  PyObject *__pyx_t_2 = NULL;
-+  PyObject *__pyx_t_3 = NULL;
-+  int __pyx_t_4;
-+  Py_ssize_t __pyx_t_5;
-+  int __pyx_t_6;
-+  int __pyx_t_7;
-+  int __pyx_t_8;
-+  PyObject *__pyx_t_9 = NULL;
-+  PyObject *__pyx_t_10 = NULL;
-+  PyObject *(*__pyx_t_11)(PyObject *);
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("multivariate_normal", 0);
-   __Pyx_INCREF(__pyx_v_mean);
-   __Pyx_INCREF(__pyx_v_cov);
- 
-@@ -16639,7 +17252,7 @@
-   __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-+  __Pyx_GOTREF(__pyx_t_1);
-   __Pyx_INCREF(__pyx_v_mean);
-   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mean);
-   __Pyx_GIVEREF(__pyx_v_mean);
-@@ -16664,7 +17277,7 @@
-   __Pyx_GOTREF(__pyx_t_1);
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+  __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_INCREF(__pyx_v_cov);
-   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_cov);
-   __Pyx_GIVEREF(__pyx_v_cov);
-@@ -16694,10 +17307,10 @@
-  *             shape = size
-  */
-     __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __pyx_v_shape = ((PyObject *)__pyx_t_2);
-     __pyx_t_2 = 0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
-   /*else*/ {
- 
-@@ -16711,7 +17324,7 @@
-     __Pyx_INCREF(__pyx_v_size);
-     __pyx_v_shape = __pyx_v_size;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":3981
-  *         else:
-@@ -16739,9 +17352,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L7;
-+    goto __pyx_L4;
-   }
--  __pyx_L7:;
-+  __pyx_L4:;
- 
-   /* "mtrand.pyx":3983
-  *         if len(mean.shape) != 1:
-@@ -16766,8 +17379,7 @@
-     __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_1);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
--    __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(__pyx_t_2);
-+    __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-     __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-@@ -16790,9 +17402,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L8;
-+    goto __pyx_L5;
-   }
--  __pyx_L8:;
-+  __pyx_L5:;
- 
-   /* "mtrand.pyx":3985
-  *         if (len(cov.shape) != 2) or (cov.shape[0] != cov.shape[1]):
-@@ -16811,8 +17423,7 @@
-   __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
--  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(__pyx_t_2);
-+  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-@@ -16831,9 +17442,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L9;
-+    goto __pyx_L6;
-   }
--  __pyx_L9:;
-+  __pyx_L6:;
- 
-   /* "mtrand.pyx":3988
-  *                raise ValueError("mean and cov must have same length")
-@@ -16856,16 +17467,16 @@
-  *         final_shape.append(mean.shape[0])
-  */
-     __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_shape);
-     PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
-     __Pyx_GIVEREF(__pyx_v_shape);
-     __Pyx_DECREF(__pyx_v_shape);
-     __pyx_v_shape = ((PyObject *)__pyx_t_2);
-     __pyx_t_2 = 0;
--    goto __pyx_L10;
-+    goto __pyx_L7;
-   }
--  __pyx_L10:;
-+  __pyx_L7:;
- 
-   /* "mtrand.pyx":3990
-  *         if isinstance(shape, int):
-@@ -16877,7 +17488,7 @@
-   __pyx_t_2 = __Pyx_PySequence_GetSlice(__pyx_v_shape, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+  __Pyx_GOTREF(__pyx_t_3);
-   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
-   __Pyx_GIVEREF(__pyx_t_2);
-   __pyx_t_2 = 0;
-@@ -16894,9 +17505,6 @@
-  *         # Create a matrix of independent standard normally distributed random
-  *         # numbers. The matrix has rows with the same length as mean and as
-  */
--  if (unlikely(((PyObject *)__pyx_v_final_shape) == Py_None)) {
--    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
--  }
-   __pyx_t_2 = PyObject_GetAttr(__pyx_v_mean, __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-@@ -16912,7 +17520,7 @@
-  *         x.shape = (np.multiply.reduce(final_shape[0:len(final_shape)-1]),
-  *                    mean.shape[0])
-  */
--  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__standard_normal); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__standard_normal); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_3);
-   __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-@@ -16923,7 +17531,7 @@
-   __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-+  __Pyx_GOTREF(__pyx_t_1);
-   __Pyx_INCREF(((PyObject *)__pyx_v_final_shape));
-   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_final_shape));
-   __Pyx_GIVEREF(((PyObject *)__pyx_v_final_shape));
-@@ -16932,7 +17540,7 @@
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-+  __Pyx_GOTREF(__pyx_t_1);
-   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
-   __Pyx_GIVEREF(__pyx_t_9);
-   __pyx_t_9 = 0;
-@@ -16958,14 +17566,11 @@
-   __pyx_t_9 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__reduce); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_9);
-   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--  if (unlikely(((PyObject *)__pyx_v_final_shape) == Py_None)) {
--    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
--  }
--  __pyx_t_5 = PyList_GET_SIZE(((PyObject *)__pyx_v_final_shape)); 
-+  __pyx_t_5 = PyList_GET_SIZE(((PyObject *)__pyx_v_final_shape)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __pyx_t_1 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_final_shape), 0, (__pyx_t_5 - 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+  __Pyx_GOTREF(__pyx_t_3);
-   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1));
-   __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
-   __pyx_t_1 = 0;
-@@ -16987,7 +17592,7 @@
-   __Pyx_GOTREF(__pyx_t_9);
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+  __Pyx_GOTREF(__pyx_t_3);
-   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
-   __Pyx_GIVEREF(__pyx_t_1);
-   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_9);
-@@ -17013,14 +17618,18 @@
-  *         (u,s,v) = svd(cov)
-  */
-   __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+  __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_INCREF(((PyObject *)__pyx_n_s__svd));
-   PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__svd));
-   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__svd));
-   __pyx_t_9 = __Pyx_Import(((PyObject *)__pyx_n_s_166), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_9);
-   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
--  __pyx_t_3 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__svd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_3 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__svd);
-+  if (__pyx_t_3 == NULL) {
-+    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__svd);
-+    if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  }
-   __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_INCREF(__pyx_t_3);
-   __pyx_v_svd = __pyx_t_3;
-@@ -17035,7 +17644,7 @@
-  *         # The rows of x now have the correct covariance but mean 0. Add
-  */
-   __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-+  __Pyx_GOTREF(__pyx_t_9);
-   __Pyx_INCREF(__pyx_v_cov);
-   PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_cov);
-   __Pyx_GIVEREF(__pyx_v_cov);
-@@ -17044,21 +17653,22 @@
-   __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
-   if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
-     PyObject* sequence = __pyx_t_3;
-+    #if CYTHON_COMPILING_IN_CPYTHON
-+    Py_ssize_t size = Py_SIZE(sequence);
-+    #else
-+    Py_ssize_t size = PySequence_Size(sequence);
-+    #endif
-+    if (unlikely(size != 3)) {
-+      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
-+      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    }
-+    #if CYTHON_COMPILING_IN_CPYTHON
-     if (likely(PyTuple_CheckExact(sequence))) {
--      if (unlikely(PyTuple_GET_SIZE(sequence) != 3)) {
--        if (PyTuple_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
--        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
--        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      }
-       __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
-       __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
-       __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); 
-     } else {
--      if (unlikely(PyList_GET_SIZE(sequence) != 3)) {
--        if (PyList_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
--        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
--        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--      }
-       __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
-       __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
-       __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
-@@ -17066,28 +17676,35 @@
-     __Pyx_INCREF(__pyx_t_9);
-     __Pyx_INCREF(__pyx_t_1);
-     __Pyx_INCREF(__pyx_t_2);
-+    #else
-+    __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_2 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    #endif
-     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
--  } else {
-+  } else
-+  {
-     Py_ssize_t index = -1;
-     __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_10);
-     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-     __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
--    index = 0; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L11_unpacking_failed;
-+    index = 0; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L8_unpacking_failed;
-     __Pyx_GOTREF(__pyx_t_9);
--    index = 1; __pyx_t_1 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
-+    index = 1; __pyx_t_1 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_1)) goto __pyx_L8_unpacking_failed;
-     __Pyx_GOTREF(__pyx_t_1);
--    index = 2; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
-+    index = 2; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed;
-     __Pyx_GOTREF(__pyx_t_2);
-     if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+    __pyx_t_11 = NULL;
-     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
--    goto __pyx_L12_unpacking_done;
--    __pyx_L11_unpacking_failed:;
-+    goto __pyx_L9_unpacking_done;
-+    __pyx_L8_unpacking_failed:;
-     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
--    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
--    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
-+    __pyx_t_11 = NULL;
-+    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __pyx_L12_unpacking_done:;
-+    __pyx_L9_unpacking_done:;
-   }
-   __pyx_v_u = __pyx_t_9;
-   __pyx_t_9 = 0;
-@@ -17114,7 +17731,7 @@
-   __Pyx_GOTREF(__pyx_t_1);
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+  __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_INCREF(__pyx_v_s);
-   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_s);
-   __Pyx_GIVEREF(__pyx_v_s);
-@@ -17126,7 +17743,7 @@
-   __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-   __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
-+  __Pyx_GOTREF(__pyx_t_9);
-   PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3);
-   __Pyx_GIVEREF(__pyx_t_3);
-   __Pyx_INCREF(__pyx_v_v);
-@@ -17154,7 +17771,7 @@
-   __Pyx_GOTREF(__pyx_t_9);
-   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
-+  __Pyx_GOTREF(__pyx_t_3);
-   __Pyx_INCREF(__pyx_v_mean);
-   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_mean);
-   __Pyx_GIVEREF(__pyx_v_mean);
-@@ -17177,9 +17794,6 @@
-  *         return x
-  * 
-  */
--  if (unlikely(((PyObject *)__pyx_v_final_shape) == Py_None)) {
--    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
--  }
-   __pyx_t_2 = ((PyObject *)PyList_AsTuple(__pyx_v_final_shape)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-   if (PyObject_SetAttr(__pyx_v_x, __pyx_n_s__shape, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-@@ -17222,50 +17836,32 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":4015
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_97multinomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_96multinomial[] = "\n        multinomial(n, pvals, size=None)\n\n        Draw samples from a multinomial distribution.\n\n        The multinomial distribution is a multivariate generalisation of the\n        binomial distribution.  Take an experiment with one of ``p``\n        possible outcomes.  An example of such an experiment is throwing a dice,\n        where the outcome can be 1 through 6.  Each sample drawn from the\n        distribution represents `n` such experiments.  Its values,\n        ``X_i = [X_0, X_1, ..., X_p]``, represent the number of times the outcome\n        was ``i``.\n\n        Parameters\n        ----------\n        n : int\n            Number of experiments.\n        pvals : sequence of floats, length p\n            Probabilities of each of the ``p`` different outcomes.  These\n            should sum to 1 (however, the last element is always assumed to\n            account for the remaining probability, as long as\n            ``sum(pvals[:-1]) <= 1)``.\n        size : tuple of ints\n            Given a `size` of ``(M, N, K)``, then ``M*N*K`` samples are drawn,\n            and the output shape becomes ``(M, N, K, p)``, since each sample\n            has shape ``(p,)``.\n\n        Examples\n        --------\n        Throw a dice 20 times:\n\n        >>> np.random.multinomial(20, [1/6.]*6, size=1)\n        array([[4, 1, 7, 5, 2, 1]])\n\n        It landed 4 times on 1, once on 2, etc.\n\n        Now, throw the dice 20 times, and 20 times again:\n\n        >>> np.random.multinomial(20, [1/6.]*6, size=2)\n        array([[3, 4, 3, 3, 4, 3],\n               [2, 4, 3, 4, 0, 7]])\n\n        For the first run, we threw 3 times 1, 4 times 2, etc.  For the second,\n        we threw 2 times 1, 4 times 2, etc.\n\n        A loaded dice is more likely to land on number 6:\n\n        >>> np.random.multinomial(100, [1/7.]*5)\n        array([13, 16, 13, 16, 42])\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_97multinomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  npy_intp __pyx_v_n;
-+  PyObject *__pyx_v_pvals = 0;
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("multinomial (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__n,&__pyx_n_s__pvals,&__pyx_n_s__size,0};
-+    PyObject* values[3] = {0,0,0};
-+
-+    /* "mtrand.pyx":4015
-  *         return x
-  * 
-  *     def multinomial(self, npy_intp n, object pvals, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         multinomial(n, pvals, size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_48multinomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_48multinomial[] = "\n        multinomial(n, pvals, size=None)\n\n        Draw samples from a multinomial distribution.\n\n        The multinomial distribution is a multivariate generalisation of the\n        binomial distribution.  Take an experiment with one of ``p``\n        possible outcomes.  An example of such an experiment is throwing a dice,\n        where the outcome can be 1 through 6.  Each sample drawn from the\n        distribution represents `n` such experiments.  Its values,\n        ``X_i = [X_0, X_1, ..., X_p]``, represent the number of times the outcome\n        was ``i``.\n\n        Parameters\n        ----------\n        n : int\n            Number of experiments.\n        pvals : sequence of floats, length p\n            Probabilities of each of the ``p`` different outcomes.  These\n            should sum to 1 (however, the last element is always assumed to\n            account for the remaining probability, as long as\n            ``sum(pvals[:-1]) <= 1)``.\n        size : tuple of ints\n            Given a `size` of ``(M, N, K)``, then ``M*N*K`` samples are drawn,\n            and the output shape becomes ``(M, N, K, p)``, since each sample\n            has shape ``(p,)``.\n\n        Examples\n        --------\n        Throw a dice 20 times:\n\n        >>> np.random.multinomial(20, [1/6.]*6, size=1)\n        array([[4, 1, 7, 5, 2, 1]])\n\n        It landed 4 times on 1, once on 2, etc.\n\n        Now, throw the dice 20 times, and 20 times again:\n\n        >>> np.random.multinomial(20, [1/6.]*6, size=2)\n        array([[3, 4, 3, 3, 4, 3],\n               [2, 4, 3, 4, 0, 7]])\n\n        For the first run, we threw 3 times 1, 4 times 2, etc.  For the second,\n        we threw 2 times 1, 4 times 2, etc.\n\n        A loaded dice is more likely to land on number 6:\n\n        >>> np.random.multinomial(100, [1/7.]*5)\n        array([13, 16, 13, 16, 42])\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_48multinomial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  npy_intp __pyx_v_n;
--  PyObject *__pyx_v_pvals = 0;
--  PyObject *__pyx_v_size = 0;
--  npy_intp __pyx_v_d;
--  PyArrayObject *arrayObject_parr = 0;
--  PyArrayObject *arrayObject_mnarr = 0;
--  double *__pyx_v_pix;
--  long *__pyx_v_mnix;
--  npy_intp __pyx_v_i;
--  npy_intp __pyx_v_j;
--  npy_intp __pyx_v_dn;
--  double __pyx_v_Sum;
--  PyObject *__pyx_v_shape = NULL;
--  PyObject *__pyx_v_multin = NULL;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  Py_ssize_t __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  int __pyx_t_3;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  long __pyx_t_6;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__n,&__pyx_n_s__pvals,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("multinomial");
--  {
--    PyObject* values[3] = {0,0,0};
-     values[2] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -17273,14 +17869,12 @@
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__n);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__n)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
--        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pvals);
--        if (likely(values[1])) kw_args--;
-+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pvals)) != 0)) kw_args--;
-         else {
-           __Pyx_RaiseArgtupleInvalid("multinomial", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-         }
-@@ -17291,7 +17885,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "multinomial") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "multinomial") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -17314,6 +17908,35 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_96multinomial(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_n, __pyx_v_pvals, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_96multinomial(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, npy_intp __pyx_v_n, PyObject *__pyx_v_pvals, PyObject *__pyx_v_size) {
-+  npy_intp __pyx_v_d;
-+  PyArrayObject *arrayObject_parr = 0;
-+  PyArrayObject *arrayObject_mnarr = 0;
-+  double *__pyx_v_pix;
-+  long *__pyx_v_mnix;
-+  npy_intp __pyx_v_i;
-+  npy_intp __pyx_v_j;
-+  npy_intp __pyx_v_dn;
-+  double __pyx_v_Sum;
-+  PyObject *__pyx_v_shape = NULL;
-+  PyObject *__pyx_v_multin = NULL;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  Py_ssize_t __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  int __pyx_t_3;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  long __pyx_t_6;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("multinomial", 0);
- 
-   /* "mtrand.pyx":4074
-  *         cdef double Sum
-@@ -17369,9 +17992,9 @@
-     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":4081
-  *             raise ValueError("sum(pvals[:-1]) > 1.0")
-@@ -17393,13 +18016,13 @@
-     __pyx_t_2 = __Pyx_PyInt_to_py_npy_intp(__pyx_v_d); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+    __Pyx_GOTREF(__pyx_t_4);
-     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
-     __Pyx_GIVEREF(__pyx_t_2);
-     __pyx_t_2 = 0;
-     __pyx_v_shape = ((PyObject *)__pyx_t_4);
-     __pyx_t_4 = 0;
--    goto __pyx_L7;
-+    goto __pyx_L4;
-   }
- 
-   /* "mtrand.pyx":4083
-@@ -17422,7 +18045,7 @@
-     __pyx_t_4 = __Pyx_PyInt_to_py_npy_intp(__pyx_v_d); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_4);
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -17431,7 +18054,7 @@
-     __pyx_t_4 = 0;
-     __pyx_v_shape = ((PyObject *)__pyx_t_2);
-     __pyx_t_2 = 0;
--    goto __pyx_L7;
-+    goto __pyx_L4;
-   }
-   /*else*/ {
- 
-@@ -17445,7 +18068,7 @@
-     __pyx_t_2 = __Pyx_PyInt_to_py_npy_intp(__pyx_v_d); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+    __Pyx_GOTREF(__pyx_t_4);
-     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
-     __Pyx_GIVEREF(__pyx_t_2);
-     __pyx_t_2 = 0;
-@@ -17455,7 +18078,7 @@
-     __pyx_v_shape = __pyx_t_2;
-     __pyx_t_2 = 0;
-   }
--  __pyx_L7:;
-+  __pyx_L4:;
- 
-   /* "mtrand.pyx":4088
-  *             shape = size + (d,)
-@@ -17470,7 +18093,7 @@
-   __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_INCREF(__pyx_v_shape);
-   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
-   __Pyx_GIVEREF(__pyx_v_shape);
-@@ -17562,7 +18185,7 @@
-         PyErr_Format(PyExc_ZeroDivisionError, "float division");
-         {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-       }
--      (__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));
-+      (__pyx_v_mnix[(__pyx_v_i + __pyx_v_j)]) = rk_binomial(__pyx_v_self->internal_state, __pyx_v_dn, ((__pyx_v_pix[__pyx_v_j]) / __pyx_v_Sum));
- 
-       /* "mtrand.pyx":4097
-  *             for j from 0 <= j < d-1:
-@@ -17590,10 +18213,10 @@
-  *                 Sum = Sum - pix[j]
-  *             if dn > 0:
-  */
--        goto __pyx_L11_break;
--        goto __pyx_L12;
-+        goto __pyx_L8_break;
-+        goto __pyx_L9;
-       }
--      __pyx_L12:;
-+      __pyx_L9:;
- 
-       /* "mtrand.pyx":4100
-  *                 if dn <= 0:
-@@ -17604,7 +18227,7 @@
-  */
-       __pyx_v_Sum = (__pyx_v_Sum - (__pyx_v_pix[__pyx_v_j]));
-     }
--    __pyx_L11_break:;
-+    __pyx_L8_break:;
- 
-     /* "mtrand.pyx":4101
-  *                     break
-@@ -17624,9 +18247,9 @@
-  *             i = i + d
-  */
-       (__pyx_v_mnix[((__pyx_v_i + __pyx_v_d) - 1)]) = __pyx_v_dn;
--      goto __pyx_L13;
-+      goto __pyx_L10;
-     }
--    __pyx_L13:;
-+    __pyx_L10:;
- 
-     /* "mtrand.pyx":4104
-  *                 mnix[i+d-1] = dn
-@@ -17668,60 +18291,40 @@
-   return __pyx_r;
- }
- 
--/* "mtrand.pyx":4108
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_99dirichlet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_98dirichlet[] = "\n        dirichlet(alpha, size=None)\n\n        Draw samples from the Dirichlet distribution.\n\n        Draw `size` samples of dimension k from a Dirichlet distribution. A\n        Dirichlet-distributed random variable can be seen as a multivariate\n        generalization of a Beta distribution. Dirichlet pdf is the conjugate\n        prior of a multinomial in Bayesian inference.\n\n        Parameters\n        ----------\n        alpha : array\n            Parameter of the distribution (k dimension for sample of\n            dimension k).\n        size : array\n            Number of samples to draw.\n\n        Returns\n        -------\n        samples : ndarray,\n            The drawn samples, of shape (alpha.ndim, size).\n\n        Notes\n        -----\n        .. math:: X \\approx \\prod_{i=1}^{k}{x^{\\alpha_i-1}_i}\n\n        Uses the following property for computation: for each dimension,\n        draw a random sample y_i from a standard gamma generator of shape\n        `alpha_i`, then\n        :math:`X = \\frac{1}{\\sum_{i=1}^k{y_i}} (y_1, \\ldots, y_n)` is\n        Dirichlet distributed.\n\n        References\n        ----------\n        .. [1] David McKay, \"Information Theory, Inference and Learning\n               Algorithms,\" chapter 23,\n               http://www.inference.phy.cam.ac.uk/mackay/\n        .. [2] Wikipedia, \"Dirichlet distribution\",\n               http://en.wikipedia.org/wiki/Dirichlet_distribution\n\n        Examples\n        --------\n        Taking an example cited in Wikipedia, this distribution can be used if\n        one wanted to cut strings (each of initial length 1.0) into K pieces\n        with different lengths, where each piece had, on average, a designated\n        average length, but allowing some variation in the relative sizes of the\n        pieces.\n\n        >>> s = np.random.dirichlet((10, 5, 3), 20).transpose()\n\n        >>> plt.barh(range(20), s[0])\n        >>> plt.barh(range(20), s[1], left=s[0], color='g')""\n        >>> plt.barh(range(20), s[2], left=s[0]+s[1], color='r')\n        >>> plt.title(\"Lengths of Strings\")\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_99dirichlet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+  PyObject *__pyx_v_alpha = 0;
-+  PyObject *__pyx_v_size = 0;
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("dirichlet (wrapper)", 0);
-+  {
-+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__alpha,&__pyx_n_s__size,0};
-+    PyObject* values[2] = {0,0};
-+
-+    /* "mtrand.pyx":4108
-  *         return multin
-  * 
-  *     def dirichlet(self, object alpha, size=None):             # <<<<<<<<<<<<<<
-  *         """
-  *         dirichlet(alpha, size=None)
-  */
--
--static PyObject *__pyx_pf_6mtrand_11RandomState_49dirichlet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_49dirichlet[] = "\n        dirichlet(alpha, size=None)\n\n        Draw samples from the Dirichlet distribution.\n\n        Draw `size` samples of dimension k from a Dirichlet distribution. A\n        Dirichlet-distributed random variable can be seen as a multivariate\n        generalization of a Beta distribution. Dirichlet pdf is the conjugate\n        prior of a multinomial in Bayesian inference.\n\n        Parameters\n        ----------\n        alpha : array\n            Parameter of the distribution (k dimension for sample of\n            dimension k).\n        size : array\n            Number of samples to draw.\n\n        Returns\n        -------\n        samples : ndarray,\n            The drawn samples, of shape (alpha.ndim, size).\n\n        Notes\n        -----\n        .. math:: X \\approx \\prod_{i=1}^{k}{x^{\\alpha_i-1}_i}\n\n        Uses the following property for computation: for each dimension,\n        draw a random sample y_i from a standard gamma generator of shape\n        `alpha_i`, then\n        :math:`X = \\frac{1}{\\sum_{i=1}^k{y_i}} (y_1, \\ldots, y_n)` is\n        Dirichlet distributed.\n\n        References\n        ----------\n        .. [1] David McKay, \"Information Theory, Inference and Learning\n               Algorithms,\" chapter 23,\n               http://www.inference.phy.cam.ac.uk/mackay/\n        .. [2] Wikipedia, \"Dirichlet distribution\",\n               http://en.wikipedia.org/wiki/Dirichlet_distribution\n\n        Examples\n        --------\n        Taking an example cited in Wikipedia, this distribution can be used if\n        one wanted to cut strings (each of initial length 1.0) into K pieces\n        with different lengths, where each piece had, on average, a designated\n        average length, but allowing some variation in the relative sizes of the\n        pieces.\n\n        >>> s = np.random.dirichlet((10, 5, 3), 20).transpose()\n\n        >>> plt.barh(range(20), s[0])\n        >>> plt.barh(range(20), s[1], left=s[0], color='g')""\n        >>> plt.barh(range(20), s[2], left=s[0]+s[1], color='r')\n        >>> plt.title(\"Lengths of Strings\")\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_49dirichlet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
--  PyObject *__pyx_v_alpha = 0;
--  PyObject *__pyx_v_size = 0;
--  npy_intp __pyx_v_k;
--  npy_intp __pyx_v_totsize;
--  PyArrayObject *__pyx_v_alpha_arr = 0;
--  PyArrayObject *__pyx_v_val_arr = 0;
--  double *__pyx_v_alpha_data;
--  double *__pyx_v_val_data;
--  npy_intp __pyx_v_i;
--  npy_intp __pyx_v_j;
--  double __pyx_v_acc;
--  double __pyx_v_invacc;
--  PyObject *__pyx_v_shape = NULL;
--  PyObject *__pyx_v_diric = NULL;
--  PyObject *__pyx_r = NULL;
--  __Pyx_RefNannyDeclarations
--  Py_ssize_t __pyx_t_1;
--  PyObject *__pyx_t_2 = NULL;
--  int __pyx_t_3;
--  PyObject *__pyx_t_4 = NULL;
--  PyObject *__pyx_t_5 = NULL;
--  npy_intp __pyx_t_6;
--  int __pyx_lineno = 0;
--  const char *__pyx_filename = NULL;
--  int __pyx_clineno = 0;
--  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__alpha,&__pyx_n_s__size,0};
--  __Pyx_RefNannySetupContext("dirichlet");
--  {
--    PyObject* values[2] = {0,0};
-     values[1] = ((PyObject *)Py_None);
-     if (unlikely(__pyx_kwds)) {
-       Py_ssize_t kw_args;
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+      switch (pos_args) {
-         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-         case  0: break;
-         default: goto __pyx_L5_argtuple_error;
-       }
-       kw_args = PyDict_Size(__pyx_kwds);
--      switch (PyTuple_GET_SIZE(__pyx_args)) {
-+      switch (pos_args) {
-         case  0:
--        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alpha);
--        if (likely(values[0])) kw_args--;
-+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alpha)) != 0)) kw_args--;
-         else goto __pyx_L5_argtuple_error;
-         case  1:
-         if (kw_args > 0) {
-@@ -17730,7 +18333,7 @@
-         }
-       }
-       if (unlikely(kw_args > 0)) {
--        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "dirichlet") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4108; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dirichlet") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4108; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       }
-     } else {
-       switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -17751,6 +18354,36 @@
-   __Pyx_RefNannyFinishContext();
-   return NULL;
-   __pyx_L4_argument_unpacking_done:;
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_98dirichlet(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), __pyx_v_alpha, __pyx_v_size);
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_6mtrand_11RandomState_98dirichlet(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_size) {
-+  npy_intp __pyx_v_k;
-+  npy_intp __pyx_v_totsize;
-+  PyArrayObject *__pyx_v_alpha_arr = 0;
-+  PyArrayObject *__pyx_v_val_arr = 0;
-+  double *__pyx_v_alpha_data;
-+  double *__pyx_v_val_data;
-+  npy_intp __pyx_v_i;
-+  npy_intp __pyx_v_j;
-+  double __pyx_v_acc;
-+  double __pyx_v_invacc;
-+  PyObject *__pyx_v_shape = NULL;
-+  PyObject *__pyx_v_diric = NULL;
-+  PyObject *__pyx_r = NULL;
-+  __Pyx_RefNannyDeclarations
-+  Py_ssize_t __pyx_t_1;
-+  PyObject *__pyx_t_2 = NULL;
-+  int __pyx_t_3;
-+  PyObject *__pyx_t_4 = NULL;
-+  PyObject *__pyx_t_5 = NULL;
-+  npy_intp __pyx_t_6;
-+  int __pyx_lineno = 0;
-+  const char *__pyx_filename = NULL;
-+  int __pyx_clineno = 0;
-+  __Pyx_RefNannySetupContext("dirichlet", 0);
- 
-   /* "mtrand.pyx":4194
-  *         cdef double     acc, invacc
-@@ -17804,13 +18437,13 @@
-     __pyx_t_2 = __Pyx_PyInt_to_py_npy_intp(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+    __Pyx_GOTREF(__pyx_t_4);
-     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
-     __Pyx_GIVEREF(__pyx_t_2);
-     __pyx_t_2 = 0;
-     __pyx_v_shape = ((PyObject *)__pyx_t_4);
-     __pyx_t_4 = 0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
- 
-   /* "mtrand.pyx":4200
-@@ -17833,7 +18466,7 @@
-     __pyx_t_4 = __Pyx_PyInt_to_py_npy_intp(__pyx_v_k); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_4);
-     __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+    __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_INCREF(__pyx_v_size);
-     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_size);
-     __Pyx_GIVEREF(__pyx_v_size);
-@@ -17842,7 +18475,7 @@
-     __pyx_t_4 = 0;
-     __pyx_v_shape = ((PyObject *)__pyx_t_2);
-     __pyx_t_2 = 0;
--    goto __pyx_L6;
-+    goto __pyx_L3;
-   }
-   /*else*/ {
- 
-@@ -17856,7 +18489,7 @@
-     __pyx_t_2 = __Pyx_PyInt_to_py_npy_intp(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-     __Pyx_GOTREF(__pyx_t_2);
-     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+    __Pyx_GOTREF(__pyx_t_4);
-     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
-     __Pyx_GIVEREF(__pyx_t_2);
-     __pyx_t_2 = 0;
-@@ -17866,7 +18499,7 @@
-     __pyx_v_shape = __pyx_t_2;
-     __pyx_t_2 = 0;
-   }
--  __pyx_L6:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":4205
-  *             shape = size + (k,)
-@@ -17886,7 +18519,7 @@
-   __Pyx_GOTREF(__pyx_t_5);
-   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-+  __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_INCREF(__pyx_v_shape);
-   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
-   __Pyx_GIVEREF(__pyx_v_shape);
-@@ -17974,7 +18607,7 @@
-  *                 acc             = acc + val_data[i+j]
-  *             invacc  = 1/acc
-  */
--      (__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]));
-+      (__pyx_v_val_data[(__pyx_v_i + __pyx_v_j)]) = rk_standard_gamma(__pyx_v_self->internal_state, (__pyx_v_alpha_data[__pyx_v_j]));
- 
-       /* "mtrand.pyx":4215
-  *             for j from 0 <= j < k:
-@@ -18059,6 +18692,18 @@
-   return __pyx_r;
- }
- 
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_101shuffle(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_100shuffle[] = "\n        shuffle(x)\n\n        Modify a sequence in-place by shuffling its contents.\n\n        Parameters\n        ----------\n        x : array_like\n            The array or list to be shuffled.\n\n        Returns\n        -------\n        None\n\n        Examples\n        --------\n        >>> arr = np.arange(10)\n        >>> np.random.shuffle(arr)\n        >>> arr\n        [1 7 5 2 9 4 3 6 0 8]\n\n        This function only shuffles the array along the first index of a\n        multi-dimensional array:\n\n        >>> arr = np.arange(9).reshape((3, 3))\n        >>> np.random.shuffle(arr)\n        >>> arr\n        array([[3, 4, 5],\n               [6, 7, 8],\n               [0, 1, 2]])\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_101shuffle(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("shuffle (wrapper)", 0);
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_100shuffle(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), ((PyObject *)__pyx_v_x));
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
- /* "mtrand.pyx":4224
-  * 
-  *     # Shuffling and permutations:
-@@ -18067,9 +18712,7 @@
-  *         shuffle(x)
-  */
- 
--static PyObject *__pyx_pf_6mtrand_11RandomState_50shuffle(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_50shuffle[] = "\n        shuffle(x)\n\n        Modify a sequence in-place by shuffling its contents.\n\n        Parameters\n        ----------\n        x : array_like\n            The array or list to be shuffled.\n\n        Returns\n        -------\n        None\n\n        Examples\n        --------\n        >>> arr = np.arange(10)\n        >>> np.random.shuffle(arr)\n        >>> arr\n        [1 7 5 2 9 4 3 6 0 8]\n\n        This function only shuffles the array along the first index of a\n        multi-dimensional array:\n\n        >>> arr = np.arange(9).reshape((3, 3))\n        >>> np.random.shuffle(arr)\n        >>> arr\n        array([[3, 4, 5],\n               [6, 7, 8],\n               [0, 1, 2]])\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_50shuffle(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
-+static PyObject *__pyx_pf_6mtrand_11RandomState_100shuffle(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_x) {
-   npy_intp __pyx_v_i;
-   npy_intp __pyx_v_j;
-   int __pyx_v_copy;
-@@ -18086,7 +18729,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("shuffle");
-+  __Pyx_RefNannySetupContext("shuffle", 0);
- 
-   /* "mtrand.pyx":4260
-  *         cdef int copy
-@@ -18119,17 +18762,17 @@
-  *         except:
-  *             j = 0
-  */
--      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_x, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
-+      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_x, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       __Pyx_GOTREF(__pyx_t_5);
--      __pyx_t_1 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
-+      __pyx_t_1 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-       __pyx_v_j = __pyx_t_1;
-     }
-     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
--    goto __pyx_L12_try_end;
--    __pyx_L5_error:;
-+    goto __pyx_L10_try_end;
-+    __pyx_L3_error:;
-     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- 
-     /* "mtrand.pyx":4263
-@@ -18141,7 +18784,7 @@
-  */
-     /*except:*/ {
-       __Pyx_AddTraceback("mtrand.RandomState.shuffle", __pyx_clineno, __pyx_lineno, __pyx_filename);
--      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4263; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
-+      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4263; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
-       __Pyx_GOTREF(__pyx_t_5);
-       __Pyx_GOTREF(__pyx_t_6);
-       __Pyx_GOTREF(__pyx_t_7);
-@@ -18157,20 +18800,20 @@
-       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
--      goto __pyx_L6_exception_handled;
-+      goto __pyx_L4_exception_handled;
-     }
--    __pyx_L7_except_error:;
-+    __pyx_L5_except_error:;
-     __Pyx_XGIVEREF(__pyx_t_2);
-     __Pyx_XGIVEREF(__pyx_t_3);
-     __Pyx_XGIVEREF(__pyx_t_4);
-     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
-     goto __pyx_L1_error;
--    __pyx_L6_exception_handled:;
-+    __pyx_L4_exception_handled:;
-     __Pyx_XGIVEREF(__pyx_t_2);
-     __Pyx_XGIVEREF(__pyx_t_3);
-     __Pyx_XGIVEREF(__pyx_t_4);
-     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
--    __pyx_L12_try_end:;
-+    __pyx_L10_try_end:;
-   }
- 
-   /* "mtrand.pyx":4266
-@@ -18201,7 +18844,7 @@
-  *                 x[i], x[j] = x[j], x[i]
-  *                 i = i - 1
-  */
--      __pyx_v_j = rk_interval(__pyx_v_i, ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state);
-+      __pyx_v_j = rk_interval(__pyx_v_i, __pyx_v_self->internal_state);
- 
-       /* "mtrand.pyx":4270
-  *             while i > 0:
-@@ -18228,7 +18871,7 @@
-  */
-       __pyx_v_i = (__pyx_v_i - 1);
-     }
--    goto __pyx_L15;
-+    goto __pyx_L13;
-   }
-   /*else*/ {
- 
-@@ -18275,7 +18918,7 @@
-  *                     x[i], x[j] = x[j].copy(), x[i].copy()
-  *                     i = i - 1
-  */
--        __pyx_v_j = rk_interval(__pyx_v_i, ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state);
-+        __pyx_v_j = rk_interval(__pyx_v_i, __pyx_v_self->internal_state);
- 
-         /* "mtrand.pyx":4278
-  *                 while(i > 0):
-@@ -18314,7 +18957,7 @@
-  */
-         __pyx_v_i = (__pyx_v_i - 1);
-       }
--      goto __pyx_L18;
-+      goto __pyx_L16;
-     }
-     /*else*/ {
- 
-@@ -18336,7 +18979,7 @@
-  *                     x[i], x[j] = x[j][:], x[i][:]
-  *                     i = i - 1
-  */
--        __pyx_v_j = rk_interval(__pyx_v_i, ((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self)->internal_state);
-+        __pyx_v_j = rk_interval(__pyx_v_i, __pyx_v_self->internal_state);
- 
-         /* "mtrand.pyx":4283
-  *                 while(i > 0):
-@@ -18370,9 +19013,9 @@
-         __pyx_v_i = (__pyx_v_i - 1);
-       }
-     }
--    __pyx_L18:;
-+    __pyx_L16:;
-   }
--  __pyx_L15:;
-+  __pyx_L13:;
- 
-   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-   goto __pyx_L0;
-@@ -18388,6 +19031,18 @@
-   return __pyx_r;
- }
- 
-+/* Python wrapper */
-+static PyObject *__pyx_pw_6mtrand_11RandomState_103permutation(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
-+static char __pyx_doc_6mtrand_11RandomState_102permutation[] = "\n        permutation(x)\n\n        Randomly permute a sequence, or return a permuted range.\n\n        If `x` is a multi-dimensional array, it is only shuffled along its\n        first index.\n\n        Parameters\n        ----------\n        x : int or array_like\n            If `x` is an integer, randomly permute ``np.arange(x)``.\n            If `x` is an array, make a copy and shuffle the elements\n            randomly.\n\n        Returns\n        -------\n        out : ndarray\n            Permuted sequence or array range.\n\n        Examples\n        --------\n        >>> np.random.permutation(10)\n        array([1, 7, 4, 3, 0, 9, 2, 5, 8, 6])\n\n        >>> np.random.permutation([1, 4, 9, 12, 15])\n        array([15,  1,  9,  4, 12])\n\n        >>> arr = np.arange(9).reshape((3, 3))\n        >>> np.random.permutation(arr)\n        array([[6, 7, 8],\n               [0, 1, 2],\n               [3, 4, 5]])\n\n        ";
-+static PyObject *__pyx_pw_6mtrand_11RandomState_103permutation(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
-+  PyObject *__pyx_r = 0;
-+  __Pyx_RefNannyDeclarations
-+  __Pyx_RefNannySetupContext("permutation (wrapper)", 0);
-+  __pyx_r = __pyx_pf_6mtrand_11RandomState_102permutation(((struct __pyx_obj_6mtrand_RandomState *)__pyx_v_self), ((PyObject *)__pyx_v_x));
-+  __Pyx_RefNannyFinishContext();
-+  return __pyx_r;
-+}
-+
- /* "mtrand.pyx":4286
-  *                     i = i - 1
-  * 
-@@ -18396,9 +19051,7 @@
-  *         permutation(x)
-  */
- 
--static PyObject *__pyx_pf_6mtrand_11RandomState_51permutation(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
--static char __pyx_doc_6mtrand_11RandomState_51permutation[] = "\n        permutation(x)\n\n        Randomly permute a sequence, or return a permuted range.\n\n        If `x` is a multi-dimensional array, it is only shuffled along its\n        first index.\n\n        Parameters\n        ----------\n        x : int or array_like\n            If `x` is an integer, randomly permute ``np.arange(x)``.\n            If `x` is an array, make a copy and shuffle the elements\n            randomly.\n\n        Returns\n        -------\n        out : ndarray\n            Permuted sequence or array range.\n\n        Examples\n        --------\n        >>> np.random.permutation(10)\n        array([1, 7, 4, 3, 0, 9, 2, 5, 8, 6])\n\n        >>> np.random.permutation([1, 4, 9, 12, 15])\n        array([15,  1,  9,  4, 12])\n\n        >>> arr = np.arange(9).reshape((3, 3))\n        >>> np.random.permutation(arr)\n        array([[6, 7, 8],\n               [0, 1, 2],\n               [3, 4, 5]])\n\n        ";
--static PyObject *__pyx_pf_6mtrand_11RandomState_51permutation(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
-+static PyObject *__pyx_pf_6mtrand_11RandomState_102permutation(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_x) {
-   PyObject *__pyx_v_arr = NULL;
-   PyObject *__pyx_r = NULL;
-   __Pyx_RefNannyDeclarations
-@@ -18409,7 +19062,7 @@
-   int __pyx_lineno = 0;
-   const char *__pyx_filename = NULL;
-   int __pyx_clineno = 0;
--  __Pyx_RefNannySetupContext("permutation");
-+  __Pyx_RefNannySetupContext("permutation", 0);
- 
-   /* "mtrand.pyx":4322
-  * 
-@@ -18424,7 +19077,7 @@
-   __Pyx_GOTREF(__pyx_t_2);
-   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-+  __Pyx_GOTREF(__pyx_t_1);
-   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
-   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyInt_Type))));
-   __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
-@@ -18451,7 +19104,7 @@
-     __Pyx_GOTREF(__pyx_t_2);
-     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-+    __Pyx_GOTREF(__pyx_t_1);
-     __Pyx_INCREF(__pyx_v_x);
-     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x);
-     __Pyx_GIVEREF(__pyx_v_x);
-@@ -18461,7 +19114,7 @@
-     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-     __pyx_v_arr = __pyx_t_4;
-     __pyx_t_4 = 0;
--    goto __pyx_L5;
-+    goto __pyx_L3;
-   }
-   /*else*/ {
- 
-@@ -18478,7 +19131,7 @@
-     __Pyx_GOTREF(__pyx_t_1);
-     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+    __Pyx_GOTREF(__pyx_t_4);
-     __Pyx_INCREF(__pyx_v_x);
-     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_x);
-     __Pyx_GIVEREF(__pyx_v_x);
-@@ -18489,7 +19142,7 @@
-     __pyx_v_arr = __pyx_t_2;
-     __pyx_t_2 = 0;
-   }
--  __pyx_L5:;
-+  __pyx_L3:;
- 
-   /* "mtrand.pyx":4326
-  *         else:
-@@ -18498,10 +19151,10 @@
-  *         return arr
-  * 
-  */
--  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__shuffle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__shuffle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __Pyx_GOTREF(__pyx_t_2);
-   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-+  __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_INCREF(__pyx_v_arr);
-   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arr);
-   __Pyx_GIVEREF(__pyx_v_arr);
-@@ -18538,7 +19191,7 @@
-   return __pyx_r;
- }
- 
--static PyObject *__pyx_tp_new_6mtrand_RandomState(PyTypeObject *t, PyObject *a, PyObject *k) {
-+static PyObject *__pyx_tp_new_6mtrand_RandomState(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-   PyObject *o = (*t->tp_alloc)(t, 0);
-   if (!o) return 0;
-   return o;
-@@ -18549,7 +19202,7 @@
-     PyObject *etype, *eval, *etb;
-     PyErr_Fetch(&etype, &eval, &etb);
-     ++Py_REFCNT(o);
--    __pyx_pf_6mtrand_11RandomState_1__dealloc__(o);
-+    __pyx_pw_6mtrand_11RandomState_3__dealloc__(o);
-     if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
-     --Py_REFCNT(o);
-     PyErr_Restore(etype, eval, etb);
-@@ -18558,56 +19211,56 @@
- }
- 
- static PyMethodDef __pyx_methods_6mtrand_RandomState[] = {
--  {__Pyx_NAMESTR("seed"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_2seed, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_2seed)},
--  {__Pyx_NAMESTR("get_state"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_3get_state, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_3get_state)},
--  {__Pyx_NAMESTR("set_state"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_4set_state, METH_O, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_4set_state)},
--  {__Pyx_NAMESTR("__getstate__"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_5__getstate__, METH_NOARGS, __Pyx_DOCSTR(0)},
--  {__Pyx_NAMESTR("__setstate__"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_6__setstate__, METH_O, __Pyx_DOCSTR(0)},
--  {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_7__reduce__, METH_NOARGS, __Pyx_DOCSTR(0)},
--  {__Pyx_NAMESTR("random_sample"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_8random_sample, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_8random_sample)},
--  {__Pyx_NAMESTR("tomaxint"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_9tomaxint, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_9tomaxint)},
--  {__Pyx_NAMESTR("randint"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_10randint, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_10randint)},
--  {__Pyx_NAMESTR("bytes"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_11bytes, METH_O, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_11bytes)},
--  {__Pyx_NAMESTR("uniform"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_12uniform, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_12uniform)},
--  {__Pyx_NAMESTR("rand"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_13rand, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_13rand)},
--  {__Pyx_NAMESTR("randn"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_14randn, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_14randn)},
--  {__Pyx_NAMESTR("random_integers"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_15random_integers, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_15random_integers)},
--  {__Pyx_NAMESTR("standard_normal"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_16standard_normal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_16standard_normal)},
--  {__Pyx_NAMESTR("normal"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_17normal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_17normal)},
--  {__Pyx_NAMESTR("beta"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_18beta, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_18beta)},
--  {__Pyx_NAMESTR("exponential"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_19exponential, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_19exponential)},
--  {__Pyx_NAMESTR("standard_exponential"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_20standard_exponential, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_20standard_exponential)},
--  {__Pyx_NAMESTR("standard_gamma"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_21standard_gamma, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_21standard_gamma)},
--  {__Pyx_NAMESTR("gamma"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_22gamma, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_22gamma)},
--  {__Pyx_NAMESTR("f"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_23f, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_23f)},
--  {__Pyx_NAMESTR("noncentral_f"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_24noncentral_f, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_24noncentral_f)},
--  {__Pyx_NAMESTR("chisquare"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_25chisquare, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_25chisquare)},
--  {__Pyx_NAMESTR("noncentral_chisquare"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_26noncentral_chisquare, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_26noncentral_chisquare)},
--  {__Pyx_NAMESTR("standard_cauchy"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_27standard_cauchy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_27standard_cauchy)},
--  {__Pyx_NAMESTR("standard_t"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_28standard_t, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_28standard_t)},
--  {__Pyx_NAMESTR("vonmises"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_29vonmises, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_29vonmises)},
--  {__Pyx_NAMESTR("pareto"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_30pareto, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_30pareto)},
--  {__Pyx_NAMESTR("weibull"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_31weibull, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_31weibull)},
--  {__Pyx_NAMESTR("power"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_32power, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_32power)},
--  {__Pyx_NAMESTR("laplace"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_33laplace, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_33laplace)},
--  {__Pyx_NAMESTR("gumbel"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_34gumbel, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_34gumbel)},
--  {__Pyx_NAMESTR("logistic"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_35logistic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_35logistic)},
--  {__Pyx_NAMESTR("lognormal"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_36lognormal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_36lognormal)},
--  {__Pyx_NAMESTR("rayleigh"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_37rayleigh, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_37rayleigh)},
--  {__Pyx_NAMESTR("wald"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_38wald, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_38wald)},
--  {__Pyx_NAMESTR("triangular"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_39triangular, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_39triangular)},
--  {__Pyx_NAMESTR("binomial"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_40binomial, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_40binomial)},
--  {__Pyx_NAMESTR("negative_binomial"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_41negative_binomial, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_41negative_binomial)},
--  {__Pyx_NAMESTR("poisson"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_42poisson, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_42poisson)},
--  {__Pyx_NAMESTR("zipf"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_43zipf, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_43zipf)},
--  {__Pyx_NAMESTR("geometric"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_44geometric, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_44geometric)},
--  {__Pyx_NAMESTR("hypergeometric"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_45hypergeometric, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_45hypergeometric)},
--  {__Pyx_NAMESTR("logseries"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_46logseries, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_46logseries)},
--  {__Pyx_NAMESTR("multivariate_normal"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_47multivariate_normal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_47multivariate_normal)},
--  {__Pyx_NAMESTR("multinomial"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_48multinomial, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_48multinomial)},
--  {__Pyx_NAMESTR("dirichlet"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_49dirichlet, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_49dirichlet)},
--  {__Pyx_NAMESTR("shuffle"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_50shuffle, METH_O, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_50shuffle)},
--  {__Pyx_NAMESTR("permutation"), (PyCFunction)__pyx_pf_6mtrand_11RandomState_51permutation, METH_O, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_51permutation)},
-+  {__Pyx_NAMESTR("seed"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_5seed, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_4seed)},
-+  {__Pyx_NAMESTR("get_state"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_7get_state, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_6get_state)},
-+  {__Pyx_NAMESTR("set_state"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_9set_state, METH_O, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_8set_state)},
-+  {__Pyx_NAMESTR("__getstate__"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_11__getstate__, METH_NOARGS, __Pyx_DOCSTR(0)},
-+  {__Pyx_NAMESTR("__setstate__"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_13__setstate__, METH_O, __Pyx_DOCSTR(0)},
-+  {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_15__reduce__, METH_NOARGS, __Pyx_DOCSTR(0)},
-+  {__Pyx_NAMESTR("random_sample"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_17random_sample, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_16random_sample)},
-+  {__Pyx_NAMESTR("tomaxint"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_19tomaxint, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_18tomaxint)},
-+  {__Pyx_NAMESTR("randint"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_21randint, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_20randint)},
-+  {__Pyx_NAMESTR("bytes"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_23bytes, METH_O, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_22bytes)},
-+  {__Pyx_NAMESTR("uniform"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_25uniform, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_24uniform)},
-+  {__Pyx_NAMESTR("rand"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_27rand, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_26rand)},
-+  {__Pyx_NAMESTR("randn"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_29randn, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_28randn)},
-+  {__Pyx_NAMESTR("random_integers"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_31random_integers, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_30random_integers)},
-+  {__Pyx_NAMESTR("standard_normal"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_33standard_normal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_32standard_normal)},
-+  {__Pyx_NAMESTR("normal"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_35normal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_34normal)},
-+  {__Pyx_NAMESTR("beta"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_37beta, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_36beta)},
-+  {__Pyx_NAMESTR("exponential"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_39exponential, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_38exponential)},
-+  {__Pyx_NAMESTR("standard_exponential"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_41standard_exponential, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_40standard_exponential)},
-+  {__Pyx_NAMESTR("standard_gamma"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_43standard_gamma, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_42standard_gamma)},
-+  {__Pyx_NAMESTR("gamma"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_45gamma, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_44gamma)},
-+  {__Pyx_NAMESTR("f"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_47f, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_46f)},
-+  {__Pyx_NAMESTR("noncentral_f"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_49noncentral_f, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_48noncentral_f)},
-+  {__Pyx_NAMESTR("chisquare"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_51chisquare, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_50chisquare)},
-+  {__Pyx_NAMESTR("noncentral_chisquare"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_53noncentral_chisquare, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_52noncentral_chisquare)},
-+  {__Pyx_NAMESTR("standard_cauchy"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_55standard_cauchy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_54standard_cauchy)},
-+  {__Pyx_NAMESTR("standard_t"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_57standard_t, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_56standard_t)},
-+  {__Pyx_NAMESTR("vonmises"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_59vonmises, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_58vonmises)},
-+  {__Pyx_NAMESTR("pareto"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_61pareto, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_60pareto)},
-+  {__Pyx_NAMESTR("weibull"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_63weibull, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_62weibull)},
-+  {__Pyx_NAMESTR("power"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_65power, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_64power)},
-+  {__Pyx_NAMESTR("laplace"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_67laplace, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_66laplace)},
-+  {__Pyx_NAMESTR("gumbel"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_69gumbel, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_68gumbel)},
-+  {__Pyx_NAMESTR("logistic"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_71logistic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_70logistic)},
-+  {__Pyx_NAMESTR("lognormal"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_73lognormal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_72lognormal)},
-+  {__Pyx_NAMESTR("rayleigh"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_75rayleigh, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_74rayleigh)},
-+  {__Pyx_NAMESTR("wald"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_77wald, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_76wald)},
-+  {__Pyx_NAMESTR("triangular"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_79triangular, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_78triangular)},
-+  {__Pyx_NAMESTR("binomial"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_81binomial, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_80binomial)},
-+  {__Pyx_NAMESTR("negative_binomial"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_83negative_binomial, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_82negative_binomial)},
-+  {__Pyx_NAMESTR("poisson"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_85poisson, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_84poisson)},
-+  {__Pyx_NAMESTR("zipf"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_87zipf, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_86zipf)},
-+  {__Pyx_NAMESTR("geometric"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_89geometric, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_88geometric)},
-+  {__Pyx_NAMESTR("hypergeometric"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_91hypergeometric, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_90hypergeometric)},
-+  {__Pyx_NAMESTR("logseries"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_93logseries, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_92logseries)},
-+  {__Pyx_NAMESTR("multivariate_normal"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_95multivariate_normal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_94multivariate_normal)},
-+  {__Pyx_NAMESTR("multinomial"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_97multinomial, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_96multinomial)},
-+  {__Pyx_NAMESTR("dirichlet"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_99dirichlet, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_98dirichlet)},
-+  {__Pyx_NAMESTR("shuffle"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_101shuffle, METH_O, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_100shuffle)},
-+  {__Pyx_NAMESTR("permutation"), (PyCFunction)__pyx_pw_6mtrand_11RandomState_103permutation, METH_O, __Pyx_DOCSTR(__pyx_doc_6mtrand_11RandomState_102permutation)},
-   {0, 0, 0, 0}
- };
- 
-@@ -18749,7 +19402,7 @@
-   0, /*tp_descr_get*/
-   0, /*tp_descr_set*/
-   0, /*tp_dictoffset*/
--  __pyx_pf_6mtrand_11RandomState___init__, /*tp_init*/
-+  __pyx_pw_6mtrand_11RandomState_1__init__, /*tp_init*/
-   0, /*tp_alloc*/
-   __pyx_tp_new_6mtrand_RandomState, /*tp_new*/
-   0, /*tp_free*/
-@@ -19035,7 +19688,7 @@
- 
- static int __Pyx_InitCachedConstants(void) {
-   __Pyx_RefNannyDeclarations
--  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants");
-+  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
- 
-   /* "mtrand.pyx":184
-  *                                                 <void *>oa)
-@@ -19045,7 +19698,7 @@
-  *             oa_data = <double *>PyArray_MultiIter_DATA(multi, 1)
-  */
-   __pyx_k_tuple_2 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_2));
-+  __Pyx_GOTREF(__pyx_k_tuple_2);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
-   PyTuple_SET_ITEM(__pyx_k_tuple_2, 0, ((PyObject *)__pyx_kp_s_1));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
-@@ -19059,7 +19712,7 @@
-  *             oa_data = <double *>PyArray_MultiIter_DATA(multi, 1)
-  */
-   __pyx_k_tuple_3 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_3));
-+  __Pyx_GOTREF(__pyx_k_tuple_3);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
-   PyTuple_SET_ITEM(__pyx_k_tuple_3, 0, ((PyObject *)__pyx_kp_s_1));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
-@@ -19073,7 +19726,7 @@
-  *             oa_data = <double *>PyArray_MultiIter_DATA(multi, 1)
-  */
-   __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_4));
-+  __Pyx_GOTREF(__pyx_k_tuple_4);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
-   PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_kp_s_1));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
-@@ -19087,7 +19740,7 @@
-  *             on_data = <long *>PyArray_MultiIter_DATA(multi, 1)
-  */
-   __pyx_k_tuple_5 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_5));
-+  __Pyx_GOTREF(__pyx_k_tuple_5);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
-   PyTuple_SET_ITEM(__pyx_k_tuple_5, 0, ((PyObject *)__pyx_kp_s_1));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
-@@ -19101,7 +19754,7 @@
-  *             on_data = <double *>PyArray_MultiIter_DATA(multi, 1)
-  */
-   __pyx_k_tuple_6 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_6));
-+  __Pyx_GOTREF(__pyx_k_tuple_6);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
-   PyTuple_SET_ITEM(__pyx_k_tuple_6, 0, ((PyObject *)__pyx_kp_s_1));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
-@@ -19115,7 +19768,7 @@
-  *             on_data = <long *>PyArray_MultiIter_DATA(multi, 1)
-  */
-   __pyx_k_tuple_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_7));
-+  __Pyx_GOTREF(__pyx_k_tuple_7);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
-   PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_kp_s_1));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
-@@ -19129,7 +19782,7 @@
-  *             oa_data = <double *>PyArray_MultiIter_DATA(multi, 1)
-  */
-   __pyx_k_tuple_8 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_8));
-+  __Pyx_GOTREF(__pyx_k_tuple_8);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
-   PyTuple_SET_ITEM(__pyx_k_tuple_8, 0, ((PyObject *)__pyx_kp_s_1));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
-@@ -19143,7 +19796,7 @@
-  *         if len(state) == 3:
-  */
-   __pyx_k_tuple_10 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_10));
-+  __Pyx_GOTREF(__pyx_k_tuple_10);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
-   PyTuple_SET_ITEM(__pyx_k_tuple_10, 0, ((PyObject *)__pyx_kp_s_9));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
-@@ -19157,7 +19810,7 @@
-  *         self.internal_state.pos = pos
-  */
-   __pyx_k_tuple_12 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_12));
-+  __Pyx_GOTREF(__pyx_k_tuple_12);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
-   PyTuple_SET_ITEM(__pyx_k_tuple_12, 0, ((PyObject *)__pyx_kp_s_11));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
-@@ -19171,7 +19824,7 @@
-  *         diff = <unsigned long>hi - <unsigned long>lo - 1UL
-  */
-   __pyx_k_tuple_14 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_14));
-+  __Pyx_GOTREF(__pyx_k_tuple_14);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_13));
-   PyTuple_SET_ITEM(__pyx_k_tuple_14, 0, ((PyObject *)__pyx_kp_s_13));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13));
-@@ -19185,7 +19838,7 @@
-  * 
-  */
-   __pyx_k_tuple_20 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_20));
-+  __Pyx_GOTREF(__pyx_k_tuple_20);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_20, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19199,7 +19852,7 @@
-  * 
-  */
-   __pyx_k_tuple_21 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_21));
-+  __Pyx_GOTREF(__pyx_k_tuple_21);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_21, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19213,7 +19866,7 @@
-  *                 raise ValueError("b <= 0")
-  */
-   __pyx_k_tuple_23 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_23));
-+  __Pyx_GOTREF(__pyx_k_tuple_23);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_22));
-   PyTuple_SET_ITEM(__pyx_k_tuple_23, 0, ((PyObject *)__pyx_kp_s_22));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22));
-@@ -19227,7 +19880,7 @@
-  * 
-  */
-   __pyx_k_tuple_25 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_25));
-+  __Pyx_GOTREF(__pyx_k_tuple_25);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_24));
-   PyTuple_SET_ITEM(__pyx_k_tuple_25, 0, ((PyObject *)__pyx_kp_s_24));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24));
-@@ -19241,7 +19894,7 @@
-  *             raise ValueError("b <= 0")
-  */
-   __pyx_k_tuple_26 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_26));
-+  __Pyx_GOTREF(__pyx_k_tuple_26);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_22));
-   PyTuple_SET_ITEM(__pyx_k_tuple_26, 0, ((PyObject *)__pyx_kp_s_22));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22));
-@@ -19255,7 +19908,7 @@
-  * 
-  */
-   __pyx_k_tuple_27 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_27));
-+  __Pyx_GOTREF(__pyx_k_tuple_27);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_24));
-   PyTuple_SET_ITEM(__pyx_k_tuple_27, 0, ((PyObject *)__pyx_kp_s_24));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_24));
-@@ -19269,7 +19922,7 @@
-  * 
-  */
-   __pyx_k_tuple_29 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_29));
-+  __Pyx_GOTREF(__pyx_k_tuple_29);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_29, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19283,7 +19936,7 @@
-  * 
-  */
-   __pyx_k_tuple_30 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_30));
-+  __Pyx_GOTREF(__pyx_k_tuple_30);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_30, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19297,7 +19950,7 @@
-  * 
-  */
-   __pyx_k_tuple_32 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_32));
-+  __Pyx_GOTREF(__pyx_k_tuple_32);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_31));
-   PyTuple_SET_ITEM(__pyx_k_tuple_32, 0, ((PyObject *)__pyx_kp_s_31));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_31));
-@@ -19311,7 +19964,7 @@
-  * 
-  */
-   __pyx_k_tuple_33 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_33));
-+  __Pyx_GOTREF(__pyx_k_tuple_33);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_31));
-   PyTuple_SET_ITEM(__pyx_k_tuple_33, 0, ((PyObject *)__pyx_kp_s_31));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_31));
-@@ -19325,7 +19978,7 @@
-  *                 raise ValueError("scale <= 0")
-  */
-   __pyx_k_tuple_35 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_35));
-+  __Pyx_GOTREF(__pyx_k_tuple_35);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_31));
-   PyTuple_SET_ITEM(__pyx_k_tuple_35, 0, ((PyObject *)__pyx_kp_s_31));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_31));
-@@ -19339,7 +19992,7 @@
-  * 
-  */
-   __pyx_k_tuple_36 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_36));
-+  __Pyx_GOTREF(__pyx_k_tuple_36);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_36, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19353,7 +20006,7 @@
-  *             raise ValueError("scale <= 0")
-  */
-   __pyx_k_tuple_37 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_37));
-+  __Pyx_GOTREF(__pyx_k_tuple_37);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_31));
-   PyTuple_SET_ITEM(__pyx_k_tuple_37, 0, ((PyObject *)__pyx_kp_s_31));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_31));
-@@ -19367,7 +20020,7 @@
-  * 
-  */
-   __pyx_k_tuple_38 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_38));
-+  __Pyx_GOTREF(__pyx_k_tuple_38);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_38, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19381,7 +20034,7 @@
-  *                 raise ValueError("scale <= 0")
-  */
-   __pyx_k_tuple_39 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_39));
-+  __Pyx_GOTREF(__pyx_k_tuple_39);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_31));
-   PyTuple_SET_ITEM(__pyx_k_tuple_39, 0, ((PyObject *)__pyx_kp_s_31));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_31));
-@@ -19395,7 +20048,7 @@
-  * 
-  */
-   __pyx_k_tuple_40 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_40));
-+  __Pyx_GOTREF(__pyx_k_tuple_40);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_40, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19409,7 +20062,7 @@
-  *             raise ValueError("dfden <= 0")
-  */
-   __pyx_k_tuple_42 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_42));
-+  __Pyx_GOTREF(__pyx_k_tuple_42);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_41));
-   PyTuple_SET_ITEM(__pyx_k_tuple_42, 0, ((PyObject *)__pyx_kp_s_41));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_41));
-@@ -19423,7 +20076,7 @@
-  * 
-  */
-   __pyx_k_tuple_44 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_44));
-+  __Pyx_GOTREF(__pyx_k_tuple_44);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_43));
-   PyTuple_SET_ITEM(__pyx_k_tuple_44, 0, ((PyObject *)__pyx_kp_s_43));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43));
-@@ -19437,7 +20090,7 @@
-  *                 raise ValueError("dfden <= 0")
-  */
-   __pyx_k_tuple_46 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_46));
-+  __Pyx_GOTREF(__pyx_k_tuple_46);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_45));
-   PyTuple_SET_ITEM(__pyx_k_tuple_46, 0, ((PyObject *)__pyx_kp_s_45));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_45));
-@@ -19451,7 +20104,7 @@
-  *                 raise ValueError("nonc < 0")
-  */
-   __pyx_k_tuple_47 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_47));
-+  __Pyx_GOTREF(__pyx_k_tuple_47);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_43));
-   PyTuple_SET_ITEM(__pyx_k_tuple_47, 0, ((PyObject *)__pyx_kp_s_43));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43));
-@@ -19465,7 +20118,7 @@
-  *                                   fdfnum, fdfden, fnonc)
-  */
-   __pyx_k_tuple_49 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_49));
-+  __Pyx_GOTREF(__pyx_k_tuple_49);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_48));
-   PyTuple_SET_ITEM(__pyx_k_tuple_49, 0, ((PyObject *)__pyx_kp_s_48));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_48));
-@@ -19479,7 +20132,7 @@
-  *             raise ValueError("dfden <= 0")
-  */
-   __pyx_k_tuple_50 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_50));
-+  __Pyx_GOTREF(__pyx_k_tuple_50);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_45));
-   PyTuple_SET_ITEM(__pyx_k_tuple_50, 0, ((PyObject *)__pyx_kp_s_45));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_45));
-@@ -19493,7 +20146,7 @@
-  *             raise ValueError("nonc < 0")
-  */
-   __pyx_k_tuple_51 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_51));
-+  __Pyx_GOTREF(__pyx_k_tuple_51);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_43));
-   PyTuple_SET_ITEM(__pyx_k_tuple_51, 0, ((PyObject *)__pyx_kp_s_43));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_43));
-@@ -19507,7 +20160,7 @@
-  *             odfden, ononc)
-  */
-   __pyx_k_tuple_52 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_52));
-+  __Pyx_GOTREF(__pyx_k_tuple_52);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_48));
-   PyTuple_SET_ITEM(__pyx_k_tuple_52, 0, ((PyObject *)__pyx_kp_s_48));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_48));
-@@ -19521,7 +20174,7 @@
-  * 
-  */
-   __pyx_k_tuple_54 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_54));
-+  __Pyx_GOTREF(__pyx_k_tuple_54);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_53));
-   PyTuple_SET_ITEM(__pyx_k_tuple_54, 0, ((PyObject *)__pyx_kp_s_53));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_53));
-@@ -19535,7 +20188,7 @@
-  * 
-  */
-   __pyx_k_tuple_55 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_55));
-+  __Pyx_GOTREF(__pyx_k_tuple_55);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_53));
-   PyTuple_SET_ITEM(__pyx_k_tuple_55, 0, ((PyObject *)__pyx_kp_s_53));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_53));
-@@ -19549,7 +20202,7 @@
-  *                 raise ValueError("nonc <= 0")
-  */
-   __pyx_k_tuple_56 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_56));
-+  __Pyx_GOTREF(__pyx_k_tuple_56);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_53));
-   PyTuple_SET_ITEM(__pyx_k_tuple_56, 0, ((PyObject *)__pyx_kp_s_53));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_53));
-@@ -19563,7 +20216,7 @@
-  *                                   size, fdf, fnonc)
-  */
-   __pyx_k_tuple_58 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_58));
-+  __Pyx_GOTREF(__pyx_k_tuple_58);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_57));
-   PyTuple_SET_ITEM(__pyx_k_tuple_58, 0, ((PyObject *)__pyx_kp_s_57));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_57));
-@@ -19577,7 +20230,7 @@
-  *             raise ValueError("nonc < 0")
-  */
-   __pyx_k_tuple_60 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_60));
-+  __Pyx_GOTREF(__pyx_k_tuple_60);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_59));
-   PyTuple_SET_ITEM(__pyx_k_tuple_60, 0, ((PyObject *)__pyx_kp_s_59));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_59));
-@@ -19591,7 +20244,7 @@
-  *             odf, ononc)
-  */
-   __pyx_k_tuple_61 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_61));
-+  __Pyx_GOTREF(__pyx_k_tuple_61);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_48));
-   PyTuple_SET_ITEM(__pyx_k_tuple_61, 0, ((PyObject *)__pyx_kp_s_48));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_48));
-@@ -19605,7 +20258,7 @@
-  * 
-  */
-   __pyx_k_tuple_62 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_62));
-+  __Pyx_GOTREF(__pyx_k_tuple_62);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_53));
-   PyTuple_SET_ITEM(__pyx_k_tuple_62, 0, ((PyObject *)__pyx_kp_s_53));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_53));
-@@ -19619,7 +20272,7 @@
-  * 
-  */
-   __pyx_k_tuple_63 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_63));
-+  __Pyx_GOTREF(__pyx_k_tuple_63);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_53));
-   PyTuple_SET_ITEM(__pyx_k_tuple_63, 0, ((PyObject *)__pyx_kp_s_53));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_53));
-@@ -19633,7 +20286,7 @@
-  * 
-  */
-   __pyx_k_tuple_65 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_65));
-+  __Pyx_GOTREF(__pyx_k_tuple_65);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_64));
-   PyTuple_SET_ITEM(__pyx_k_tuple_65, 0, ((PyObject *)__pyx_kp_s_64));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_64));
-@@ -19647,7 +20300,7 @@
-  * 
-  */
-   __pyx_k_tuple_66 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_66));
-+  __Pyx_GOTREF(__pyx_k_tuple_66);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_64));
-   PyTuple_SET_ITEM(__pyx_k_tuple_66, 0, ((PyObject *)__pyx_kp_s_64));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_64));
-@@ -19661,7 +20314,7 @@
-  * 
-  */
-   __pyx_k_tuple_67 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_67));
-+  __Pyx_GOTREF(__pyx_k_tuple_67);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_22));
-   PyTuple_SET_ITEM(__pyx_k_tuple_67, 0, ((PyObject *)__pyx_kp_s_22));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22));
-@@ -19675,7 +20328,7 @@
-  * 
-  */
-   __pyx_k_tuple_68 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_68));
-+  __Pyx_GOTREF(__pyx_k_tuple_68);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_22));
-   PyTuple_SET_ITEM(__pyx_k_tuple_68, 0, ((PyObject *)__pyx_kp_s_22));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22));
-@@ -19689,7 +20342,7 @@
-  * 
-  */
-   __pyx_k_tuple_69 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_69));
-+  __Pyx_GOTREF(__pyx_k_tuple_69);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_22));
-   PyTuple_SET_ITEM(__pyx_k_tuple_69, 0, ((PyObject *)__pyx_kp_s_22));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22));
-@@ -19703,7 +20356,7 @@
-  * 
-  */
-   __pyx_k_tuple_70 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_70));
-+  __Pyx_GOTREF(__pyx_k_tuple_70);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_22));
-   PyTuple_SET_ITEM(__pyx_k_tuple_70, 0, ((PyObject *)__pyx_kp_s_22));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22));
-@@ -19717,7 +20370,7 @@
-  * 
-  */
-   __pyx_k_tuple_71 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_71));
-+  __Pyx_GOTREF(__pyx_k_tuple_71);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_22));
-   PyTuple_SET_ITEM(__pyx_k_tuple_71, 0, ((PyObject *)__pyx_kp_s_22));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22));
-@@ -19731,7 +20384,7 @@
-  * 
-  */
-   __pyx_k_tuple_72 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_72));
-+  __Pyx_GOTREF(__pyx_k_tuple_72);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_22));
-   PyTuple_SET_ITEM(__pyx_k_tuple_72, 0, ((PyObject *)__pyx_kp_s_22));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22));
-@@ -19745,7 +20398,7 @@
-  * 
-  */
-   __pyx_k_tuple_75 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_75));
-+  __Pyx_GOTREF(__pyx_k_tuple_75);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_75, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19759,7 +20412,7 @@
-  * 
-  */
-   __pyx_k_tuple_76 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_76));
-+  __Pyx_GOTREF(__pyx_k_tuple_76);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_76, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19773,7 +20426,7 @@
-  * 
-  */
-   __pyx_k_tuple_79 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_79));
-+  __Pyx_GOTREF(__pyx_k_tuple_79);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_79, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19787,7 +20440,7 @@
-  * 
-  */
-   __pyx_k_tuple_80 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_80));
-+  __Pyx_GOTREF(__pyx_k_tuple_80);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_80, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19801,7 +20454,7 @@
-  * 
-  */
-   __pyx_k_tuple_83 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_83));
-+  __Pyx_GOTREF(__pyx_k_tuple_83);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_83, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19815,7 +20468,7 @@
-  * 
-  */
-   __pyx_k_tuple_84 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_84));
-+  __Pyx_GOTREF(__pyx_k_tuple_84);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_84, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19829,7 +20482,7 @@
-  * 
-  */
-   __pyx_k_tuple_88 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_88));
-+  __Pyx_GOTREF(__pyx_k_tuple_88);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_87));
-   PyTuple_SET_ITEM(__pyx_k_tuple_88, 0, ((PyObject *)__pyx_kp_s_87));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_87));
-@@ -19843,7 +20496,7 @@
-  * 
-  */
-   __pyx_k_tuple_90 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_90));
-+  __Pyx_GOTREF(__pyx_k_tuple_90);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_89));
-   PyTuple_SET_ITEM(__pyx_k_tuple_90, 0, ((PyObject *)__pyx_kp_s_89));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_89));
-@@ -19857,7 +20510,7 @@
-  * 
-  */
-   __pyx_k_tuple_92 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_92));
-+  __Pyx_GOTREF(__pyx_k_tuple_92);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_92, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19871,7 +20524,7 @@
-  * 
-  */
-   __pyx_k_tuple_94 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_94));
-+  __Pyx_GOTREF(__pyx_k_tuple_94);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_93));
-   PyTuple_SET_ITEM(__pyx_k_tuple_94, 0, ((PyObject *)__pyx_kp_s_93));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_93));
-@@ -19885,7 +20538,7 @@
-  *                 raise ValueError("scale <= 0")
-  */
-   __pyx_k_tuple_96 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_96));
-+  __Pyx_GOTREF(__pyx_k_tuple_96);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_95));
-   PyTuple_SET_ITEM(__pyx_k_tuple_96, 0, ((PyObject *)__pyx_kp_s_95));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_95));
-@@ -19899,7 +20552,7 @@
-  * 
-  */
-   __pyx_k_tuple_97 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_97));
-+  __Pyx_GOTREF(__pyx_k_tuple_97);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
-   PyTuple_SET_ITEM(__pyx_k_tuple_97, 0, ((PyObject *)__pyx_kp_s_19));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
-@@ -19913,7 +20566,7 @@
-  *             raise ValueError("scale <= 0.0")
-  */
-   __pyx_k_tuple_99 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_99));
-+  __Pyx_GOTREF(__pyx_k_tuple_99);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_98));
-   PyTuple_SET_ITEM(__pyx_k_tuple_99, 0, ((PyObject *)__pyx_kp_s_98));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_98));
-@@ -19927,7 +20580,7 @@
-  * 
-  */
-   __pyx_k_tuple_100 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_100));
-+  __Pyx_GOTREF(__pyx_k_tuple_100);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_93));
-   PyTuple_SET_ITEM(__pyx_k_tuple_100, 0, ((PyObject *)__pyx_kp_s_93));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_93));
-@@ -19941,7 +20594,7 @@
-  *                 raise ValueError("mode > right")
-  */
-   __pyx_k_tuple_102 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_102));
-+  __Pyx_GOTREF(__pyx_k_tuple_102);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_101));
-   PyTuple_SET_ITEM(__pyx_k_tuple_102, 0, ((PyObject *)__pyx_kp_s_101));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_101));
-@@ -19955,7 +20608,7 @@
-  *                 raise ValueError("left == right")
-  */
-   __pyx_k_tuple_104 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_104));
-+  __Pyx_GOTREF(__pyx_k_tuple_104);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_103));
-   PyTuple_SET_ITEM(__pyx_k_tuple_104, 0, ((PyObject *)__pyx_kp_s_103));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_103));
-@@ -19969,7 +20622,7 @@
-  *                                   fmode, fright)
-  */
-   __pyx_k_tuple_106 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_106));
-+  __Pyx_GOTREF(__pyx_k_tuple_106);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_105));
-   PyTuple_SET_ITEM(__pyx_k_tuple_106, 0, ((PyObject *)__pyx_kp_s_105));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_105));
-@@ -19983,7 +20636,7 @@
-  *             raise ValueError("mode > right")
-  */
-   __pyx_k_tuple_107 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_107));
-+  __Pyx_GOTREF(__pyx_k_tuple_107);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_101));
-   PyTuple_SET_ITEM(__pyx_k_tuple_107, 0, ((PyObject *)__pyx_kp_s_101));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_101));
-@@ -19997,7 +20650,7 @@
-  *             raise ValueError("left == right")
-  */
-   __pyx_k_tuple_108 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_108));
-+  __Pyx_GOTREF(__pyx_k_tuple_108);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_103));
-   PyTuple_SET_ITEM(__pyx_k_tuple_108, 0, ((PyObject *)__pyx_kp_s_103));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_103));
-@@ -20011,7 +20664,7 @@
-  *             omode, oright)
-  */
-   __pyx_k_tuple_109 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_109));
-+  __Pyx_GOTREF(__pyx_k_tuple_109);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_105));
-   PyTuple_SET_ITEM(__pyx_k_tuple_109, 0, ((PyObject *)__pyx_kp_s_105));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_105));
-@@ -20025,7 +20678,7 @@
-  *                 raise ValueError("p < 0")
-  */
-   __pyx_k_tuple_111 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_111));
-+  __Pyx_GOTREF(__pyx_k_tuple_111);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_110));
-   PyTuple_SET_ITEM(__pyx_k_tuple_111, 0, ((PyObject *)__pyx_kp_s_110));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_110));
-@@ -20039,7 +20692,7 @@
-  *                 raise ValueError("p > 1")
-  */
-   __pyx_k_tuple_113 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_113));
-+  __Pyx_GOTREF(__pyx_k_tuple_113);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_112));
-   PyTuple_SET_ITEM(__pyx_k_tuple_113, 0, ((PyObject *)__pyx_kp_s_112));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_112));
-@@ -20053,7 +20706,7 @@
-  * 
-  */
-   __pyx_k_tuple_115 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_115));
-+  __Pyx_GOTREF(__pyx_k_tuple_115);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_114));
-   PyTuple_SET_ITEM(__pyx_k_tuple_115, 0, ((PyObject *)__pyx_kp_s_114));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_114));
-@@ -20067,7 +20720,7 @@
-  *             raise ValueError("p < 0")
-  */
-   __pyx_k_tuple_116 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_116));
-+  __Pyx_GOTREF(__pyx_k_tuple_116);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_110));
-   PyTuple_SET_ITEM(__pyx_k_tuple_116, 0, ((PyObject *)__pyx_kp_s_110));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_110));
-@@ -20081,7 +20734,7 @@
-  *             raise ValueError("p > 1")
-  */
-   __pyx_k_tuple_117 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_117));
-+  __Pyx_GOTREF(__pyx_k_tuple_117);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_112));
-   PyTuple_SET_ITEM(__pyx_k_tuple_117, 0, ((PyObject *)__pyx_kp_s_112));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_112));
-@@ -20095,7 +20748,7 @@
-  * 
-  */
-   __pyx_k_tuple_118 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_118));
-+  __Pyx_GOTREF(__pyx_k_tuple_118);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_114));
-   PyTuple_SET_ITEM(__pyx_k_tuple_118, 0, ((PyObject *)__pyx_kp_s_114));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_114));
-@@ -20109,7 +20762,7 @@
-  *                 raise ValueError("p < 0")
-  */
-   __pyx_k_tuple_119 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_119)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_119));
-+  __Pyx_GOTREF(__pyx_k_tuple_119);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_110));
-   PyTuple_SET_ITEM(__pyx_k_tuple_119, 0, ((PyObject *)__pyx_kp_s_110));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_110));
-@@ -20123,7 +20776,7 @@
-  *                 raise ValueError("p > 1")
-  */
-   __pyx_k_tuple_120 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_120));
-+  __Pyx_GOTREF(__pyx_k_tuple_120);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_112));
-   PyTuple_SET_ITEM(__pyx_k_tuple_120, 0, ((PyObject *)__pyx_kp_s_112));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_112));
-@@ -20137,7 +20790,7 @@
-  *                                    size, fn, fp)
-  */
-   __pyx_k_tuple_121 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_121));
-+  __Pyx_GOTREF(__pyx_k_tuple_121);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_114));
-   PyTuple_SET_ITEM(__pyx_k_tuple_121, 0, ((PyObject *)__pyx_kp_s_114));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_114));
-@@ -20151,7 +20804,7 @@
-  *             raise ValueError("p < 0")
-  */
-   __pyx_k_tuple_122 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_122));
-+  __Pyx_GOTREF(__pyx_k_tuple_122);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_110));
-   PyTuple_SET_ITEM(__pyx_k_tuple_122, 0, ((PyObject *)__pyx_kp_s_110));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_110));
-@@ -20165,7 +20818,7 @@
-  *             raise ValueError("p > 1")
-  */
-   __pyx_k_tuple_123 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_123));
-+  __Pyx_GOTREF(__pyx_k_tuple_123);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_112));
-   PyTuple_SET_ITEM(__pyx_k_tuple_123, 0, ((PyObject *)__pyx_kp_s_112));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_112));
-@@ -20179,7 +20832,7 @@
-  *                             on, op)
-  */
-   __pyx_k_tuple_124 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_124));
-+  __Pyx_GOTREF(__pyx_k_tuple_124);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_114));
-   PyTuple_SET_ITEM(__pyx_k_tuple_124, 0, ((PyObject *)__pyx_kp_s_114));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_114));
-@@ -20193,7 +20846,7 @@
-  *                 raise ValueError("lam value too large")
-  */
-   __pyx_k_tuple_127 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_127));
-+  __Pyx_GOTREF(__pyx_k_tuple_127);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_126));
-   PyTuple_SET_ITEM(__pyx_k_tuple_127, 0, ((PyObject *)__pyx_kp_s_126));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_126));
-@@ -20207,7 +20860,7 @@
-  * 
-  */
-   __pyx_k_tuple_129 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_129));
-+  __Pyx_GOTREF(__pyx_k_tuple_129);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_128));
-   PyTuple_SET_ITEM(__pyx_k_tuple_129, 0, ((PyObject *)__pyx_kp_s_128));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_128));
-@@ -20221,7 +20874,7 @@
-  *             raise ValueError("lam value too large.")
-  */
-   __pyx_k_tuple_130 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_130)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_130));
-+  __Pyx_GOTREF(__pyx_k_tuple_130);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_126));
-   PyTuple_SET_ITEM(__pyx_k_tuple_130, 0, ((PyObject *)__pyx_kp_s_126));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_126));
-@@ -20235,7 +20888,7 @@
-  * 
-  */
-   __pyx_k_tuple_132 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_132));
-+  __Pyx_GOTREF(__pyx_k_tuple_132);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_131));
-   PyTuple_SET_ITEM(__pyx_k_tuple_132, 0, ((PyObject *)__pyx_kp_s_131));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_131));
-@@ -20249,7 +20902,7 @@
-  * 
-  */
-   __pyx_k_tuple_134 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_134));
-+  __Pyx_GOTREF(__pyx_k_tuple_134);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_133));
-   PyTuple_SET_ITEM(__pyx_k_tuple_134, 0, ((PyObject *)__pyx_kp_s_133));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_133));
-@@ -20263,7 +20916,7 @@
-  * 
-  */
-   __pyx_k_tuple_135 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_135));
-+  __Pyx_GOTREF(__pyx_k_tuple_135);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_133));
-   PyTuple_SET_ITEM(__pyx_k_tuple_135, 0, ((PyObject *)__pyx_kp_s_133));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_133));
-@@ -20277,7 +20930,7 @@
-  *                 raise ValueError("p > 1.0")
-  */
-   __pyx_k_tuple_137 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_137));
-+  __Pyx_GOTREF(__pyx_k_tuple_137);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_136));
-   PyTuple_SET_ITEM(__pyx_k_tuple_137, 0, ((PyObject *)__pyx_kp_s_136));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_136));
-@@ -20291,7 +20944,7 @@
-  * 
-  */
-   __pyx_k_tuple_139 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_139)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_139));
-+  __Pyx_GOTREF(__pyx_k_tuple_139);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_138));
-   PyTuple_SET_ITEM(__pyx_k_tuple_139, 0, ((PyObject *)__pyx_kp_s_138));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_138));
-@@ -20305,7 +20958,7 @@
-  *             raise ValueError("p > 1.0")
-  */
-   __pyx_k_tuple_140 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_140));
-+  __Pyx_GOTREF(__pyx_k_tuple_140);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_136));
-   PyTuple_SET_ITEM(__pyx_k_tuple_140, 0, ((PyObject *)__pyx_kp_s_136));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_136));
-@@ -20319,7 +20972,7 @@
-  * 
-  */
-   __pyx_k_tuple_141 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_141)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_141));
-+  __Pyx_GOTREF(__pyx_k_tuple_141);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_138));
-   PyTuple_SET_ITEM(__pyx_k_tuple_141, 0, ((PyObject *)__pyx_kp_s_138));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_138));
-@@ -20333,7 +20986,7 @@
-  *                 raise ValueError("nbad < 1")
-  */
-   __pyx_k_tuple_143 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_143)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_143));
-+  __Pyx_GOTREF(__pyx_k_tuple_143);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_142));
-   PyTuple_SET_ITEM(__pyx_k_tuple_143, 0, ((PyObject *)__pyx_kp_s_142));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_142));
-@@ -20347,7 +21000,7 @@
-  *                 raise ValueError("nsample < 1")
-  */
-   __pyx_k_tuple_145 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_145)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_145));
-+  __Pyx_GOTREF(__pyx_k_tuple_145);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_144));
-   PyTuple_SET_ITEM(__pyx_k_tuple_145, 0, ((PyObject *)__pyx_kp_s_144));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_144));
-@@ -20361,7 +21014,7 @@
-  *                 raise ValueError("ngood + nbad < nsample")
-  */
-   __pyx_k_tuple_147 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_147)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_147));
-+  __Pyx_GOTREF(__pyx_k_tuple_147);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_146));
-   PyTuple_SET_ITEM(__pyx_k_tuple_147, 0, ((PyObject *)__pyx_kp_s_146));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_146));
-@@ -20375,7 +21028,7 @@
-  *                                     lngood, lnbad, lnsample)
-  */
-   __pyx_k_tuple_149 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_149)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_149));
-+  __Pyx_GOTREF(__pyx_k_tuple_149);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_148));
-   PyTuple_SET_ITEM(__pyx_k_tuple_149, 0, ((PyObject *)__pyx_kp_s_148));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_148));
-@@ -20389,7 +21042,7 @@
-  *             raise ValueError("nbad < 1")
-  */
-   __pyx_k_tuple_150 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_150)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_150));
-+  __Pyx_GOTREF(__pyx_k_tuple_150);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_142));
-   PyTuple_SET_ITEM(__pyx_k_tuple_150, 0, ((PyObject *)__pyx_kp_s_142));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_142));
-@@ -20403,7 +21056,7 @@
-  *             raise ValueError("nsample < 1")
-  */
-   __pyx_k_tuple_151 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_151));
-+  __Pyx_GOTREF(__pyx_k_tuple_151);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_144));
-   PyTuple_SET_ITEM(__pyx_k_tuple_151, 0, ((PyObject *)__pyx_kp_s_144));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_144));
-@@ -20417,7 +21070,7 @@
-  *             raise ValueError("ngood + nbad < nsample")
-  */
-   __pyx_k_tuple_152 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_152));
-+  __Pyx_GOTREF(__pyx_k_tuple_152);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_146));
-   PyTuple_SET_ITEM(__pyx_k_tuple_152, 0, ((PyObject *)__pyx_kp_s_146));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_146));
-@@ -20431,7 +21084,7 @@
-  *             ongood, onbad, onsample)
-  */
-   __pyx_k_tuple_153 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_153)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_153));
-+  __Pyx_GOTREF(__pyx_k_tuple_153);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_148));
-   PyTuple_SET_ITEM(__pyx_k_tuple_153, 0, ((PyObject *)__pyx_kp_s_148));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_148));
-@@ -20445,7 +21098,7 @@
-  *                 raise ValueError("p >= 1.0")
-  */
-   __pyx_k_tuple_155 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_155)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_155));
-+  __Pyx_GOTREF(__pyx_k_tuple_155);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_154));
-   PyTuple_SET_ITEM(__pyx_k_tuple_155, 0, ((PyObject *)__pyx_kp_s_154));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_154));
-@@ -20459,7 +21112,7 @@
-  * 
-  */
-   __pyx_k_tuple_157 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_157)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_157));
-+  __Pyx_GOTREF(__pyx_k_tuple_157);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_156));
-   PyTuple_SET_ITEM(__pyx_k_tuple_157, 0, ((PyObject *)__pyx_kp_s_156));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_156));
-@@ -20473,7 +21126,7 @@
-  *             raise ValueError("p >= 1.0")
-  */
-   __pyx_k_tuple_158 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_158)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_158));
-+  __Pyx_GOTREF(__pyx_k_tuple_158);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_154));
-   PyTuple_SET_ITEM(__pyx_k_tuple_158, 0, ((PyObject *)__pyx_kp_s_154));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_154));
-@@ -20487,7 +21140,7 @@
-  * 
-  */
-   __pyx_k_tuple_159 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_159)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_159));
-+  __Pyx_GOTREF(__pyx_k_tuple_159);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_156));
-   PyTuple_SET_ITEM(__pyx_k_tuple_159, 0, ((PyObject *)__pyx_kp_s_156));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_156));
-@@ -20501,7 +21154,7 @@
-  *                raise ValueError("cov must be 2 dimensional and square")
-  */
-   __pyx_k_tuple_161 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_161)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_161));
-+  __Pyx_GOTREF(__pyx_k_tuple_161);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_160));
-   PyTuple_SET_ITEM(__pyx_k_tuple_161, 0, ((PyObject *)__pyx_kp_s_160));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_160));
-@@ -20515,7 +21168,7 @@
-  *                raise ValueError("mean and cov must have same length")
-  */
-   __pyx_k_tuple_163 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_163)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_163));
-+  __Pyx_GOTREF(__pyx_k_tuple_163);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_162));
-   PyTuple_SET_ITEM(__pyx_k_tuple_163, 0, ((PyObject *)__pyx_kp_s_162));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_162));
-@@ -20529,7 +21182,7 @@
-  *         if isinstance(shape, int):
-  */
-   __pyx_k_tuple_165 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_165)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_165));
-+  __Pyx_GOTREF(__pyx_k_tuple_165);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_164));
-   PyTuple_SET_ITEM(__pyx_k_tuple_165, 0, ((PyObject *)__pyx_kp_s_164));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_164));
-@@ -20543,7 +21196,7 @@
-  *         if size is None:
-  */
-   __pyx_k_tuple_168 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_168)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_168));
-+  __Pyx_GOTREF(__pyx_k_tuple_168);
-   __Pyx_INCREF(((PyObject *)__pyx_kp_s_167));
-   PyTuple_SET_ITEM(__pyx_k_tuple_168, 0, ((PyObject *)__pyx_kp_s_167));
-   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_167));
-@@ -20557,13 +21210,13 @@
-  *     def __init__(self, seed=None):
-  */
-   __pyx_k_tuple_169 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_169)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_169));
-+  __Pyx_GOTREF(__pyx_k_tuple_169);
-   __Pyx_INCREF(((PyObject *)__pyx_n_s__l));
-   PyTuple_SET_ITEM(__pyx_k_tuple_169, 0, ((PyObject *)__pyx_n_s__l));
-   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l));
-   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_169));
-   __pyx_k_tuple_170 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_170)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_170));
-+  __Pyx_GOTREF(__pyx_k_tuple_170);
-   __Pyx_INCREF(((PyObject *)__pyx_n_s__l));
-   PyTuple_SET_ITEM(__pyx_k_tuple_170, 0, ((PyObject *)__pyx_n_s__l));
-   __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l));
-@@ -20608,12 +21261,18 @@
-           Py_FatalError("failed to import 'refnanny' module");
-   }
-   #endif
--  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_mtrand(void)");
-+  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_mtrand(void)", 0);
-   if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  #ifdef __pyx_binding_PyCFunctionType_USED
--  if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  #ifdef __Pyx_CyFunction_USED
-+  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  #endif
-+  #ifdef __Pyx_FusedFunction_USED
-+  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  #endif
-+  #ifdef __Pyx_Generator_USED
-+  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-   #endif
-   /*--- Library function declarations ---*/
-   /*--- Threads initialization code ---*/
-@@ -20624,16 +21283,15 @@
-   #endif
-   /*--- Module creation code ---*/
-   #if PY_MAJOR_VERSION < 3
--  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("mtrand"), __pyx_methods, 0, 0, PYTHON_API_VERSION);
-+  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("mtrand"), __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
-   #else
-   __pyx_m = PyModule_Create(&__pyx_moduledef);
-   #endif
--  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
--  #if PY_MAJOR_VERSION < 3
--  Py_INCREF(__pyx_m);
-+  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-+  #if CYTHON_COMPILING_IN_PYPY
-+  Py_INCREF(__pyx_b);
-   #endif
--  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
--  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-   if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-   /*--- Initialize various global constants etc. ---*/
-   if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-@@ -20716,7 +21374,7 @@
-   __Pyx_GOTREF(__pyx_t_4);
-   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
--  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-+  __Pyx_GOTREF(__pyx_t_1);
-   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
-   __Pyx_GIVEREF(__pyx_t_4);
-   __pyx_t_4 = 0;
-@@ -21667,7 +22325,6 @@
- }
- 
- /* Runtime support code */
--
- #if CYTHON_REFNANNY
- static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
-     PyObject *m = NULL, *p = NULL;
-@@ -21700,9 +22357,9 @@
- }
- 
- static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
-+#if CYTHON_COMPILING_IN_CPYTHON
-     PyObject *tmp_type, *tmp_value, *tmp_tb;
-     PyThreadState *tstate = PyThreadState_GET();
--
-     tmp_type = tstate->curexc_type;
-     tmp_value = tstate->curexc_value;
-     tmp_tb = tstate->curexc_traceback;
-@@ -21712,55 +22369,60 @@
-     Py_XDECREF(tmp_type);
-     Py_XDECREF(tmp_value);
-     Py_XDECREF(tmp_tb);
-+#else
-+    PyErr_Restore(type, value, tb);
-+#endif
- }
--
- static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
-+#if CYTHON_COMPILING_IN_CPYTHON
-     PyThreadState *tstate = PyThreadState_GET();
-     *type = tstate->curexc_type;
-     *value = tstate->curexc_value;
-     *tb = tstate->curexc_traceback;
--
-     tstate->curexc_type = 0;
-     tstate->curexc_value = 0;
-     tstate->curexc_traceback = 0;
-+#else
-+    PyErr_Fetch(type, value, tb);
-+#endif
- }
- 
--
- #if PY_MAJOR_VERSION < 3
--static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
--    /* cause is unused */
-+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
-+                        CYTHON_UNUSED PyObject *cause) {
-     Py_XINCREF(type);
--    Py_XINCREF(value);
--    Py_XINCREF(tb);
--    /* First, check the traceback argument, replacing None with NULL. */
--    if (tb == Py_None) {
--        Py_DECREF(tb);
--        tb = 0;
--    }
--    else if (tb != NULL && !PyTraceBack_Check(tb)) {
--        PyErr_SetString(PyExc_TypeError,
--            "raise: arg 3 must be a traceback or None");
--        goto raise_error;
--    }
--    /* Next, replace a missing value with None */
--    if (value == NULL) {
--        value = Py_None;
-+    if (!value || value == Py_None)
-+        value = NULL;
-+    else
-         Py_INCREF(value);
-+    if (!tb || tb == Py_None)
-+        tb = NULL;
-+    else {
-+        Py_INCREF(tb);
-+        if (!PyTraceBack_Check(tb)) {
-+            PyErr_SetString(PyExc_TypeError,
-+                "raise: arg 3 must be a traceback or None");
-+            goto raise_error;
-+        }
-     }
-     #if PY_VERSION_HEX < 0x02050000
--    if (!PyClass_Check(type))
-+    if (PyClass_Check(type)) {
-     #else
--    if (!PyType_Check(type))
-+    if (PyType_Check(type)) {
-     #endif
--    {
--        /* Raising an instance.  The value should be a dummy. */
--        if (value != Py_None) {
-+#if CYTHON_COMPILING_IN_PYPY
-+        if (!value) {
-+            Py_INCREF(Py_None);
-+            value = Py_None;
-+        }
-+#endif
-+        PyErr_NormalizeException(&type, &value, &tb);
-+    } else {
-+        if (value) {
-             PyErr_SetString(PyExc_TypeError,
-                 "instance exception may not have a separate value");
-             goto raise_error;
-         }
--        /* Normalize to raise <class>, <instance> */
--        Py_DECREF(value);
-         value = type;
-         #if PY_VERSION_HEX < 0x02050000
-             if (PyInstance_Check(type)) {
-@@ -21783,7 +22445,6 @@
-             }
-         #endif
-     }
--
-     __Pyx_ErrRestore(type, value, tb);
-     return;
- raise_error:
-@@ -21792,10 +22453,9 @@
-     Py_XDECREF(tb);
-     return;
- }
--
- #else /* Python 3+ */
--
- static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
-+    PyObject* owned_instance = NULL;
-     if (tb == Py_None) {
-         tb = 0;
-     } else if (tb && !PyTraceBack_Check(tb)) {
-@@ -21805,7 +22465,6 @@
-     }
-     if (value == Py_None)
-         value = 0;
--
-     if (PyExceptionInstance_Check(type)) {
-         if (value) {
-             PyErr_SetString(PyExc_TypeError,
-@@ -21814,13 +22473,36 @@
-         }
-         value = type;
-         type = (PyObject*) Py_TYPE(value);
--    } else if (!PyExceptionClass_Check(type)) {
-+    } else if (PyExceptionClass_Check(type)) {
-+        PyObject *args;
-+        if (!value)
-+            args = PyTuple_New(0);
-+        else if (PyTuple_Check(value)) {
-+            Py_INCREF(value);
-+            args = value;
-+        }
-+        else
-+            args = PyTuple_Pack(1, value);
-+        if (!args)
-+            goto bad;
-+        owned_instance = PyEval_CallObject(type, args);
-+        Py_DECREF(args);
-+        if (!owned_instance)
-+            goto bad;
-+        value = owned_instance;
-+        if (!PyExceptionInstance_Check(value)) {
-+            PyErr_Format(PyExc_TypeError,
-+                         "calling %R should have returned an instance of "
-+                         "BaseException, not %R",
-+                         type, Py_TYPE(value));
-+            goto bad;
-+        }
-+    } else {
-         PyErr_SetString(PyExc_TypeError,
-             "raise: exception class must be a subclass of BaseException");
-         goto bad;
-     }
--
--    if (cause) {
-+    if (cause && cause != Py_None) {
-         PyObject *fixed_cause;
-         if (PyExceptionClass_Check(cause)) {
-             fixed_cause = PyObject_CallObject(cause, NULL);
-@@ -21837,14 +22519,9 @@
-                             "BaseException");
-             goto bad;
-         }
--        if (!value) {
--            value = PyObject_CallObject(type, NULL);
--        }
-         PyException_SetCause(value, fixed_cause);
-     }
--
-     PyErr_SetObject(type, value);
--
-     if (tb) {
-         PyThreadState *tstate = PyThreadState_GET();
-         PyObject* tmp_tb = tstate->curexc_traceback;
-@@ -21854,8 +22531,8 @@
-             Py_XDECREF(tmp_tb);
-         }
-     }
--
- bad:
-+    Py_XDECREF(owned_instance);
-     return;
- }
- #endif
-@@ -21869,7 +22546,7 @@
-         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
-         #else
-         "%s() got multiple values for keyword argument '%s'", func_name,
--        PyString_AS_STRING(kw_name));
-+        PyString_AsString(kw_name));
-         #endif
- }
- 
-@@ -21885,55 +22562,77 @@
-     Py_ssize_t pos = 0;
-     PyObject*** name;
-     PyObject*** first_kw_arg = argnames + num_pos_args;
--
-     while (PyDict_Next(kwds, &pos, &key, &value)) {
-         name = first_kw_arg;
-         while (*name && (**name != key)) name++;
-         if (*name) {
-             values[name-argnames] = value;
--        } else {
--            #if PY_MAJOR_VERSION < 3
--            if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
--            #else
--            if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
--            #endif
--                goto invalid_keyword_type;
--            } else {
--                for (name = first_kw_arg; *name; name++) {
--                    #if PY_MAJOR_VERSION >= 3
--                    if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
--                        PyUnicode_Compare(**name, key) == 0) break;
--                    #else
--                    if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
--                        _PyString_Eq(**name, key)) break;
--                    #endif
--                }
--                if (*name) {
-+            continue;
-+        }
-+        name = first_kw_arg;
-+        #if PY_MAJOR_VERSION < 3
-+        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
-+            while (*name) {
-+                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
-+                        && _PyString_Eq(**name, key)) {
-                     values[name-argnames] = value;
--                } else {
--                    /* unexpected keyword found */
--                    for (name=argnames; name != first_kw_arg; name++) {
--                        if (**name == key) goto arg_passed_twice;
--                        #if PY_MAJOR_VERSION >= 3
--                        if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
--                            PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
--                        #else
--                        if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
--                            _PyString_Eq(**name, key)) goto arg_passed_twice;
--                        #endif
--                    }
--                    if (kwds2) {
--                        if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
--                    } else {
--                        goto invalid_keyword;
-+                    break;
-+                }
-+                name++;
-+            }
-+            if (*name) continue;
-+            else {
-+                PyObject*** argname = argnames;
-+                while (argname != first_kw_arg) {
-+                    if ((**argname == key) || (
-+                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
-+                             && _PyString_Eq(**argname, key))) {
-+                        goto arg_passed_twice;
-                     }
-+                    argname++;
-                 }
-             }
-+        } else
-+        #endif
-+        if (likely(PyUnicode_Check(key))) {
-+            while (*name) {
-+                int cmp = (**name == key) ? 0 :
-+                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
-+                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
-+                #endif
-+                    PyUnicode_Compare(**name, key);
-+                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
-+                if (cmp == 0) {
-+                    values[name-argnames] = value;
-+                    break;
-+                }
-+                name++;
-+            }
-+            if (*name) continue;
-+            else {
-+                PyObject*** argname = argnames;
-+                while (argname != first_kw_arg) {
-+                    int cmp = (**argname == key) ? 0 :
-+                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
-+                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
-+                    #endif
-+                        PyUnicode_Compare(**argname, key);
-+                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
-+                    if (cmp == 0) goto arg_passed_twice;
-+                    argname++;
-+                }
-+            }
-+        } else
-+            goto invalid_keyword_type;
-+        if (kwds2) {
-+            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
-+        } else {
-+            goto invalid_keyword;
-         }
-     }
-     return 0;
- arg_passed_twice:
--    __Pyx_RaiseDoubleKeywordsError(function_name, **name);
-+    __Pyx_RaiseDoubleKeywordsError(function_name, key);
-     goto bad;
- invalid_keyword_type:
-     PyErr_Format(PyExc_TypeError,
-@@ -21961,7 +22660,6 @@
- {
-     Py_ssize_t num_expected;
-     const char *more_or_less;
--
-     if (num_found < num_min) {
-         num_expected = num_min;
-         more_or_less = "at least";
-@@ -21973,21 +22671,54 @@
-         more_or_less = "exactly";
-     }
-     PyErr_Format(PyExc_TypeError,
--                 "%s() takes %s %"PY_FORMAT_SIZE_T"d positional argument%s (%"PY_FORMAT_SIZE_T"d given)",
-+                 "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)",
-                  func_name, more_or_less, num_expected,
-                  (num_expected == 1) ? "" : "s", num_found);
- }
- 
-+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
-+    PyErr_Format(PyExc_ValueError,
-+                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
-+}
- 
- static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
-     PyErr_Format(PyExc_ValueError,
--                 "need more than %"PY_FORMAT_SIZE_T"d value%s to unpack",
-+                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack",
-                  index, (index == 1) ? "" : "s");
- }
- 
--static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
--    PyErr_Format(PyExc_ValueError,
--                 "too many values to unpack (expected %"PY_FORMAT_SIZE_T"d)", expected);
-+static CYTHON_INLINE int __Pyx_IterFinish(void) {
-+#if CYTHON_COMPILING_IN_CPYTHON
-+    PyThreadState *tstate = PyThreadState_GET();
-+    PyObject* exc_type = tstate->curexc_type;
-+    if (unlikely(exc_type)) {
-+        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
-+            PyObject *exc_value, *exc_tb;
-+            exc_value = tstate->curexc_value;
-+            exc_tb = tstate->curexc_traceback;
-+            tstate->curexc_type = 0;
-+            tstate->curexc_value = 0;
-+            tstate->curexc_traceback = 0;
-+            Py_DECREF(exc_type);
-+            Py_XDECREF(exc_value);
-+            Py_XDECREF(exc_tb);
-+            return 0;
-+        } else {
-+            return -1;
-+        }
-+    }
-+    return 0;
-+#else
-+    if (unlikely(PyErr_Occurred())) {
-+        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
-+            PyErr_Clear();
-+            return 0;
-+        } else {
-+            return -1;
-+        }
-+    }
-+    return 0;
-+#endif
- }
- 
- static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
-@@ -21995,19 +22726,15 @@
-         Py_DECREF(retval);
-         __Pyx_RaiseTooManyValuesError(expected);
-         return -1;
--    } else if (PyErr_Occurred()) {
--        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
--            PyErr_Clear();
--            return 0;
--        } else {
--            return -1;
--        }
-+    } else {
-+        return __Pyx_IterFinish();
-     }
-     return 0;
- }
- 
- static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
-     PyObject *local_type, *local_value, *local_tb;
-+#if CYTHON_COMPILING_IN_CPYTHON
-     PyObject *tmp_type, *tmp_value, *tmp_tb;
-     PyThreadState *tstate = PyThreadState_GET();
-     local_type = tstate->curexc_type;
-@@ -22016,19 +22743,27 @@
-     tstate->curexc_type = 0;
-     tstate->curexc_value = 0;
-     tstate->curexc_traceback = 0;
-+#else
-+    PyErr_Fetch(&local_type, &local_value, &local_tb);
-+#endif
-     PyErr_NormalizeException(&local_type, &local_value, &local_tb);
-+#if CYTHON_COMPILING_IN_CPYTHON
-     if (unlikely(tstate->curexc_type))
-+#else
-+    if (unlikely(PyErr_Occurred()))
-+#endif
-         goto bad;
-     #if PY_MAJOR_VERSION >= 3
-     if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
-         goto bad;
-     #endif
--    *type = local_type;
--    *value = local_value;
--    *tb = local_tb;
-     Py_INCREF(local_type);
-     Py_INCREF(local_value);
-     Py_INCREF(local_tb);
-+    *type = local_type;
-+    *value = local_value;
-+    *tb = local_tb;
-+#if CYTHON_COMPILING_IN_CPYTHON
-     tmp_type = tstate->exc_type;
-     tmp_value = tstate->exc_value;
-     tmp_tb = tstate->exc_traceback;
-@@ -22036,10 +22771,13 @@
-     tstate->exc_value = local_value;
-     tstate->exc_traceback = local_tb;
-     /* Make sure tstate is in a consistent state when we XDECREF
--       these objects (XDECREF may run arbitrary code). */
-+       these objects (DECREF may run arbitrary code). */
-     Py_XDECREF(tmp_type);
-     Py_XDECREF(tmp_value);
-     Py_XDECREF(tmp_tb);
-+#else
-+    PyErr_SetExcInfo(local_type, local_value, local_tb);
-+#endif
-     return 0;
- bad:
-     *type = 0;
-@@ -22051,7 +22789,6 @@
-     return -1;
- }
- 
--
- static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
-     PyObject *kwdict,
-     const char* function_name,
-@@ -22059,13 +22796,17 @@
- {
-     PyObject* key = 0;
-     Py_ssize_t pos = 0;
-+#if CPYTHON_COMPILING_IN_PYPY
-+    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
-+        goto invalid_keyword;
-+    return 1;
-+#else
-     while (PyDict_Next(kwdict, &pos, &key, 0)) {
-         #if PY_MAJOR_VERSION < 3
-         if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
--        #else
--        if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key)))
-         #endif
--            goto invalid_keyword_type;
-+            if (unlikely(!PyUnicode_Check(key)))
-+                goto invalid_keyword_type;
-     }
-     if ((!kw_allowed) && unlikely(key))
-         goto invalid_keyword;
-@@ -22074,6 +22815,7 @@
-     PyErr_Format(PyExc_TypeError,
-         "%s() keywords must be strings", function_name);
-     return 0;
-+#endif
- invalid_keyword:
-     PyErr_Format(PyExc_TypeError,
-     #if PY_MAJOR_VERSION < 3
-@@ -22098,8 +22840,8 @@
-     return 0;
- }
- 
--
- static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
-+#if CYTHON_COMPILING_IN_CPYTHON
-     PyThreadState *tstate = PyThreadState_GET();
-     *type = tstate->exc_type;
-     *value = tstate->exc_value;
-@@ -22107,9 +22849,12 @@
-     Py_XINCREF(*type);
-     Py_XINCREF(*value);
-     Py_XINCREF(*tb);
-+#else
-+    PyErr_GetExcInfo(type, value, tb);
-+#endif
- }
--
- static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
-+#if CYTHON_COMPILING_IN_CPYTHON
-     PyObject *tmp_type, *tmp_value, *tmp_tb;
-     PyThreadState *tstate = PyThreadState_GET();
-     tmp_type = tstate->exc_type;
-@@ -22121,6 +22866,9 @@
-     Py_XDECREF(tmp_type);
-     Py_XDECREF(tmp_value);
-     Py_XDECREF(tmp_tb);
-+#else
-+    PyErr_SetExcInfo(type, value, tb);
-+#endif
- }
- 
- static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
-@@ -22149,12 +22897,33 @@
-         goto bad;
-     #if PY_VERSION_HEX >= 0x02050000
-     {
--        PyObject *py_level = PyInt_FromLong(level);
--        if (!py_level)
--            goto bad;
--        module = PyObject_CallFunctionObjArgs(py_import,
--            name, global_dict, empty_dict, list, py_level, NULL);
--        Py_DECREF(py_level);
-+        #if PY_MAJOR_VERSION >= 3
-+        if (level == -1) {
-+            if (strchr(__Pyx_MODULE_NAME, '.')) {
-+                /* try package relative import first */
-+                PyObject *py_level = PyInt_FromLong(1);
-+                if (!py_level)
-+                    goto bad;
-+                module = PyObject_CallFunctionObjArgs(py_import,
-+                    name, global_dict, empty_dict, list, py_level, NULL);
-+                Py_DECREF(py_level);
-+                if (!module) {
-+                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
-+                        goto bad;
-+                    PyErr_Clear();
-+                }
-+            }
-+            level = 0; /* try absolute import on failure */
-+        }
-+        #endif
-+        if (!module) {
-+            PyObject *py_level = PyInt_FromLong(level);
-+            if (!py_level)
-+                goto bad;
-+            module = PyObject_CallFunctionObjArgs(py_import,
-+                name, global_dict, empty_dict, list, py_level, NULL);
-+            Py_DECREF(py_level);
-+        }
-     }
-     #else
-     if (level>0) {
-@@ -22171,66 +22940,65 @@
-     return module;
- }
- 
--static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
--    if (s1 == s2) {   /* as done by PyObject_RichCompareBool(); also catches the (interned) empty string */
--        return (equals == Py_EQ);
--    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
--        if (PyBytes_GET_SIZE(s1) != PyBytes_GET_SIZE(s2)) {
--            return (equals == Py_NE);
--        } else if (PyBytes_GET_SIZE(s1) == 1) {
--            if (equals == Py_EQ)
--                return (PyBytes_AS_STRING(s1)[0] == PyBytes_AS_STRING(s2)[0]);
--            else
--                return (PyBytes_AS_STRING(s1)[0] != PyBytes_AS_STRING(s2)[0]);
--        } else {
--            int result = memcmp(PyBytes_AS_STRING(s1), PyBytes_AS_STRING(s2), (size_t)PyBytes_GET_SIZE(s1));
--            return (equals == Py_EQ) ? (result == 0) : (result != 0);
-+static CYTHON_INLINE npy_intp __Pyx_PyInt_from_py_npy_intp(PyObject* x) {
-+    const npy_intp neg_one = (npy_intp)-1, const_zero = (npy_intp)0;
-+    const int is_unsigned = const_zero < neg_one;
-+    if (sizeof(npy_intp) == sizeof(char)) {
-+        if (is_unsigned)
-+            return (npy_intp)__Pyx_PyInt_AsUnsignedChar(x);
-+        else
-+            return (npy_intp)__Pyx_PyInt_AsSignedChar(x);
-+    } else if (sizeof(npy_intp) == sizeof(short)) {
-+        if (is_unsigned)
-+            return (npy_intp)__Pyx_PyInt_AsUnsignedShort(x);
-+        else
-+            return (npy_intp)__Pyx_PyInt_AsSignedShort(x);
-+    } else if (sizeof(npy_intp) == sizeof(int)) {
-+        if (is_unsigned)
-+            return (npy_intp)__Pyx_PyInt_AsUnsignedInt(x);
-+        else
-+            return (npy_intp)__Pyx_PyInt_AsSignedInt(x);
-+    } else if (sizeof(npy_intp) == sizeof(long)) {
-+        if (is_unsigned)
-+            return (npy_intp)__Pyx_PyInt_AsUnsignedLong(x);
-+        else
-+            return (npy_intp)__Pyx_PyInt_AsSignedLong(x);
-+    } else if (sizeof(npy_intp) == sizeof(PY_LONG_LONG)) {
-+        if (is_unsigned)
-+            return (npy_intp)__Pyx_PyInt_AsUnsignedLongLong(x);
-+        else
-+            return (npy_intp)__Pyx_PyInt_AsSignedLongLong(x);
-+    }  else {
-+        npy_intp val;
-+        PyObject *v = __Pyx_PyNumber_Int(x);
-+        #if PY_VERSION_HEX < 0x03000000
-+        if (likely(v) && !PyLong_Check(v)) {
-+            PyObject *tmp = v;
-+            v = PyNumber_Long(tmp);
-+            Py_DECREF(tmp);
-         }
--    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
--        return (equals == Py_NE);
--    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
--        return (equals == Py_NE);
--    } else {
--        int result;
--        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
--        if (!py_result)
--            return -1;
--        result = __Pyx_PyObject_IsTrue(py_result);
--        Py_DECREF(py_result);
--        return result;
-+        #endif
-+        if (likely(v)) {
-+            int one = 1; int is_little = (int)*(unsigned char *)&one;
-+            unsigned char *bytes = (unsigned char *)&val;
-+            int ret = _PyLong_AsByteArray((PyLongObject *)v,
-+                                          bytes, sizeof(val),
-+                                          is_little, !is_unsigned);
-+            Py_DECREF(v);
-+            if (likely(!ret))
-+                return val;
-+        }
-+        return (npy_intp)-1;
-     }
- }
- 
--static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
--    if (s1 == s2) {   /* as done by PyObject_RichCompareBool(); also catches the (interned) empty string */
--        return (equals == Py_EQ);
--    } else if (PyUnicode_CheckExact(s1) & PyUnicode_CheckExact(s2)) {
--        if (PyUnicode_GET_SIZE(s1) != PyUnicode_GET_SIZE(s2)) {
--            return (equals == Py_NE);
--        } else if (PyUnicode_GET_SIZE(s1) == 1) {
--            if (equals == Py_EQ)
--                return (PyUnicode_AS_UNICODE(s1)[0] == PyUnicode_AS_UNICODE(s2)[0]);
--            else
--                return (PyUnicode_AS_UNICODE(s1)[0] != PyUnicode_AS_UNICODE(s2)[0]);
--        } else {
--            int result = PyUnicode_Compare(s1, s2);
--            if ((result == -1) && unlikely(PyErr_Occurred()))
--                return -1;
--            return (equals == Py_EQ) ? (result == 0) : (result != 0);
--        }
--    } else if ((s1 == Py_None) & PyUnicode_CheckExact(s2)) {
--        return (equals == Py_NE);
--    } else if ((s2 == Py_None) & PyUnicode_CheckExact(s1)) {
--        return (equals == Py_NE);
--    } else {
--        int result;
--        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
--        if (!py_result)
--            return -1;
--        result = __Pyx_PyObject_IsTrue(py_result);
--        Py_DECREF(py_result);
--        return result;
--    }
-+static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) {
-+#if PY_MAJOR_VERSION < 3
-+    PyErr_Format(PyExc_ImportError, "cannot import name %.230s",
-+                 PyString_AsString(name));
-+#else
-+    PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
-+#endif
- }
- 
- static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp val) {
-@@ -22658,58 +23426,6 @@
-     }
- }
- 
--static CYTHON_INLINE npy_intp __Pyx_PyInt_from_py_npy_intp(PyObject* x) {
--    const npy_intp neg_one = (npy_intp)-1, const_zero = (npy_intp)0;
--    const int is_unsigned = const_zero < neg_one;
--    if (sizeof(npy_intp) == sizeof(char)) {
--        if (is_unsigned)
--            return (npy_intp)__Pyx_PyInt_AsUnsignedChar(x);
--        else
--            return (npy_intp)__Pyx_PyInt_AsSignedChar(x);
--    } else if (sizeof(npy_intp) == sizeof(short)) {
--        if (is_unsigned)
--            return (npy_intp)__Pyx_PyInt_AsUnsignedShort(x);
--        else
--            return (npy_intp)__Pyx_PyInt_AsSignedShort(x);
--    } else if (sizeof(npy_intp) == sizeof(int)) {
--        if (is_unsigned)
--            return (npy_intp)__Pyx_PyInt_AsUnsignedInt(x);
--        else
--            return (npy_intp)__Pyx_PyInt_AsSignedInt(x);
--    } else if (sizeof(npy_intp) == sizeof(long)) {
--        if (is_unsigned)
--            return (npy_intp)__Pyx_PyInt_AsUnsignedLong(x);
--        else
--            return (npy_intp)__Pyx_PyInt_AsSignedLong(x);
--    } else if (sizeof(npy_intp) == sizeof(PY_LONG_LONG)) {
--        if (is_unsigned)
--            return (npy_intp)__Pyx_PyInt_AsUnsignedLongLong(x);
--        else
--            return (npy_intp)__Pyx_PyInt_AsSignedLongLong(x);
--    }  else {
--        npy_intp val;
--        PyObject *v = __Pyx_PyNumber_Int(x);
--        #if PY_VERSION_HEX < 0x03000000
--        if (likely(v) && !PyLong_Check(v)) {
--            PyObject *tmp = v;
--            v = PyNumber_Long(tmp);
--            Py_DECREF(tmp);
--        }
--        #endif
--        if (likely(v)) {
--            int one = 1; int is_little = (int)*(unsigned char *)&one;
--            unsigned char *bytes = (unsigned char *)&val;
--            int ret = _PyLong_AsByteArray((PyLongObject *)v,
--                                          bytes, sizeof(val),
--                                          is_little, !is_unsigned);
--            Py_DECREF(v);
--            if (likely(!ret))
--                return val;
--        }
--        return (npy_intp)-1;
--    }
--}
--
- static int __Pyx_check_binary_version(void) {
-     char ctversion[4], rtversion[4];
-     PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
-@@ -22729,6 +23445,23 @@
-     return 0;
- }
- 
-+#ifndef __PYX_HAVE_RT_ImportModule
-+#define __PYX_HAVE_RT_ImportModule
-+static PyObject *__Pyx_ImportModule(const char *name) {
-+    PyObject *py_name = 0;
-+    PyObject *py_module = 0;
-+    py_name = __Pyx_PyIdentifier_FromString(name);
-+    if (!py_name)
-+        goto bad;
-+    py_module = PyImport_Import(py_name);
-+    Py_DECREF(py_name);
-+    return py_module;
-+bad:
-+    Py_XDECREF(py_name);
-+    return 0;
-+}
-+#endif
-+
- #ifndef __PYX_HAVE_RT_ImportType
- #define __PYX_HAVE_RT_ImportType
- static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
-@@ -22738,15 +23471,10 @@
-     PyObject *result = 0;
-     PyObject *py_name = 0;
-     char warning[200];
--
-     py_module = __Pyx_ImportModule(module_name);
-     if (!py_module)
-         goto bad;
--    #if PY_MAJOR_VERSION < 3
--    py_name = PyString_FromString(class_name);
--    #else
--    py_name = PyUnicode_FromString(class_name);
--    #endif
-+    py_name = __Pyx_PyIdentifier_FromString(class_name);
-     if (!py_name)
-         goto bad;
-     result = PyObject_GetAttr(py_module, py_name);
-@@ -22762,7 +23490,7 @@
-             module_name, class_name);
-         goto bad;
-     }
--    if (!strict && ((PyTypeObject *)result)->tp_basicsize > (Py_ssize_t)size) {
-+    if (!strict && (size_t)((PyTypeObject *)result)->tp_basicsize > size) {
-         PyOS_snprintf(warning, sizeof(warning),
-             "%s.%s size changed, may indicate binary incompatibility",
-             module_name, class_name);
-@@ -22772,7 +23500,7 @@
-         if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
-         #endif
-     }
--    else if (((PyTypeObject *)result)->tp_basicsize != (Py_ssize_t)size) {
-+    else if ((size_t)((PyTypeObject *)result)->tp_basicsize != size) {
-         PyErr_Format(PyExc_ValueError,
-             "%s.%s has the wrong size, try recompiling",
-             module_name, class_name);
-@@ -22786,51 +23514,105 @@
- }
- #endif
- 
--#ifndef __PYX_HAVE_RT_ImportModule
--#define __PYX_HAVE_RT_ImportModule
--static PyObject *__Pyx_ImportModule(const char *name) {
--    PyObject *py_name = 0;
--    PyObject *py_module = 0;
--
--    #if PY_MAJOR_VERSION < 3
--    py_name = PyString_FromString(name);
--    #else
--    py_name = PyUnicode_FromString(name);
--    #endif
--    if (!py_name)
--        goto bad;
--    py_module = PyImport_Import(py_name);
--    Py_DECREF(py_name);
--    return py_module;
--bad:
--    Py_XDECREF(py_name);
--    return 0;
-+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
-+    int start = 0, mid = 0, end = count - 1;
-+    if (end >= 0 && code_line > entries[end].code_line) {
-+        return count;
-+    }
-+    while (start < end) {
-+        mid = (start + end) / 2;
-+        if (code_line < entries[mid].code_line) {
-+            end = mid;
-+        } else if (code_line > entries[mid].code_line) {
-+             start = mid + 1;
-+        } else {
-+            return mid;
-+        }
-+    }
-+    if (code_line <= entries[mid].code_line) {
-+        return mid;
-+    } else {
-+        return mid + 1;
-+    }
-+}
-+static PyCodeObject *__pyx_find_code_object(int code_line) {
-+    PyCodeObject* code_object;
-+    int pos;
-+    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
-+        return NULL;
-+    }
-+    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
-+    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
-+        return NULL;
-+    }
-+    code_object = __pyx_code_cache.entries[pos].code_object;
-+    Py_INCREF(code_object);
-+    return code_object;
-+}
-+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
-+    int pos, i;
-+    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
-+    if (unlikely(!code_line)) {
-+        return;
-+    }
-+    if (unlikely(!entries)) {
-+        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
-+        if (likely(entries)) {
-+            __pyx_code_cache.entries = entries;
-+            __pyx_code_cache.max_count = 64;
-+            __pyx_code_cache.count = 1;
-+            entries[0].code_line = code_line;
-+            entries[0].code_object = code_object;
-+            Py_INCREF(code_object);
-+        }
-+        return;
-+    }
-+    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
-+    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
-+        PyCodeObject* tmp = entries[pos].code_object;
-+        entries[pos].code_object = code_object;
-+        Py_DECREF(tmp);
-+        return;
-+    }
-+    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
-+        int new_max = __pyx_code_cache.max_count + 64;
-+        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
-+            __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
-+        if (unlikely(!entries)) {
-+            return;
-+        }
-+        __pyx_code_cache.entries = entries;
-+        __pyx_code_cache.max_count = new_max;
-+    }
-+    for (i=__pyx_code_cache.count; i>pos; i--) {
-+        entries[i] = entries[i-1];
-+    }
-+    entries[pos].code_line = code_line;
-+    entries[pos].code_object = code_object;
-+    __pyx_code_cache.count++;
-+    Py_INCREF(code_object);
- }
--#endif
- 
- #include "compile.h"
- #include "frameobject.h"
- #include "traceback.h"
--
--static void __Pyx_AddTraceback(const char *funcname, int __pyx_clineno,
--                               int __pyx_lineno, const char *__pyx_filename) {
-+static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
-+            const char *funcname, int c_line,
-+            int py_line, const char *filename) {
-+    PyCodeObject *py_code = 0;
-     PyObject *py_srcfile = 0;
-     PyObject *py_funcname = 0;
--    PyObject *py_globals = 0;
--    PyCodeObject *py_code = 0;
--    PyFrameObject *py_frame = 0;
--
-     #if PY_MAJOR_VERSION < 3
--    py_srcfile = PyString_FromString(__pyx_filename);
-+    py_srcfile = PyString_FromString(filename);
-     #else
--    py_srcfile = PyUnicode_FromString(__pyx_filename);
-+    py_srcfile = PyUnicode_FromString(filename);
-     #endif
-     if (!py_srcfile) goto bad;
--    if (__pyx_clineno) {
-+    if (c_line) {
-         #if PY_MAJOR_VERSION < 3
--        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
-+        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
-         #else
--        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
-+        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
-         #endif
-     }
-     else {
-@@ -22841,28 +23623,45 @@
-         #endif
-     }
-     if (!py_funcname) goto bad;
--    py_globals = PyModule_GetDict(__pyx_m);
--    if (!py_globals) goto bad;
--    py_code = PyCode_New(
-+    py_code = __Pyx_PyCode_New(
-         0,            /*int argcount,*/
--        #if PY_MAJOR_VERSION >= 3
-         0,            /*int kwonlyargcount,*/
--        #endif
-         0,            /*int nlocals,*/
-         0,            /*int stacksize,*/
-         0,            /*int flags,*/
-         __pyx_empty_bytes, /*PyObject *code,*/
--        __pyx_empty_tuple,  /*PyObject *consts,*/
--        __pyx_empty_tuple,  /*PyObject *names,*/
--        __pyx_empty_tuple,  /*PyObject *varnames,*/
--        __pyx_empty_tuple,  /*PyObject *freevars,*/
--        __pyx_empty_tuple,  /*PyObject *cellvars,*/
-+        __pyx_empty_tuple, /*PyObject *consts,*/
-+        __pyx_empty_tuple, /*PyObject *names,*/
-+        __pyx_empty_tuple, /*PyObject *varnames,*/
-+        __pyx_empty_tuple, /*PyObject *freevars,*/
-+        __pyx_empty_tuple, /*PyObject *cellvars,*/
-         py_srcfile,   /*PyObject *filename,*/
-         py_funcname,  /*PyObject *name,*/
--        __pyx_lineno,   /*int firstlineno,*/
-+        py_line,      /*int firstlineno,*/
-         __pyx_empty_bytes  /*PyObject *lnotab*/
-     );
--    if (!py_code) goto bad;
-+    Py_DECREF(py_srcfile);
-+    Py_DECREF(py_funcname);
-+    return py_code;
-+bad:
-+    Py_XDECREF(py_srcfile);
-+    Py_XDECREF(py_funcname);
-+    return NULL;
-+}
-+static void __Pyx_AddTraceback(const char *funcname, int c_line,
-+                               int py_line, const char *filename) {
-+    PyCodeObject *py_code = 0;
-+    PyObject *py_globals = 0;
-+    PyFrameObject *py_frame = 0;
-+    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
-+    if (!py_code) {
-+        py_code = __Pyx_CreateCodeObjectForTraceback(
-+            funcname, c_line, py_line, filename);
-+        if (!py_code) goto bad;
-+        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
-+    }
-+    py_globals = PyModule_GetDict(__pyx_m);
-+    if (!py_globals) goto bad;
-     py_frame = PyFrame_New(
-         PyThreadState_GET(), /*PyThreadState *tstate,*/
-         py_code,             /*PyCodeObject *code,*/
-@@ -22870,11 +23669,9 @@
-         0                    /*PyObject *locals*/
-     );
-     if (!py_frame) goto bad;
--    py_frame->f_lineno = __pyx_lineno;
-+    py_frame->f_lineno = py_line;
-     PyTraceBack_Here(py_frame);
- bad:
--    Py_XDECREF(py_srcfile);
--    Py_XDECREF(py_funcname);
-     Py_XDECREF(py_code);
-     Py_XDECREF(py_frame);
- }
-@@ -22909,6 +23706,7 @@
-     return 0;
- }
- 
-+
- /* Type Conversion Functions */
- 
- static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
diff --git a/dports/python/py-numpy/files/patch-python33-shape.diff b/dports/python/py-numpy/files/patch-python33-shape.diff
deleted file mode 100644
--- a/dports/python/py-numpy/files/patch-python33-shape.diff
+++ /dev/null
@@ -1,88 +0,0 @@
---- numpy/core/tests/test_multiarray.py
-+++ numpy/core/tests/test_multiarray.py
-@@ -11,10 +11,19 @@
- 
- from numpy.compat import asbytes, getexception, strchar
- 
- from test_print import in_foreign_locale
- 
-+if sys.version_info[:2] > (3, 2):
-+    # In Python 3.3 the representation of empty shape, strides and suboffsets
-+    # is an empty tuple instead of None.
-+    # http://docs.python.org/dev/whatsnew/3.3.html#api-changes
-+    EMPTY = ()
-+else:    
-+    EMPTY = None
-+
-+
- class TestFlags(TestCase):
-     def setUp(self):
-         self.a = arange(10)
- 
-     def test_writeable(self):
-@@ -2160,31 +2169,31 @@
-             y = memoryview(x)
-             assert_equal(y.format, 'i')
-             assert_equal(y.shape, (5,))
-             assert_equal(y.ndim, 1)
-             assert_equal(y.strides, (4,))
--            assert_equal(y.suboffsets, None)
-+            assert_equal(y.suboffsets, EMPTY)
-             assert_equal(y.itemsize, 4)
- 
-         def test_export_simple_nd(self):
-             x = np.array([[1,2],[3,4]], dtype=np.float64)
-             y = memoryview(x)
-             assert_equal(y.format, 'd')
-             assert_equal(y.shape, (2, 2))
-             assert_equal(y.ndim, 2)
-             assert_equal(y.strides, (16, 8))
--            assert_equal(y.suboffsets, None)
-+            assert_equal(y.suboffsets, EMPTY)
-             assert_equal(y.itemsize, 8)
- 
-         def test_export_discontiguous(self):
-             x = np.zeros((3,3,3), dtype=np.float32)[:,0,:]
-             y = memoryview(x)
-             assert_equal(y.format, 'f')
-             assert_equal(y.shape, (3, 3))
-             assert_equal(y.ndim, 2)
-             assert_equal(y.strides, (36, 4))
--            assert_equal(y.suboffsets, None)
-+            assert_equal(y.suboffsets, EMPTY)
-             assert_equal(y.itemsize, 4)
- 
-         def test_export_record(self):
-             dt = [('a', 'b'),
-                   ('b', 'h'),
-@@ -2212,11 +2221,11 @@
-                            asbytes('aaaa'), 'bbbb', asbytes('   '), True, 1.0)],
-                          dtype=dt)
-             y = memoryview(x)
-             assert_equal(y.shape, (1,))
-             assert_equal(y.ndim, 1)
--            assert_equal(y.suboffsets, None)
-+            assert_equal(y.suboffsets, EMPTY)
- 
-             sz = sum([dtype(b).itemsize for a, b in dt])
-             if dtype('l').itemsize == 4:
-                 assert_equal(y.format, 'T{b:a:=h:b:i:c:l:d:^q:dx:B:e:@H:f:=I:g:L:h:^Q:hx:=f:i:d:j:^g:k:=Zf:ix:Zd:jx:^Zg:kx:4s:l:=4w:m:3x:n:?:o:@e:p:}')
-             else:
-@@ -2226,14 +2235,14 @@
- 
-         def test_export_subarray(self):
-             x = np.array(([[1,2],[3,4]],), dtype=[('a', ('i', (2,2)))])
-             y = memoryview(x)
-             assert_equal(y.format, 'T{(2,2)i:a:}')
--            assert_equal(y.shape, None)
-+            assert_equal(y.shape, EMPTY)
-             assert_equal(y.ndim, 0)
--            assert_equal(y.strides, None)
--            assert_equal(y.suboffsets, None)
-+            assert_equal(y.strides, EMPTY)
-+            assert_equal(y.suboffsets, EMPTY)
-             assert_equal(y.itemsize, 16)
- 
-         def test_export_endian(self):
-             x = np.array([1,2,3], dtype='>i')
-             y = memoryview(x)
diff --git a/dports/python/py-numpy/files/patch-python33-unicode.diff b/dports/python/py-numpy/files/patch-python33-unicode.diff
deleted file mode 100644
--- a/dports/python/py-numpy/files/patch-python33-unicode.diff
+++ /dev/null
@@ -1,105 +0,0 @@
---- numpy/core/src/multiarray/scalarapi.c
-+++ numpy/core/src/multiarray/scalarapi.c
-@@ -650,10 +650,39 @@
-              * so round up to nearest multiple
-              */
-             itemsize = (((itemsize - 1) >> 2) + 1) << 2;
-         }
-     }
-+#if PY_VERSION_HEX >= 0x03030000
-+    if (type_num == NPY_UNICODE) {
-+        PyObject *u, *args;
-+        int byteorder;
-+
-+#if NPY_BYTE_ORDER == NPY_LITTLE_ENDIAN
-+        byteorder = -1;
-+#elif NPY_BYTE_ORDER == NPY_BIG_ENDIAN
-+        byteorder = +1;
-+#else
-+        #error Endianness undefined ?
-+#endif
-+        if (swap) byteorder *= -1;
-+
-+        u = PyUnicode_DecodeUTF32(data, itemsize, NULL, &byteorder);
-+        if (u == NULL) {
-+            return NULL;
-+        }
-+        args = Py_BuildValue("(O)", u);
-+        if (args == NULL) {
-+            Py_DECREF(u);
-+            return NULL;
-+        }
-+        obj = type->tp_new(type, args, NULL);
-+        Py_DECREF(u);
-+        Py_DECREF(args);
-+        return obj;
-+    }
-+#endif
-     if (type->tp_itemsize != 0) {
-         /* String type */
-         obj = type->tp_alloc(type, itemsize);
-     }
-     else {
-@@ -686,10 +715,11 @@
-             ((PyStringObject *)obj)->ob_sstate = SSTATE_NOT_INTERNED;
- #endif
-             memcpy(destptr, data, itemsize);
-             return obj;
-         }
-+#if PY_VERSION_HEX < 0x03030000
-         else if (type_num == PyArray_UNICODE) {
-             /* tp_alloc inherited from Python PyBaseObject_Type */
-             PyUnicodeObject *uni = (PyUnicodeObject*)obj;
-             size_t length = itemsize >> 2;
-             Py_UNICODE *dst;
-@@ -757,10 +787,11 @@
-             uni->str[length] = 0;
-             uni->length = length;
- #endif
-             return obj;
-         }
-+#endif /* PY_VERSION_HEX < 0x03030000 */
-         else {
-             PyVoidScalarObject *vobj = (PyVoidScalarObject *)obj;
-             vobj->base = NULL;
-             vobj->descr = descr;
-             Py_INCREF(descr);
---- numpy/core/src/multiarray/scalartypes.c.src
-+++ numpy/core/src/multiarray/scalartypes.c.src
-@@ -2321,11 +2321,15 @@
-     Py_DECREF(typecode);
- #if @default@ == 0
-     *((npy_@name@ *)dest) = *((npy_@name@ *)src);
- #elif @default@ == 1 /* unicode and strings */
-     if (itemsize == 0) { /* unicode */
-+#if PY_VERSION_HEX >= 0x03030000
-+        itemsize = PyUnicode_GetLength(robj) * PyUnicode_KIND(robj);
-+#else
-         itemsize = ((PyUnicodeObject *)robj)->length * sizeof(Py_UNICODE);
-+#endif
-     }
-     memcpy(dest, src, itemsize);
-     /* @default@ == 2 won't get here */
- #endif
-     Py_DECREF(robj);
---- numpy/core/tests/test_unicode.py
-+++ numpy/core/tests/test_unicode.py
-@@ -24,14 +24,16 @@
-     def buffer_length(arr):
-         if isinstance(arr, ndarray):
-             return len(arr.data)
-         return len(buffer(arr))
- 
-+# In both cases below we need to make sure that the byte swapped value (as
-+# UCS4) is still a valid unicode:
- # Value that can be represented in UCS2 interpreters
--ucs2_value = u'\uFFFF'
-+ucs2_value = u'\u0900'
- # Value that cannot be represented in UCS2 interpreters (but can in UCS4)
--ucs4_value = u'\U0010FFFF'
-+ucs4_value = u'\U00100900'
- 
- 
- ############################################################
- #    Creation tests
- ############################################################
