"Fossies" - the Fresh Open Source Software Archive

Member "numpy-1.16.4/numpy/random/mtrand/mtrand.c" (27 May 2019, 2277407 Bytes) of package /linux/misc/numpy-1.16.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "mtrand.c" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 1.16.2_vs_1.16.3.

    1 /* Generated by Cython 0.29 */
    2 
    3 #define PY_SSIZE_T_CLEAN
    4 #include "Python.h"
    5 #ifndef Py_PYTHON_H
    6     #error Python headers needed to compile C extensions, please install development version of Python.
    7 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    8     #error Cython requires Python 2.6+ or Python 3.3+.
    9 #else
   10 #define CYTHON_ABI "0_29"
   11 #define CYTHON_HEX_VERSION 0x001D00F0
   12 #define CYTHON_FUTURE_DIVISION 0
   13 #include <stddef.h>
   14 #ifndef offsetof
   15   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
   16 #endif
   17 #if !defined(WIN32) && !defined(MS_WINDOWS)
   18   #ifndef __stdcall
   19     #define __stdcall
   20   #endif
   21   #ifndef __cdecl
   22     #define __cdecl
   23   #endif
   24   #ifndef __fastcall
   25     #define __fastcall
   26   #endif
   27 #endif
   28 #ifndef DL_IMPORT
   29   #define DL_IMPORT(t) t
   30 #endif
   31 #ifndef DL_EXPORT
   32   #define DL_EXPORT(t) t
   33 #endif
   34 #define __PYX_COMMA ,
   35 #ifndef HAVE_LONG_LONG
   36   #if PY_VERSION_HEX >= 0x02070000
   37     #define HAVE_LONG_LONG
   38   #endif
   39 #endif
   40 #ifndef PY_LONG_LONG
   41   #define PY_LONG_LONG LONG_LONG
   42 #endif
   43 #ifndef Py_HUGE_VAL
   44   #define Py_HUGE_VAL HUGE_VAL
   45 #endif
   46 #ifdef PYPY_VERSION
   47   #define CYTHON_COMPILING_IN_PYPY 1
   48   #define CYTHON_COMPILING_IN_PYSTON 0
   49   #define CYTHON_COMPILING_IN_CPYTHON 0
   50   #undef CYTHON_USE_TYPE_SLOTS
   51   #define CYTHON_USE_TYPE_SLOTS 0
   52   #undef CYTHON_USE_PYTYPE_LOOKUP
   53   #define CYTHON_USE_PYTYPE_LOOKUP 0
   54   #if PY_VERSION_HEX < 0x03050000
   55     #undef CYTHON_USE_ASYNC_SLOTS
   56     #define CYTHON_USE_ASYNC_SLOTS 0
   57   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
   58     #define CYTHON_USE_ASYNC_SLOTS 1
   59   #endif
   60   #undef CYTHON_USE_PYLIST_INTERNALS
   61   #define CYTHON_USE_PYLIST_INTERNALS 0
   62   #undef CYTHON_USE_UNICODE_INTERNALS
   63   #define CYTHON_USE_UNICODE_INTERNALS 0
   64   #undef CYTHON_USE_UNICODE_WRITER
   65   #define CYTHON_USE_UNICODE_WRITER 0
   66   #undef CYTHON_USE_PYLONG_INTERNALS
   67   #define CYTHON_USE_PYLONG_INTERNALS 0
   68   #undef CYTHON_AVOID_BORROWED_REFS
   69   #define CYTHON_AVOID_BORROWED_REFS 1
   70   #undef CYTHON_ASSUME_SAFE_MACROS
   71   #define CYTHON_ASSUME_SAFE_MACROS 0
   72   #undef CYTHON_UNPACK_METHODS
   73   #define CYTHON_UNPACK_METHODS 0
   74   #undef CYTHON_FAST_THREAD_STATE
   75   #define CYTHON_FAST_THREAD_STATE 0
   76   #undef CYTHON_FAST_PYCALL
   77   #define CYTHON_FAST_PYCALL 0
   78   #undef CYTHON_PEP489_MULTI_PHASE_INIT
   79   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
   80   #undef CYTHON_USE_TP_FINALIZE
   81   #define CYTHON_USE_TP_FINALIZE 0
   82   #undef CYTHON_USE_DICT_VERSIONS
   83   #define CYTHON_USE_DICT_VERSIONS 0
   84   #undef CYTHON_USE_EXC_INFO_STACK
   85   #define CYTHON_USE_EXC_INFO_STACK 0
   86 #elif defined(PYSTON_VERSION)
   87   #define CYTHON_COMPILING_IN_PYPY 0
   88   #define CYTHON_COMPILING_IN_PYSTON 1
   89   #define CYTHON_COMPILING_IN_CPYTHON 0
   90   #ifndef CYTHON_USE_TYPE_SLOTS
   91     #define CYTHON_USE_TYPE_SLOTS 1
   92   #endif
   93   #undef CYTHON_USE_PYTYPE_LOOKUP
   94   #define CYTHON_USE_PYTYPE_LOOKUP 0
   95   #undef CYTHON_USE_ASYNC_SLOTS
   96   #define CYTHON_USE_ASYNC_SLOTS 0
   97   #undef CYTHON_USE_PYLIST_INTERNALS
   98   #define CYTHON_USE_PYLIST_INTERNALS 0
   99   #ifndef CYTHON_USE_UNICODE_INTERNALS
  100     #define CYTHON_USE_UNICODE_INTERNALS 1
  101   #endif
  102   #undef CYTHON_USE_UNICODE_WRITER
  103   #define CYTHON_USE_UNICODE_WRITER 0
  104   #undef CYTHON_USE_PYLONG_INTERNALS
  105   #define CYTHON_USE_PYLONG_INTERNALS 0
  106   #ifndef CYTHON_AVOID_BORROWED_REFS
  107     #define CYTHON_AVOID_BORROWED_REFS 0
  108   #endif
  109   #ifndef CYTHON_ASSUME_SAFE_MACROS
  110     #define CYTHON_ASSUME_SAFE_MACROS 1
  111   #endif
  112   #ifndef CYTHON_UNPACK_METHODS
  113     #define CYTHON_UNPACK_METHODS 1
  114   #endif
  115   #undef CYTHON_FAST_THREAD_STATE
  116   #define CYTHON_FAST_THREAD_STATE 0
  117   #undef CYTHON_FAST_PYCALL
  118   #define CYTHON_FAST_PYCALL 0
  119   #undef CYTHON_PEP489_MULTI_PHASE_INIT
  120   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  121   #undef CYTHON_USE_TP_FINALIZE
  122   #define CYTHON_USE_TP_FINALIZE 0
  123   #undef CYTHON_USE_DICT_VERSIONS
  124   #define CYTHON_USE_DICT_VERSIONS 0
  125   #undef CYTHON_USE_EXC_INFO_STACK
  126   #define CYTHON_USE_EXC_INFO_STACK 0
  127 #else
  128   #define CYTHON_COMPILING_IN_PYPY 0
  129   #define CYTHON_COMPILING_IN_PYSTON 0
  130   #define CYTHON_COMPILING_IN_CPYTHON 1
  131   #ifndef CYTHON_USE_TYPE_SLOTS
  132     #define CYTHON_USE_TYPE_SLOTS 1
  133   #endif
  134   #if PY_VERSION_HEX < 0x02070000
  135     #undef CYTHON_USE_PYTYPE_LOOKUP
  136     #define CYTHON_USE_PYTYPE_LOOKUP 0
  137   #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
  138     #define CYTHON_USE_PYTYPE_LOOKUP 1
  139   #endif
  140   #if PY_MAJOR_VERSION < 3
  141     #undef CYTHON_USE_ASYNC_SLOTS
  142     #define CYTHON_USE_ASYNC_SLOTS 0
  143   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
  144     #define CYTHON_USE_ASYNC_SLOTS 1
  145   #endif
  146   #if PY_VERSION_HEX < 0x02070000
  147     #undef CYTHON_USE_PYLONG_INTERNALS
  148     #define CYTHON_USE_PYLONG_INTERNALS 0
  149   #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
  150     #define CYTHON_USE_PYLONG_INTERNALS 1
  151   #endif
  152   #ifndef CYTHON_USE_PYLIST_INTERNALS
  153     #define CYTHON_USE_PYLIST_INTERNALS 1
  154   #endif
  155   #ifndef CYTHON_USE_UNICODE_INTERNALS
  156     #define CYTHON_USE_UNICODE_INTERNALS 1
  157   #endif
  158   #if PY_VERSION_HEX < 0x030300F0
  159     #undef CYTHON_USE_UNICODE_WRITER
  160     #define CYTHON_USE_UNICODE_WRITER 0
  161   #elif !defined(CYTHON_USE_UNICODE_WRITER)
  162     #define CYTHON_USE_UNICODE_WRITER 1
  163   #endif
  164   #ifndef CYTHON_AVOID_BORROWED_REFS
  165     #define CYTHON_AVOID_BORROWED_REFS 0
  166   #endif
  167   #ifndef CYTHON_ASSUME_SAFE_MACROS
  168     #define CYTHON_ASSUME_SAFE_MACROS 1
  169   #endif
  170   #ifndef CYTHON_UNPACK_METHODS
  171     #define CYTHON_UNPACK_METHODS 1
  172   #endif
  173   #ifndef CYTHON_FAST_THREAD_STATE
  174     #define CYTHON_FAST_THREAD_STATE 1
  175   #endif
  176   #ifndef CYTHON_FAST_PYCALL
  177     #define CYTHON_FAST_PYCALL 1
  178   #endif
  179   #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
  180     #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  181   #endif
  182   #ifndef CYTHON_USE_TP_FINALIZE
  183     #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  184   #endif
  185   #ifndef CYTHON_USE_DICT_VERSIONS
  186     #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  187   #endif
  188   #ifndef CYTHON_USE_EXC_INFO_STACK
  189     #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  190   #endif
  191 #endif
  192 #if !defined(CYTHON_FAST_PYCCALL)
  193 #define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
  194 #endif
  195 #if CYTHON_USE_PYLONG_INTERNALS
  196   #include "longintrepr.h"
  197   #undef SHIFT
  198   #undef BASE
  199   #undef MASK
  200 #endif
  201 #ifndef __has_attribute
  202   #define __has_attribute(x) 0
  203 #endif
  204 #ifndef __has_cpp_attribute
  205   #define __has_cpp_attribute(x) 0
  206 #endif
  207 #ifndef CYTHON_RESTRICT
  208   #if defined(__GNUC__)
  209     #define CYTHON_RESTRICT __restrict__
  210   #elif defined(_MSC_VER) && _MSC_VER >= 1400
  211     #define CYTHON_RESTRICT __restrict
  212   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  213     #define CYTHON_RESTRICT restrict
  214   #else
  215     #define CYTHON_RESTRICT
  216   #endif
  217 #endif
  218 #ifndef CYTHON_UNUSED
  219 # if defined(__GNUC__)
  220 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  221 #     define CYTHON_UNUSED __attribute__ ((__unused__))
  222 #   else
  223 #     define CYTHON_UNUSED
  224 #   endif
  225 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
  226 #   define CYTHON_UNUSED __attribute__ ((__unused__))
  227 # else
  228 #   define CYTHON_UNUSED
  229 # endif
  230 #endif
  231 #ifndef CYTHON_MAYBE_UNUSED_VAR
  232 #  if defined(__cplusplus)
  233      template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
  234 #  else
  235 #    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
  236 #  endif
  237 #endif
  238 #ifndef CYTHON_NCP_UNUSED
  239 # if CYTHON_COMPILING_IN_CPYTHON
  240 #  define CYTHON_NCP_UNUSED
  241 # else
  242 #  define CYTHON_NCP_UNUSED CYTHON_UNUSED
  243 # endif
  244 #endif
  245 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
  246 #ifdef _MSC_VER
  247     #ifndef _MSC_STDINT_H_
  248         #if _MSC_VER < 1300
  249            typedef unsigned char     uint8_t;
  250            typedef unsigned int      uint32_t;
  251         #else
  252            typedef unsigned __int8   uint8_t;
  253            typedef unsigned __int32  uint32_t;
  254         #endif
  255     #endif
  256 #else
  257    #include <stdint.h>
  258 #endif
  259 #ifndef CYTHON_FALLTHROUGH
  260   #if defined(__cplusplus) && __cplusplus >= 201103L
  261     #if __has_cpp_attribute(fallthrough)
  262       #define CYTHON_FALLTHROUGH [[fallthrough]]
  263     #elif __has_cpp_attribute(clang::fallthrough)
  264       #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
  265     #elif __has_cpp_attribute(gnu::fallthrough)
  266       #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
  267     #endif
  268   #endif
  269   #ifndef CYTHON_FALLTHROUGH
  270     #if __has_attribute(fallthrough)
  271       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
  272     #else
  273       #define CYTHON_FALLTHROUGH
  274     #endif
  275   #endif
  276   #if defined(__clang__ ) && defined(__apple_build_version__)
  277     #if __apple_build_version__ < 7000000
  278       #undef  CYTHON_FALLTHROUGH
  279       #define CYTHON_FALLTHROUGH
  280     #endif
  281   #endif
  282 #endif
  283 
  284 #ifndef CYTHON_INLINE
  285   #if defined(__clang__)
  286     #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  287   #elif defined(__GNUC__)
  288     #define CYTHON_INLINE __inline__
  289   #elif defined(_MSC_VER)
  290     #define CYTHON_INLINE __inline
  291   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  292     #define CYTHON_INLINE inline
  293   #else
  294     #define CYTHON_INLINE
  295   #endif
  296 #endif
  297 
  298 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  299   #define Py_OptimizeFlag 0
  300 #endif
  301 #define __PYX_BUILD_PY_SSIZE_T "n"
  302 #define CYTHON_FORMAT_SSIZE_T "z"
  303 #if PY_MAJOR_VERSION < 3
  304   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  305   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  306           PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  307   #define __Pyx_DefaultClassType PyClass_Type
  308 #else
  309   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  310   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  311           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  312   #define __Pyx_DefaultClassType PyType_Type
  313 #endif
  314 #ifndef Py_TPFLAGS_CHECKTYPES
  315   #define Py_TPFLAGS_CHECKTYPES 0
  316 #endif
  317 #ifndef Py_TPFLAGS_HAVE_INDEX
  318   #define Py_TPFLAGS_HAVE_INDEX 0
  319 #endif
  320 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  321   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
  322 #endif
  323 #ifndef Py_TPFLAGS_HAVE_FINALIZE
  324   #define Py_TPFLAGS_HAVE_FINALIZE 0
  325 #endif
  326 #ifndef METH_STACKLESS
  327   #define METH_STACKLESS 0
  328 #endif
  329 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  330   #ifndef METH_FASTCALL
  331      #define METH_FASTCALL 0x80
  332   #endif
  333   typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  334   typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
  335                                                           Py_ssize_t nargs, PyObject *kwnames);
  336 #else
  337   #define __Pyx_PyCFunctionFast _PyCFunctionFast
  338   #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  339 #endif
  340 #if CYTHON_FAST_PYCCALL
  341 #define __Pyx_PyFastCFunction_Check(func)\
  342     ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
  343 #else
  344 #define __Pyx_PyFastCFunction_Check(func) 0
  345 #endif
  346 #if CYTHON_USE_DICT_VERSIONS
  347 #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
  348 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
  349     (version_var) = __PYX_GET_DICT_VERSION(dict);\
  350     (cache_var) = (value);
  351 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
  352         static PY_UINT64_T __pyx_dict_version = 0;\
  353         static PyObject *__pyx_dict_cached_value = NULL;\
  354         if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
  355             (VAR) = __pyx_dict_cached_value;\
  356         } else {\
  357             (VAR) = __pyx_dict_cached_value = (LOOKUP);\
  358             __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
  359         }\
  360     }
  361 #else
  362 #define __PYX_GET_DICT_VERSION(dict)  (0)
  363 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
  364 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
  365 #endif
  366 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  367   #define PyObject_Malloc(s)   PyMem_Malloc(s)
  368   #define PyObject_Free(p)     PyMem_Free(p)
  369   #define PyObject_Realloc(p)  PyMem_Realloc(p)
  370 #endif
  371 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  372   #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  373   #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  374   #define PyMem_RawFree(p)             PyMem_Free(p)
  375 #endif
  376 #if CYTHON_COMPILING_IN_PYSTON
  377   #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  378   #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
  379 #else
  380   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  381   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
  382 #endif
  383 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  384   #define __Pyx_PyThreadState_Current PyThreadState_GET()
  385 #elif PY_VERSION_HEX >= 0x03060000
  386   #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
  387 #elif PY_VERSION_HEX >= 0x03000000
  388   #define __Pyx_PyThreadState_Current PyThreadState_GET()
  389 #else
  390   #define __Pyx_PyThreadState_Current _PyThreadState_Current
  391 #endif
  392 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
  393 #include "pythread.h"
  394 #define Py_tss_NEEDS_INIT 0
  395 typedef int Py_tss_t;
  396 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  397   *key = PyThread_create_key();
  398   return 0; // PyThread_create_key reports success always
  399 }
  400 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  401   Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  402   *key = Py_tss_NEEDS_INIT;
  403   return key;
  404 }
  405 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  406   PyObject_Free(key);
  407 }
  408 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  409   return *key != Py_tss_NEEDS_INIT;
  410 }
  411 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  412   PyThread_delete_key(*key);
  413   *key = Py_tss_NEEDS_INIT;
  414 }
  415 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  416   return PyThread_set_key_value(*key, value);
  417 }
  418 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  419   return PyThread_get_key_value(*key);
  420 }
  421 #endif // TSS (Thread Specific Storage) API
  422 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
  423 #define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
  424 #else
  425 #define __Pyx_PyDict_NewPresized(n)  PyDict_New()
  426 #endif
  427 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  428   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  429   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
  430 #else
  431   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  432   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
  433 #endif
  434 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
  435 #define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
  436 #else
  437 #define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
  438 #endif
  439 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  440   #define CYTHON_PEP393_ENABLED 1
  441   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
  442                                               0 : _PyUnicode_Ready((PyObject *)(op)))
  443   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  444   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  445   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  446   #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  447   #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  448   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  449   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  450   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  451 #else
  452   #define CYTHON_PEP393_ENABLED 0
  453   #define PyUnicode_1BYTE_KIND  1
  454   #define PyUnicode_2BYTE_KIND  2
  455   #define PyUnicode_4BYTE_KIND  4
  456   #define __Pyx_PyUnicode_READY(op)       (0)
  457   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  458   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  459   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  460   #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  461   #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  462   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  463   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  464   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
  465 #endif
  466 #if CYTHON_COMPILING_IN_PYPY
  467   #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  468   #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
  469 #else
  470   #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  471   #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
  472       PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
  473 #endif
  474 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  475   #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  476 #endif
  477 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  478   #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  479 #endif
  480 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  481   #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  482 #endif
  483 #define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
  484 #define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
  485 #if PY_MAJOR_VERSION >= 3
  486   #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
  487 #else
  488   #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
  489 #endif
  490 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  491   #define PyObject_ASCII(o)            PyObject_Repr(o)
  492 #endif
  493 #if PY_MAJOR_VERSION >= 3
  494   #define PyBaseString_Type            PyUnicode_Type
  495   #define PyStringObject               PyUnicodeObject
  496   #define PyString_Type                PyUnicode_Type
  497   #define PyString_Check               PyUnicode_Check
  498   #define PyString_CheckExact          PyUnicode_CheckExact
  499   #define PyObject_Unicode             PyObject_Str
  500 #endif
  501 #if PY_MAJOR_VERSION >= 3
  502   #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  503   #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
  504 #else
  505   #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  506   #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
  507 #endif
  508 #ifndef PySet_CheckExact
  509   #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
  510 #endif
  511 #if CYTHON_ASSUME_SAFE_MACROS
  512   #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  513 #else
  514   #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  515 #endif
  516 #if PY_MAJOR_VERSION >= 3
  517   #define PyIntObject                  PyLongObject
  518   #define PyInt_Type                   PyLong_Type
  519   #define PyInt_Check(op)              PyLong_Check(op)
  520   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  521   #define PyInt_FromString             PyLong_FromString
  522   #define PyInt_FromUnicode            PyLong_FromUnicode
  523   #define PyInt_FromLong               PyLong_FromLong
  524   #define PyInt_FromSize_t             PyLong_FromSize_t
  525   #define PyInt_FromSsize_t            PyLong_FromSsize_t
  526   #define PyInt_AsLong                 PyLong_AsLong
  527   #define PyInt_AS_LONG                PyLong_AS_LONG
  528   #define PyInt_AsSsize_t              PyLong_AsSsize_t
  529   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  530   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  531   #define PyNumber_Int                 PyNumber_Long
  532 #endif
  533 #if PY_MAJOR_VERSION >= 3
  534   #define PyBoolObject                 PyLongObject
  535 #endif
  536 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  537   #ifndef PyUnicode_InternFromString
  538     #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  539   #endif
  540 #endif
  541 #if PY_VERSION_HEX < 0x030200A4
  542   typedef long Py_hash_t;
  543   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  544   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
  545 #else
  546   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  547   #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
  548 #endif
  549 #if PY_MAJOR_VERSION >= 3
  550   #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
  551 #else
  552   #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
  553 #endif
  554 #if CYTHON_USE_ASYNC_SLOTS
  555   #if PY_VERSION_HEX >= 0x030500B1
  556     #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
  557     #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  558   #else
  559     #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  560   #endif
  561 #else
  562   #define __Pyx_PyType_AsAsync(obj) NULL
  563 #endif
  564 #ifndef __Pyx_PyAsyncMethodsStruct
  565     typedef struct {
  566         unaryfunc am_await;
  567         unaryfunc am_aiter;
  568         unaryfunc am_anext;
  569     } __Pyx_PyAsyncMethodsStruct;
  570 #endif
  571 
  572 #if defined(WIN32) || defined(MS_WINDOWS)
  573   #define _USE_MATH_DEFINES
  574 #endif
  575 #include <math.h>
  576 #ifdef NAN
  577 #define __PYX_NAN() ((float) NAN)
  578 #else
  579 static CYTHON_INLINE float __PYX_NAN() {
  580   float value;
  581   memset(&value, 0xFF, sizeof(value));
  582   return value;
  583 }
  584 #endif
  585 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
  586 #define __Pyx_truncl trunc
  587 #else
  588 #define __Pyx_truncl truncl
  589 #endif
  590 
  591 
  592 #define __PYX_ERR(f_index, lineno, Ln_error) \
  593 { \
  594   __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
  595 }
  596 
  597 #ifndef __PYX_EXTERN_C
  598   #ifdef __cplusplus
  599     #define __PYX_EXTERN_C extern "C"
  600   #else
  601     #define __PYX_EXTERN_C extern
  602   #endif
  603 #endif
  604 
  605 #define __PYX_HAVE__mtrand
  606 #define __PYX_HAVE_API__mtrand
  607 /* Early includes */
  608 #include "string.h"
  609 #include "math.h"
  610 #include <string.h>
  611 #include <stdio.h>
  612 #include "numpy/npy_no_deprecated_api.h"
  613 #include "numpy/arrayobject.h"
  614 #include "numpy/npy_math.h"
  615 #include "mtrand_py_helper.h"
  616 #include "randomkit.h"
  617 #include "distributions.h"
  618 #include "initarray.h"
  619 #ifdef _OPENMP
  620 #include <omp.h>
  621 #endif /* _OPENMP */
  622 
  623 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
  624 #define CYTHON_WITHOUT_ASSERTIONS
  625 #endif
  626 
  627 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
  628                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
  629 
  630 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
  631 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
  632 #define __PYX_DEFAULT_STRING_ENCODING ""
  633 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
  634 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
  635 #define __Pyx_uchar_cast(c) ((unsigned char)c)
  636 #define __Pyx_long_cast(x) ((long)x)
  637 #define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
  638     (sizeof(type) < sizeof(Py_ssize_t))  ||\
  639     (sizeof(type) > sizeof(Py_ssize_t) &&\
  640           likely(v < (type)PY_SSIZE_T_MAX ||\
  641                  v == (type)PY_SSIZE_T_MAX)  &&\
  642           (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
  643                                 v == (type)PY_SSIZE_T_MIN)))  ||\
  644     (sizeof(type) == sizeof(Py_ssize_t) &&\
  645           (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
  646                                v == (type)PY_SSIZE_T_MAX)))  )
  647 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
  648     return (size_t) i < (size_t) limit;
  649 }
  650 #if defined (__cplusplus) && __cplusplus >= 201103L
  651     #include <cstdlib>
  652     #define __Pyx_sst_abs(value) std::abs(value)
  653 #elif SIZEOF_INT >= SIZEOF_SIZE_T
  654     #define __Pyx_sst_abs(value) abs(value)
  655 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
  656     #define __Pyx_sst_abs(value) labs(value)
  657 #elif defined (_MSC_VER)
  658     #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
  659 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  660     #define __Pyx_sst_abs(value) llabs(value)
  661 #elif defined (__GNUC__)
  662     #define __Pyx_sst_abs(value) __builtin_llabs(value)
  663 #else
  664     #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
  665 #endif
  666 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
  667 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
  668 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
  669 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
  670 #define __Pyx_PyBytes_FromString        PyBytes_FromString
  671 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
  672 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
  673 #if PY_MAJOR_VERSION < 3
  674     #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
  675     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
  676 #else
  677     #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
  678     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
  679 #endif
  680 #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
  681 #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
  682 #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
  683 #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
  684 #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
  685 #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
  686 #define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
  687 #define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
  688 #define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
  689 #define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
  690 #define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
  691 #define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
  692 #define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
  693 #define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
  694 #define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
  695 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
  696 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
  697     const Py_UNICODE *u_end = u;
  698     while (*u_end++) ;
  699     return (size_t)(u_end - u - 1);
  700 }
  701 #define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
  702 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
  703 #define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
  704 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
  705 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
  706 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
  707 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
  708 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
  709 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
  710 #define __Pyx_PySequence_Tuple(obj)\
  711     (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
  712 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
  713 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
  714 #if CYTHON_ASSUME_SAFE_MACROS
  715 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
  716 #else
  717 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
  718 #endif
  719 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
  720 #if PY_MAJOR_VERSION >= 3
  721 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
  722 #else
  723 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
  724 #endif
  725 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
  726 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  727 static int __Pyx_sys_getdefaultencoding_not_ascii;
  728 static int __Pyx_init_sys_getdefaultencoding_params(void) {
  729     PyObject* sys;
  730     PyObject* default_encoding = NULL;
  731     PyObject* ascii_chars_u = NULL;
  732     PyObject* ascii_chars_b = NULL;
  733     const char* default_encoding_c;
  734     sys = PyImport_ImportModule("sys");
  735     if (!sys) goto bad;
  736     default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
  737     Py_DECREF(sys);
  738     if (!default_encoding) goto bad;
  739     default_encoding_c = PyBytes_AsString(default_encoding);
  740     if (!default_encoding_c) goto bad;
  741     if (strcmp(default_encoding_c, "ascii") == 0) {
  742         __Pyx_sys_getdefaultencoding_not_ascii = 0;
  743     } else {
  744         char ascii_chars[128];
  745         int c;
  746         for (c = 0; c < 128; c++) {
  747             ascii_chars[c] = c;
  748         }
  749         __Pyx_sys_getdefaultencoding_not_ascii = 1;
  750         ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
  751         if (!ascii_chars_u) goto bad;
  752         ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
  753         if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
  754             PyErr_Format(
  755                 PyExc_ValueError,
  756                 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
  757                 default_encoding_c);
  758             goto bad;
  759         }
  760         Py_DECREF(ascii_chars_u);
  761         Py_DECREF(ascii_chars_b);
  762     }
  763     Py_DECREF(default_encoding);
  764     return 0;
  765 bad:
  766     Py_XDECREF(default_encoding);
  767     Py_XDECREF(ascii_chars_u);
  768     Py_XDECREF(ascii_chars_b);
  769     return -1;
  770 }
  771 #endif
  772 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
  773 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
  774 #else
  775 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
  776 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
  777 static char* __PYX_DEFAULT_STRING_ENCODING;
  778 static int __Pyx_init_sys_getdefaultencoding_params(void) {
  779     PyObject* sys;
  780     PyObject* default_encoding = NULL;
  781     char* default_encoding_c;
  782     sys = PyImport_ImportModule("sys");
  783     if (!sys) goto bad;
  784     default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
  785     Py_DECREF(sys);
  786     if (!default_encoding) goto bad;
  787     default_encoding_c = PyBytes_AsString(default_encoding);
  788     if (!default_encoding_c) goto bad;
  789     __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
  790     if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
  791     strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
  792     Py_DECREF(default_encoding);
  793     return 0;
  794 bad:
  795     Py_XDECREF(default_encoding);
  796     return -1;
  797 }
  798 #endif
  799 #endif
  800 
  801 
  802 /* Test for GCC > 2.95 */
  803 #if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  804   #define likely(x)   __builtin_expect(!!(x), 1)
  805   #define unlikely(x) __builtin_expect(!!(x), 0)
  806 #else /* !__GNUC__ or GCC < 2.95 */
  807   #define likely(x)   (x)
  808   #define unlikely(x) (x)
  809 #endif /* __GNUC__ */
  810 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
  811 
  812 static PyObject *__pyx_m = NULL;
  813 static PyObject *__pyx_d;
  814 static PyObject *__pyx_b;
  815 static PyObject *__pyx_cython_runtime = NULL;
  816 static PyObject *__pyx_empty_tuple;
  817 static PyObject *__pyx_empty_bytes;
  818 static PyObject *__pyx_empty_unicode;
  819 static int __pyx_lineno;
  820 static int __pyx_clineno = 0;
  821 static const char * __pyx_cfilenm= __FILE__;
  822 static const char *__pyx_filename;
  823 
  824 
  825 static const char *__pyx_f[] = {
  826   "mtrand.pyx",
  827   "numpy.pxd",
  828   "randint_helpers.pxi",
  829   "type.pxd",
  830 };
  831 /* NoFastGil.proto */
  832 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
  833 #define __Pyx_PyGILState_Release PyGILState_Release
  834 #define __Pyx_FastGIL_Remember()
  835 #define __Pyx_FastGIL_Forget()
  836 #define __Pyx_FastGilFuncInit()
  837 
  838 /* ForceInitThreads.proto */
  839 #ifndef __PYX_FORCE_INIT_THREADS
  840   #define __PYX_FORCE_INIT_THREADS 0
  841 #endif
  842 
  843 
  844 /*--- Type declarations ---*/
  845 struct __pyx_obj_6mtrand_RandomState;
  846 
  847 /* "mtrand.pyx":126
  848  *     long rk_logseries(rk_state *state, double p) nogil
  849  * 
  850  * ctypedef double (* rk_cont0)(rk_state *state) nogil             # <<<<<<<<<<<<<<
  851  * ctypedef double (* rk_cont1)(rk_state *state, double a) nogil
  852  * ctypedef double (* rk_cont2)(rk_state *state, double a, double b) nogil
  853  */
  854 typedef double (*__pyx_t_6mtrand_rk_cont0)(rk_state *);
  855 
  856 /* "mtrand.pyx":127
  857  * 
  858  * ctypedef double (* rk_cont0)(rk_state *state) nogil
  859  * ctypedef double (* rk_cont1)(rk_state *state, double a) nogil             # <<<<<<<<<<<<<<
  860  * ctypedef double (* rk_cont2)(rk_state *state, double a, double b) nogil
  861  * ctypedef double (* rk_cont3)(rk_state *state, double a, double b, double c) nogil
  862  */
  863 typedef double (*__pyx_t_6mtrand_rk_cont1)(rk_state *, double);
  864 
  865 /* "mtrand.pyx":128
  866  * ctypedef double (* rk_cont0)(rk_state *state) nogil
  867  * ctypedef double (* rk_cont1)(rk_state *state, double a) nogil
  868  * ctypedef double (* rk_cont2)(rk_state *state, double a, double b) nogil             # <<<<<<<<<<<<<<
  869  * ctypedef double (* rk_cont3)(rk_state *state, double a, double b, double c) nogil
  870  * 
  871  */
  872 typedef double (*__pyx_t_6mtrand_rk_cont2)(rk_state *, double, double);
  873 
  874 /* "mtrand.pyx":129
  875  * ctypedef double (* rk_cont1)(rk_state *state, double a) nogil
  876  * ctypedef double (* rk_cont2)(rk_state *state, double a, double b) nogil
  877  * ctypedef double (* rk_cont3)(rk_state *state, double a, double b, double c) nogil             # <<<<<<<<<<<<<<
  878  * 
  879  * ctypedef long (* rk_disc0)(rk_state *state) nogil
  880  */
  881 typedef double (*__pyx_t_6mtrand_rk_cont3)(rk_state *, double, double, double);
  882 
  883 /* "mtrand.pyx":131
  884  * ctypedef double (* rk_cont3)(rk_state *state, double a, double b, double c) nogil
  885  * 
  886  * ctypedef long (* rk_disc0)(rk_state *state) nogil             # <<<<<<<<<<<<<<
  887  * ctypedef long (* rk_discnp)(rk_state *state, long n, double p) nogil
  888  * ctypedef long (* rk_discdd)(rk_state *state, double n, double p) nogil
  889  */
  890 typedef long (*__pyx_t_6mtrand_rk_disc0)(rk_state *);
  891 
  892 /* "mtrand.pyx":132
  893  * 
  894  * ctypedef long (* rk_disc0)(rk_state *state) nogil
  895  * ctypedef long (* rk_discnp)(rk_state *state, long n, double p) nogil             # <<<<<<<<<<<<<<
  896  * ctypedef long (* rk_discdd)(rk_state *state, double n, double p) nogil
  897  * ctypedef long (* rk_discnmN)(rk_state *state, long n, long m, long N) nogil
  898  */
  899 typedef long (*__pyx_t_6mtrand_rk_discnp)(rk_state *, long, double);
  900 
  901 /* "mtrand.pyx":133
  902  * ctypedef long (* rk_disc0)(rk_state *state) nogil
  903  * ctypedef long (* rk_discnp)(rk_state *state, long n, double p) nogil
  904  * ctypedef long (* rk_discdd)(rk_state *state, double n, double p) nogil             # <<<<<<<<<<<<<<
  905  * ctypedef long (* rk_discnmN)(rk_state *state, long n, long m, long N) nogil
  906  * ctypedef long (* rk_discd)(rk_state *state, double a) nogil
  907  */
  908 typedef long (*__pyx_t_6mtrand_rk_discdd)(rk_state *, double, double);
  909 
  910 /* "mtrand.pyx":134
  911  * ctypedef long (* rk_discnp)(rk_state *state, long n, double p) nogil
  912  * ctypedef long (* rk_discdd)(rk_state *state, double n, double p) nogil
  913  * ctypedef long (* rk_discnmN)(rk_state *state, long n, long m, long N) nogil             # <<<<<<<<<<<<<<
  914  * ctypedef long (* rk_discd)(rk_state *state, double a) nogil
  915  * 
  916  */
  917 typedef long (*__pyx_t_6mtrand_rk_discnmN)(rk_state *, long, long, long);
  918 
  919 /* "mtrand.pyx":135
  920  * ctypedef long (* rk_discdd)(rk_state *state, double n, double p) nogil
  921  * ctypedef long (* rk_discnmN)(rk_state *state, long n, long m, long N) nogil
  922  * ctypedef long (* rk_discd)(rk_state *state, double a) nogil             # <<<<<<<<<<<<<<
  923  * 
  924  * 
  925  */
  926 typedef long (*__pyx_t_6mtrand_rk_discd)(rk_state *, double);
  927 
  928 /* "mtrand.pyx":593
  929  * 
  930  * 
  931  * cdef class RandomState:             # <<<<<<<<<<<<<<
  932  *     """
  933  *     RandomState(seed=None)
  934  */
  935 struct __pyx_obj_6mtrand_RandomState {
  936   PyObject_HEAD
  937   struct __pyx_vtabstruct_6mtrand_RandomState *__pyx_vtab;
  938   rk_state *internal_state;
  939   PyObject *lock;
  940   PyObject *state_address;
  941 };
  942 
  943 
  944 
  945 struct __pyx_vtabstruct_6mtrand_RandomState {
  946   PyObject *(*_shuffle_raw)(struct __pyx_obj_6mtrand_RandomState *, npy_intp, npy_intp, npy_intp, char *, char *);
  947 };
  948 static struct __pyx_vtabstruct_6mtrand_RandomState *__pyx_vtabptr_6mtrand_RandomState;
  949 static CYTHON_INLINE PyObject *__pyx_f_6mtrand_11RandomState__shuffle_raw(struct __pyx_obj_6mtrand_RandomState *, npy_intp, npy_intp, npy_intp, char *, char *);
  950 
  951 /* --- Runtime support code (head) --- */
  952 /* Refnanny.proto */
  953 #ifndef CYTHON_REFNANNY
  954   #define CYTHON_REFNANNY 0
  955 #endif
  956 #if CYTHON_REFNANNY
  957   typedef struct {
  958     void (*INCREF)(void*, PyObject*, int);
  959     void (*DECREF)(void*, PyObject*, int);
  960     void (*GOTREF)(void*, PyObject*, int);
  961     void (*GIVEREF)(void*, PyObject*, int);
  962     void* (*SetupContext)(const char*, int, const char*);
  963     void (*FinishContext)(void**);
  964   } __Pyx_RefNannyAPIStruct;
  965   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  966   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  967   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  968 #ifdef WITH_THREAD
  969   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
  970           if (acquire_gil) {\
  971               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
  972               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
  973               PyGILState_Release(__pyx_gilstate_save);\
  974           } else {\
  975               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
  976           }
  977 #else
  978   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
  979           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
  980 #endif
  981   #define __Pyx_RefNannyFinishContext()\
  982           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  983   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  984   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  985   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  986   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  987   #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  988   #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  989   #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  990   #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
  991 #else
  992   #define __Pyx_RefNannyDeclarations
  993   #define __Pyx_RefNannySetupContext(name, acquire_gil)
  994   #define __Pyx_RefNannyFinishContext()
  995   #define __Pyx_INCREF(r) Py_INCREF(r)
  996   #define __Pyx_DECREF(r) Py_DECREF(r)
  997   #define __Pyx_GOTREF(r)
  998   #define __Pyx_GIVEREF(r)
  999   #define __Pyx_XINCREF(r) Py_XINCREF(r)
 1000   #define __Pyx_XDECREF(r) Py_XDECREF(r)
 1001   #define __Pyx_XGOTREF(r)
 1002   #define __Pyx_XGIVEREF(r)
 1003 #endif
 1004 #define __Pyx_XDECREF_SET(r, v) do {\
 1005         PyObject *tmp = (PyObject *) r;\
 1006         r = v; __Pyx_XDECREF(tmp);\
 1007     } while (0)
 1008 #define __Pyx_DECREF_SET(r, v) do {\
 1009         PyObject *tmp = (PyObject *) r;\
 1010         r = v; __Pyx_DECREF(tmp);\
 1011     } while (0)
 1012 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
 1013 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
 1014 
 1015 /* PyObjectGetAttrStr.proto */
 1016 #if CYTHON_USE_TYPE_SLOTS
 1017 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
 1018 #else
 1019 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
 1020 #endif
 1021 
 1022 /* GetBuiltinName.proto */
 1023 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
 1024 
 1025 /* GetTopmostException.proto */
 1026 #if CYTHON_USE_EXC_INFO_STACK
 1027 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
 1028 #endif
 1029 
 1030 /* PyThreadStateGet.proto */
 1031 #if CYTHON_FAST_THREAD_STATE
 1032 #define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
 1033 #define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
 1034 #define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
 1035 #else
 1036 #define __Pyx_PyThreadState_declare
 1037 #define __Pyx_PyThreadState_assign
 1038 #define __Pyx_PyErr_Occurred()  PyErr_Occurred()
 1039 #endif
 1040 
 1041 /* SaveResetException.proto */
 1042 #if CYTHON_FAST_THREAD_STATE
 1043 #define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
 1044 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
 1045 #define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
 1046 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
 1047 #else
 1048 #define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
 1049 #define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
 1050 #endif
 1051 
 1052 /* PyErrExceptionMatches.proto */
 1053 #if CYTHON_FAST_THREAD_STATE
 1054 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
 1055 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
 1056 #else
 1057 #define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
 1058 #endif
 1059 
 1060 /* GetException.proto */
 1061 #if CYTHON_FAST_THREAD_STATE
 1062 #define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
 1063 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
 1064 #else
 1065 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
 1066 #endif
 1067 
 1068 /* PyObjectCall.proto */
 1069 #if CYTHON_COMPILING_IN_CPYTHON
 1070 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
 1071 #else
 1072 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
 1073 #endif
 1074 
 1075 /* PyErrFetchRestore.proto */
 1076 #if CYTHON_FAST_THREAD_STATE
 1077 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
 1078 #define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
 1079 #define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
 1080 #define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
 1081 #define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
 1082 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
 1083 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
 1084 #if CYTHON_COMPILING_IN_CPYTHON
 1085 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
 1086 #else
 1087 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
 1088 #endif
 1089 #else
 1090 #define __Pyx_PyErr_Clear() PyErr_Clear()
 1091 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
 1092 #define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
 1093 #define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
 1094 #define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
 1095 #define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
 1096 #define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
 1097 #define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
 1098 #endif
 1099 
 1100 /* RaiseException.proto */
 1101 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
 1102 
 1103 /* RaiseArgTupleInvalid.proto */
 1104 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
 1105     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
 1106 
 1107 /* RaiseDoubleKeywords.proto */
 1108 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
 1109 
 1110 /* ParseKeywords.proto */
 1111 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
 1112     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
 1113     const char* function_name);
 1114 
 1115 /* GetModuleGlobalName.proto */
 1116 #if CYTHON_USE_DICT_VERSIONS
 1117 #define __Pyx_GetModuleGlobalName(var, name)  {\
 1118     static PY_UINT64_T __pyx_dict_version = 0;\
 1119     static PyObject *__pyx_dict_cached_value = NULL;\
 1120     (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
 1121         (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
 1122         __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
 1123 }
 1124 #define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
 1125     PY_UINT64_T __pyx_dict_version;\
 1126     PyObject *__pyx_dict_cached_value;\
 1127     (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
 1128 }
 1129 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
 1130 #else
 1131 #define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
 1132 #define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
 1133 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
 1134 #endif
 1135 
 1136 /* PyCFunctionFastCall.proto */
 1137 #if CYTHON_FAST_PYCCALL
 1138 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
 1139 #else
 1140 #define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
 1141 #endif
 1142 
 1143 /* PyFunctionFastCall.proto */
 1144 #if CYTHON_FAST_PYCALL
 1145 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
 1146     __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
 1147 #if 1 || PY_VERSION_HEX < 0x030600B1
 1148 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
 1149 #else
 1150 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
 1151 #endif
 1152 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
 1153     (sizeof(char [1 - 2*!(cond)]) - 1)
 1154 #ifndef Py_MEMBER_SIZE
 1155 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
 1156 #endif
 1157   static size_t __pyx_pyframe_localsplus_offset = 0;
 1158   #include "frameobject.h"
 1159   #define __Pxy_PyFrame_Initialize_Offsets()\
 1160     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
 1161      (void)(__pyx_pyframe_localsplus_offset = PyFrame_Type.tp_basicsize - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
 1162   #define __Pyx_PyFrame_GetLocalsplus(frame)\
 1163     (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
 1164 #endif
 1165 
 1166 /* PyObjectCall2Args.proto */
 1167 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
 1168 
 1169 /* PyObjectCallMethO.proto */
 1170 #if CYTHON_COMPILING_IN_CPYTHON
 1171 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
 1172 #endif
 1173 
 1174 /* PyObjectCallOneArg.proto */
 1175 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
 1176 
 1177 /* PyObjectLookupSpecial.proto */
 1178 #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
 1179 static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
 1180     PyObject *res;
 1181     PyTypeObject *tp = Py_TYPE(obj);
 1182 #if PY_MAJOR_VERSION < 3
 1183     if (unlikely(PyInstance_Check(obj)))
 1184         return __Pyx_PyObject_GetAttrStr(obj, attr_name);
 1185 #endif
 1186     res = _PyType_Lookup(tp, attr_name);
 1187     if (likely(res)) {
 1188         descrgetfunc f = Py_TYPE(res)->tp_descr_get;
 1189         if (!f) {
 1190             Py_INCREF(res);
 1191         } else {
 1192             res = f(res, obj, (PyObject *)tp);
 1193         }
 1194     } else {
 1195         PyErr_SetObject(PyExc_AttributeError, attr_name);
 1196     }
 1197     return res;
 1198 }
 1199 #else
 1200 #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
 1201 #endif
 1202 
 1203 /* PyObjectCallNoArg.proto */
 1204 #if CYTHON_COMPILING_IN_CPYTHON
 1205 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
 1206 #else
 1207 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
 1208 #endif
 1209 
 1210 /* ExtTypeTest.proto */
 1211 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
 1212 
 1213 /* PyIntCompare.proto */
 1214 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
 1215 
 1216 /* PyIntCompare.proto */
 1217 static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
 1218 
 1219 /* GetItemInt.proto */
 1220 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
 1221     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
 1222     __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
 1223     (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
 1224                __Pyx_GetItemInt_Generic(o, to_py_func(i))))
 1225 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
 1226     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
 1227     __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
 1228     (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
 1229 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
 1230                                                               int wraparound, int boundscheck);
 1231 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
 1232     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
 1233     __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
 1234     (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
 1235 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
 1236                                                               int wraparound, int boundscheck);
 1237 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
 1238 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
 1239                                                      int is_list, int wraparound, int boundscheck);
 1240 
 1241 /* IncludeStringH.proto */
 1242 #include <string.h>
 1243 
 1244 /* BytesEquals.proto */
 1245 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
 1246 
 1247 /* UnicodeEquals.proto */
 1248 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
 1249 
 1250 /* StrEquals.proto */
 1251 #if PY_MAJOR_VERSION >= 3
 1252 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
 1253 #else
 1254 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
 1255 #endif
 1256 
 1257 /* SliceObject.proto */
 1258 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
 1259         PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
 1260         PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
 1261         int has_cstart, int has_cstop, int wraparound);
 1262 
 1263 /* RaiseTooManyValuesToUnpack.proto */
 1264 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
 1265 
 1266 /* RaiseNeedMoreValuesToUnpack.proto */
 1267 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
 1268 
 1269 /* IterFinish.proto */
 1270 static CYTHON_INLINE int __Pyx_IterFinish(void);
 1271 
 1272 /* UnpackItemEndCheck.proto */
 1273 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
 1274 
 1275 /* ObjectGetItem.proto */
 1276 #if CYTHON_USE_TYPE_SLOTS
 1277 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
 1278 #else
 1279 #define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
 1280 #endif
 1281 
 1282 /* PyIntBinop.proto */
 1283 #if !CYTHON_COMPILING_IN_PYPY
 1284 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
 1285 #else
 1286 #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace)\
 1287     (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
 1288 #endif
 1289 
 1290 /* None.proto */
 1291 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
 1292 
 1293 /* SliceObject.proto */
 1294 #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
 1295     __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
 1296 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
 1297         PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
 1298         PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
 1299         int has_cstart, int has_cstop, int wraparound);
 1300 
 1301 /* PyObjectSetAttrStr.proto */
 1302 #if CYTHON_USE_TYPE_SLOTS
 1303 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
 1304 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
 1305 #else
 1306 #define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
 1307 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
 1308 #endif
 1309 
 1310 /* KeywordStringCheck.proto */
 1311 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
 1312 
 1313 /* PyIntBinop.proto */
 1314 #if !CYTHON_COMPILING_IN_PYPY
 1315 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
 1316 #else
 1317 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
 1318     (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
 1319 #endif
 1320 
 1321 /* Import.proto */
 1322 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
 1323 
 1324 /* ImportFrom.proto */
 1325 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
 1326 
 1327 /* ListAppend.proto */
 1328 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
 1329 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
 1330     PyListObject* L = (PyListObject*) list;
 1331     Py_ssize_t len = Py_SIZE(list);
 1332     if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
 1333         Py_INCREF(x);
 1334         PyList_SET_ITEM(list, len, x);
 1335         Py_SIZE(list) = len+1;
 1336         return 0;
 1337     }
 1338     return PyList_Append(list, x);
 1339 }
 1340 #else
 1341 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
 1342 #endif
 1343 
 1344 /* SetItemInt.proto */
 1345 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
 1346     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
 1347     __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
 1348     (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
 1349                __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
 1350 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
 1351 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
 1352                                                int is_list, int wraparound, int boundscheck);
 1353 
 1354 /* TypeImport.proto */
 1355 #ifndef __PYX_HAVE_RT_ImportType_proto
 1356 #define __PYX_HAVE_RT_ImportType_proto
 1357 enum __Pyx_ImportType_CheckSize {
 1358    __Pyx_ImportType_CheckSize_Error = 0,
 1359    __Pyx_ImportType_CheckSize_Warn = 1,
 1360    __Pyx_ImportType_CheckSize_Ignore = 2
 1361 };
 1362 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
 1363 #endif
 1364 
 1365 /* PyObject_GenericGetAttrNoDict.proto */
 1366 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
 1367 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
 1368 #else
 1369 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
 1370 #endif
 1371 
 1372 /* PyObject_GenericGetAttr.proto */
 1373 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
 1374 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
 1375 #else
 1376 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
 1377 #endif
 1378 
 1379 /* SetVTable.proto */
 1380 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
 1381 
 1382 /* CLineInTraceback.proto */
 1383 #ifdef CYTHON_CLINE_IN_TRACEBACK
 1384 #define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
 1385 #else
 1386 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
 1387 #endif
 1388 
 1389 /* CodeObjectCache.proto */
 1390 typedef struct {
 1391     PyCodeObject* code_object;
 1392     int code_line;
 1393 } __Pyx_CodeObjectCacheEntry;
 1394 struct __Pyx_CodeObjectCache {
 1395     int count;
 1396     int max_count;
 1397     __Pyx_CodeObjectCacheEntry* entries;
 1398 };
 1399 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
 1400 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
 1401 static PyCodeObject *__pyx_find_code_object(int code_line);
 1402 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
 1403 
 1404 /* AddTraceback.proto */
 1405 static void __Pyx_AddTraceback(const char *funcname, int c_line,
 1406                                int py_line, const char *filename);
 1407 
 1408 /* CIntToPy.proto */
 1409 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_bool(npy_bool value);
 1410 
 1411 /* CIntToPy.proto */
 1412 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int8(npy_int8 value);
 1413 
 1414 /* CIntToPy.proto */
 1415 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int16(npy_int16 value);
 1416 
 1417 /* CIntToPy.proto */
 1418 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int32(npy_int32 value);
 1419 
 1420 /* CIntToPy.proto */
 1421 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_int64(npy_int64 value);
 1422 
 1423 /* CIntToPy.proto */
 1424 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint8(npy_uint8 value);
 1425 
 1426 /* CIntToPy.proto */
 1427 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint16(npy_uint16 value);
 1428 
 1429 /* CIntToPy.proto */
 1430 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint32(npy_uint32 value);
 1431 
 1432 /* CIntToPy.proto */
 1433 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_uint64(npy_uint64 value);
 1434 
 1435 /* CIntToPy.proto */
 1436 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_intp(npy_intp value);
 1437 
 1438 /* CIntToPy.proto */
 1439 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
 1440 
 1441 /* CIntToPy.proto */
 1442 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
 1443 
 1444 /* CIntFromPy.proto */
 1445 static CYTHON_INLINE npy_bool __Pyx_PyInt_As_npy_bool(PyObject *);
 1446 
 1447 /* CIntFromPy.proto */
 1448 static CYTHON_INLINE npy_int8 __Pyx_PyInt_As_npy_int8(PyObject *);
 1449 
 1450 /* CIntFromPy.proto */
 1451 static CYTHON_INLINE npy_int16 __Pyx_PyInt_As_npy_int16(PyObject *);
 1452 
 1453 /* CIntFromPy.proto */
 1454 static CYTHON_INLINE npy_int32 __Pyx_PyInt_As_npy_int32(PyObject *);
 1455 
 1456 /* CIntFromPy.proto */
 1457 static CYTHON_INLINE npy_int64 __Pyx_PyInt_As_npy_int64(PyObject *);
 1458 
 1459 /* CIntFromPy.proto */
 1460 static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *);
 1461 
 1462 /* CIntFromPy.proto */
 1463 static CYTHON_INLINE npy_uint16 __Pyx_PyInt_As_npy_uint16(PyObject *);
 1464 
 1465 /* CIntFromPy.proto */
 1466 static CYTHON_INLINE npy_uint32 __Pyx_PyInt_As_npy_uint32(PyObject *);
 1467 
 1468 /* CIntFromPy.proto */
 1469 static CYTHON_INLINE npy_uint64 __Pyx_PyInt_As_npy_uint64(PyObject *);
 1470 
 1471 /* CIntFromPy.proto */
 1472 static CYTHON_INLINE npy_intp __Pyx_PyInt_As_npy_intp(PyObject *);
 1473 
 1474 /* CIntFromPy.proto */
 1475 static CYTHON_INLINE unsigned long __Pyx_PyInt_As_unsigned_long(PyObject *);
 1476 
 1477 /* CIntFromPy.proto */
 1478 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
 1479 
 1480 /* CIntFromPy.proto */
 1481 static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
 1482 
 1483 /* CIntFromPy.proto */
 1484 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
 1485 
 1486 /* FastTypeChecks.proto */
 1487 #if CYTHON_COMPILING_IN_CPYTHON
 1488 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
 1489 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
 1490 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
 1491 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
 1492 #else
 1493 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
 1494 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
 1495 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
 1496 #endif
 1497 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
 1498 
 1499 /* CheckBinaryVersion.proto */
 1500 static int __Pyx_check_binary_version(void);
 1501 
 1502 /* InitStrings.proto */
 1503 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
 1504 
 1505 static CYTHON_INLINE PyObject *__pyx_f_6mtrand_11RandomState__shuffle_raw(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, npy_intp __pyx_v_n, npy_intp __pyx_v_itemsize, npy_intp __pyx_v_stride, char *__pyx_v_data, char *__pyx_v_buf); /* proto*/
 1506 
 1507 /* Module declarations from 'libc.string' */
 1508 
 1509 /* Module declarations from 'libc.stdio' */
 1510 
 1511 /* Module declarations from '__builtin__' */
 1512 
 1513 /* Module declarations from 'cpython.type' */
 1514 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
 1515 
 1516 /* Module declarations from 'cpython' */
 1517 
 1518 /* Module declarations from 'cpython.object' */
 1519 
 1520 /* Module declarations from 'cpython.exc' */
 1521 
 1522 /* Module declarations from 'numpy' */
 1523 
 1524 /* Module declarations from 'libc' */
 1525 
 1526 /* Module declarations from 'cython' */
 1527 
 1528 /* Module declarations from 'mtrand' */
 1529 static PyTypeObject *__pyx_ptype_6mtrand_dtype = 0;
 1530 static PyTypeObject *__pyx_ptype_6mtrand_ndarray = 0;
 1531 static PyTypeObject *__pyx_ptype_6mtrand_flatiter = 0;
 1532 static PyTypeObject *__pyx_ptype_6mtrand_broadcast = 0;
 1533 static PyTypeObject *__pyx_ptype_6mtrand_RandomState = 0;
 1534 static CYTHON_INLINE int __pyx_f_6mtrand_import_array(void); /*proto*/
 1535 static PyObject *__pyx_f_6mtrand_cont0_array(rk_state *, __pyx_t_6mtrand_rk_cont0, PyObject *, PyObject *); /*proto*/
 1536 static PyObject *__pyx_f_6mtrand_cont1_array_sc(rk_state *, __pyx_t_6mtrand_rk_cont1, PyObject *, double, PyObject *); /*proto*/
 1537 static PyObject *__pyx_f_6mtrand_cont1_array(rk_state *, __pyx_t_6mtrand_rk_cont1, PyObject *, PyArrayObject *, PyObject *); /*proto*/
 1538 static PyObject *__pyx_f_6mtrand_cont2_array_sc(rk_state *, __pyx_t_6mtrand_rk_cont2, PyObject *, double, double, PyObject *); /*proto*/
 1539 static PyObject *__pyx_f_6mtrand_cont2_array(rk_state *, __pyx_t_6mtrand_rk_cont2, PyObject *, PyArrayObject *, PyArrayObject *, PyObject *); /*proto*/
 1540 static PyObject *__pyx_f_6mtrand_cont3_array_sc(rk_state *, __pyx_t_6mtrand_rk_cont3, PyObject *, double, double, double, PyObject *); /*proto*/
 1541 static PyObject *__pyx_f_6mtrand_cont3_array(rk_state *, __pyx_t_6mtrand_rk_cont3, PyObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyObject *); /*proto*/
 1542 static PyObject *__pyx_f_6mtrand_disc0_array(rk_state *, __pyx_t_6mtrand_rk_disc0, PyObject *, PyObject *); /*proto*/
 1543 static PyObject *__pyx_f_6mtrand_discnp_array_sc(rk_state *, __pyx_t_6mtrand_rk_discnp, PyObject *, long, double, PyObject *); /*proto*/
 1544 static PyObject *__pyx_f_6mtrand_discnp_array(rk_state *, __pyx_t_6mtrand_rk_discnp, PyObject *, PyArrayObject *, PyArrayObject *, PyObject *); /*proto*/
 1545 static PyObject *__pyx_f_6mtrand_discdd_array_sc(rk_state *, __pyx_t_6mtrand_rk_discdd, PyObject *, double, double, PyObject *); /*proto*/
 1546 static PyObject *__pyx_f_6mtrand_discdd_array(rk_state *, __pyx_t_6mtrand_rk_discdd, PyObject *, PyArrayObject *, PyArrayObject *, PyObject *); /*proto*/
 1547 static PyObject *__pyx_f_6mtrand_discnmN_array_sc(rk_state *, __pyx_t_6mtrand_rk_discnmN, PyObject *, long, long, long, PyObject *); /*proto*/
 1548 static PyObject *__pyx_f_6mtrand_discnmN_array(rk_state *, __pyx_t_6mtrand_rk_discnmN, PyObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyObject *); /*proto*/
 1549 static PyObject *__pyx_f_6mtrand_discd_array_sc(rk_state *, __pyx_t_6mtrand_rk_discd, PyObject *, double, PyObject *); /*proto*/
 1550 static PyObject *__pyx_f_6mtrand_discd_array(rk_state *, __pyx_t_6mtrand_rk_discd, PyObject *, PyArrayObject *, PyObject *); /*proto*/
 1551 static double __pyx_f_6mtrand_kahan_sum(double *, npy_intp); /*proto*/
 1552 #define __Pyx_MODULE_NAME "mtrand"
 1553 extern int __pyx_module_is_main_mtrand;
 1554 int __pyx_module_is_main_mtrand = 0;
 1555 
 1556 /* Implementation of 'mtrand' */
 1557 static PyObject *__pyx_builtin_ImportError;
 1558 static PyObject *__pyx_builtin_ValueError;
 1559 static PyObject *__pyx_builtin_range;
 1560 static PyObject *__pyx_builtin_TypeError;
 1561 static PyObject *__pyx_builtin_KeyError;
 1562 static PyObject *__pyx_builtin_OverflowError;
 1563 static PyObject *__pyx_builtin_DeprecationWarning;
 1564 static PyObject *__pyx_builtin_RuntimeWarning;
 1565 static PyObject *__pyx_builtin_reversed;
 1566 static const char __pyx_k_L[] = "L";
 1567 static const char __pyx_k_T[] = "T";
 1568 static const char __pyx_k_a[] = "a";
 1569 static const char __pyx_k_b[] = "b";
 1570 static const char __pyx_k_d[] = "d";
 1571 static const char __pyx_k_f[] = "f";
 1572 static const char __pyx_k_l[] = "l";
 1573 static const char __pyx_k_n[] = "n";
 1574 static const char __pyx_k_p[] = "p";
 1575 static const char __pyx_k_df[] = "df";
 1576 static const char __pyx_k_mu[] = "mu";
 1577 static const char __pyx_k_np[] = "np";
 1578 static const char __pyx_k_a_0[] = "a <= 0";
 1579 static const char __pyx_k_add[] = "add";
 1580 static const char __pyx_k_all[] = "all";
 1581 static const char __pyx_k_any[] = "any";
 1582 static const char __pyx_k_b_0[] = "b <= 0";
 1583 static const char __pyx_k_buf[] = "buf";
 1584 static const char __pyx_k_cnt[] = "cnt";
 1585 static const char __pyx_k_cov[] = "cov";
 1586 static const char __pyx_k_dot[] = "dot";
 1587 static const char __pyx_k_eps[] = "eps";
 1588 static const char __pyx_k_int[] = "int";
 1589 static const char __pyx_k_lam[] = "lam";
 1590 static const char __pyx_k_loc[] = "loc";
 1591 static const char __pyx_k_low[] = "low";
 1592 static const char __pyx_k_max[] = "max";
 1593 static const char __pyx_k_n_0[] = "n < 0";
 1594 static const char __pyx_k_off[] = "off";
 1595 static const char __pyx_k_out[] = "out";
 1596 static const char __pyx_k_p_0[] = "p < 0";
 1597 static const char __pyx_k_p_1[] = "p > 1";
 1598 static const char __pyx_k_rng[] = "rng";
 1599 static const char __pyx_k_svd[] = "svd";
 1600 static const char __pyx_k_tol[] = "tol";
 1601 static const char __pyx_k_Lock[] = "Lock";
 1602 static const char __pyx_k_atol[] = "atol";
 1603 static const char __pyx_k_beta[] = "beta";
 1604 static const char __pyx_k_bool[] = "bool_";
 1605 static const char __pyx_k_copy[] = "copy";
 1606 static const char __pyx_k_data[] = "data";
 1607 static const char __pyx_k_df_0[] = "df <= 0";
 1608 static const char __pyx_k_exit[] = "__exit__";
 1609 static const char __pyx_k_high[] = "high";
 1610 static const char __pyx_k_int8[] = "int8";
 1611 static const char __pyx_k_intp[] = "intp";
 1612 static const char __pyx_k_item[] = "item";
 1613 static const char __pyx_k_left[] = "left";
 1614 static const char __pyx_k_less[] = "less";
 1615 static const char __pyx_k_long[] = "long";
 1616 static const char __pyx_k_main[] = "__main__";
 1617 static const char __pyx_k_mean[] = "mean";
 1618 static const char __pyx_k_mode[] = "mode";
 1619 static const char __pyx_k_name[] = "__name__";
 1620 static const char __pyx_k_nbad[] = "nbad";
 1621 static const char __pyx_k_ndim[] = "ndim";
 1622 static const char __pyx_k_nonc[] = "nonc";
 1623 static const char __pyx_k_prod[] = "prod";
 1624 static const char __pyx_k_rand[] = "rand";
 1625 static const char __pyx_k_rtol[] = "rtol";
 1626 static const char __pyx_k_safe[] = "safe";
 1627 static const char __pyx_k_seed[] = "seed";
 1628 static const char __pyx_k_side[] = "side";
 1629 static const char __pyx_k_size[] = "size";
 1630 static const char __pyx_k_sort[] = "sort";
 1631 static const char __pyx_k_sqrt[] = "sqrt";
 1632 static const char __pyx_k_take[] = "take";
 1633 static const char __pyx_k_test[] = "__test__";
 1634 static const char __pyx_k_uint[] = "uint";
 1635 static const char __pyx_k_wald[] = "wald";
 1636 static const char __pyx_k_warn[] = "warn";
 1637 static const char __pyx_k_zipf[] = "zipf";
 1638 static const char __pyx_k_a_0_2[] = "a < 0";
 1639 static const char __pyx_k_alpha[] = "alpha";
 1640 static const char __pyx_k_array[] = "array";
 1641 static const char __pyx_k_bytes[] = "bytes";
 1642 static const char __pyx_k_dfden[] = "dfden";
 1643 static const char __pyx_k_dfnum[] = "dfnum";
 1644 static const char __pyx_k_dtype[] = "dtype";
 1645 static const char __pyx_k_empty[] = "empty";
 1646 static const char __pyx_k_enter[] = "__enter__";
 1647 static const char __pyx_k_equal[] = "equal";
 1648 static const char __pyx_k_finfo[] = "finfo";
 1649 static const char __pyx_k_gamma[] = "gamma";
 1650 static const char __pyx_k_iinfo[] = "iinfo";
 1651 static const char __pyx_k_index[] = "index";
 1652 static const char __pyx_k_int16[] = "int16";
 1653 static const char __pyx_k_int32[] = "int32";
 1654 static const char __pyx_k_int64[] = "int64";
 1655 static const char __pyx_k_isnan[] = "isnan";
 1656 static const char __pyx_k_kappa[] = "kappa";
 1657 static const char __pyx_k_lam_0[] = "lam < 0";
 1658 static const char __pyx_k_n_0_2[] = "n <= 0";
 1659 static const char __pyx_k_ngood[] = "ngood";
 1660 static const char __pyx_k_numpy[] = "numpy";
 1661 static const char __pyx_k_p_0_0[] = "p <= 0.0";
 1662 static const char __pyx_k_p_1_0[] = "p > 1.0";
 1663 static const char __pyx_k_power[] = "power";
 1664 static const char __pyx_k_pvals[] = "pvals";
 1665 static const char __pyx_k_raise[] = "raise";
 1666 static const char __pyx_k_randn[] = "randn";
 1667 static const char __pyx_k_range[] = "range";
 1668 static const char __pyx_k_ravel[] = "ravel";
 1669 static const char __pyx_k_right[] = "right";
 1670 static const char __pyx_k_scale[] = "scale";
 1671 static const char __pyx_k_shape[] = "shape";
 1672 static const char __pyx_k_sigma[] = "sigma";
 1673 static const char __pyx_k_state[] = "state";
 1674 static const char __pyx_k_uint8[] = "uint8";
 1675 static const char __pyx_k_zeros[] = "zeros";
 1676 static const char __pyx_k_arange[] = "arange";
 1677 static const char __pyx_k_astype[] = "astype";
 1678 static const char __pyx_k_choice[] = "choice";
 1679 static const char __pyx_k_ctypes[] = "ctypes";
 1680 static const char __pyx_k_cumsum[] = "cumsum";
 1681 static const char __pyx_k_double[] = "double";
 1682 static const char __pyx_k_format[] = "format";
 1683 static const char __pyx_k_gumbel[] = "gumbel";
 1684 static const char __pyx_k_ignore[] = "ignore";
 1685 static const char __pyx_k_import[] = "__import__";
 1686 static const char __pyx_k_mean_0[] = "mean <= 0";
 1687 static const char __pyx_k_mtrand[] = "mtrand";
 1688 static const char __pyx_k_nbad_0[] = "nbad < 0";
 1689 static const char __pyx_k_nonc_0[] = "nonc < 0";
 1690 static const char __pyx_k_normal[] = "normal";
 1691 static const char __pyx_k_pareto[] = "pareto";
 1692 static const char __pyx_k_rand_2[] = "_rand";
 1693 static const char __pyx_k_random[] = "random";
 1694 static const char __pyx_k_reduce[] = "reduce";
 1695 static const char __pyx_k_uint16[] = "uint16";
 1696 static const char __pyx_k_uint32[] = "uint32";
 1697 static const char __pyx_k_uint64[] = "uint64";
 1698 static const char __pyx_k_unique[] = "unique";
 1699 static const char __pyx_k_unsafe[] = "unsafe";
 1700 static const char __pyx_k_MT19937[] = "MT19937";
 1701 static const char __pyx_k_alpha_0[] = "alpha <= 0";
 1702 static const char __pyx_k_asarray[] = "asarray";
 1703 static const char __pyx_k_casting[] = "casting";
 1704 static const char __pyx_k_dfden_0[] = "dfden <= 0";
 1705 static const char __pyx_k_dfnum_0[] = "dfnum <= 0";
 1706 static const char __pyx_k_float64[] = "float64";
 1707 static const char __pyx_k_greater[] = "greater";
 1708 static const char __pyx_k_integer[] = "integer";
 1709 static const char __pyx_k_kappa_0[] = "kappa < 0";
 1710 static const char __pyx_k_laplace[] = "laplace";
 1711 static const char __pyx_k_ndarray[] = "ndarray";
 1712 static const char __pyx_k_ngood_0[] = "ngood < 0";
 1713 static const char __pyx_k_nsample[] = "nsample";
 1714 static const char __pyx_k_p_1_0_2[] = "p >= 1.0";
 1715 static const char __pyx_k_poisson[] = "poisson";
 1716 static const char __pyx_k_randint[] = "randint";
 1717 static const char __pyx_k_replace[] = "replace";
 1718 static const char __pyx_k_reshape[] = "reshape";
 1719 static const char __pyx_k_scale_0[] = "scale < 0";
 1720 static const char __pyx_k_shape_0[] = "shape < 0";
 1721 static const char __pyx_k_shuffle[] = "shuffle";
 1722 static const char __pyx_k_sigma_0[] = "sigma < 0";
 1723 static const char __pyx_k_signbit[] = "signbit";
 1724 static const char __pyx_k_strides[] = "strides";
 1725 static const char __pyx_k_uniform[] = "uniform";
 1726 static const char __pyx_k_weibull[] = "weibull";
 1727 static const char __pyx_k_KeyError[] = "KeyError";
 1728 static const char __pyx_k_allclose[] = "allclose";
 1729 static const char __pyx_k_binomial[] = "binomial";
 1730 static const char __pyx_k_floating[] = "floating";
 1731 static const char __pyx_k_isfinite[] = "isfinite";
 1732 static const char __pyx_k_itemsize[] = "itemsize";
 1733 static const char __pyx_k_logistic[] = "logistic";
 1734 static const char __pyx_k_mean_0_0[] = "mean <= 0.0";
 1735 static const char __pyx_k_operator[] = "operator";
 1736 static const char __pyx_k_p_is_nan[] = "p is nan";
 1737 static const char __pyx_k_rayleigh[] = "rayleigh";
 1738 static const char __pyx_k_reversed[] = "reversed";
 1739 static const char __pyx_k_rngstate[] = "rngstate";
 1740 static const char __pyx_k_subtract[] = "subtract";
 1741 static const char __pyx_k_vonmises[] = "vonmises";
 1742 static const char __pyx_k_warnings[] = "warnings";
 1743 static const char __pyx_k_TypeError[] = "TypeError";
 1744 static const char __pyx_k_broadcast[] = "broadcast";
 1745 static const char __pyx_k_chisquare[] = "chisquare";
 1746 static const char __pyx_k_dirichlet[] = "dirichlet";
 1747 static const char __pyx_k_geometric[] = "geometric";
 1748 static const char __pyx_k_get_state[] = "get_state";
 1749 static const char __pyx_k_left_mode[] = "left > mode";
 1750 static const char __pyx_k_lognormal[] = "lognormal";
 1751 static const char __pyx_k_logseries[] = "logseries";
 1752 static const char __pyx_k_nsample_1[] = "nsample < 1";
 1753 static const char __pyx_k_rand_bool[] = "_rand_bool";
 1754 static const char __pyx_k_rand_int8[] = "_rand_int8";
 1755 static const char __pyx_k_scale_0_0[] = "scale < 0.0";
 1756 static const char __pyx_k_scale_0_2[] = "scale <= 0";
 1757 static const char __pyx_k_set_state[] = "set_state";
 1758 static const char __pyx_k_sigma_0_0[] = "sigma < 0.0";
 1759 static const char __pyx_k_threading[] = "threading";
 1760 static const char __pyx_k_ValueError[] = "ValueError";
 1761 static const char __pyx_k_array_data[] = "array_data";
 1762 static const char __pyx_k_empty_like[] = "empty_like";
 1763 static const char __pyx_k_issubdtype[] = "issubdtype";
 1764 static const char __pyx_k_left_right[] = "left == right";
 1765 static const char __pyx_k_less_equal[] = "less_equal";
 1766 static const char __pyx_k_logical_or[] = "logical_or";
 1767 static const char __pyx_k_mode_right[] = "mode > right";
 1768 static const char __pyx_k_mtrand_pyx[] = "mtrand.pyx";
 1769 static const char __pyx_k_numpy_dual[] = "numpy.dual";
 1770 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
 1771 static const char __pyx_k_rand_int16[] = "_rand_int16";
 1772 static const char __pyx_k_rand_int32[] = "_rand_int32";
 1773 static const char __pyx_k_rand_int64[] = "_rand_int64";
 1774 static const char __pyx_k_rand_uint8[] = "_rand_uint8";
 1775 static const char __pyx_k_standard_t[] = "standard_t";
 1776 static const char __pyx_k_triangular[] = "triangular";
 1777 static const char __pyx_k_ImportError[] = "ImportError";
 1778 static const char __pyx_k_RandomState[] = "RandomState";
 1779 static const char __pyx_k_check_valid[] = "check_valid";
 1780 static const char __pyx_k_exponential[] = "exponential";
 1781 static const char __pyx_k_multinomial[] = "multinomial";
 1782 static const char __pyx_k_permutation[] = "permutation";
 1783 static const char __pyx_k_rand_uint16[] = "_rand_uint16";
 1784 static const char __pyx_k_rand_uint32[] = "_rand_uint32";
 1785 static const char __pyx_k_rand_uint64[] = "_rand_uint64";
 1786 static const char __pyx_k_scale_0_0_2[] = "scale <= 0.0";
 1787 static const char __pyx_k_noncentral_f[] = "noncentral_f";
 1788 static const char __pyx_k_randint_type[] = "_randint_type";
 1789 static const char __pyx_k_return_index[] = "return_index";
 1790 static const char __pyx_k_searchsorted[] = "searchsorted";
 1791 static const char __pyx_k_OverflowError[] = "OverflowError";
 1792 static const char __pyx_k_count_nonzero[] = "count_nonzero";
 1793 static const char __pyx_k_greater_equal[] = "greater_equal";
 1794 static const char __pyx_k_random_sample[] = "random_sample";
 1795 static const char __pyx_k_RuntimeWarning[] = "RuntimeWarning";
 1796 static const char __pyx_k_hypergeometric[] = "hypergeometric";
 1797 static const char __pyx_k_standard_gamma[] = "standard_gamma";
 1798 static const char __pyx_k_dummy_threading[] = "dummy_threading";
 1799 static const char __pyx_k_poisson_lam_max[] = "poisson_lam_max";
 1800 static const char __pyx_k_random_integers[] = "random_integers";
 1801 static const char __pyx_k_shape_from_size[] = "_shape_from_size";
 1802 static const char __pyx_k_standard_cauchy[] = "standard_cauchy";
 1803 static const char __pyx_k_standard_normal[] = "standard_normal";
 1804 static const char __pyx_k_sum_pvals_1_1_0[] = "sum(pvals[:-1]) > 1.0";
 1805 static const char __pyx_k_RandomState_ctor[] = "__RandomState_ctor";
 1806 static const char __pyx_k_may_share_memory[] = "may_share_memory";
 1807 static const char __pyx_k_negative_binomial[] = "negative_binomial";
 1808 static const char __pyx_k_DeprecationWarning[] = "DeprecationWarning";
 1809 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
 1810 static const char __pyx_k_ngood_nbad_nsample[] = "ngood + nbad < nsample";
 1811 static const char __pyx_k_lam_value_too_large[] = "lam value too large";
 1812 static const char __pyx_k_multivariate_normal[] = "multivariate_normal";
 1813 static const char __pyx_k_randint_helpers_pxi[] = "randint_helpers.pxi";
 1814 static const char __pyx_k_noncentral_chisquare[] = "noncentral_chisquare";
 1815 static const char __pyx_k_standard_exponential[] = "standard_exponential";
 1816 static const char __pyx_k_lam_value_too_large_2[] = "lam value too large.";
 1817 static const char __pyx_k_Seed_array_must_be_1_d[] = "Seed array must be 1-d";
 1818 static const char __pyx_k_Seed_must_be_non_empty[] = "Seed must be non-empty";
 1819 static const char __pyx_k_RandomState_f_line_2002[] = "RandomState.f (line 2002)";
 1820 static const char __pyx_k_a_must_be_1_dimensional[] = "'a' must be 1-dimensional";
 1821 static const char __pyx_k_p_must_be_1_dimensional[] = "'p' must be 1-dimensional";
 1822 static const char __pyx_k_state_must_be_624_longs[] = "state must be 624 longs";
 1823 static const char __pyx_k_algorithm_must_be_MT19937[] = "algorithm must be 'MT19937'";
 1824 static const char __pyx_k_probabilities_contain_NaN[] = "probabilities contain NaN";
 1825 static const char __pyx_k_RandomState_rand_line_1326[] = "RandomState.rand (line 1326)";
 1826 static const char __pyx_k_RandomState_wald_line_3525[] = "RandomState.wald (line 3525)";
 1827 static const char __pyx_k_RandomState_zipf_line_4009[] = "RandomState.zipf (line 4009)";
 1828 static const char __pyx_k_Range_exceeds_valid_bounds[] = "Range exceeds valid bounds";
 1829 static const char __pyx_k_low_is_out_of_bounds_for_s[] = "low is out of bounds for %s";
 1830 static const char __pyx_k_mean_must_be_1_dimensional[] = "mean must be 1 dimensional";
 1831 static const char __pyx_k_RandomState_bytes_line_1003[] = "RandomState.bytes (line 1003)";
 1832 static const char __pyx_k_RandomState_gamma_line_1906[] = "RandomState.gamma (line 1906)";
 1833 static const char __pyx_k_RandomState_power_line_2887[] = "RandomState.power (line 2887)";
 1834 static const char __pyx_k_RandomState_randn_line_1370[] = "RandomState.randn (line 1370)";
 1835 static const char __pyx_k_a_and_p_must_have_same_size[] = "'a' and 'p' must have same size";
 1836 static const char __pyx_k_a_must_be_a_valid_float_1_0[] = "'a' must be a valid float > 1.0";
 1837 static const char __pyx_k_high_is_out_of_bounds_for_s[] = "high is out of bounds for %s";
 1838 static const char __pyx_k_RandomState_choice_line_1032[] = "RandomState.choice (line 1032)";
 1839 static const char __pyx_k_RandomState_gumbel_line_3096[] = "RandomState.gumbel (line 3096)";
 1840 static const char __pyx_k_RandomState_normal_line_1557[] = "RandomState.normal (line 1557)";
 1841 static const char __pyx_k_RandomState_pareto_line_2667[] = "RandomState.pareto (line 2667)";
 1842 static const char __pyx_k_RandomState_randint_line_910[] = "RandomState.randint (line 910)";
 1843 static const char __pyx_k_RandomState_laplace_line_2998[] = "RandomState.laplace (line 2998)";
 1844 static const char __pyx_k_RandomState_poisson_line_3921[] = "RandomState.poisson (line 3921)";
 1845 static const char __pyx_k_RandomState_shuffle_line_4793[] = "RandomState.shuffle (line 4793)";
 1846 static const char __pyx_k_RandomState_tomaxint_line_863[] = "RandomState.tomaxint (line 863)";
 1847 static const char __pyx_k_RandomState_uniform_line_1220[] = "RandomState.uniform (line 1220)";
 1848 static const char __pyx_k_RandomState_weibull_line_2777[] = "RandomState.weibull (line 2777)";
 1849 static const char __pyx_k_probabilities_do_not_sum_to_1[] = "probabilities do not sum to 1";
 1850 static const char __pyx_k_RandomState_binomial_line_3706[] = "RandomState.binomial (line 3706)";
 1851 static const char __pyx_k_RandomState_logistic_line_3227[] = "RandomState.logistic (line 3227)";
 1852 static const char __pyx_k_RandomState_rayleigh_line_3445[] = "RandomState.rayleigh (line 3445)";
 1853 static const char __pyx_k_RandomState_vonmises_line_2569[] = "RandomState.vonmises (line 2569)";
 1854 static const char __pyx_k_dirichlet_alpha_size_None_Draw[] = "\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 : 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.  Default is None, in which case a\n            single value is returned.\n\n        Returns\n        -------\n        samples : ndarray,\n            The drawn samples, of shape (size, alpha.ndim).\n\n        Raises\n        -------\n        ValueError\n            If any value in alpha is less than or equal to zero\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.org.uk/mackay/itila/\n        .. [2] Wikipedia, \"Dirichlet distribution\",\n               https://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\n        the pieces.\n\n        >>> s = np.random.dirichlet((10, 5, 3), 20).transpose()\n\n        >>> import matplotlib.pyplot as plt\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        ";
 1855 static const char __pyx_k_laplace_loc_0_0_scale_1_0_size[] = "\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 or array_like of floats, optional\n            The position, :math:`\\mu`, of the distribution peak. Default is 0.\n        scale : float or array_like of floats, optional\n            :math:`\\lambda`, the exponential decay. Default is 1.\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.  If size is ``None`` (default),\n            a single value is returned if ``loc`` and ``scale`` are both scalars.\n            Otherwise, ``np.broadcast(loc, scale).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized Laplace distribution.\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\n        of an error can be expressed as an exponential function of the\n        absolute magnitude of the error, which leads to the Laplace\n        distribution. For many problems in economics and health\n        sciences, this distribution seems to model the data better\n        than the standard Gaussian distribution.\n\n        References\n        ----------\n        .. [1] Abramowitz, M. and Stegun, I. A. (Eds.). \"Han""dbook of\n               Mathematical Functions with Formulas, Graphs, and Mathematical\n               Tables, 9th printing,\" New York: Dover, 1972.\n        .. [2] Kotz, Samuel, et. al. \"The Laplace Distribution and\n               Generalizations, \" Birkhauser, 2001.\n        .. [3] Weisstein, Eric W. \"Laplace Distribution.\"\n               From MathWorld--A Wolfram Web Resource.\n               http://mathworld.wolfram.com/LaplaceDistribution.html\n        .. [4] Wikipedia, \"Laplace distribution\",\n               https://en.wikipedia.org/wiki/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, density=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        ";
 1856 static const char __pyx_k_permutation_x_Randomly_permute[] = "\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        ";
 1857 static const char __pyx_k_poisson_lam_1_0_size_None_Draw[] = "\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 distribution\n        for large N.\n\n        Parameters\n        ----------\n        lam : float or array_like of floats\n            Expectation of interval, should be >= 0. A sequence of expectation\n            intervals must be broadcastable over the requested size.\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.  If size is ``None`` (default),\n            a single value is returned if ``lam`` is a scalar. Otherwise,\n            ``np.array(lam).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized Poisson distribution.\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\n        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.\"\n               From MathWorld--A Wolfram Web Resource.\n               http://mathworld.wolfram.com/PoissonDistribution.html\n        .. [2] Wikipedia, \"Poisson distribution\",\n               https://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 hist""ogram of the sample:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, ignored = plt.hist(s, 14, density=True)\n        >>> plt.show()\n\n        Draw each 100 values for lambda 100 and 500:\n\n        >>> s = np.random.poisson(lam=(100., 500.), size=(100, 2))\n\n        ";
 1858 static const char __pyx_k_rand_d0_d1_dn_Random_values_in[] = "\n        rand(d0, d1, ..., dn)\n\n        Random values in a given shape.\n\n        Create an array of the given shape and populate it with\n        random samples from a uniform distribution\n        over ``[0, 1)``.\n\n        Parameters\n        ----------\n        d0, d1, ..., dn : int, optional\n            The dimensions of the returned array, should all be positive.\n            If no argument is given a single Python float is returned.\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        np.random.random_sample .\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        ";
 1859 static const char __pyx_k_randn_d0_d1_dn_Return_a_sample[] = "\n        randn(d0, 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 ``(d0, 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        d0, d1, ..., dn : int, optional\n            The dimensions of the returned array, should be all positive.\n            If no argument is given a single Python float is returned.\n\n        Returns\n        -------\n        Z : ndarray or float\n            A ``(d0, 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        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        ";
 1860 static const char __pyx_k_random_sample_size_None_Return[] = "\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            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.  Default is None, in which case a\n            single value is returned.\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        ";
 1861 static const char __pyx_k_shuffle_x_Modify_a_sequence_in[] = "\n        shuffle(x)\n\n        Modify a sequence in-place by shuffling its contents.\n\n        This function only shuffles the array along the first axis of a\n        multi-dimensional array. The order of sub-arrays is changed but\n        their contents remains the same.\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        Multi-dimensional arrays are only shuffled along the first axis:\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        ";
 1862 static const char __pyx_k_standard_cauchy_size_None_Draw[] = "\n        standard_cauchy(size=None)\n\n        Draw samples from a 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, optional\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.  Default is None, in which case a\n            single value is returned.\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              https://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              https://en.wikipedia.org/wiki""/Cauchy_distribution\n\n        Examples\n        --------\n        Draw samples and plot the distribution:\n\n        >>> import matplotlib.pyplot as plt\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        ";
 1863 static const char __pyx_k_standard_exponential_size_None[] = "\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, optional\n            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.  Default is None, in which case a\n            single value is returned.\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        ";
 1864 static const char __pyx_k_standard_gamma_shape_size_None[] = "\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 or array_like of floats\n            Parameter, 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.  If size is ``None`` (default),\n            a single value is returned if ``shape`` is a scalar.  Otherwise,\n            ``np.array(shape).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized standard gamma distribution.\n\n        See Also\n        --------\n        scipy.stats.gamma : probability density function, distribution or\n            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               https://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, density=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        ";
 1865 static const char __pyx_k_standard_normal_size_None_Draw[] = "\n        standard_normal(size=None)\n\n        Draw 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.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.  Default is None, in which case a\n            single value is 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        ";
 1866 static const char __pyx_k_wald_mean_scale_size_None_Draw[] = "\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. Some references claim that the Wald is an inverse Gaussian\n        with mean equal to 1, but 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\n        unit distance and distance covered in unit time.\n\n        Parameters\n        ----------\n        mean : float or array_like of floats\n            Distribution mean, should be > 0.\n        scale : float or array_like of floats\n            Scale parameter, 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.  If size is ``None`` (default),\n            a single value is returned if ``mean`` and ``scale`` are both scalars.\n            Otherwise, ``np.broadcast(mean, scale).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized Wald distribution.\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\n        from attempts to model Brownian motion. It is also a\n        competitor to the Weibull for use in reliability modeling and\n        modeling stock returns and interest rate processes.\n\n        References\n        ----------\n        .. [1] Brighton Webs Ltd., Wald Distribution,\n              "" https://web.archive.org/web/20090423014010/http://www.brighton-webs.co.uk:80/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, \"Inverse Gaussian distribution\"\n               https://en.wikipedia.org/wiki/Inverse_Gaussian_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, density=True)\n        >>> plt.show()\n\n        ";
 1867 static const char __pyx_k_RandomState_chisquare_line_2211[] = "RandomState.chisquare (line 2211)";
 1868 static const char __pyx_k_RandomState_dirichlet_line_4669[] = "RandomState.dirichlet (line 4669)";
 1869 static const char __pyx_k_RandomState_geometric_line_4102[] = "RandomState.geometric (line 4102)";
 1870 static const char __pyx_k_RandomState_hypergeometric_line[] = "RandomState.hypergeometric (line 4170)";
 1871 static const char __pyx_k_RandomState_lognormal_line_3321[] = "RandomState.lognormal (line 3321)";
 1872 static const char __pyx_k_RandomState_logseries_line_4293[] = "RandomState.logseries (line 4293)";
 1873 static const char __pyx_k_RandomState_multivariate_normal[] = "RandomState.multivariate_normal (line 4391)";
 1874 static const char __pyx_k_RandomState_standard_gamma_line[] = "RandomState.standard_gamma (line 1820)";
 1875 static const char __pyx_k_Seed_must_be_between_0_and_2_32[] = "Seed must be between 0 and 2**32 - 1";
 1876 static const char __pyx_k_Unsupported_dtype_s_for_randint[] = "Unsupported dtype \"%s\" for randint";
 1877 static const char __pyx_k_a_cannot_be_empty_unless_no_sam[] = "'a' cannot be empty unless no samples are taken";
 1878 static const char __pyx_k_a_must_be_1_dimensional_or_an_i[] = "'a' must be 1-dimensional or an integer";
 1879 static const char __pyx_k_a_must_be_greater_than_0_unless[] = "'a' must be greater than 0 unless no samples are taken";
 1880 static const char __pyx_k_a_must_contain_valid_floats_1_0[] = "'a' must contain valid floats > 1.0";
 1881 static const char __pyx_k_binomial_n_p_size_None_Draw_sam[] = "\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 : int or array_like of ints\n            Parameter of the distribution, >= 0. Floats are also accepted,\n            but they will be truncated to integers.\n        p : float or array_like of floats\n            Parameter of the distribution, >= 0 and <=1.\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.  If size is ``None`` (default),\n            a single value is returned if ``n`` and ``p`` are both scalars.\n            Otherwise, ``np.broadcast(n, p).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized binomial distribution, where\n            each sample is equal to the number of successes over the n trials.\n\n        See Also\n        --------\n        scipy.stats.binom : probability density function, distribution or\n            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 binom""ial 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               https://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        ";
 1882 static const char __pyx_k_bytes_length_Return_random_byte[] = "\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        ";
 1883 static const char __pyx_k_chisquare_df_size_None_Draw_sam[] = "\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 : float or array_like of floats\n             Number of degrees of freedom, 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.  If size is ``None`` (default),\n            a single value is returned if ``df`` is a scalar.  Otherwise,\n            ``np.array(df).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized chi-square distribution.\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        .. [1] NIST \"Engineering Statistics Handbook\"\n               https://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        ";
 1884 static const char __pyx_k_choice_a_size_None_replace_True[] = "\n        choice(a, size=None, replace=True, p=None)\n\n        Generates a random sample from a given 1-D array\n\n                .. versionadded:: 1.7.0\n\n        Parameters\n        -----------\n        a : 1-D array-like or int\n            If an ndarray, a random sample is generated from its elements.\n            If an int, the random sample is generated as if a were np.arange(a)\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.  Default is None, in which case a\n            single value is returned.\n        replace : boolean, optional\n            Whether the sample is with or without replacement\n        p : 1-D array-like, optional\n            The probabilities associated with each entry in a.\n            If not given the sample assumes a uniform distribution over all\n            entries in a.\n\n        Returns\n        --------\n        samples : single item or ndarray\n            The generated random samples\n\n        Raises\n        -------\n        ValueError\n            If a is an int and less than zero, if a or p are not 1-dimensional,\n            if a is an array-like of size 0, if p is not a vector of\n            probabilities, if a and p have different lengths, or if\n            replace=False and the sample size is greater than the population\n            size\n\n        See Also\n        ---------\n        randint, shuffle, permutation\n\n        Examples\n        ---------\n        Generate a uniform random sample from np.arange(5) of size 3:\n\n        >>> np.random.choice(5, 3)\n        array([0, 3, 4])\n        >>> #This is equivalent to np.random.randint(0,5,3)\n\n        Generate a non-uniform random sample from np.arange(5) of size 3:\n\n        >>> np.random.choice(5, 3, p=[0.1, 0, 0.3, 0.6, 0])\n        array([3, 3, 0])\n\n        Generate a uniform random sample from np.arange(5) of size 3 without\n        ""replacement:\n\n        >>> np.random.choice(5, 3, replace=False)\n        array([3,1,0])\n        >>> #This is equivalent to np.random.permutation(np.arange(5))[:3]\n\n        Generate a non-uniform random sample from np.arange(5) of size\n        3 without replacement:\n\n        >>> np.random.choice(5, 3, replace=False, p=[0.1, 0, 0.3, 0.6, 0])\n        array([2, 3, 0])\n\n        Any of the above can be repeated with an arbitrary array-like\n        instead of just integers. For instance:\n\n        >>> aa_milne_arr = ['pooh', 'rabbit', 'piglet', 'Christopher']\n        >>> np.random.choice(aa_milne_arr, 5, p=[0.5, 0.1, 0.1, 0.3])\n        array(['pooh', 'pooh', 'pooh', 'Christopher', 'piglet'],\n              dtype='|S11')\n\n        ";
 1885 static const char __pyx_k_f_dfnum_dfden_size_None_Draw_sa[] = "\n        f(dfnum, dfden, size=None)\n\n        Draw samples from an 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 should be greater than\n        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 or array_like of floats\n            Degrees of freedom in numerator, should be > 0.\n        dfden : float or array_like of float\n            Degrees of freedom in denominator, 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.  If size is ``None`` (default),\n            a single value is returned if ``dfnum`` and ``dfden`` are both scalars.\n            Otherwise, ``np.broadcast(dfnum, dfden).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized Fisher distribution.\n\n        See Also\n        --------\n        scipy.stats.f : probability density function, distribution or\n            cumulative density function, etc.\n\n        Notes\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               https://en.wikipedia.org/wiki/F-distribution\n\n        Examples\n        --------\n        An example from Glantz[1], pp 47-40:\n\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        ";
 1886 static const char __pyx_k_gamma_shape_scale_1_0_size_None[] = "\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 : float or array_like of floats\n            The shape of the gamma distribution. Should be greater than zero.\n        scale : float or array_like of floats, optional\n            The scale of the gamma distribution. Should be greater than zero.\n            Default is equal to 1.\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.  If size is ``None`` (default),\n            a single value is returned if ``shape`` and ``scale`` are both scalars.\n            Otherwise, ``np.broadcast(shape, scale).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized gamma distribution.\n\n        See Also\n        --------\n        scipy.stats.gamma : probability density function, distribution or\n            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 Resourc""e.\n               http://mathworld.wolfram.com/GammaDistribution.html\n        .. [2] Wikipedia, \"Gamma distribution\",\n               https://en.wikipedia.org/wiki/Gamma_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> shape, scale = 2., 2.  # mean=4, std=2*sqrt(2)\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, density=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        ";
 1887 static const char __pyx_k_geometric_p_size_None_Draw_samp[] = "\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 or array_like of floats\n            The probability of success of an individual trial.\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.  If size is ``None`` (default),\n            a single value is returned if ``p`` is a scalar.  Otherwise,\n            ``np.array(p).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized geometric distribution.\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        ";
 1888 static const char __pyx_k_gumbel_loc_0_0_scale_1_0_size_N[] = "\n        gumbel(loc=0.0, scale=1.0, size=None)\n\n        Draw samples from a Gumbel distribution.\n\n        Draw samples from a Gumbel distribution with specified location and\n        scale.  For more information on the Gumbel distribution, see\n        Notes and References below.\n\n        Parameters\n        ----------\n        loc : float or array_like of floats, optional\n            The location of the mode of the distribution. Default is 0.\n        scale : float or array_like of floats, optional\n            The scale parameter of the distribution. Default is 1.\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.  If size is ``None`` (default),\n            a single value is returned if ``loc`` and ``scale`` are both scalars.\n            Otherwise, ``np.broadcast(loc, scale).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized Gumbel distribution.\n\n        See Also\n        --------\n        scipy.stats.gumbel_l\n        scipy.stats.gumbel_r\n        scipy.stats.genextreme\n        weibull\n\n        Notes\n        -----\n        The Gumbel (or Smallest Extreme Value (SEV) or the Smallest Extreme\n        Value Type I) distribution is one of a class of Generalized Extreme\n        Value (GEV) distributions used in modeling extreme value problems.\n        The Gumbel is a special case of the Extreme Value Type I distribution\n        for maximums from 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\n        :math:`\\beta` is 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\n        rainfall rates.  It is a \"fat-tailed\" distribution - the probability of\n        an event in the tail of the distribution is larger than if one used a\n        Gaussian, hence the surprisingly frequent occurrence of 100-year\n        floods. Floods were initially modeled as a Gaussian process, which\n        underestimated the frequency of extreme events.\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\n        of :math:`\\frac{\\pi^2}{6}\\beta^2`.\n\n        References\n        ----------\n        .. [1] Gumbel, E. J., \"Statistics of Extremes,\"\n               New York: Columbia University Press, 1958.\n        .. [2] Reiss, R.-D. and Thomas, M., \"Statistical Analysis of Extreme\n               Values from Insurance, Finance, Hydrology and Other Fields,\"\n               Basel: Birkhauser Verlag, 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, density=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, density=True)\n        >>> beta = np.std(maxima) * np.sqrt(6) / np.pi\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        ";
 1889 static const char __pyx_k_hypergeometric_ngood_nbad_nsamp[] = "\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 : int or array_like of ints\n            Number of ways to make a good selection.  Must be nonnegative.\n        nbad : int or array_like of ints\n            Number of ways to make a bad selection.  Must be nonnegative.\n        nsample : int or array_like of ints\n            Number of items sampled.  Must be at least 1 and at most\n            ``ngood + nbad``.\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.  If size is ``None`` (default),\n            a single value is returned if ``ngood``, ``nbad``, and ``nsample``\n            are all scalars.  Otherwise, ``np.broadcast(ngood, nbad, nsample).size``\n            samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized hypergeometric distribution.\n\n        See Also\n        --------\n        scipy.stats.hypergeom : probability density function, distribution or\n            cumulative density function, etc.\n\n        Notes\n        -----\n        The probability density for the Hypergeometric distribution is\n\n        .. math:: P(x) = \\frac{\\binom{g}{x}\\binom{b}{n-x}}{\\binom{g+b}{n}},\n\n        where :math:`0 \\le x \\le n` and :math:`n-b \\le x \\le g`\n\n        for P(x) the probability of x successes, g = ngood, b = nbad, and\n        n = number of samples.\n\n        Consider an urn with black and white marbles in it, ngood of them\n        black a""nd 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 with\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               https://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        >>> from matplotlib.pyplot import hist\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        ";
 1890 static const char __pyx_k_logistic_loc_0_0_scale_1_0_size[] = "\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 or array_like of floats, optional\n            Parameter of the distribution. Default is 0.\n        scale : float or array_like of floats, optional\n            Parameter of the distribution. Should be greater than zero.\n            Default is 1.\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.  If size is ``None`` (default),\n            a single value is returned if ``loc`` and ``scale`` are both scalars.\n            Otherwise, ``np.broadcast(loc, scale).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized logistic distribution.\n\n        See Also\n        --------\n        scipy.stats.logistic : probability density function, distribution or\n            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\n               Extreme Values, from Insurance, Financ""e, Hydrology and Other\n               Fields,\" 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               https://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        >>> import matplotlib.pyplot as plt\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        ";
 1891 static const char __pyx_k_lognormal_mean_0_0_sigma_1_0_si[] = "\n        lognormal(mean=0.0, sigma=1.0, size=None)\n\n        Draw samples from a log-normal distribution.\n\n        Draw samples from a log-normal distribution with specified mean,\n        standard deviation, and array shape.  Note that the mean and standard\n        deviation are not the values for the distribution itself, but of the\n        underlying normal distribution it is derived from.\n\n        Parameters\n        ----------\n        mean : float or array_like of floats, optional\n            Mean value of the underlying normal distribution. Default is 0.\n        sigma : float or array_like of floats, optional\n            Standard deviation of the underlying normal distribution. Should\n            be greater than zero. Default is 1.\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.  If size is ``None`` (default),\n            a single value is returned if ``mean`` and ``sigma`` are both scalars.\n            Otherwise, ``np.broadcast(mean, sigma).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized log-normal distribution.\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.  The probability density function for the log-normal\n        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\n        deviation of the normally distributed logarithm of the variable.\n        A log-normal distribution results if a random variable is the *produc""t*\n        of a large number of independent, identically-distributed variables in\n        the same way that a normal distribution results if the variable is the\n        *sum* of a large number of independent, identically-distributed\n        variables.\n\n        References\n        ----------\n        .. [1] Limpert, E., Stahel, W. A., and Abbt, M., \"Log-normal\n               Distributions across the Sciences: Keys and Clues,\"\n               BioScience, Vol. 51, No. 5, May, 2001.\n               https://stat.ethz.ch/~stahel/lognormal/bioscience.pdf\n        .. [2] Reiss, R.D. and Thomas, M., \"Statistical Analysis of Extreme\n               Values,\" Basel: Birkhauser Verlag, 2001, pp. 31-32.\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, density=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\n        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        >>> count, bins, ignored = plt"".hist(b, 100, density=True, align='mid')\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        ";
 1892 static const char __pyx_k_logseries_p_size_None_Draw_samp[] = "\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        shape parameter, 0 < ``p`` < 1.\n\n        Parameters\n        ----------\n        p : float or array_like of floats\n            Shape parameter for the distribution.  Must be in the range (0, 1).\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.  If size is ``None`` (default),\n            a single value is returned if ``p`` is a scalar.  Otherwise,\n            ``np.array(p).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized logarithmic series distribution.\n\n        See Also\n        --------\n        scipy.stats.logser : probability density function, distribution or\n            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, \"Logarithmic distribution\",\n               https://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        >>> import matplotlib.pyplot as plt\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        ";
 1893 static const char __pyx_k_multinomial_n_pvals_size_None_D[] = "\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\n        outcome 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 : 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.  Default is None, in which case a\n            single value 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        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.  Fo""r the second,\n        we threw 2 times 1, 4 times 2, etc.\n\n        A loaded die is more likely to land on number 6:\n\n        >>> np.random.multinomial(100, [1/7.]*5 + [2/7.])\n        array([11, 16, 14, 17, 16, 26])\n\n        The probability inputs should be normalized. As an implementation\n        detail, the value of the last entry is ignored and assumed to take\n        up any leftover probability mass, but this should not be relied on.\n        A biased coin which has twice as much weight on one side as on the\n        other should be sampled like so:\n\n        >>> np.random.multinomial(100, [1.0 / 3, 2.0 / 3])  # RIGHT\n        array([38, 62])\n\n        not like:\n\n        >>> np.random.multinomial(100, [1.0, 2.0])  # WRONG\n        array([100,   0])\n\n        ";
 1894 static const char __pyx_k_multivariate_normal_mean_cov_si[] = "\n        multivariate_normal(mean, cov[, size, check_valid, tol])\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. It must be symmetric and\n            positive-semidefinite for proper sampling.\n        size : int or 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        check_valid : { 'warn', 'raise', 'ignore' }, optional\n            Behavior when the covariance matrix is not positive semidefinite.\n        tol : float, optional\n            Tolerance when checking the singular values in covariance matrix.\n            cov is cast to double before the check.\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\n\n        Diagonal covariance means that points are oriented along 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')\n        >>> plt.axis('equal')\n        >>> plt.show()\n\n        Note that the covariance matrix must be positive semidefinite (a.k.a.\n        nonnegative-definite). Otherwise, the behavior of this method is\n        undefined and backwards compatibility is not guaranteed.\n\n        References\n        ----------\n        .. [1] Papoulis, A., \"Probability, Random Variables, and Stochastic\n               Processes,\" 3rd ed., New York: McGraw-Hill, 1991.\n        .. [2] Duda, R. O., Hart, P. E., and Stork, D. G., \"Pattern\n               Classification,\" 2nd ed., New York: Wiley, 2001.\n\n        Examples\n        --------\n        >>> mean = (1, 2)\n        >>> cov = [[1, 0], [0, 1]""]\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        >>> list((x[0,0,:] - mean) < 0.6)\n        [True, True]\n\n        ";
 1895 static const char __pyx_k_negative_binomial_n_p_size_None[] = "\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` successes 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 or array_like of ints\n            Parameter of the distribution, > 0. Floats are also accepted,\n            but they will be truncated to integers.\n        p : float or array_like of floats\n            Parameter of the distribution, >= 0 and <=1.\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.  If size is ``None`` (default),\n            a single value is returned if ``n`` and ``p`` are both scalars.\n            Otherwise, ``np.broadcast(n, p).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized negative binomial distribution,\n            where each sample is equal to N, the number of failures that\n            occurred before a total of n successes was reached.\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}p^{n}(1-p)^{N},\n\n        where :math:`n` is the number of successes, :math:`p` is the\n        probability of success, and :math:`N+n` is the number of trials.\n        The negative binomial distribution gives the probability of N\n        failures given n successes, with a success on the last trial.\n\n        If one throws a die repeatedly until the third time a \"1\" appears,\n        then the probability distribution of the number of non-\"1\"s that\n        appear before the 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               https://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\n        exploration wells, each with an estimated probability of\n        success of 0.1.  What is the probability of having one success\n        for each successive well, that is what is the probability of a\n        single success after drilling 5 wells, after 6 wells, 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        ";
 1896 static const char __pyx_k_noncentral_chisquare_df_nonc_si[] = "\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 : float or array_like of floats\n            Degrees of freedom, should be > 0.\n\n            .. versionchanged:: 1.10.0\n               Earlier NumPy versions required dfnum > 1.\n        nonc : float or array_like of floats\n            Non-centrality, should be non-negative.\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.  If size is ``None`` (default),\n            a single value is returned if ``df`` and ``nonc`` are both scalars.\n            Otherwise, ``np.broadcast(df, nonc).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized noncentral chi-square distribution.\n\n        Notes\n        -----\n        The probability density function for the noncentral Chi-square\n        distribution is\n\n        .. math:: P(x;df,nonc) = \\sum^{\\infty}_{i=0}\n                               \\frac{e^{-nonc/2}(nonc/2)^{i}}{i!}\n                               \\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\n        useful in bombing and coverage problems, the probability of\n        killing the point target given by the noncentral chi-squared\n        distribution.\n\n        References\n        ----------\n        .. [1] Delhi, M.S. Holla, \"On a noncentral chi-square distribution in\n               the analysis of weapon systems effectiveness\", Metrika,\n               Volume 15, Number 1 / December, 1970.\n        .. [2] Wikipedia, \"Noncentral chi-s""quared distribution\"\n               https://en.wikipedia.org/wiki/Noncentral_chi-squared_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, density=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), density=True)\n        >>> values2 = plt.hist(np.random.chisquare(3, 100000),\n        ...                    bins=np.arange(0., 25, .1), density=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, density=True)\n        >>> plt.show()\n\n        ";
 1897 static const char __pyx_k_noncentral_f_dfnum_dfden_nonc_s[] = "\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 : float or array_like of floats\n            Numerator degrees of freedom, should be > 0.\n\n            .. versionchanged:: 1.14.0\n               Earlier NumPy versions required dfnum > 1.\n        dfden : float or array_like of floats\n            Denominator degrees of freedom, should be > 0.\n        nonc : float or array_like of floats\n            Non-centrality parameter, the sum of the squares of the numerator\n            means, 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.  If size is ``None`` (default),\n            a single value is returned if ``dfnum``, ``dfden``, and ``nonc``\n            are all scalars.  Otherwise, ``np.broadcast(dfnum, dfden, nonc).size``\n            samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized noncentral Fisher distribution.\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        .. [1] Weisstein, Eric W. \"Noncentral F-Distribution.\"\n               From MathW""orld--A Wolfram Web Resource.\n               http://mathworld.wolfram.com/NoncentralF-Distribution.html\n        .. [2] Wikipedia, \"Noncentral F-distribution\",\n               https://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 comparison.\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, density=True)\n        >>> c_vals = np.random.f(dfnum, dfden, 1000000)\n        >>> F = np.histogram(c_vals, bins=50, density=True)\n        >>> import matplotlib.pyplot as plt\n        >>> plt.plot(F[1][1:], F[0])\n        >>> plt.plot(NF[1][1:], NF[0])\n        >>> plt.show()\n\n        ";
 1898 static const char __pyx_k_normal_loc_0_0_scale_1_0_size_N[] = "\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 or array_like of floats\n            Mean (\"centre\") of the distribution.\n        scale : float or array_like of floats\n            Standard deviation (spread or \"width\") of the distribution.\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.  If size is ``None`` (default),\n            a single value is returned if ``loc`` and ``scale`` are both scalars.\n            Otherwise, ``np.broadcast(loc, scale).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized normal distribution.\n\n        See Also\n        --------\n        scipy.stats.norm : probability density function, distribution or\n            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\n        deviation. The square of the standard deviation, :math:`\\sigma^2`,\n        is called the v""ariance.\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\n        the mean, rather than those far away.\n\n        References\n        ----------\n        .. [1] Wikipedia, \"Normal distribution\",\n               https://en.wikipedia.org/wiki/Normal_distribution\n        .. [2] P. R. Peebles Jr., \"Central Limit Theorem\" in \"Probability,\n               Random 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, density=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        ";
 1899 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
 1900 static const char __pyx_k_pareto_a_size_None_Draw_samples[] = "\n        pareto(a, size=None)\n\n        Draw samples from a Pareto II or Lomax distribution with\n        specified shape.\n\n        The Lomax or Pareto II distribution is a shifted Pareto\n        distribution. The classical Pareto distribution can be\n        obtained from the Lomax distribution by adding 1 and\n        multiplying by the scale parameter ``m`` (see Notes).  The\n        smallest value of the Lomax distribution is zero while for the\n        classical Pareto distribution it is ``mu``, where the standard\n        Pareto distribution has location ``mu = 1``.  Lomax can also\n        be considered as a simplified version of the Generalized\n        Pareto distribution (available in SciPy), with the scale set\n        to one and the location set to zero.\n\n        The Pareto distribution must be greater than zero, and is\n        unbounded above.  It is also known as the \"80-20 rule\".  In\n        this distribution, 80 percent of the weights are in the lowest\n        20 percent of the range, while the other 20 percent fill the\n        remaining 80 percent of the range.\n\n        Parameters\n        ----------\n        a : float or array_like of floats\n            Shape of the distribution. Should be greater than zero.\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.  If size is ``None`` (default),\n            a single value is returned if ``a`` is a scalar.  Otherwise,\n            ``np.array(a).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized Pareto distribution.\n\n        See Also\n        --------\n        scipy.stats.lomax : probability density function, distribution or\n            cumulative density function, etc.\n        scipy.stats.genpareto : probability density function, distribution or\n            cumulative densit""y 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 scale.\n\n        The Pareto distribution, named after the Italian economist\n        Vilfredo Pareto, is a power law probability distribution\n        useful in many real world problems.  Outside the field of\n        economics it is generally referred to as the Bradford\n        distribution. Pareto developed the distribution to describe\n        the distribution of wealth in an economy.  It has also found\n        use in insurance, web page access statistics, oil field sizes,\n        and many other problems, including the download frequency for\n        projects in Sourceforge [1]_.  It is one of the so-called\n        \"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               https://en.wikipedia.org/wiki/Pareto_distribution\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> a, m = 3., 2.  # shape and mode\n        >>> s = (np.random.pareto(a, 1000) + 1) * m\n\n        Display the histogram of the samples, along with the probability\n        density function:\n\n        >>> import matplotlib.pyplot as plt\n        >>> count, bins, _ = plt.hist(s, 100, density=True)\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        ";
 1901 static const char __pyx_k_power_a_size_None_Draws_samples[] = "\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 or array_like of floats\n            Parameter of the distribution. Should be greater than zero.\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.  If size is ``None`` (default),\n            a single value is returned if ``a`` is a scalar.  Otherwise,\n            ``np.array(a).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized power distribution.\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. \"NIST Handbook 148:\n               Dataplot Reference Manual, Volume 2: Let Subcommands and Library\n               Functions\", National Institute of Standards and Technology\n               Handbook Series, June 2003.\n               https://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 = 10""00\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, density=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, density=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, density=True)\n        >>> plt.plot(xx,powpdf,'r-')\n        >>> plt.title('inverse of stats.pareto(5)')\n\n        ";
 1902 static const char __pyx_k_randint_low_high_None_size_None[] = "\n        randint(low, high=None, size=None, dtype='l')\n\n        Return random integers from `low` (inclusive) to `high` (exclusive).\n\n        Return random integers from the \"discrete uniform\" distribution of\n        the specified dtype in the \"half-open\" interval [`low`, `high`). If\n        `high` is None (the default), 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 one above the\n            *highest* such 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.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.  Default is None, in which case a\n            single value is returned.\n        dtype : dtype, optional\n            Desired dtype of the result. All dtypes are determined by their\n            name, i.e., 'int64', 'int', etc, so byteorder is not available\n            and a specific precision may have different C types depending\n            on the platform. The default value is 'np.int'.\n\n            .. versionadded:: 1.11.0\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        ";
 1903 static const char __pyx_k_random_integers_low_high_None_s[] = "\n        random_integers(low, high=None, size=None)\n\n        Random integers of type np.int between `low` and `high`, inclusive.\n\n        Return random integers of type np.int from the \"discrete uniform\"\n        distribution in the closed interval [`low`, `high`].  If `high` is\n        None (the default), then results are from [1, `low`]. The np.int\n        type translates to the C long type used by Python 2 for \"short\"\n        integers and its precision is platform dependent.\n\n        This function has been deprecated. Use randint instead.\n\n        .. deprecated:: 1.11.0\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.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.  Default is None, in which case a\n            single value 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        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, density=True)\n        >>> plt.show()\n\n        ";
 1904 static const char __pyx_k_rayleigh_scale_1_0_size_None_Dr[] = "\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 : float or array_like of floats, optional\n            Scale, also equals the mode. Should be >= 0. Default is 1.\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.  If size is ``None`` (default),\n            a single value is returned if ``scale`` is a scalar.  Otherwise,\n            ``np.array(scale).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized Rayleigh distribution.\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 would arise, for example, if the East\n        and North components of the wind velocity had identical zero-mean\n        Gaussian distributions.  Then the wind speed would have a Rayleigh\n        distribution.\n\n        References\n        ----------\n        .. [1] Brighton Webs Ltd., \"Rayleigh Distribution,\"\n               https://web.archive.org/web/20090514091424/http://brighton-webs.co.uk:80/distributions/rayleigh.asp\n        .. [2] Wikipedia, \"Rayleigh distribution\"\n               https://en.wikipedia.org/wiki/Rayleigh_distribution\n\n        Examples\n        --------\n        Draw values from the distribution and plot the histogram\n\n        >>> from matplotlib.pyplot import hist\n        >>> values = hist(np.random.rayleigh(3, 100000), bins=200, density=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        ";
 1905 static const char __pyx_k_standard_t_df_size_None_Draw_sa[] = "\n        standard_t(df, size=None)\n\n        Draw samples from a standard Student's t distribution with `df` degrees\n        of freedom.\n\n        A special case of the hyperbolic distribution.  As `df` gets\n        large, the result resembles that of the standard normal\n        distribution (`standard_normal`).\n\n        Parameters\n        ----------\n        df : float or array_like of floats\n            Degrees of freedom, 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.  If size is ``None`` (default),\n            a single value is returned if ``df`` is a scalar.  Otherwise,\n            ``np.array(df).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized standard Student's t distribution.\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\n        Normal distribution. The t test provides a way to test whether\n        the sample mean (that is the mean calculated from the data) is\n        a good estimate of the true mean.\n\n        The derivation of the t-distribution was first published in\n        1908 by William Gosset while working for the Guinness Brewery\n        in Dublin. Due to proprietary issues, he had to publish under\n        a pseudonym, and so he used the name Student.\n\n        References\n        ----------\n        .. [1] Dalgaard, Peter, \"Introductory Statistics With R\",\n               Springer, 2002.\n        .. [2] Wikipedia, \"Student's t-distribution\"\n               https://en.wikipedia.org/wiki/Student's_t-distri""bution\n\n        Examples\n        --------\n        From Dalgaard page 83 [1]_, suppose the daily energy intake for 11\n        women in kilojoules (kJ) is:\n\n        >>> intake = np.array([5260., 5470, 5640, 6180, 6390, 6515, 6805, 7515, \\\n        ...                    7515, 8230, 8770])\n\n        Does 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, density=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        ";
 1906 static const char __pyx_k_tomaxint_size_None_Random_integ[] = "\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 : 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.  Default is None, in which case a\n            single value is 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]]])\n\n        ";
 1907 static const char __pyx_k_triangular_left_mode_right_size[] = "\n        triangular(left, mode, right, size=None)\n\n        Draw samples from the triangular distribution over the\n        interval ``[left, right]``.\n\n        The triangular distribution is a continuous probability\n        distribution with lower limit left, peak at mode, and upper\n        limit right. Unlike the other distributions, these parameters\n        directly define the shape of the pdf.\n\n        Parameters\n        ----------\n        left : float or array_like of floats\n            Lower limit.\n        mode : float or array_like of floats\n            The value where the peak of the distribution occurs.\n            The value should fulfill the condition ``left <= mode <= right``.\n        right : float or array_like of floats\n            Upper limit, should be larger than `left`.\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.  If size is ``None`` (default),\n            a single value is returned if ``left``, ``mode``, and ``right``\n            are all scalars.  Otherwise, ``np.broadcast(left, mode, right).size``\n            samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized triangular distribution.\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(r-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\n        problems where the underlying distribution is not known, but\n        some knowledge of the limits and mode exists. Often it is used\n        in simulations.\n\n       "" References\n        ----------\n        .. [1] Wikipedia, \"Triangular distribution\"\n               https://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=200,\n        ...              density=True)\n        >>> plt.show()\n\n        ";
 1908 static const char __pyx_k_uniform_low_0_0_high_1_0_size_N[] = "\n        uniform(low=0.0, high=1.0, size=None)\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 or array_like of floats, 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 or array_like of floats\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            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n            ``m * n * k`` samples are drawn.  If size is ``None`` (default),\n            a single value is returned if ``low`` and ``high`` are both scalars.\n            Otherwise, ``np.broadcast(low, high).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized uniform distribution.\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        anywhe""re within the interval ``[a, b)``, and zero elsewhere.\n\n        When ``high`` == ``low``, values of ``low`` will be returned.\n        If ``high`` < ``low``, the results are officially undefined\n        and may eventually raise an error, i.e. do not rely on this\n        function to behave when passed arguments satisfying that\n        inequality condition.\n\n        Examples\n        --------\n        Draw samples from the distribution:\n\n        >>> s = np.random.uniform(-1,0,1000)\n\n        All values are within 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, density=True)\n        >>> plt.plot(bins, np.ones_like(bins), linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
 1909 static const char __pyx_k_vonmises_mu_kappa_size_None_Dra[] = "\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 or array_like of floats\n            Mode (\"center\") of the distribution.\n        kappa : float or array_like of floats\n            Dispersion of the distribution, has to 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.  If size is ``None`` (default),\n            a single value is returned if ``mu`` and ``kappa`` are both scalars.\n            Otherwise, ``np.broadcast(mu, kappa).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized von Mises distribution.\n\n        See Also\n        --------\n        scipy.stats.vonmises : probability density function, distribution, or\n            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, aero""dynamics, fluid mechanics, and philosophy of\n        science.\n\n        References\n        ----------\n        .. [1] Abramowitz, M. and Stegun, I. A. (Eds.). \"Handbook of\n               Mathematical Functions with Formulas, Graphs, and Mathematical\n               Tables, 9th printing,\" New York: Dover, 1972.\n        .. [2] von Mises, R., \"Mathematical Theory of Probability\n               and Statistics\", 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        >>> from scipy.special import i0\n        >>> plt.hist(s, 50, density=True)\n        >>> x = np.linspace(-np.pi, np.pi, num=51)\n        >>> y = np.exp(kappa*np.cos(x-mu))/(2*np.pi*i0(kappa))\n        >>> plt.plot(x, y, linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
 1910 static const char __pyx_k_weibull_a_size_None_Draw_sample[] = "\n        weibull(a, size=None)\n\n        Draw samples from a 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 or array_like of floats\n            Shape parameter of the distribution.  Must be nonnegative.\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.  If size is ``None`` (default),\n            a single value is returned if ``a`` is a scalar.  Otherwise,\n            ``np.array(a).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized Weibull distribution.\n\n        See Also\n        --------\n        scipy.stats.weibull_max\n        scipy.stats.weibull_min\n        scipy.stats.genextreme\n        gumbel\n\n        Notes\n        -----\n        The Weibull (or Type III asymptotic extreme value distribution\n        for smallest values, SEV Type III, or Rosin-Rammler\n        distribution) is one of a class of Generalized Extreme Value\n        (GEV) distributions used in modeling extreme value problems.\n        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, 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, \"A Statistical Distribution Function of\n               Wide Applicability\", Journal Of Applied Mechanics ASME Paper\n               1951.\n        .. [3] Wikipedia, \"Weibull distribution\",\n               https://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        ";
 1911 static const char __pyx_k_zipf_a_size_None_Draw_samples_f[] = "\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 or array_like of floats\n            Distribution parameter. Should be greater than 1.\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.  If size is ``None`` (default),\n            a single value is returned if ``a`` is a scalar. Otherwise,\n            ``np.array(a).size`` samples are drawn.\n\n        Returns\n        -------\n        out : ndarray or scalar\n            Drawn samples from the parameterized Zipf distribution.\n\n        See Also\n        --------\n        scipy.stats.zipf : probability density function, distribution, or\n            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        .. [1] Zipf, G. K., \"Selected Studies of the Principle of Relative\n               Frequency in Language,\" Cambridge, MA: Harvard Univ. Press,\n               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        >>> from scipy import special\n\n        Truncate s values at 50 so plot is interesting:\n\n        >>> count, bins, ignored = plt.hist(s[s<50], 50, density=True)\n        >>> x = np.arange(1., 50.)\n        >>> y = x**(-a) / special.zetac(a)\n        >>> plt.plot(x, y/max(y), linewidth=2, color='r')\n        >>> plt.show()\n\n        ";
 1912 static const char __pyx_k_Cannot_take_a_larger_sample_than[] = "Cannot take a larger sample than population when 'replace=False'";
 1913 static const char __pyx_k_Fewer_non_zero_entries_in_p_than[] = "Fewer non-zero entries in p than size";
 1914 static const char __pyx_k_RandomState_multinomial_line_455[] = "RandomState.multinomial (line 4556)";
 1915 static const char __pyx_k_RandomState_negative_binomial_li[] = "RandomState.negative_binomial (line 3822)";
 1916 static const char __pyx_k_RandomState_noncentral_chisquare[] = "RandomState.noncentral_chisquare (line 2292)";
 1917 static const char __pyx_k_RandomState_noncentral_f_line_21[] = "RandomState.noncentral_f (line 2109)";
 1918 static const char __pyx_k_RandomState_permutation_line_488[] = "RandomState.permutation (line 4880)";
 1919 static const char __pyx_k_RandomState_random_integers_line[] = "RandomState.random_integers (line 1427)";
 1920 static const char __pyx_k_RandomState_random_sample_line_8[] = "RandomState.random_sample (line 819)";
 1921 static const char __pyx_k_RandomState_standard_cauchy_line[] = "RandomState.standard_cauchy (line 2398)";
 1922 static const char __pyx_k_RandomState_standard_exponential[] = "RandomState.standard_exponential (line 1789)";
 1923 static const char __pyx_k_RandomState_standard_normal_line[] = "RandomState.standard_normal (line 1524)";
 1924 static const char __pyx_k_RandomState_standard_t_line_2463[] = "RandomState.standard_t (line 2463)";
 1925 static const char __pyx_k_RandomState_triangular_line_3612[] = "RandomState.triangular (line 3612)";
 1926 static const char __pyx_k_Range_cannot_be_empty_low_high_u[] = "Range cannot be empty (low >= high) unless no samples are taken";
 1927 static const char __pyx_k_Seed_values_must_be_between_0_an[] = "Seed values must be between 0 and 2**32 - 1";
 1928 static const char __pyx_k_This_function_is_deprecated_Plea[] = "This function is deprecated. Please call randint(1, {low} + 1) instead";
 1929 static const char __pyx_k_check_valid_must_equal_warn_rais[] = "check_valid must equal 'warn', 'raise', or 'ignore'";
 1930 static const char __pyx_k_cov_must_be_2_dimensional_and_sq[] = "cov must be 2 dimensional and square";
 1931 static const char __pyx_k_covariance_is_not_symmetric_posi[] = "covariance is not symmetric positive-semidefinite.";
 1932 static const char __pyx_k_mean_and_cov_must_have_same_leng[] = "mean and cov must have same length";
 1933 static const char __pyx_k_negative_dimensions_are_not_allo[] = "negative dimensions are not allowed";
 1934 static const char __pyx_k_probabilities_are_not_non_negati[] = "probabilities are not non-negative";
 1935 static const char __pyx_k_size_is_not_compatible_with_inpu[] = "size is not compatible with inputs";
 1936 static const char __pyx_k_This_function_is_deprecated_Plea_2[] = "This function is deprecated. Please call randint({low}, {high} + 1) instead";
 1937 static PyObject *__pyx_kp_s_Cannot_take_a_larger_sample_than;
 1938 static PyObject *__pyx_n_s_DeprecationWarning;
 1939 static PyObject *__pyx_kp_s_Fewer_non_zero_entries_in_p_than;
 1940 static PyObject *__pyx_n_s_ImportError;
 1941 static PyObject *__pyx_n_s_KeyError;
 1942 static PyObject *__pyx_n_s_L;
 1943 static PyObject *__pyx_n_s_Lock;
 1944 static PyObject *__pyx_n_s_MT19937;
 1945 static PyObject *__pyx_n_s_OverflowError;
 1946 static PyObject *__pyx_n_s_RandomState;
 1947 static PyObject *__pyx_kp_u_RandomState_binomial_line_3706;
 1948 static PyObject *__pyx_kp_u_RandomState_bytes_line_1003;
 1949 static PyObject *__pyx_kp_u_RandomState_chisquare_line_2211;
 1950 static PyObject *__pyx_kp_u_RandomState_choice_line_1032;
 1951 static PyObject *__pyx_n_s_RandomState_ctor;
 1952 static PyObject *__pyx_kp_u_RandomState_dirichlet_line_4669;
 1953 static PyObject *__pyx_kp_u_RandomState_f_line_2002;
 1954 static PyObject *__pyx_kp_u_RandomState_gamma_line_1906;
 1955 static PyObject *__pyx_kp_u_RandomState_geometric_line_4102;
 1956 static PyObject *__pyx_kp_u_RandomState_gumbel_line_3096;
 1957 static PyObject *__pyx_kp_u_RandomState_hypergeometric_line;
 1958 static PyObject *__pyx_kp_u_RandomState_laplace_line_2998;
 1959 static PyObject *__pyx_kp_u_RandomState_logistic_line_3227;
 1960 static PyObject *__pyx_kp_u_RandomState_lognormal_line_3321;
 1961 static PyObject *__pyx_kp_u_RandomState_logseries_line_4293;
 1962 static PyObject *__pyx_kp_u_RandomState_multinomial_line_455;
 1963 static PyObject *__pyx_kp_u_RandomState_multivariate_normal;
 1964 static PyObject *__pyx_kp_u_RandomState_negative_binomial_li;
 1965 static PyObject *__pyx_kp_u_RandomState_noncentral_chisquare;
 1966 static PyObject *__pyx_kp_u_RandomState_noncentral_f_line_21;
 1967 static PyObject *__pyx_kp_u_RandomState_normal_line_1557;
 1968 static PyObject *__pyx_kp_u_RandomState_pareto_line_2667;
 1969 static PyObject *__pyx_kp_u_RandomState_permutation_line_488;
 1970 static PyObject *__pyx_kp_u_RandomState_poisson_line_3921;
 1971 static PyObject *__pyx_kp_u_RandomState_power_line_2887;
 1972 static PyObject *__pyx_kp_u_RandomState_rand_line_1326;
 1973 static PyObject *__pyx_kp_u_RandomState_randint_line_910;
 1974 static PyObject *__pyx_kp_u_RandomState_randn_line_1370;
 1975 static PyObject *__pyx_kp_u_RandomState_random_integers_line;
 1976 static PyObject *__pyx_kp_u_RandomState_random_sample_line_8;
 1977 static PyObject *__pyx_kp_u_RandomState_rayleigh_line_3445;
 1978 static PyObject *__pyx_kp_u_RandomState_shuffle_line_4793;
 1979 static PyObject *__pyx_kp_u_RandomState_standard_cauchy_line;
 1980 static PyObject *__pyx_kp_u_RandomState_standard_exponential;
 1981 static PyObject *__pyx_kp_u_RandomState_standard_gamma_line;
 1982 static PyObject *__pyx_kp_u_RandomState_standard_normal_line;
 1983 static PyObject *__pyx_kp_u_RandomState_standard_t_line_2463;
 1984 static PyObject *__pyx_kp_u_RandomState_tomaxint_line_863;
 1985 static PyObject *__pyx_kp_u_RandomState_triangular_line_3612;
 1986 static PyObject *__pyx_kp_u_RandomState_uniform_line_1220;
 1987 static PyObject *__pyx_kp_u_RandomState_vonmises_line_2569;
 1988 static PyObject *__pyx_kp_u_RandomState_wald_line_3525;
 1989 static PyObject *__pyx_kp_u_RandomState_weibull_line_2777;
 1990 static PyObject *__pyx_kp_u_RandomState_zipf_line_4009;
 1991 static PyObject *__pyx_kp_s_Range_cannot_be_empty_low_high_u;
 1992 static PyObject *__pyx_kp_s_Range_exceeds_valid_bounds;
 1993 static PyObject *__pyx_n_s_RuntimeWarning;
 1994 static PyObject *__pyx_kp_s_Seed_array_must_be_1_d;
 1995 static PyObject *__pyx_kp_s_Seed_must_be_between_0_and_2_32;
 1996 static PyObject *__pyx_kp_s_Seed_must_be_non_empty;
 1997 static PyObject *__pyx_kp_s_Seed_values_must_be_between_0_an;
 1998 static PyObject *__pyx_n_s_T;
 1999 static PyObject *__pyx_kp_s_This_function_is_deprecated_Plea;
 2000 static PyObject *__pyx_kp_s_This_function_is_deprecated_Plea_2;
 2001 static PyObject *__pyx_n_s_TypeError;
 2002 static PyObject *__pyx_kp_s_Unsupported_dtype_s_for_randint;
 2003 static PyObject *__pyx_n_s_ValueError;
 2004 static PyObject *__pyx_n_s_a;
 2005 static PyObject *__pyx_kp_s_a_0;
 2006 static PyObject *__pyx_kp_s_a_0_2;
 2007 static PyObject *__pyx_kp_s_a_and_p_must_have_same_size;
 2008 static PyObject *__pyx_kp_s_a_cannot_be_empty_unless_no_sam;
 2009 static PyObject *__pyx_kp_s_a_must_be_1_dimensional;
 2010 static PyObject *__pyx_kp_s_a_must_be_1_dimensional_or_an_i;
 2011 static PyObject *__pyx_kp_s_a_must_be_a_valid_float_1_0;
 2012 static PyObject *__pyx_kp_s_a_must_be_greater_than_0_unless;
 2013 static PyObject *__pyx_kp_s_a_must_contain_valid_floats_1_0;
 2014 static PyObject *__pyx_n_s_add;
 2015 static PyObject *__pyx_kp_s_algorithm_must_be_MT19937;
 2016 static PyObject *__pyx_n_s_all;
 2017 static PyObject *__pyx_n_s_allclose;
 2018 static PyObject *__pyx_n_s_alpha;
 2019 static PyObject *__pyx_kp_s_alpha_0;
 2020 static PyObject *__pyx_n_s_any;
 2021 static PyObject *__pyx_n_s_arange;
 2022 static PyObject *__pyx_n_s_array;
 2023 static PyObject *__pyx_n_s_array_data;
 2024 static PyObject *__pyx_n_s_asarray;
 2025 static PyObject *__pyx_n_s_astype;
 2026 static PyObject *__pyx_n_s_atol;
 2027 static PyObject *__pyx_n_s_b;
 2028 static PyObject *__pyx_kp_s_b_0;
 2029 static PyObject *__pyx_n_s_beta;
 2030 static PyObject *__pyx_n_s_binomial;
 2031 static PyObject *__pyx_kp_u_binomial_n_p_size_None_Draw_sam;
 2032 static PyObject *__pyx_n_s_bool;
 2033 static PyObject *__pyx_n_s_broadcast;
 2034 static PyObject *__pyx_n_s_buf;
 2035 static PyObject *__pyx_n_s_bytes;
 2036 static PyObject *__pyx_kp_u_bytes_length_Return_random_byte;
 2037 static PyObject *__pyx_n_s_casting;
 2038 static PyObject *__pyx_n_s_check_valid;
 2039 static PyObject *__pyx_kp_s_check_valid_must_equal_warn_rais;
 2040 static PyObject *__pyx_n_s_chisquare;
 2041 static PyObject *__pyx_kp_u_chisquare_df_size_None_Draw_sam;
 2042 static PyObject *__pyx_n_s_choice;
 2043 static PyObject *__pyx_kp_u_choice_a_size_None_replace_True;
 2044 static PyObject *__pyx_n_s_cline_in_traceback;
 2045 static PyObject *__pyx_n_s_cnt;
 2046 static PyObject *__pyx_n_s_copy;
 2047 static PyObject *__pyx_n_s_count_nonzero;
 2048 static PyObject *__pyx_n_s_cov;
 2049 static PyObject *__pyx_kp_s_cov_must_be_2_dimensional_and_sq;
 2050 static PyObject *__pyx_kp_s_covariance_is_not_symmetric_posi;
 2051 static PyObject *__pyx_n_s_ctypes;
 2052 static PyObject *__pyx_n_s_cumsum;
 2053 static PyObject *__pyx_n_s_d;
 2054 static PyObject *__pyx_n_s_data;
 2055 static PyObject *__pyx_n_s_df;
 2056 static PyObject *__pyx_kp_s_df_0;
 2057 static PyObject *__pyx_n_s_dfden;
 2058 static PyObject *__pyx_kp_s_dfden_0;
 2059 static PyObject *__pyx_n_s_dfnum;
 2060 static PyObject *__pyx_kp_s_dfnum_0;
 2061 static PyObject *__pyx_n_s_dirichlet;
 2062 static PyObject *__pyx_kp_u_dirichlet_alpha_size_None_Draw;
 2063 static PyObject *__pyx_n_s_dot;
 2064 static PyObject *__pyx_n_s_double;
 2065 static PyObject *__pyx_n_s_dtype;
 2066 static PyObject *__pyx_n_s_dummy_threading;
 2067 static PyObject *__pyx_n_s_empty;
 2068 static PyObject *__pyx_n_s_empty_like;
 2069 static PyObject *__pyx_n_s_enter;
 2070 static PyObject *__pyx_n_s_eps;
 2071 static PyObject *__pyx_n_s_equal;
 2072 static PyObject *__pyx_n_s_exit;
 2073 static PyObject *__pyx_n_s_exponential;
 2074 static PyObject *__pyx_n_s_f;
 2075 static PyObject *__pyx_kp_u_f_dfnum_dfden_size_None_Draw_sa;
 2076 static PyObject *__pyx_n_s_finfo;
 2077 static PyObject *__pyx_n_s_float64;
 2078 static PyObject *__pyx_n_s_floating;
 2079 static PyObject *__pyx_n_s_format;
 2080 static PyObject *__pyx_n_s_gamma;
 2081 static PyObject *__pyx_kp_u_gamma_shape_scale_1_0_size_None;
 2082 static PyObject *__pyx_n_s_geometric;
 2083 static PyObject *__pyx_kp_u_geometric_p_size_None_Draw_samp;
 2084 static PyObject *__pyx_n_s_get_state;
 2085 static PyObject *__pyx_n_s_greater;
 2086 static PyObject *__pyx_n_s_greater_equal;
 2087 static PyObject *__pyx_n_s_gumbel;
 2088 static PyObject *__pyx_kp_u_gumbel_loc_0_0_scale_1_0_size_N;
 2089 static PyObject *__pyx_n_s_high;
 2090 static PyObject *__pyx_kp_s_high_is_out_of_bounds_for_s;
 2091 static PyObject *__pyx_n_s_hypergeometric;
 2092 static PyObject *__pyx_kp_u_hypergeometric_ngood_nbad_nsamp;
 2093 static PyObject *__pyx_n_s_ignore;
 2094 static PyObject *__pyx_n_s_iinfo;
 2095 static PyObject *__pyx_n_s_import;
 2096 static PyObject *__pyx_n_s_index;
 2097 static PyObject *__pyx_n_s_int;
 2098 static PyObject *__pyx_n_s_int16;
 2099 static PyObject *__pyx_n_s_int32;
 2100 static PyObject *__pyx_n_s_int64;
 2101 static PyObject *__pyx_n_s_int8;
 2102 static PyObject *__pyx_n_s_integer;
 2103 static PyObject *__pyx_n_s_intp;
 2104 static PyObject *__pyx_n_s_isfinite;
 2105 static PyObject *__pyx_n_s_isnan;
 2106 static PyObject *__pyx_n_s_issubdtype;
 2107 static PyObject *__pyx_n_s_item;
 2108 static PyObject *__pyx_n_s_itemsize;
 2109 static PyObject *__pyx_n_s_kappa;
 2110 static PyObject *__pyx_kp_s_kappa_0;
 2111 static PyObject *__pyx_n_s_l;
 2112 static PyObject *__pyx_n_s_lam;
 2113 static PyObject *__pyx_kp_s_lam_0;
 2114 static PyObject *__pyx_kp_s_lam_value_too_large;
 2115 static PyObject *__pyx_kp_s_lam_value_too_large_2;
 2116 static PyObject *__pyx_n_s_laplace;
 2117 static PyObject *__pyx_kp_u_laplace_loc_0_0_scale_1_0_size;
 2118 static PyObject *__pyx_n_s_left;
 2119 static PyObject *__pyx_kp_s_left_mode;
 2120 static PyObject *__pyx_kp_s_left_right;
 2121 static PyObject *__pyx_n_s_less;
 2122 static PyObject *__pyx_n_s_less_equal;
 2123 static PyObject *__pyx_n_s_loc;
 2124 static PyObject *__pyx_n_s_logical_or;
 2125 static PyObject *__pyx_n_s_logistic;
 2126 static PyObject *__pyx_kp_u_logistic_loc_0_0_scale_1_0_size;
 2127 static PyObject *__pyx_n_s_lognormal;
 2128 static PyObject *__pyx_kp_u_lognormal_mean_0_0_sigma_1_0_si;
 2129 static PyObject *__pyx_n_s_logseries;
 2130 static PyObject *__pyx_kp_u_logseries_p_size_None_Draw_samp;
 2131 static PyObject *__pyx_n_s_long;
 2132 static PyObject *__pyx_n_s_low;
 2133 static PyObject *__pyx_kp_s_low_is_out_of_bounds_for_s;
 2134 static PyObject *__pyx_n_s_main;
 2135 static PyObject *__pyx_n_s_max;
 2136 static PyObject *__pyx_n_s_may_share_memory;
 2137 static PyObject *__pyx_n_s_mean;
 2138 static PyObject *__pyx_kp_s_mean_0;
 2139 static PyObject *__pyx_kp_s_mean_0_0;
 2140 static PyObject *__pyx_kp_s_mean_and_cov_must_have_same_leng;
 2141 static PyObject *__pyx_kp_s_mean_must_be_1_dimensional;
 2142 static PyObject *__pyx_n_s_mode;
 2143 static PyObject *__pyx_kp_s_mode_right;
 2144 static PyObject *__pyx_n_s_mtrand;
 2145 static PyObject *__pyx_kp_s_mtrand_pyx;
 2146 static PyObject *__pyx_n_s_mu;
 2147 static PyObject *__pyx_n_s_multinomial;
 2148 static PyObject *__pyx_kp_u_multinomial_n_pvals_size_None_D;
 2149 static PyObject *__pyx_n_s_multivariate_normal;
 2150 static PyObject *__pyx_kp_u_multivariate_normal_mean_cov_si;
 2151 static PyObject *__pyx_n_s_n;
 2152 static PyObject *__pyx_kp_s_n_0;
 2153 static PyObject *__pyx_kp_s_n_0_2;
 2154 static PyObject *__pyx_n_s_name;
 2155 static PyObject *__pyx_n_s_nbad;
 2156 static PyObject *__pyx_kp_s_nbad_0;
 2157 static PyObject *__pyx_n_s_ndarray;
 2158 static PyObject *__pyx_n_s_ndim;
 2159 static PyObject *__pyx_n_s_negative_binomial;
 2160 static PyObject *__pyx_kp_u_negative_binomial_n_p_size_None;
 2161 static PyObject *__pyx_kp_s_negative_dimensions_are_not_allo;
 2162 static PyObject *__pyx_n_s_ngood;
 2163 static PyObject *__pyx_kp_s_ngood_0;
 2164 static PyObject *__pyx_kp_s_ngood_nbad_nsample;
 2165 static PyObject *__pyx_n_s_nonc;
 2166 static PyObject *__pyx_kp_s_nonc_0;
 2167 static PyObject *__pyx_n_s_noncentral_chisquare;
 2168 static PyObject *__pyx_kp_u_noncentral_chisquare_df_nonc_si;
 2169 static PyObject *__pyx_n_s_noncentral_f;
 2170 static PyObject *__pyx_kp_u_noncentral_f_dfnum_dfden_nonc_s;
 2171 static PyObject *__pyx_n_s_normal;
 2172 static PyObject *__pyx_kp_u_normal_loc_0_0_scale_1_0_size_N;
 2173 static PyObject *__pyx_n_s_np;
 2174 static PyObject *__pyx_n_s_nsample;
 2175 static PyObject *__pyx_kp_s_nsample_1;
 2176 static PyObject *__pyx_n_s_numpy;
 2177 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
 2178 static PyObject *__pyx_n_s_numpy_dual;
 2179 static PyObject *__pyx_n_s_off;
 2180 static PyObject *__pyx_n_s_operator;
 2181 static PyObject *__pyx_n_s_out;
 2182 static PyObject *__pyx_n_s_p;
 2183 static PyObject *__pyx_kp_s_p_0;
 2184 static PyObject *__pyx_kp_s_p_0_0;
 2185 static PyObject *__pyx_kp_s_p_1;
 2186 static PyObject *__pyx_kp_s_p_1_0;
 2187 static PyObject *__pyx_kp_s_p_1_0_2;
 2188 static PyObject *__pyx_kp_s_p_is_nan;
 2189 static PyObject *__pyx_kp_s_p_must_be_1_dimensional;
 2190 static PyObject *__pyx_n_s_pareto;
 2191 static PyObject *__pyx_kp_u_pareto_a_size_None_Draw_samples;
 2192 static PyObject *__pyx_n_s_permutation;
 2193 static PyObject *__pyx_kp_u_permutation_x_Randomly_permute;
 2194 static PyObject *__pyx_n_s_poisson;
 2195 static PyObject *__pyx_kp_u_poisson_lam_1_0_size_None_Draw;
 2196 static PyObject *__pyx_n_s_poisson_lam_max;
 2197 static PyObject *__pyx_n_s_power;
 2198 static PyObject *__pyx_kp_u_power_a_size_None_Draws_samples;
 2199 static PyObject *__pyx_kp_s_probabilities_are_not_non_negati;
 2200 static PyObject *__pyx_kp_s_probabilities_contain_NaN;
 2201 static PyObject *__pyx_kp_s_probabilities_do_not_sum_to_1;
 2202 static PyObject *__pyx_n_s_prod;
 2203 static PyObject *__pyx_n_s_pvals;
 2204 static PyObject *__pyx_n_s_pyx_vtable;
 2205 static PyObject *__pyx_n_s_raise;
 2206 static PyObject *__pyx_n_s_rand;
 2207 static PyObject *__pyx_n_s_rand_2;
 2208 static PyObject *__pyx_n_s_rand_bool;
 2209 static PyObject *__pyx_kp_u_rand_d0_d1_dn_Random_values_in;
 2210 static PyObject *__pyx_n_s_rand_int16;
 2211 static PyObject *__pyx_n_s_rand_int32;
 2212 static PyObject *__pyx_n_s_rand_int64;
 2213 static PyObject *__pyx_n_s_rand_int8;
 2214 static PyObject *__pyx_n_s_rand_uint16;
 2215 static PyObject *__pyx_n_s_rand_uint32;
 2216 static PyObject *__pyx_n_s_rand_uint64;
 2217 static PyObject *__pyx_n_s_rand_uint8;
 2218 static PyObject *__pyx_n_s_randint;
 2219 static PyObject *__pyx_kp_s_randint_helpers_pxi;
 2220 static PyObject *__pyx_kp_u_randint_low_high_None_size_None;
 2221 static PyObject *__pyx_n_s_randint_type;
 2222 static PyObject *__pyx_n_s_randn;
 2223 static PyObject *__pyx_kp_u_randn_d0_d1_dn_Return_a_sample;
 2224 static PyObject *__pyx_n_s_random;
 2225 static PyObject *__pyx_n_s_random_integers;
 2226 static PyObject *__pyx_kp_u_random_integers_low_high_None_s;
 2227 static PyObject *__pyx_n_s_random_sample;
 2228 static PyObject *__pyx_kp_u_random_sample_size_None_Return;
 2229 static PyObject *__pyx_n_s_range;
 2230 static PyObject *__pyx_n_s_ravel;
 2231 static PyObject *__pyx_n_s_rayleigh;
 2232 static PyObject *__pyx_kp_u_rayleigh_scale_1_0_size_None_Dr;
 2233 static PyObject *__pyx_n_s_reduce;
 2234 static PyObject *__pyx_n_s_replace;
 2235 static PyObject *__pyx_n_s_reshape;
 2236 static PyObject *__pyx_n_s_return_index;
 2237 static PyObject *__pyx_n_s_reversed;
 2238 static PyObject *__pyx_n_s_right;
 2239 static PyObject *__pyx_n_s_rng;
 2240 static PyObject *__pyx_n_s_rngstate;
 2241 static PyObject *__pyx_n_s_rtol;
 2242 static PyObject *__pyx_n_s_safe;
 2243 static PyObject *__pyx_n_s_scale;
 2244 static PyObject *__pyx_kp_s_scale_0;
 2245 static PyObject *__pyx_kp_s_scale_0_0;
 2246 static PyObject *__pyx_kp_s_scale_0_0_2;
 2247 static PyObject *__pyx_kp_s_scale_0_2;
 2248 static PyObject *__pyx_n_s_searchsorted;
 2249 static PyObject *__pyx_n_s_seed;
 2250 static PyObject *__pyx_n_s_set_state;
 2251 static PyObject *__pyx_n_s_shape;
 2252 static PyObject *__pyx_kp_s_shape_0;
 2253 static PyObject *__pyx_n_s_shape_from_size;
 2254 static PyObject *__pyx_n_s_shuffle;
 2255 static PyObject *__pyx_kp_u_shuffle_x_Modify_a_sequence_in;
 2256 static PyObject *__pyx_n_s_side;
 2257 static PyObject *__pyx_n_s_sigma;
 2258 static PyObject *__pyx_kp_s_sigma_0;
 2259 static PyObject *__pyx_kp_s_sigma_0_0;
 2260 static PyObject *__pyx_n_s_signbit;
 2261 static PyObject *__pyx_n_s_size;
 2262 static PyObject *__pyx_kp_s_size_is_not_compatible_with_inpu;
 2263 static PyObject *__pyx_n_s_sort;
 2264 static PyObject *__pyx_n_s_sqrt;
 2265 static PyObject *__pyx_n_s_standard_cauchy;
 2266 static PyObject *__pyx_kp_u_standard_cauchy_size_None_Draw;
 2267 static PyObject *__pyx_n_s_standard_exponential;
 2268 static PyObject *__pyx_kp_u_standard_exponential_size_None;
 2269 static PyObject *__pyx_n_s_standard_gamma;
 2270 static PyObject *__pyx_kp_u_standard_gamma_shape_size_None;
 2271 static PyObject *__pyx_n_s_standard_normal;
 2272 static PyObject *__pyx_kp_u_standard_normal_size_None_Draw;
 2273 static PyObject *__pyx_n_s_standard_t;
 2274 static PyObject *__pyx_kp_u_standard_t_df_size_None_Draw_sa;
 2275 static PyObject *__pyx_n_s_state;
 2276 static PyObject *__pyx_kp_s_state_must_be_624_longs;
 2277 static PyObject *__pyx_n_s_strides;
 2278 static PyObject *__pyx_n_s_subtract;
 2279 static PyObject *__pyx_kp_s_sum_pvals_1_1_0;
 2280 static PyObject *__pyx_n_s_svd;
 2281 static PyObject *__pyx_n_s_take;
 2282 static PyObject *__pyx_n_s_test;
 2283 static PyObject *__pyx_n_s_threading;
 2284 static PyObject *__pyx_n_s_tol;
 2285 static PyObject *__pyx_kp_u_tomaxint_size_None_Random_integ;
 2286 static PyObject *__pyx_n_s_triangular;
 2287 static PyObject *__pyx_kp_u_triangular_left_mode_right_size;
 2288 static PyObject *__pyx_n_s_uint;
 2289 static PyObject *__pyx_n_s_uint16;
 2290 static PyObject *__pyx_n_s_uint32;
 2291 static PyObject *__pyx_n_s_uint64;
 2292 static PyObject *__pyx_n_s_uint8;
 2293 static PyObject *__pyx_n_s_uniform;
 2294 static PyObject *__pyx_kp_u_uniform_low_0_0_high_1_0_size_N;
 2295 static PyObject *__pyx_n_s_unique;
 2296 static PyObject *__pyx_n_s_unsafe;
 2297 static PyObject *__pyx_n_s_vonmises;
 2298 static PyObject *__pyx_kp_u_vonmises_mu_kappa_size_None_Dra;
 2299 static PyObject *__pyx_n_s_wald;
 2300 static PyObject *__pyx_kp_u_wald_mean_scale_size_None_Draw;
 2301 static PyObject *__pyx_n_s_warn;
 2302 static PyObject *__pyx_n_s_warnings;
 2303 static PyObject *__pyx_n_s_weibull;
 2304 static PyObject *__pyx_kp_u_weibull_a_size_None_Draw_sample;
 2305 static PyObject *__pyx_n_s_zeros;
 2306 static PyObject *__pyx_n_s_zipf;
 2307 static PyObject *__pyx_kp_u_zipf_a_size_None_Draw_samples_f;
 2308 static PyObject *__pyx_pf_6mtrand__rand_bool(CYTHON_UNUSED PyObject *__pyx_self, npy_bool __pyx_v_low, npy_bool __pyx_v_high, PyObject *__pyx_v_size, PyObject *__pyx_v_rngstate); /* proto */
 2309 static PyObject *__pyx_pf_6mtrand_2_rand_int8(CYTHON_UNUSED PyObject *__pyx_self, npy_int8 __pyx_v_low, npy_int8 __pyx_v_high, PyObject *__pyx_v_size, PyObject *__pyx_v_rngstate); /* proto */
 2310 static PyObject *__pyx_pf_6mtrand_4_rand_int16(CYTHON_UNUSED PyObject *__pyx_self, npy_int16 __pyx_v_low, npy_int16 __pyx_v_high, PyObject *__pyx_v_size, PyObject *__pyx_v_rngstate); /* proto */
 2311 static PyObject *__pyx_pf_6mtrand_6_rand_int32(CYTHON_UNUSED PyObject *__pyx_self, npy_int32 __pyx_v_low, npy_int32 __pyx_v_high, PyObject *__pyx_v_size, PyObject *__pyx_v_rngstate); /* proto */
 2312 static PyObject *__pyx_pf_6mtrand_8_rand_int64(CYTHON_UNUSED PyObject *__pyx_self, npy_int64 __pyx_v_low, npy_int64 __pyx_v_high, PyObject *__pyx_v_size, PyObject *__pyx_v_rngstate); /* proto */
 2313 static PyObject *__pyx_pf_6mtrand_10_rand_uint8(CYTHON_UNUSED PyObject *__pyx_self, npy_uint8 __pyx_v_low, npy_uint8 __pyx_v_high, PyObject *__pyx_v_size, PyObject *__pyx_v_rngstate); /* proto */
 2314 static PyObject *__pyx_pf_6mtrand_12_rand_uint16(CYTHON_UNUSED PyObject *__pyx_self, npy_uint16 __pyx_v_low, npy_uint16 __pyx_v_high, PyObject *__pyx_v_size, PyObject *__pyx_v_rngstate); /* proto */
 2315 static PyObject *__pyx_pf_6mtrand_14_rand_uint32(CYTHON_UNUSED PyObject *__pyx_self, npy_uint32 __pyx_v_low, npy_uint32 __pyx_v_high, PyObject *__pyx_v_size, PyObject *__pyx_v_rngstate); /* proto */
 2316 static PyObject *__pyx_pf_6mtrand_16_rand_uint64(CYTHON_UNUSED PyObject *__pyx_self, npy_uint64 __pyx_v_low, npy_uint64 __pyx_v_high, PyObject *__pyx_v_size, PyObject *__pyx_v_rngstate); /* proto */
 2317 static PyObject *__pyx_pf_6mtrand_18_shape_from_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_size, PyObject *__pyx_v_d); /* proto */
 2318 static int __pyx_pf_6mtrand_11RandomState___init__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_seed); /* proto */
 2319 static void __pyx_pf_6mtrand_11RandomState_2__dealloc__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self); /* proto */
 2320 static PyObject *__pyx_pf_6mtrand_11RandomState_4seed(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_seed); /* proto */
 2321 static PyObject *__pyx_pf_6mtrand_11RandomState_6get_state(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self); /* proto */
 2322 static PyObject *__pyx_pf_6mtrand_11RandomState_8set_state(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
 2323 static PyObject *__pyx_pf_6mtrand_11RandomState_10__getstate__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self); /* proto */
 2324 static PyObject *__pyx_pf_6mtrand_11RandomState_12__setstate__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
 2325 static PyObject *__pyx_pf_6mtrand_11RandomState_14__reduce__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self); /* proto */
 2326 static PyObject *__pyx_pf_6mtrand_11RandomState_16random_sample(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size); /* proto */
 2327 static PyObject *__pyx_pf_6mtrand_11RandomState_18tomaxint(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size); /* proto */
 2328 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, PyObject *__pyx_v_dtype); /* proto */
 2329 static PyObject *__pyx_pf_6mtrand_11RandomState_22bytes(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, npy_intp __pyx_v_length); /* proto */
 2330 static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_size, PyObject *__pyx_v_replace, PyObject *__pyx_v_p); /* proto */
 2331 static PyObject *__pyx_pf_6mtrand_11RandomState_26uniform(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_low, PyObject *__pyx_v_high, PyObject *__pyx_v_size); /* proto */
 2332 static PyObject *__pyx_pf_6mtrand_11RandomState_28rand(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
 2333 static PyObject *__pyx_pf_6mtrand_11RandomState_30randn(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
 2334 static PyObject *__pyx_pf_6mtrand_11RandomState_32random_integers(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_low, PyObject *__pyx_v_high, PyObject *__pyx_v_size); /* proto */
 2335 static PyObject *__pyx_pf_6mtrand_11RandomState_34standard_normal(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size); /* proto */
 2336 static PyObject *__pyx_pf_6mtrand_11RandomState_36normal(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_loc, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
 2337 static PyObject *__pyx_pf_6mtrand_11RandomState_38beta(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_size); /* proto */
 2338 static PyObject *__pyx_pf_6mtrand_11RandomState_40exponential(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
 2339 static PyObject *__pyx_pf_6mtrand_11RandomState_42standard_exponential(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size); /* proto */
 2340 static PyObject *__pyx_pf_6mtrand_11RandomState_44standard_gamma(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_shape, PyObject *__pyx_v_size); /* proto */
 2341 static PyObject *__pyx_pf_6mtrand_11RandomState_46gamma(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_shape, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
 2342 static PyObject *__pyx_pf_6mtrand_11RandomState_48f(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_dfnum, PyObject *__pyx_v_dfden, PyObject *__pyx_v_size); /* proto */
 2343 static PyObject *__pyx_pf_6mtrand_11RandomState_50noncentral_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 */
 2344 static PyObject *__pyx_pf_6mtrand_11RandomState_52chisquare(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_df, PyObject *__pyx_v_size); /* proto */
 2345 static PyObject *__pyx_pf_6mtrand_11RandomState_54noncentral_chisquare(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_df, PyObject *__pyx_v_nonc, PyObject *__pyx_v_size); /* proto */
 2346 static PyObject *__pyx_pf_6mtrand_11RandomState_56standard_cauchy(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_size); /* proto */
 2347 static PyObject *__pyx_pf_6mtrand_11RandomState_58standard_t(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_df, PyObject *__pyx_v_size); /* proto */
 2348 static PyObject *__pyx_pf_6mtrand_11RandomState_60vonmises(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_mu, PyObject *__pyx_v_kappa, PyObject *__pyx_v_size); /* proto */
 2349 static PyObject *__pyx_pf_6mtrand_11RandomState_62pareto(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_size); /* proto */
 2350 static PyObject *__pyx_pf_6mtrand_11RandomState_64weibull(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_size); /* proto */
 2351 static PyObject *__pyx_pf_6mtrand_11RandomState_66power(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_size); /* proto */
 2352 static PyObject *__pyx_pf_6mtrand_11RandomState_68laplace(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_loc, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
 2353 static PyObject *__pyx_pf_6mtrand_11RandomState_70gumbel(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_loc, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
 2354 static PyObject *__pyx_pf_6mtrand_11RandomState_72logistic(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_loc, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
 2355 static PyObject *__pyx_pf_6mtrand_11RandomState_74lognormal(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_mean, PyObject *__pyx_v_sigma, PyObject *__pyx_v_size); /* proto */
 2356 static PyObject *__pyx_pf_6mtrand_11RandomState_76rayleigh(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
 2357 static PyObject *__pyx_pf_6mtrand_11RandomState_78wald(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_mean, PyObject *__pyx_v_scale, PyObject *__pyx_v_size); /* proto */
 2358 static PyObject *__pyx_pf_6mtrand_11RandomState_80triangular(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 */
 2359 static PyObject *__pyx_pf_6mtrand_11RandomState_82binomial(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_p, PyObject *__pyx_v_size); /* proto */
 2360 static PyObject *__pyx_pf_6mtrand_11RandomState_84negative_binomial(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_p, PyObject *__pyx_v_size); /* proto */
 2361 static PyObject *__pyx_pf_6mtrand_11RandomState_86poisson(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_lam, PyObject *__pyx_v_size); /* proto */
 2362 static PyObject *__pyx_pf_6mtrand_11RandomState_88zipf(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_size); /* proto */
 2363 static PyObject *__pyx_pf_6mtrand_11RandomState_90geometric(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_p, PyObject *__pyx_v_size); /* proto */
 2364 static PyObject *__pyx_pf_6mtrand_11RandomState_92hypergeometric(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 */
 2365 static PyObject *__pyx_pf_6mtrand_11RandomState_94logseries(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_p, PyObject *__pyx_v_size); /* proto */
 2366 static PyObject *__pyx_pf_6mtrand_11RandomState_96multivariate_normal(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_mean, PyObject *__pyx_v_cov, PyObject *__pyx_v_size, PyObject *__pyx_v_check_valid, PyObject *__pyx_v_tol); /* proto */
 2367 static PyObject *__pyx_pf_6mtrand_11RandomState_98multinomial(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, npy_intp __pyx_v_n, PyObject *__pyx_v_pvals, PyObject *__pyx_v_size); /* proto */
 2368 static PyObject *__pyx_pf_6mtrand_11RandomState_100dirichlet(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_size); /* proto */
 2369 static PyObject *__pyx_pf_6mtrand_11RandomState_102shuffle(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
 2370 static PyObject *__pyx_pf_6mtrand_11RandomState_104permutation(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
 2371 static PyObject *__pyx_tp_new_6mtrand_RandomState(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
 2372 static PyObject *__pyx_float_0_0;
 2373 static PyObject *__pyx_float_1_0;
 2374 static PyObject *__pyx_float_1eneg_8;
 2375 static PyObject *__pyx_int_0;
 2376 static PyObject *__pyx_int_1;
 2377 static PyObject *__pyx_int_2;
 2378 static PyObject *__pyx_int_3;
 2379 static PyObject *__pyx_int_5;
 2380 static PyObject *__pyx_int_10;
 2381 static PyObject *__pyx_int_128;
 2382 static PyObject *__pyx_int_256;
 2383 static PyObject *__pyx_int_624;
 2384 static PyObject *__pyx_int_32768;
 2385 static PyObject *__pyx_int_65536;
 2386 static PyObject *__pyx_int_2147483648;
 2387 static PyObject *__pyx_int_4294967296;
 2388 static PyObject *__pyx_int_9223372036854775808;
 2389 static PyObject *__pyx_int_18446744073709551616;
 2390 static PyObject *__pyx_int_neg_1;
 2391 static PyObject *__pyx_int_neg_128;
 2392 static PyObject *__pyx_int_neg_32768;
 2393 static PyObject *__pyx_int_neg_2147483648;
 2394 static PyObject *__pyx_int_neg_9223372036854775808;
 2395 static PyObject *__pyx_k__13;
 2396 static PyObject *__pyx_tuple_;
 2397 static PyObject *__pyx_tuple__2;
 2398 static PyObject *__pyx_tuple__3;
 2399 static PyObject *__pyx_tuple__4;
 2400 static PyObject *__pyx_tuple__5;
 2401 static PyObject *__pyx_tuple__6;
 2402 static PyObject *__pyx_tuple__7;
 2403 static PyObject *__pyx_tuple__8;
 2404 static PyObject *__pyx_tuple__9;
 2405 static PyObject *__pyx_slice__10;
 2406 static PyObject *__pyx_slice__11;
 2407 static PyObject *__pyx_slice__69;
 2408 static PyObject *__pyx_tuple__12;
 2409 static PyObject *__pyx_tuple__14;
 2410 static PyObject *__pyx_tuple__15;
 2411 static PyObject *__pyx_tuple__16;
 2412 static PyObject *__pyx_tuple__17;
 2413 static PyObject *__pyx_tuple__18;
 2414 static PyObject *__pyx_tuple__19;
 2415 static PyObject *__pyx_tuple__20;
 2416 static PyObject *__pyx_tuple__21;
 2417 static PyObject *__pyx_tuple__22;
 2418 static PyObject *__pyx_tuple__23;
 2419 static PyObject *__pyx_tuple__24;
 2420 static PyObject *__pyx_tuple__25;
 2421 static PyObject *__pyx_tuple__26;
 2422 static PyObject *__pyx_tuple__27;
 2423 static PyObject *__pyx_tuple__28;
 2424 static PyObject *__pyx_tuple__29;
 2425 static PyObject *__pyx_tuple__30;
 2426 static PyObject *__pyx_tuple__31;
 2427 static PyObject *__pyx_tuple__32;
 2428 static PyObject *__pyx_tuple__33;
 2429 static PyObject *__pyx_tuple__34;
 2430 static PyObject *__pyx_tuple__35;
 2431 static PyObject *__pyx_tuple__36;
 2432 static PyObject *__pyx_tuple__37;
 2433 static PyObject *__pyx_tuple__38;
 2434 static PyObject *__pyx_tuple__39;
 2435 static PyObject *__pyx_tuple__40;
 2436 static PyObject *__pyx_tuple__41;
 2437 static PyObject *__pyx_tuple__42;
 2438 static PyObject *__pyx_tuple__43;
 2439 static PyObject *__pyx_tuple__44;
 2440 static PyObject *__pyx_tuple__45;
 2441 static PyObject *__pyx_tuple__46;
 2442 static PyObject *__pyx_tuple__47;
 2443 static PyObject *__pyx_tuple__48;
 2444 static PyObject *__pyx_tuple__49;
 2445 static PyObject *__pyx_tuple__50;
 2446 static PyObject *__pyx_tuple__51;
 2447 static PyObject *__pyx_tuple__52;
 2448 static PyObject *__pyx_tuple__53;
 2449 static PyObject *__pyx_tuple__54;
 2450 static PyObject *__pyx_tuple__55;
 2451 static PyObject *__pyx_tuple__56;
 2452 static PyObject *__pyx_tuple__57;
 2453 static PyObject *__pyx_tuple__58;
 2454 static PyObject *__pyx_tuple__59;
 2455 static PyObject *__pyx_tuple__60;
 2456 static PyObject *__pyx_tuple__61;
 2457 static PyObject *__pyx_tuple__62;
 2458 static PyObject *__pyx_tuple__63;
 2459 static PyObject *__pyx_tuple__64;
 2460 static PyObject *__pyx_tuple__65;
 2461 static PyObject *__pyx_tuple__66;
 2462 static PyObject *__pyx_tuple__67;
 2463 static PyObject *__pyx_tuple__68;
 2464 static PyObject *__pyx_tuple__70;
 2465 static PyObject *__pyx_tuple__71;
 2466 static PyObject *__pyx_tuple__72;
 2467 static PyObject *__pyx_tuple__73;
 2468 static PyObject *__pyx_tuple__74;
 2469 static PyObject *__pyx_tuple__75;
 2470 static PyObject *__pyx_tuple__76;
 2471 static PyObject *__pyx_tuple__77;
 2472 static PyObject *__pyx_tuple__79;
 2473 static PyObject *__pyx_tuple__81;
 2474 static PyObject *__pyx_tuple__83;
 2475 static PyObject *__pyx_tuple__85;
 2476 static PyObject *__pyx_tuple__87;
 2477 static PyObject *__pyx_tuple__89;
 2478 static PyObject *__pyx_tuple__91;
 2479 static PyObject *__pyx_tuple__93;
 2480 static PyObject *__pyx_tuple__95;
 2481 static PyObject *__pyx_codeobj__78;
 2482 static PyObject *__pyx_codeobj__80;
 2483 static PyObject *__pyx_codeobj__82;
 2484 static PyObject *__pyx_codeobj__84;
 2485 static PyObject *__pyx_codeobj__86;
 2486 static PyObject *__pyx_codeobj__88;
 2487 static PyObject *__pyx_codeobj__90;
 2488 static PyObject *__pyx_codeobj__92;
 2489 static PyObject *__pyx_codeobj__94;
 2490 static PyObject *__pyx_codeobj__96;
 2491 /* Late includes */
 2492 
 2493 /* "numpy.pxd":158
 2494  * 
 2495  * # copied from cython version with addition of PyErr_Print.
 2496  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 2497  *     try:
 2498  *         _import_array()
 2499  */
 2500 
 2501 static CYTHON_INLINE int __pyx_f_6mtrand_import_array(void) {
 2502   int __pyx_r;
 2503   __Pyx_RefNannyDeclarations
 2504   PyObject *__pyx_t_1 = NULL;
 2505   PyObject *__pyx_t_2 = NULL;
 2506   PyObject *__pyx_t_3 = NULL;
 2507   int __pyx_t_4;
 2508   PyObject *__pyx_t_5 = NULL;
 2509   PyObject *__pyx_t_6 = NULL;
 2510   PyObject *__pyx_t_7 = NULL;
 2511   PyObject *__pyx_t_8 = NULL;
 2512   __Pyx_RefNannySetupContext("import_array", 0);
 2513 
 2514   /* "numpy.pxd":159
 2515  * # copied from cython version with addition of PyErr_Print.
 2516  * cdef inline int import_array() except -1:
 2517  *     try:             # <<<<<<<<<<<<<<
 2518  *         _import_array()
 2519  *     except Exception:
 2520  */
 2521   {
 2522     __Pyx_PyThreadState_declare
 2523     __Pyx_PyThreadState_assign
 2524     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
 2525     __Pyx_XGOTREF(__pyx_t_1);
 2526     __Pyx_XGOTREF(__pyx_t_2);
 2527     __Pyx_XGOTREF(__pyx_t_3);
 2528     /*try:*/ {
 2529 
 2530       /* "numpy.pxd":160
 2531  * cdef inline int import_array() except -1:
 2532  *     try:
 2533  *         _import_array()             # <<<<<<<<<<<<<<
 2534  *     except Exception:
 2535  *         PyErr_Print()
 2536  */
 2537       __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 160, __pyx_L3_error)
 2538 
 2539       /* "numpy.pxd":159
 2540  * # copied from cython version with addition of PyErr_Print.
 2541  * cdef inline int import_array() except -1:
 2542  *     try:             # <<<<<<<<<<<<<<
 2543  *         _import_array()
 2544  *     except Exception:
 2545  */
 2546     }
 2547     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
 2548     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
 2549     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 2550     goto __pyx_L8_try_end;
 2551     __pyx_L3_error:;
 2552 
 2553     /* "numpy.pxd":161
 2554  *     try:
 2555  *         _import_array()
 2556  *     except Exception:             # <<<<<<<<<<<<<<
 2557  *         PyErr_Print()
 2558  *         raise ImportError("numpy.core.multiarray failed to import")
 2559  */
 2560     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
 2561     if (__pyx_t_4) {
 2562       __Pyx_AddTraceback("mtrand.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
 2563       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 161, __pyx_L5_except_error)
 2564       __Pyx_GOTREF(__pyx_t_5);
 2565       __Pyx_GOTREF(__pyx_t_6);
 2566       __Pyx_GOTREF(__pyx_t_7);
 2567 
 2568       /* "numpy.pxd":162
 2569  *         _import_array()
 2570  *     except Exception:
 2571  *         PyErr_Print()             # <<<<<<<<<<<<<<
 2572  *         raise ImportError("numpy.core.multiarray failed to import")
 2573  */
 2574       PyErr_Print();
 2575 
 2576       /* "numpy.pxd":163
 2577  *     except Exception:
 2578  *         PyErr_Print()
 2579  *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 2580  */
 2581       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 163, __pyx_L5_except_error)
 2582       __Pyx_GOTREF(__pyx_t_8);
 2583       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
 2584       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 2585       __PYX_ERR(1, 163, __pyx_L5_except_error)
 2586     }
 2587     goto __pyx_L5_except_error;
 2588     __pyx_L5_except_error:;
 2589 
 2590     /* "numpy.pxd":159
 2591  * # copied from cython version with addition of PyErr_Print.
 2592  * cdef inline int import_array() except -1:
 2593  *     try:             # <<<<<<<<<<<<<<
 2594  *         _import_array()
 2595  *     except Exception:
 2596  */
 2597     __Pyx_XGIVEREF(__pyx_t_1);
 2598     __Pyx_XGIVEREF(__pyx_t_2);
 2599     __Pyx_XGIVEREF(__pyx_t_3);
 2600     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
 2601     goto __pyx_L1_error;
 2602     __pyx_L8_try_end:;
 2603   }
 2604 
 2605   /* "numpy.pxd":158
 2606  * 
 2607  * # copied from cython version with addition of PyErr_Print.
 2608  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 2609  *     try:
 2610  *         _import_array()
 2611  */
 2612 
 2613   /* function exit code */
 2614   __pyx_r = 0;
 2615   goto __pyx_L0;
 2616   __pyx_L1_error:;
 2617   __Pyx_XDECREF(__pyx_t_5);
 2618   __Pyx_XDECREF(__pyx_t_6);
 2619   __Pyx_XDECREF(__pyx_t_7);
 2620   __Pyx_XDECREF(__pyx_t_8);
 2621   __Pyx_AddTraceback("mtrand.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
 2622   __pyx_r = -1;
 2623   __pyx_L0:;
 2624   __Pyx_RefNannyFinishContext();
 2625   return __pyx_r;
 2626 }
 2627 
 2628 /* "randint_helpers.pxi":5
 2629  * """
 2630  * 
 2631  * def _rand_bool(npy_bool low, npy_bool high, size, rngstate):             # <<<<<<<<<<<<<<
 2632  *     """
 2633  *     _rand_bool(low, high, size, rngstate)
 2634  */
 2635 
 2636 /* Python wrapper */
 2637 static PyObject *__pyx_pw_6mtrand_1_rand_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 2638 static char __pyx_doc_6mtrand__rand_bool[] = "\n    _rand_bool(low, high, size, rngstate)\n\n    Return random np.bool_ integers between ``low`` and ``high``, inclusive.\n\n    Return random integers from the \"discrete uniform\" distribution in the\n    closed interval [``low``, ``high``). On entry the arguments are presumed\n    to have been validated for size and order for the np.bool_ type.\n\n    Parameters\n    ----------\n    low : int\n        Lowest (signed) integer to be drawn from the distribution.\n    high : int\n        Highest (signed) integer to be drawn from the distribution.\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.  Default is None, in which case a\n        single value is returned.\n    rngstate : encapsulated pointer to rk_state\n        The specific type depends on the python version. In Python 2 it is\n        a PyCObject, in Python 3 a PyCapsule object.\n\n    Returns\n    -------\n    out : python integer or ndarray of np.bool_\n          `size`-shaped array of random integers from the appropriate\n          distribution, or a single such random int if `size` not provided.\n\n    ";
 2639 static PyMethodDef __pyx_mdef_6mtrand_1_rand_bool = {"_rand_bool", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mtrand_1_rand_bool, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mtrand__rand_bool};
 2640 static PyObject *__pyx_pw_6mtrand_1_rand_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 2641   npy_bool __pyx_v_low;
 2642   npy_bool __pyx_v_high;
 2643   PyObject *__pyx_v_size = 0;
 2644   PyObject *__pyx_v_rngstate = 0;
 2645   PyObject *__pyx_r = 0;
 2646   __Pyx_RefNannyDeclarations
 2647   __Pyx_RefNannySetupContext("_rand_bool (wrapper)", 0);
 2648   {
 2649     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_low,&__pyx_n_s_high,&__pyx_n_s_size,&__pyx_n_s_rngstate,0};
 2650     PyObject* values[4] = {0,0,0,0};
 2651     if (unlikely(__pyx_kwds)) {
 2652       Py_ssize_t kw_args;
 2653       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
 2654       switch (pos_args) {
 2655         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
 2656         CYTHON_FALLTHROUGH;
 2657         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 2658         CYTHON_FALLTHROUGH;
 2659         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 2660         CYTHON_FALLTHROUGH;
 2661         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 2662         CYTHON_FALLTHROUGH;
 2663         case  0: break;
 2664         default: goto __pyx_L5_argtuple_error;
 2665       }
 2666       kw_args = PyDict_Size(__pyx_kwds);
 2667       switch (pos_args) {
 2668         case  0:
 2669         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_low)) != 0)) kw_args--;
 2670         else goto __pyx_L5_argtuple_error;
 2671         CYTHON_FALLTHROUGH;
 2672         case  1:
 2673         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_high)) != 0)) kw_args--;
 2674         else {
 2675           __Pyx_RaiseArgtupleInvalid("_rand_bool", 1, 4, 4, 1); __PYX_ERR(2, 5, __pyx_L3_error)
 2676         }
 2677         CYTHON_FALLTHROUGH;
 2678         case  2:
 2679         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--;
 2680         else {
 2681           __Pyx_RaiseArgtupleInvalid("_rand_bool", 1, 4, 4, 2); __PYX_ERR(2, 5, __pyx_L3_error)
 2682         }
 2683         CYTHON_FALLTHROUGH;
 2684         case  3:
 2685         if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rngstate)) != 0)) kw_args--;
 2686         else {
 2687           __Pyx_RaiseArgtupleInvalid("_rand_bool", 1, 4, 4, 3); __PYX_ERR(2, 5, __pyx_L3_error)
 2688         }
 2689       }
 2690       if (unlikely(kw_args > 0)) {
 2691         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_rand_bool") < 0)) __PYX_ERR(2, 5, __pyx_L3_error)
 2692       }
 2693     } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
 2694       goto __pyx_L5_argtuple_error;
 2695     } else {
 2696       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 2697       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 2698       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 2699       values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
 2700     }
 2701     __pyx_v_low = __Pyx_PyInt_As_npy_bool(values[0]); if (unlikely((__pyx_v_low == ((npy_bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5, __pyx_L3_error)
 2702     __pyx_v_high = __Pyx_PyInt_As_npy_bool(values[1]); if (unlikely((__pyx_v_high == ((npy_bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 5, __pyx_L3_error)
 2703     __pyx_v_size = values[2];
 2704     __pyx_v_rngstate = values[3];
 2705   }
 2706   goto __pyx_L4_argument_unpacking_done;
 2707   __pyx_L5_argtuple_error:;
 2708   __Pyx_RaiseArgtupleInvalid("_rand_bool", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 5, __pyx_L3_error)
 2709   __pyx_L3_error:;
 2710   __Pyx_AddTraceback("mtrand._rand_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
 2711   __Pyx_RefNannyFinishContext();
 2712   return NULL;
 2713   __pyx_L4_argument_unpacking_done:;
 2714   __pyx_r = __pyx_pf_6mtrand__rand_bool(__pyx_self, __pyx_v_low, __pyx_v_high, __pyx_v_size, __pyx_v_rngstate);
 2715 
 2716   /* function exit code */
 2717   __Pyx_RefNannyFinishContext();
 2718   return __pyx_r;
 2719 }
 2720 
 2721 static PyObject *__pyx_pf_6mtrand__rand_bool(CYTHON_UNUSED PyObject *__pyx_self, npy_bool __pyx_v_low, npy_bool __pyx_v_high, PyObject *__pyx_v_size, PyObject *__pyx_v_rngstate) {
 2722   npy_bool __pyx_v_off;
 2723   npy_bool __pyx_v_rng;
 2724   npy_bool __pyx_v_buf;
 2725   PyArrayObject *arrayObject = 0;
 2726   npy_intp __pyx_v_cnt;
 2727   rk_state *__pyx_v_state;
 2728   npy_bool *__pyx_v_array_data;
 2729   PyObject *__pyx_r = NULL;
 2730   __Pyx_RefNannyDeclarations
 2731   void *__pyx_t_1;
 2732   int __pyx_t_2;
 2733   int __pyx_t_3;
 2734   PyObject *__pyx_t_4 = NULL;
 2735   PyObject *__pyx_t_5 = NULL;
 2736   PyObject *__pyx_t_6 = NULL;
 2737   PyObject *__pyx_t_7 = NULL;
 2738   int __pyx_t_8;
 2739   PyObject *__pyx_t_9 = NULL;
 2740   __Pyx_RefNannySetupContext("_rand_bool", 0);
 2741 
 2742   /* "randint_helpers.pxi":40
 2743  *     cdef ndarray array "arrayObject"
 2744  *     cdef npy_intp cnt
 2745  *     cdef rk_state *state = <rk_state *>PyCapsule_GetPointer(rngstate, NULL)             # <<<<<<<<<<<<<<
 2746  * 
 2747  *     off = <npy_bool>(low)
 2748  */
 2749   __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_rngstate, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(2, 40, __pyx_L1_error)
 2750   __pyx_v_state = ((rk_state *)__pyx_t_1);
 2751 
 2752   /* "randint_helpers.pxi":42
 2753  *     cdef rk_state *state = <rk_state *>PyCapsule_GetPointer(rngstate, NULL)
 2754  * 
 2755  *     off = <npy_bool>(low)             # <<<<<<<<<<<<<<
 2756  *     rng = <npy_bool>(high) - <npy_bool>(low)
 2757  * 
 2758  */
 2759   __pyx_v_off = ((npy_bool)__pyx_v_low);
 2760 
 2761   /* "randint_helpers.pxi":43
 2762  * 
 2763  *     off = <npy_bool>(low)
 2764  *     rng = <npy_bool>(high) - <npy_bool>(low)             # <<<<<<<<<<<<<<
 2765  * 
 2766  *     if size is None:
 2767  */
 2768   __pyx_v_rng = (((npy_bool)__pyx_v_high) - ((npy_bool)__pyx_v_low));
 2769 
 2770   /* "randint_helpers.pxi":45
 2771  *     rng = <npy_bool>(high) - <npy_bool>(low)
 2772  * 
 2773  *     if size is None:             # <<<<<<<<<<<<<<
 2774  *         rk_random_bool(off, rng, 1, &buf, state)
 2775  *         return np.bool_(<npy_bool>buf)
 2776  */
 2777   __pyx_t_2 = (__pyx_v_size == Py_None);
 2778   __pyx_t_3 = (__pyx_t_2 != 0);
 2779   if (__pyx_t_3) {
 2780 
 2781     /* "randint_helpers.pxi":46
 2782  * 
 2783  *     if size is None:
 2784  *         rk_random_bool(off, rng, 1, &buf, state)             # <<<<<<<<<<<<<<
 2785  *         return np.bool_(<npy_bool>buf)
 2786  *     else:
 2787  */
 2788     rk_random_bool(__pyx_v_off, __pyx_v_rng, 1, (&__pyx_v_buf), __pyx_v_state);
 2789 
 2790     /* "randint_helpers.pxi":47
 2791  *     if size is None:
 2792  *         rk_random_bool(off, rng, 1, &buf, state)
 2793  *         return np.bool_(<npy_bool>buf)             # <<<<<<<<<<<<<<
 2794  *     else:
 2795  *         array = <ndarray>np.empty(size, np.bool_)
 2796  */
 2797     __Pyx_XDECREF(__pyx_r);
 2798     __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 47, __pyx_L1_error)
 2799     __Pyx_GOTREF(__pyx_t_5);
 2800     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_bool); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 47, __pyx_L1_error)
 2801     __Pyx_GOTREF(__pyx_t_6);
 2802     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 2803     __pyx_t_5 = __Pyx_PyInt_From_npy_bool(((npy_bool)__pyx_v_buf)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 47, __pyx_L1_error)
 2804     __Pyx_GOTREF(__pyx_t_5);
 2805     __pyx_t_7 = NULL;
 2806     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
 2807       __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
 2808       if (likely(__pyx_t_7)) {
 2809         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
 2810         __Pyx_INCREF(__pyx_t_7);
 2811         __Pyx_INCREF(function);
 2812         __Pyx_DECREF_SET(__pyx_t_6, function);
 2813       }
 2814     }
 2815     __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
 2816     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
 2817     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 2818     if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 47, __pyx_L1_error)
 2819     __Pyx_GOTREF(__pyx_t_4);
 2820     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 2821     __pyx_r = __pyx_t_4;
 2822     __pyx_t_4 = 0;
 2823     goto __pyx_L0;
 2824 
 2825     /* "randint_helpers.pxi":45
 2826  *     rng = <npy_bool>(high) - <npy_bool>(low)
 2827  * 
 2828  *     if size is None:             # <<<<<<<<<<<<<<
 2829  *         rk_random_bool(off, rng, 1, &buf, state)
 2830  *         return np.bool_(<npy_bool>buf)
 2831  */
 2832   }
 2833 
 2834   /* "randint_helpers.pxi":49
 2835  *         return np.bool_(<npy_bool>buf)
 2836  *     else:
 2837  *         array = <ndarray>np.empty(size, np.bool_)             # <<<<<<<<<<<<<<
 2838  *         cnt = PyArray_SIZE(array)
 2839  *         array_data = <npy_bool *>PyArray_DATA(array)
 2840  */
 2841   /*else*/ {
 2842     __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 49, __pyx_L1_error)
 2843     __Pyx_GOTREF(__pyx_t_6);
 2844     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 49, __pyx_L1_error)
 2845     __Pyx_GOTREF(__pyx_t_5);
 2846     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 2847     __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 49, __pyx_L1_error)
 2848     __Pyx_GOTREF(__pyx_t_6);
 2849     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_bool); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 49, __pyx_L1_error)
 2850     __Pyx_GOTREF(__pyx_t_7);
 2851     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 2852     __pyx_t_6 = NULL;
 2853     __pyx_t_8 = 0;
 2854     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
 2855       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
 2856       if (likely(__pyx_t_6)) {
 2857         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
 2858         __Pyx_INCREF(__pyx_t_6);
 2859         __Pyx_INCREF(function);
 2860         __Pyx_DECREF_SET(__pyx_t_5, function);
 2861         __pyx_t_8 = 1;
 2862       }
 2863     }
 2864     #if CYTHON_FAST_PYCALL
 2865     if (PyFunction_Check(__pyx_t_5)) {
 2866       PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_size, __pyx_t_7};
 2867       __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 49, __pyx_L1_error)
 2868       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 2869       __Pyx_GOTREF(__pyx_t_4);
 2870       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 2871     } else
 2872     #endif
 2873     #if CYTHON_FAST_PYCCALL
 2874     if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
 2875       PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_size, __pyx_t_7};
 2876       __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 49, __pyx_L1_error)
 2877       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 2878       __Pyx_GOTREF(__pyx_t_4);
 2879       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 2880     } else
 2881     #endif
 2882     {
 2883       __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 49, __pyx_L1_error)
 2884       __Pyx_GOTREF(__pyx_t_9);
 2885       if (__pyx_t_6) {
 2886         __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
 2887       }
 2888       __Pyx_INCREF(__pyx_v_size);
 2889       __Pyx_GIVEREF(__pyx_v_size);
 2890       PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_size);
 2891       __Pyx_GIVEREF(__pyx_t_7);
 2892       PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_7);
 2893       __pyx_t_7 = 0;
 2894       __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 49, __pyx_L1_error)
 2895       __Pyx_GOTREF(__pyx_t_4);
 2896       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 2897     }
 2898     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 2899     __pyx_t_5 = __pyx_t_4;
 2900     __Pyx_INCREF(__pyx_t_5);
 2901     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 2902     arrayObject = ((PyArrayObject *)__pyx_t_5);
 2903     __pyx_t_5 = 0;
 2904 
 2905     /* "randint_helpers.pxi":50
 2906  *     else:
 2907  *         array = <ndarray>np.empty(size, np.bool_)
 2908  *         cnt = PyArray_SIZE(array)             # <<<<<<<<<<<<<<
 2909  *         array_data = <npy_bool *>PyArray_DATA(array)
 2910  *         with nogil:
 2911  */
 2912     __pyx_v_cnt = PyArray_SIZE(arrayObject);
 2913 
 2914     /* "randint_helpers.pxi":51
 2915  *         array = <ndarray>np.empty(size, np.bool_)
 2916  *         cnt = PyArray_SIZE(array)
 2917  *         array_data = <npy_bool *>PyArray_DATA(array)             # <<<<<<<<<<<<<<
 2918  *         with nogil:
 2919  *             rk_random_bool(off, rng, cnt, array_data, state)
 2920  */
 2921     __pyx_v_array_data = ((npy_bool *)PyArray_DATA(arrayObject));
 2922 
 2923     /* "randint_helpers.pxi":52
 2924  *         cnt = PyArray_SIZE(array)
 2925  *         array_data = <npy_bool *>PyArray_DATA(array)
 2926  *         with nogil:             # <<<<<<<<<<<<<<
 2927  *             rk_random_bool(off, rng, cnt, array_data, state)
 2928  *         return array
 2929  */
 2930     {
 2931         #ifdef WITH_THREAD
 2932         PyThreadState *_save;
 2933         Py_UNBLOCK_THREADS
 2934         __Pyx_FastGIL_Remember();
 2935         #endif
 2936         /*try:*/ {
 2937 
 2938           /* "randint_helpers.pxi":53
 2939  *         array_data = <npy_bool *>PyArray_DATA(array)
 2940  *         with nogil:
 2941  *             rk_random_bool(off, rng, cnt, array_data, state)             # <<<<<<<<<<<<<<
 2942  *         return array
 2943  * 
 2944  */
 2945           rk_random_bool(__pyx_v_off, __pyx_v_rng, __pyx_v_cnt, __pyx_v_array_data, __pyx_v_state);
 2946         }
 2947 
 2948         /* "randint_helpers.pxi":52
 2949  *         cnt = PyArray_SIZE(array)
 2950  *         array_data = <npy_bool *>PyArray_DATA(array)
 2951  *         with nogil:             # <<<<<<<<<<<<<<
 2952  *             rk_random_bool(off, rng, cnt, array_data, state)
 2953  *         return array
 2954  */
 2955         /*finally:*/ {
 2956           /*normal exit:*/{
 2957             #ifdef WITH_THREAD
 2958             __Pyx_FastGIL_Forget();
 2959             Py_BLOCK_THREADS
 2960             #endif
 2961             goto __pyx_L6;
 2962           }
 2963           __pyx_L6:;
 2964         }
 2965     }
 2966 
 2967     /* "randint_helpers.pxi":54
 2968  *         with nogil:
 2969  *             rk_random_bool(off, rng, cnt, array_data, state)
 2970  *         return array             # <<<<<<<<<<<<<<
 2971  * 
 2972  * def _rand_int8(npy_int8 low, npy_int8 high, size, rngstate):
 2973  */
 2974     __Pyx_XDECREF(__pyx_r);
 2975     __Pyx_INCREF(((PyObject *)arrayObject));
 2976     __pyx_r = ((PyObject *)arrayObject);
 2977     goto __pyx_L0;
 2978   }
 2979 
 2980   /* "randint_helpers.pxi":5
 2981  * """
 2982  * 
 2983  * def _rand_bool(npy_bool low, npy_bool high, size, rngstate):             # <<<<<<<<<<<<<<
 2984  *     """
 2985  *     _rand_bool(low, high, size, rngstate)
 2986  */
 2987 
 2988   /* function exit code */
 2989   __pyx_L1_error:;
 2990   __Pyx_XDECREF(__pyx_t_4);
 2991   __Pyx_XDECREF(__pyx_t_5);
 2992   __Pyx_XDECREF(__pyx_t_6);
 2993   __Pyx_XDECREF(__pyx_t_7);
 2994   __Pyx_XDECREF(__pyx_t_9);
 2995   __Pyx_AddTraceback("mtrand._rand_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
 2996   __pyx_r = NULL;
 2997   __pyx_L0:;
 2998   __Pyx_XDECREF((PyObject *)arrayObject);
 2999   __Pyx_XGIVEREF(__pyx_r);
 3000   __Pyx_RefNannyFinishContext();
 3001   return __pyx_r;
 3002 }
 3003 
 3004 /* "randint_helpers.pxi":56
 3005  *         return array
 3006  * 
 3007  * def _rand_int8(npy_int8 low, npy_int8 high, size, rngstate):             # <<<<<<<<<<<<<<
 3008  *     """
 3009  *     _rand_int8(low, high, size, rngstate)
 3010  */
 3011 
 3012 /* Python wrapper */
 3013 static PyObject *__pyx_pw_6mtrand_3_rand_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 3014 static char __pyx_doc_6mtrand_2_rand_int8[] = "\n    _rand_int8(low, high, size, rngstate)\n\n    Return random np.int8 integers between ``low`` and ``high``, inclusive.\n\n    Return random integers from the \"discrete uniform\" distribution in the\n    closed interval [``low``, ``high``). On entry the arguments are presumed\n    to have been validated for size and order for the np.int8 type.\n\n    Parameters\n    ----------\n    low : int\n        Lowest (signed) integer to be drawn from the distribution.\n    high : int\n        Highest (signed) integer to be drawn from the distribution.\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.  Default is None, in which case a\n        single value is returned.\n    rngstate : encapsulated pointer to rk_state\n        The specific type depends on the python version. In Python 2 it is\n        a PyCObject, in Python 3 a PyCapsule object.\n\n    Returns\n    -------\n    out : python integer or ndarray of np.int8\n          `size`-shaped array of random integers from the appropriate\n          distribution, or a single such random int if `size` not provided.\n\n    ";
 3015 static PyMethodDef __pyx_mdef_6mtrand_3_rand_int8 = {"_rand_int8", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mtrand_3_rand_int8, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mtrand_2_rand_int8};
 3016 static PyObject *__pyx_pw_6mtrand_3_rand_int8(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 3017   npy_int8 __pyx_v_low;
 3018   npy_int8 __pyx_v_high;
 3019   PyObject *__pyx_v_size = 0;
 3020   PyObject *__pyx_v_rngstate = 0;
 3021   PyObject *__pyx_r = 0;
 3022   __Pyx_RefNannyDeclarations
 3023   __Pyx_RefNannySetupContext("_rand_int8 (wrapper)", 0);
 3024   {
 3025     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_low,&__pyx_n_s_high,&__pyx_n_s_size,&__pyx_n_s_rngstate,0};
 3026     PyObject* values[4] = {0,0,0,0};
 3027     if (unlikely(__pyx_kwds)) {
 3028       Py_ssize_t kw_args;
 3029       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
 3030       switch (pos_args) {
 3031         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
 3032         CYTHON_FALLTHROUGH;
 3033         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 3034         CYTHON_FALLTHROUGH;
 3035         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 3036         CYTHON_FALLTHROUGH;
 3037         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 3038         CYTHON_FALLTHROUGH;
 3039         case  0: break;
 3040         default: goto __pyx_L5_argtuple_error;
 3041       }
 3042       kw_args = PyDict_Size(__pyx_kwds);
 3043       switch (pos_args) {
 3044         case  0:
 3045         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_low)) != 0)) kw_args--;
 3046         else goto __pyx_L5_argtuple_error;
 3047         CYTHON_FALLTHROUGH;
 3048         case  1:
 3049         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_high)) != 0)) kw_args--;
 3050         else {
 3051           __Pyx_RaiseArgtupleInvalid("_rand_int8", 1, 4, 4, 1); __PYX_ERR(2, 56, __pyx_L3_error)
 3052         }
 3053         CYTHON_FALLTHROUGH;
 3054         case  2:
 3055         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--;
 3056         else {
 3057           __Pyx_RaiseArgtupleInvalid("_rand_int8", 1, 4, 4, 2); __PYX_ERR(2, 56, __pyx_L3_error)
 3058         }
 3059         CYTHON_FALLTHROUGH;
 3060         case  3:
 3061         if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rngstate)) != 0)) kw_args--;
 3062         else {
 3063           __Pyx_RaiseArgtupleInvalid("_rand_int8", 1, 4, 4, 3); __PYX_ERR(2, 56, __pyx_L3_error)
 3064         }
 3065       }
 3066       if (unlikely(kw_args > 0)) {
 3067         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_rand_int8") < 0)) __PYX_ERR(2, 56, __pyx_L3_error)
 3068       }
 3069     } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
 3070       goto __pyx_L5_argtuple_error;
 3071     } else {
 3072       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 3073       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 3074       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 3075       values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
 3076     }
 3077     __pyx_v_low = __Pyx_PyInt_As_npy_int8(values[0]); if (unlikely((__pyx_v_low == ((npy_int8)-1)) && PyErr_Occurred())) __PYX_ERR(2, 56, __pyx_L3_error)
 3078     __pyx_v_high = __Pyx_PyInt_As_npy_int8(values[1]); if (unlikely((__pyx_v_high == ((npy_int8)-1)) && PyErr_Occurred())) __PYX_ERR(2, 56, __pyx_L3_error)
 3079     __pyx_v_size = values[2];
 3080     __pyx_v_rngstate = values[3];
 3081   }
 3082   goto __pyx_L4_argument_unpacking_done;
 3083   __pyx_L5_argtuple_error:;
 3084   __Pyx_RaiseArgtupleInvalid("_rand_int8", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 56, __pyx_L3_error)
 3085   __pyx_L3_error:;
 3086   __Pyx_AddTraceback("mtrand._rand_int8", __pyx_clineno, __pyx_lineno, __pyx_filename);
 3087   __Pyx_RefNannyFinishContext();
 3088   return NULL;
 3089   __pyx_L4_argument_unpacking_done:;
 3090   __pyx_r = __pyx_pf_6mtrand_2_rand_int8(__pyx_self, __pyx_v_low, __pyx_v_high, __pyx_v_size, __pyx_v_rngstate);
 3091 
 3092   /* function exit code */
 3093   __Pyx_RefNannyFinishContext();
 3094   return __pyx_r;
 3095 }
 3096 
 3097 static PyObject *__pyx_pf_6mtrand_2_rand_int8(CYTHON_UNUSED PyObject *__pyx_self, npy_int8 __pyx_v_low, npy_int8 __pyx_v_high, PyObject *__pyx_v_size, PyObject *__pyx_v_rngstate) {
 3098   npy_uint8 __pyx_v_off;
 3099   npy_uint8 __pyx_v_rng;
 3100   npy_uint8 __pyx_v_buf;
 3101   PyArrayObject *arrayObject = 0;
 3102   npy_intp __pyx_v_cnt;
 3103   rk_state *__pyx_v_state;
 3104   npy_uint8 *__pyx_v_array_data;
 3105   PyObject *__pyx_r = NULL;
 3106   __Pyx_RefNannyDeclarations
 3107   void *__pyx_t_1;
 3108   int __pyx_t_2;
 3109   int __pyx_t_3;
 3110   PyObject *__pyx_t_4 = NULL;
 3111   PyObject *__pyx_t_5 = NULL;
 3112   PyObject *__pyx_t_6 = NULL;
 3113   PyObject *__pyx_t_7 = NULL;
 3114   int __pyx_t_8;
 3115   PyObject *__pyx_t_9 = NULL;
 3116   __Pyx_RefNannySetupContext("_rand_int8", 0);
 3117 
 3118   /* "randint_helpers.pxi":91
 3119  *     cdef ndarray array "arrayObject"
 3120  *     cdef npy_intp cnt
 3121  *     cdef rk_state *state = <rk_state *>PyCapsule_GetPointer(rngstate, NULL)             # <<<<<<<<<<<<<<
 3122  * 
 3123  *     off = <npy_uint8>(low)
 3124  */
 3125   __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_rngstate, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(2, 91, __pyx_L1_error)
 3126   __pyx_v_state = ((rk_state *)__pyx_t_1);
 3127 
 3128   /* "randint_helpers.pxi":93
 3129  *     cdef rk_state *state = <rk_state *>PyCapsule_GetPointer(rngstate, NULL)
 3130  * 
 3131  *     off = <npy_uint8>(low)             # <<<<<<<<<<<<<<
 3132  *     rng = <npy_uint8>(high) - <npy_uint8>(low)
 3133  * 
 3134  */
 3135   __pyx_v_off = ((npy_uint8)__pyx_v_low);
 3136 
 3137   /* "randint_helpers.pxi":94
 3138  * 
 3139  *     off = <npy_uint8>(low)
 3140  *     rng = <npy_uint8>(high) - <npy_uint8>(low)             # <<<<<<<<<<<<<<
 3141  * 
 3142  *     if size is None:
 3143  */
 3144   __pyx_v_rng = (((npy_uint8)__pyx_v_high) - ((npy_uint8)__pyx_v_low));
 3145 
 3146   /* "randint_helpers.pxi":96
 3147  *     rng = <npy_uint8>(high) - <npy_uint8>(low)
 3148  * 
 3149  *     if size is None:             # <<<<<<<<<<<<<<
 3150  *         rk_random_uint8(off, rng, 1, &buf, state)
 3151  *         return np.int8(<npy_int8>buf)
 3152  */
 3153   __pyx_t_2 = (__pyx_v_size == Py_None);
 3154   __pyx_t_3 = (__pyx_t_2 != 0);
 3155   if (__pyx_t_3) {
 3156 
 3157     /* "randint_helpers.pxi":97
 3158  * 
 3159  *     if size is None:
 3160  *         rk_random_uint8(off, rng, 1, &buf, state)             # <<<<<<<<<<<<<<
 3161  *         return np.int8(<npy_int8>buf)
 3162  *     else:
 3163  */
 3164     rk_random_uint8(__pyx_v_off, __pyx_v_rng, 1, (&__pyx_v_buf), __pyx_v_state);
 3165 
 3166     /* "randint_helpers.pxi":98
 3167  *     if size is None:
 3168  *         rk_random_uint8(off, rng, 1, &buf, state)
 3169  *         return np.int8(<npy_int8>buf)             # <<<<<<<<<<<<<<
 3170  *     else:
 3171  *         array = <ndarray>np.empty(size, np.int8)
 3172  */
 3173     __Pyx_XDECREF(__pyx_r);
 3174     __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 98, __pyx_L1_error)
 3175     __Pyx_GOTREF(__pyx_t_5);
 3176     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int8); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 98, __pyx_L1_error)
 3177     __Pyx_GOTREF(__pyx_t_6);
 3178     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 3179     __pyx_t_5 = __Pyx_PyInt_From_npy_int8(((npy_int8)__pyx_v_buf)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 98, __pyx_L1_error)
 3180     __Pyx_GOTREF(__pyx_t_5);
 3181     __pyx_t_7 = NULL;
 3182     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
 3183       __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
 3184       if (likely(__pyx_t_7)) {
 3185         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
 3186         __Pyx_INCREF(__pyx_t_7);
 3187         __Pyx_INCREF(function);
 3188         __Pyx_DECREF_SET(__pyx_t_6, function);
 3189       }
 3190     }
 3191     __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
 3192     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
 3193     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 3194     if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 98, __pyx_L1_error)
 3195     __Pyx_GOTREF(__pyx_t_4);
 3196     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 3197     __pyx_r = __pyx_t_4;
 3198     __pyx_t_4 = 0;
 3199     goto __pyx_L0;
 3200 
 3201     /* "randint_helpers.pxi":96
 3202  *     rng = <npy_uint8>(high) - <npy_uint8>(low)
 3203  * 
 3204  *     if size is None:             # <<<<<<<<<<<<<<
 3205  *         rk_random_uint8(off, rng, 1, &buf, state)
 3206  *         return np.int8(<npy_int8>buf)
 3207  */
 3208   }
 3209 
 3210   /* "randint_helpers.pxi":100
 3211  *         return np.int8(<npy_int8>buf)
 3212  *     else:
 3213  *         array = <ndarray>np.empty(size, np.int8)             # <<<<<<<<<<<<<<
 3214  *         cnt = PyArray_SIZE(array)
 3215  *         array_data = <npy_uint8 *>PyArray_DATA(array)
 3216  */
 3217   /*else*/ {
 3218     __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 100, __pyx_L1_error)
 3219     __Pyx_GOTREF(__pyx_t_6);
 3220     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 100, __pyx_L1_error)
 3221     __Pyx_GOTREF(__pyx_t_5);
 3222     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 3223     __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 100, __pyx_L1_error)
 3224     __Pyx_GOTREF(__pyx_t_6);
 3225     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int8); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 100, __pyx_L1_error)
 3226     __Pyx_GOTREF(__pyx_t_7);
 3227     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 3228     __pyx_t_6 = NULL;
 3229     __pyx_t_8 = 0;
 3230     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
 3231       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
 3232       if (likely(__pyx_t_6)) {
 3233         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
 3234         __Pyx_INCREF(__pyx_t_6);
 3235         __Pyx_INCREF(function);
 3236         __Pyx_DECREF_SET(__pyx_t_5, function);
 3237         __pyx_t_8 = 1;
 3238       }
 3239     }
 3240     #if CYTHON_FAST_PYCALL
 3241     if (PyFunction_Check(__pyx_t_5)) {
 3242       PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_size, __pyx_t_7};
 3243       __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 100, __pyx_L1_error)
 3244       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 3245       __Pyx_GOTREF(__pyx_t_4);
 3246       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 3247     } else
 3248     #endif
 3249     #if CYTHON_FAST_PYCCALL
 3250     if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
 3251       PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_size, __pyx_t_7};
 3252       __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 100, __pyx_L1_error)
 3253       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 3254       __Pyx_GOTREF(__pyx_t_4);
 3255       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 3256     } else
 3257     #endif
 3258     {
 3259       __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 100, __pyx_L1_error)
 3260       __Pyx_GOTREF(__pyx_t_9);
 3261       if (__pyx_t_6) {
 3262         __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
 3263       }
 3264       __Pyx_INCREF(__pyx_v_size);
 3265       __Pyx_GIVEREF(__pyx_v_size);
 3266       PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_size);
 3267       __Pyx_GIVEREF(__pyx_t_7);
 3268       PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_7);
 3269       __pyx_t_7 = 0;
 3270       __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 100, __pyx_L1_error)
 3271       __Pyx_GOTREF(__pyx_t_4);
 3272       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 3273     }
 3274     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 3275     __pyx_t_5 = __pyx_t_4;
 3276     __Pyx_INCREF(__pyx_t_5);
 3277     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 3278     arrayObject = ((PyArrayObject *)__pyx_t_5);
 3279     __pyx_t_5 = 0;
 3280 
 3281     /* "randint_helpers.pxi":101
 3282  *     else:
 3283  *         array = <ndarray>np.empty(size, np.int8)
 3284  *         cnt = PyArray_SIZE(array)             # <<<<<<<<<<<<<<
 3285  *         array_data = <npy_uint8 *>PyArray_DATA(array)
 3286  *         with nogil:
 3287  */
 3288     __pyx_v_cnt = PyArray_SIZE(arrayObject);
 3289 
 3290     /* "randint_helpers.pxi":102
 3291  *         array = <ndarray>np.empty(size, np.int8)
 3292  *         cnt = PyArray_SIZE(array)
 3293  *         array_data = <npy_uint8 *>PyArray_DATA(array)             # <<<<<<<<<<<<<<
 3294  *         with nogil:
 3295  *             rk_random_uint8(off, rng, cnt, array_data, state)
 3296  */
 3297     __pyx_v_array_data = ((npy_uint8 *)PyArray_DATA(arrayObject));
 3298 
 3299     /* "randint_helpers.pxi":103
 3300  *         cnt = PyArray_SIZE(array)
 3301  *         array_data = <npy_uint8 *>PyArray_DATA(array)
 3302  *         with nogil:             # <<<<<<<<<<<<<<
 3303  *             rk_random_uint8(off, rng, cnt, array_data, state)
 3304  *         return array
 3305  */
 3306     {
 3307         #ifdef WITH_THREAD
 3308         PyThreadState *_save;
 3309         Py_UNBLOCK_THREADS
 3310         __Pyx_FastGIL_Remember();
 3311         #endif
 3312         /*try:*/ {
 3313 
 3314           /* "randint_helpers.pxi":104
 3315  *         array_data = <npy_uint8 *>PyArray_DATA(array)
 3316  *         with nogil:
 3317  *             rk_random_uint8(off, rng, cnt, array_data, state)             # <<<<<<<<<<<<<<
 3318  *         return array
 3319  * 
 3320  */
 3321           rk_random_uint8(__pyx_v_off, __pyx_v_rng, __pyx_v_cnt, __pyx_v_array_data, __pyx_v_state);
 3322         }
 3323 
 3324         /* "randint_helpers.pxi":103
 3325  *         cnt = PyArray_SIZE(array)
 3326  *         array_data = <npy_uint8 *>PyArray_DATA(array)
 3327  *         with nogil:             # <<<<<<<<<<<<<<
 3328  *             rk_random_uint8(off, rng, cnt, array_data, state)
 3329  *         return array
 3330  */
 3331         /*finally:*/ {
 3332           /*normal exit:*/{
 3333             #ifdef WITH_THREAD
 3334             __Pyx_FastGIL_Forget();
 3335             Py_BLOCK_THREADS
 3336             #endif
 3337             goto __pyx_L6;
 3338           }
 3339           __pyx_L6:;
 3340         }
 3341     }
 3342 
 3343     /* "randint_helpers.pxi":105
 3344  *         with nogil:
 3345  *             rk_random_uint8(off, rng, cnt, array_data, state)
 3346  *         return array             # <<<<<<<<<<<<<<
 3347  * 
 3348  * def _rand_int16(npy_int16 low, npy_int16 high, size, rngstate):
 3349  */
 3350     __Pyx_XDECREF(__pyx_r);
 3351     __Pyx_INCREF(((PyObject *)arrayObject));
 3352     __pyx_r = ((PyObject *)arrayObject);
 3353     goto __pyx_L0;
 3354   }
 3355 
 3356   /* "randint_helpers.pxi":56
 3357  *         return array
 3358  * 
 3359  * def _rand_int8(npy_int8 low, npy_int8 high, size, rngstate):             # <<<<<<<<<<<<<<
 3360  *     """
 3361  *     _rand_int8(low, high, size, rngstate)
 3362  */
 3363 
 3364   /* function exit code */
 3365   __pyx_L1_error:;
 3366   __Pyx_XDECREF(__pyx_t_4);
 3367   __Pyx_XDECREF(__pyx_t_5);
 3368   __Pyx_XDECREF(__pyx_t_6);
 3369   __Pyx_XDECREF(__pyx_t_7);
 3370   __Pyx_XDECREF(__pyx_t_9);
 3371   __Pyx_AddTraceback("mtrand._rand_int8", __pyx_clineno, __pyx_lineno, __pyx_filename);
 3372   __pyx_r = NULL;
 3373   __pyx_L0:;
 3374   __Pyx_XDECREF((PyObject *)arrayObject);
 3375   __Pyx_XGIVEREF(__pyx_r);
 3376   __Pyx_RefNannyFinishContext();
 3377   return __pyx_r;
 3378 }
 3379 
 3380 /* "randint_helpers.pxi":107
 3381  *         return array
 3382  * 
 3383  * def _rand_int16(npy_int16 low, npy_int16 high, size, rngstate):             # <<<<<<<<<<<<<<
 3384  *     """
 3385  *     _rand_int16(low, high, size, rngstate)
 3386  */
 3387 
 3388 /* Python wrapper */
 3389 static PyObject *__pyx_pw_6mtrand_5_rand_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 3390 static char __pyx_doc_6mtrand_4_rand_int16[] = "\n    _rand_int16(low, high, size, rngstate)\n\n    Return random np.int16 integers between ``low`` and ``high``, inclusive.\n\n    Return random integers from the \"discrete uniform\" distribution in the\n    closed interval [``low``, ``high``). On entry the arguments are presumed\n    to have been validated for size and order for the np.int16 type.\n\n    Parameters\n    ----------\n    low : int\n        Lowest (signed) integer to be drawn from the distribution.\n    high : int\n        Highest (signed) integer to be drawn from the distribution.\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.  Default is None, in which case a\n        single value is returned.\n    rngstate : encapsulated pointer to rk_state\n        The specific type depends on the python version. In Python 2 it is\n        a PyCObject, in Python 3 a PyCapsule object.\n\n    Returns\n    -------\n    out : python integer or ndarray of np.int16\n          `size`-shaped array of random integers from the appropriate\n          distribution, or a single such random int if `size` not provided.\n\n    ";
 3391 static PyMethodDef __pyx_mdef_6mtrand_5_rand_int16 = {"_rand_int16", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mtrand_5_rand_int16, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mtrand_4_rand_int16};
 3392 static PyObject *__pyx_pw_6mtrand_5_rand_int16(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 3393   npy_int16 __pyx_v_low;
 3394   npy_int16 __pyx_v_high;
 3395   PyObject *__pyx_v_size = 0;
 3396   PyObject *__pyx_v_rngstate = 0;
 3397   PyObject *__pyx_r = 0;
 3398   __Pyx_RefNannyDeclarations
 3399   __Pyx_RefNannySetupContext("_rand_int16 (wrapper)", 0);
 3400   {
 3401     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_low,&__pyx_n_s_high,&__pyx_n_s_size,&__pyx_n_s_rngstate,0};
 3402     PyObject* values[4] = {0,0,0,0};
 3403     if (unlikely(__pyx_kwds)) {
 3404       Py_ssize_t kw_args;
 3405       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
 3406       switch (pos_args) {
 3407         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
 3408         CYTHON_FALLTHROUGH;
 3409         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 3410         CYTHON_FALLTHROUGH;
 3411         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 3412         CYTHON_FALLTHROUGH;
 3413         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 3414         CYTHON_FALLTHROUGH;
 3415         case  0: break;
 3416         default: goto __pyx_L5_argtuple_error;
 3417       }
 3418       kw_args = PyDict_Size(__pyx_kwds);
 3419       switch (pos_args) {
 3420         case  0:
 3421         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_low)) != 0)) kw_args--;
 3422         else goto __pyx_L5_argtuple_error;
 3423         CYTHON_FALLTHROUGH;
 3424         case  1:
 3425         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_high)) != 0)) kw_args--;
 3426         else {
 3427           __Pyx_RaiseArgtupleInvalid("_rand_int16", 1, 4, 4, 1); __PYX_ERR(2, 107, __pyx_L3_error)
 3428         }
 3429         CYTHON_FALLTHROUGH;
 3430         case  2:
 3431         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--;
 3432         else {
 3433           __Pyx_RaiseArgtupleInvalid("_rand_int16", 1, 4, 4, 2); __PYX_ERR(2, 107, __pyx_L3_error)
 3434         }
 3435         CYTHON_FALLTHROUGH;
 3436         case  3:
 3437         if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rngstate)) != 0)) kw_args--;
 3438         else {
 3439           __Pyx_RaiseArgtupleInvalid("_rand_int16", 1, 4, 4, 3); __PYX_ERR(2, 107, __pyx_L3_error)
 3440         }
 3441       }
 3442       if (unlikely(kw_args > 0)) {
 3443         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_rand_int16") < 0)) __PYX_ERR(2, 107, __pyx_L3_error)
 3444       }
 3445     } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
 3446       goto __pyx_L5_argtuple_error;
 3447     } else {
 3448       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 3449       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 3450       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 3451       values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
 3452     }
 3453     __pyx_v_low = __Pyx_PyInt_As_npy_int16(values[0]); if (unlikely((__pyx_v_low == ((npy_int16)-1)) && PyErr_Occurred())) __PYX_ERR(2, 107, __pyx_L3_error)
 3454     __pyx_v_high = __Pyx_PyInt_As_npy_int16(values[1]); if (unlikely((__pyx_v_high == ((npy_int16)-1)) && PyErr_Occurred())) __PYX_ERR(2, 107, __pyx_L3_error)
 3455     __pyx_v_size = values[2];
 3456     __pyx_v_rngstate = values[3];
 3457   }
 3458   goto __pyx_L4_argument_unpacking_done;
 3459   __pyx_L5_argtuple_error:;
 3460   __Pyx_RaiseArgtupleInvalid("_rand_int16", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 107, __pyx_L3_error)
 3461   __pyx_L3_error:;
 3462   __Pyx_AddTraceback("mtrand._rand_int16", __pyx_clineno, __pyx_lineno, __pyx_filename);
 3463   __Pyx_RefNannyFinishContext();
 3464   return NULL;
 3465   __pyx_L4_argument_unpacking_done:;
 3466   __pyx_r = __pyx_pf_6mtrand_4_rand_int16(__pyx_self, __pyx_v_low, __pyx_v_high, __pyx_v_size, __pyx_v_rngstate);
 3467 
 3468   /* function exit code */
 3469   __Pyx_RefNannyFinishContext();
 3470   return __pyx_r;
 3471 }
 3472 
 3473 static PyObject *__pyx_pf_6mtrand_4_rand_int16(CYTHON_UNUSED PyObject *__pyx_self, npy_int16 __pyx_v_low, npy_int16 __pyx_v_high, PyObject *__pyx_v_size, PyObject *__pyx_v_rngstate) {
 3474   npy_uint16 __pyx_v_off;
 3475   npy_uint16 __pyx_v_rng;
 3476   npy_uint16 __pyx_v_buf;
 3477   PyArrayObject *arrayObject = 0;
 3478   npy_intp __pyx_v_cnt;
 3479   rk_state *__pyx_v_state;
 3480   npy_uint16 *__pyx_v_array_data;
 3481   PyObject *__pyx_r = NULL;
 3482   __Pyx_RefNannyDeclarations
 3483   void *__pyx_t_1;
 3484   int __pyx_t_2;
 3485   int __pyx_t_3;
 3486   PyObject *__pyx_t_4 = NULL;
 3487   PyObject *__pyx_t_5 = NULL;
 3488   PyObject *__pyx_t_6 = NULL;
 3489   PyObject *__pyx_t_7 = NULL;
 3490   int __pyx_t_8;
 3491   PyObject *__pyx_t_9 = NULL;
 3492   __Pyx_RefNannySetupContext("_rand_int16", 0);
 3493 
 3494   /* "randint_helpers.pxi":142
 3495  *     cdef ndarray array "arrayObject"
 3496  *     cdef npy_intp cnt
 3497  *     cdef rk_state *state = <rk_state *>PyCapsule_GetPointer(rngstate, NULL)             # <<<<<<<<<<<<<<
 3498  * 
 3499  *     off = <npy_uint16>(low)
 3500  */
 3501   __pyx_t_1 = PyCapsule_GetPointer(__pyx_v_rngstate, NULL); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(2, 142, __pyx_L1_error)
 3502   __pyx_v_state = ((rk_state *)__pyx_t_1);
 3503 
 3504   /* "randint_helpers.pxi":144
 3505  *     cdef rk_state *state = <rk_state *>PyCapsule_GetPointer(rngstate, NULL)
 3506  * 
 3507  *     off = <npy_uint16>(low)             # <<<<<<<<<<<<<<
 3508  *     rng = <npy_uint16>(high) - <npy_uint16>(low)
 3509  * 
 3510  */
 3511   __pyx_v_off = ((npy_uint16)__pyx_v_low);
 3512 
 3513   /* "randint_helpers.pxi":145
 3514  * 
 3515  *     off = <npy_uint16>(low)
 3516  *     rng = <npy_uint16>(high) - <npy_uint16>(low)             # <<<<<<<<<<<<<<
 3517  * 
 3518  *     if size is None:
 3519  */
 3520   __pyx_v_rng = (((npy_uint16)__pyx_v_high) - ((npy_uint16)__pyx_v_low));
 3521 
 3522   /* "randint_helpers.pxi":147
 3523  *     rng = <npy_uint16>(high) - <npy_uint16>(low)
 3524  * 
 3525  *     if size is None:             # <<<<<<<<<<<<<<
 3526  *         rk_random_uint16(off, rng, 1, &buf, state)
 3527  *         return np.int16(<npy_int16>buf)
 3528  */
 3529   __pyx_t_2 = (__pyx_v_size == Py_None);
 3530   __pyx_t_3 = (__pyx_t_2 != 0);
 3531   if (__pyx_t_3) {
 3532 
 3533     /* "randint_helpers.pxi":148
 3534  * 
 3535  *     if size is None:
 3536  *         rk_random_uint16(off, rng, 1, &buf, state)             # <<<<<<<<<<<<<<
 3537  *         return np.int16(<npy_int16>buf)
 3538  *     else:
 3539  */
 3540     rk_random_uint16(__pyx_v_off, __pyx_v_rng, 1, (&__pyx_v_buf), __pyx_v_state);
 3541 
 3542     /* "randint_helpers.pxi":149
 3543  *     if size is None:
 3544  *         rk_random_uint16(off, rng, 1, &buf, state)
 3545  *         return np.int16(<npy_int16>buf)             # <<<<<<<<<<<<<<
 3546  *     else:
 3547  *         array = <ndarray>np.empty(size, np.int16)
 3548  */
 3549     __Pyx_XDECREF(__pyx_r);
 3550     __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 149, __pyx_L1_error)
 3551     __Pyx_GOTREF(__pyx_t_5);
 3552     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int16); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 149, __pyx_L1_error)
 3553     __Pyx_GOTREF(__pyx_t_6);
 3554     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 3555     __pyx_t_5 = __Pyx_PyInt_From_npy_int16(((npy_int16)__pyx_v_buf)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 149, __pyx_L1_error)
 3556     __Pyx_GOTREF(__pyx_t_5);
 3557     __pyx_t_7 = NULL;
 3558     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
 3559       __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
 3560       if (likely(__pyx_t_7)) {
 3561         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
 3562         __Pyx_INCREF(__pyx_t_7);
 3563         __Pyx_INCREF(function);
 3564         __Pyx_DECREF_SET(__pyx_t_6, function);
 3565       }
 3566     }
 3567     __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
 3568     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
 3569     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 3570     if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 149, __pyx_L1_error)
 3571     __Pyx_GOTREF(__pyx_t_4);
 3572     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 3573     __pyx_r = __pyx_t_4;
 3574     __pyx_t_4 = 0;
 3575     goto __pyx_L0;
 3576 
 3577     /* "randint_helpers.pxi":147
 3578  *     rng = <npy_uint16>(high) - <npy_uint16>(low)
 3579  * 
 3580  *     if size is None:             # <<<<<<<<<<<<<<
 3581  *         rk_random_uint16(off, rng, 1, &buf, state)
 3582  *         return np.int16(<npy_int16>buf)
 3583  */
 3584   }
 3585 
 3586   /* "randint_helpers.pxi":151
 3587  *         return np.int16(<npy_int16>buf)
 3588  *     else:
 3589  *         array = <ndarray>np.empty(size, np.int16)             # <<<<<<<<<<<<<<
 3590  *         cnt = PyArray_SIZE(array)
 3591  *         array_data = <npy_uint16 *>PyArray_DATA(array)
 3592  */
 3593   /*else*/ {
 3594     __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 151, __pyx_L1_error)
 3595     __Pyx_GOTREF(__pyx_t_6);
 3596     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 151, __pyx_L1_error)
 3597     __Pyx_GOTREF(__pyx_t_5);
 3598     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 3599     __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 151, __pyx_L1_error)
 3600     __Pyx_GOTREF(__pyx_t_6);
 3601     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int16); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 151, __pyx_L1_error)
 3602     __Pyx_GOTREF(__pyx_t_7);
 3603     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 3604     __pyx_t_6 = NULL;
 3605     __pyx_t_8 = 0;
 3606     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
 3607       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
 3608       if (likely(__pyx_t_6)) {
 3609         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
 3610         __Pyx_INCREF(__pyx_t_6);
 3611         __Pyx_INCREF(function);
 3612         __Pyx_DECREF_SET(__pyx_t_5, function);
 3613         __pyx_t_8 = 1;
 3614       }
 3615     }
 3616     #if CYTHON_FAST_PYCALL
 3617     if (PyFunction_Check(__pyx_t_5)) {
 3618       PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_size, __pyx_t_7};
 3619       __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 151, __pyx_L1_error)
 3620       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 3621       __Pyx_GOTREF(__pyx_t_4);
 3622       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 3623     } else
 3624     #endif
 3625     #if CYTHON_FAST_PYCCALL
 3626     if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
 3627       PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_size, __pyx_t_7};
 3628       __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 151, __pyx_L1_error)
 3629       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 3630       __Pyx_GOTREF(__pyx_t_4);
 3631       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 3632     } else
 3633     #endif
 3634     {
 3635       __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 151, __pyx_L1_error)
 3636       __Pyx_GOTREF(__pyx_t_9);
 3637       if (__pyx_t_6) {
 3638         __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
 3639       }
 3640       __Pyx_INCREF(__pyx_v_size);
 3641       __Pyx_GIVEREF(__pyx_v_size);
 3642       PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_size);
 3643       __Pyx_GIVEREF(__pyx_t_7);
 3644       PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_7);
 3645       __pyx_t_7 = 0;
 3646       __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 151, __pyx_L1_error)
 3647       __Pyx_GOTREF(__pyx_t_4);
 3648       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 3649     }
 3650     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 3651     __pyx_t_5 = __pyx_t_4;
 3652     __Pyx_INCREF(__pyx_t_5);
 3653     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 3654     arrayObject = ((PyArrayObject *)__pyx_t_5);
 3655     __pyx_t_5 = 0;
 3656 
 3657     /* "randint_helpers.pxi":152
 3658  *     else:
 3659  *         array = <ndarray>np.empty(size, np.int16)
 3660  *         cnt = PyArray_SIZE(array)             # <<<<<<<<<<<<<<
 3661  *         array_data = <npy_uint16 *>PyArray_DATA(array)
 3662  *         with nogil:
 3663  */
 3664     __pyx_v_cnt = PyArray_SIZE(arrayObject);
 3665 
 3666     /* "randint_helpers.pxi":153
 3667  *         array = <ndarray>np.empty(size, np.int16)
 3668  *         cnt = PyArray_SIZE(array)
 3669  *         array_data = <npy_uint16 *>PyArray_DATA(array)             # <<<<<<<<<<<<<<
 3670  *         with nogil:
 3671  *             rk_random_uint16(off, rng, cnt, array_data, state)
 3672  */
 3673     __pyx_v_array_data = ((npy_uint16 *)PyArray_DATA(arrayObject));
 3674 
 3675     /* "randint_helpers.pxi":154
 3676  *         cnt = PyArray_SIZE(array)
 3677  *         array_data = <npy_uint16 *>PyArray_DATA(array)
 3678  *         with nogil:             # <<<<<<<<<<<<<<
 3679  *             rk_random_uint16(off, rng, cnt, array_data, state)
 3680  *         return array
 3681  */
 3682     {
 3683         #ifdef WITH_THREAD
 3684         PyThreadState *_save;
 3685         Py_UNBLOCK_THREADS
 3686         __Pyx_FastGIL_Remember();
 3687         #endif
 3688         /*try:*/ {
 3689 
 3690           /* "randint_helpers.pxi":155
 3691  *         array_data = <npy_uint16 *>PyArray_DATA(array)
 3692  *         with nogil:
 3693  *             rk_random_uint16(off, rng, cnt, array_data, state)             # <<<<<<<<<<<<<<
 3694  *         return array
 3695  * 
 3696  */
 3697           rk_random_uint16(__pyx_v_off, __pyx_v_rng, __pyx_v_cnt, __pyx_v_array_data, __pyx_v_state);
 3698         }
 3699 
 3700         /* "randint_helpers.pxi":154
 3701  *         cnt = PyArray_SIZE(array)
 3702  *         array_data = <npy_uint16 *>PyArray_DATA(array)
 3703  *         with nogil:             # <<<<<<<<<<<<<<
 3704  *             rk_random_uint16(off, rng, cnt, array_data, state)
 3705  *         return array
 3706  */
 3707         /*finally:*/ {
 3708           /*normal exit:*/{
 3709             #ifdef WITH_THREAD
 3710             __Pyx_FastGIL_Forget();
 3711             Py_BLOCK_THREADS
 3712             #endif
 3713             goto __pyx_L6;
 3714           }
 3715           __pyx_L6:;
 3716         }
 3717     }
 3718 
 3719     /* "randint_helpers.pxi":156
 3720  *         with nogil:
 3721  *             rk_random_uint16(off, rng, cnt, array_data, state)
 3722  *         return array             # <<<<<<<<<<<<<<
 3723  * 
 3724  * def _rand_int32(npy_int32 low, npy_int32 high, size, rngstate):
 3725  */
 3726     __Pyx_XDECREF(__pyx_r);
 3727     __Pyx_INCREF(((PyObject *)arrayObject));
 3728     __pyx_r = ((PyObject *)arrayObject);
 3729     goto __pyx_L0;
 3730   }
 3731 
 3732   /* "randint_helpers.pxi":107
 3733  *         return array
 3734  * 
 3735  * def _rand_int16(npy_int16 low, npy_int16 high, size, rngstate):             # <<<<<<<<<<<<<<
 3736  *     """
 3737  *     _rand_int16(low, high, size, rngstate)
 3738  */
 3739 
 3740   /* function exit code */
 3741   __pyx_L1_error:;
 3742   __Pyx_XDECREF(__pyx_t_4);
 3743   __Pyx_XDECREF(__pyx_t_5);
 3744   __Pyx_XDECREF(__pyx_t_6);
 3745   __Pyx_XDECREF(__pyx_t_7);
 3746   __Pyx_XDECREF(__pyx_t_9);
 3747   __Pyx_AddTraceback("mtrand._rand_int16", __pyx_clineno, __pyx_lineno, __pyx_filename);
 3748   __pyx_r = NULL;
 3749   __pyx_L0:;
 3750   __Pyx_XDECREF((PyObject *)arrayObject);
 3751   __Pyx_XGIVEREF(__pyx_r);
 3752   __Pyx_RefNannyFinishContext();
 3753   return __pyx_r;
 3754 }
 3755 
 3756 /* "randint_helpers.pxi":158
 3757  *         return array
 3758  * 
 3759  * def _rand_int32(npy_int32 low, npy_int32 high, size, rngstate):             # <<<<<<<<<<<<<<
 3760  *     """
 3761  *     _rand_int32(low, high, size, rngstate)
 3762  */
 3763 
 3764 /* Python wrapper */
 3765 static PyObject *__pyx_pw_6mtrand_7_rand_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 3766 static char __pyx_doc_6mtrand_6_rand_int32[] = "\n    _rand_int32(low, high, size, rngstate)