numpy 1.9.3__zip → 1.10.0__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- numpy-1.10.0.post2/INSTALL.txt +200 -0
- numpy-1.10.0.post2/LICENSE.txt +30 -0
- numpy-1.10.0.post2/MANIFEST.in +31 -0
- numpy-1.10.0.post2/PKG-INFO +47 -0
- numpy-1.10.0.post2/cnew.txt +117 -0
- numpy-1.10.0.post2/cold.txt +44 -0
- numpy-1.10.0.post2/committers.txt +160 -0
- numpy-1.10.0.post2/cpre.txt +283 -0
- numpy-1.10.0.post2/crel.txt +161 -0
- numpy-1.10.0.post2/doc/release/1.10.0-notes.rst +439 -0
- numpy-1.10.0.post2/doc/source/conf.py +331 -0
- numpy-1.10.0.post2/doc/source/dev/development_environment.rst +211 -0
- numpy-1.10.0.post2/doc/source/dev/gitwash/development_workflow.rst +534 -0
- numpy-1.10.0.post2/doc/source/dev/gitwash/git_links.inc +95 -0
- numpy-1.10.0.post2/doc/source/dev/gitwash/index.rst +14 -0
- numpy-1.10.0.post2/doc/source/dev/index.rst +11 -0
- numpy-1.10.0.post2/doc/source/reference/arrays.classes.rst +490 -0
- numpy-1.10.0.post2/doc/source/reference/arrays.dtypes.rst +536 -0
- numpy-1.10.0.post2/doc/source/reference/arrays.indexing.rst +549 -0
- numpy-1.10.0.post2/doc/source/reference/arrays.interface.rst +337 -0
- numpy-1.10.0.post2/doc/source/reference/arrays.ndarray.rst +622 -0
- numpy-1.10.0.post2/doc/source/reference/arrays.scalars.rst +291 -0
- numpy-1.10.0.post2/doc/source/reference/c-api.array.rst +3393 -0
- numpy-1.10.0.post2/doc/source/reference/c-api.config.rst +103 -0
- numpy-1.10.0.post2/doc/source/reference/c-api.coremath.rst +420 -0
- numpy-1.10.0.post2/doc/source/reference/c-api.dtype.rst +376 -0
- numpy-1.10.0.post2/doc/source/reference/c-api.generalized-ufuncs.rst +191 -0
- numpy-1.10.0.post2/doc/source/reference/c-api.iterator.rst +1300 -0
- numpy-1.10.0.post2/doc/source/reference/c-api.types-and-structures.rst +1240 -0
- numpy-1.10.0.post2/doc/source/reference/c-api.ufunc.rst +413 -0
- numpy-1.10.0.post2/doc/source/reference/index.rst +43 -0
- numpy-1.10.0.post2/doc/source/reference/internals.code-explanations.rst +615 -0
- numpy-1.10.0.post2/doc/source/reference/routines.array-manipulation.rst +115 -0
- numpy-1.10.0.post2/doc/source/reference/routines.io.rst +78 -0
- numpy-1.10.0.post2/doc/source/reference/routines.linalg.rst +91 -0
- numpy-1.10.0.post2/doc/source/reference/routines.ma.rst +407 -0
- numpy-1.10.0.post2/doc/source/reference/routines.sort.rst +41 -0
- numpy-1.10.0.post2/doc/source/reference/routines.statistics.rst +57 -0
- numpy-1.10.0.post2/doc/source/reference/swig.interface-file.rst +1066 -0
- numpy-1.10.0.post2/doc/source/reference/swig.testing.rst +167 -0
- numpy-1.10.0.post2/doc/source/reference/ufuncs.rst +666 -0
- numpy-1.10.0.post2/doc/source/release.rst +20 -0
- numpy-1.10.0.post2/doc/source/user/basics.io.genfromtxt.rst +531 -0
- numpy-1.10.0.post2/doc/source/user/basics.rec.rst +7 -0
- numpy-1.10.0.post2/doc/source/user/c-info.beyond-basics.rst +560 -0
- numpy-1.10.0.post2/doc/source/user/c-info.how-to-extend.rst +642 -0
- numpy-1.10.0.post2/doc/source/user/c-info.python-as-glue.rst +1177 -0
- numpy-1.10.0.post2/doc/source/user/c-info.ufunc-tutorial.rst +1211 -0
- numpy-1.10.0.post2/doc/source/user/install.rst +194 -0
- numpy-1.10.0.post2/numpy/__init__.py +227 -0
- numpy-1.10.0.post2/numpy/_build_utils/README +8 -0
- numpy-1.10.0.post2/numpy/_build_utils/apple_accelerate.py +21 -0
- numpy-1.10.0.post2/numpy/_build_utils/common.py +138 -0
- numpy-1.10.0.post2/numpy/_build_utils/src/apple_sgemv_fix.c +227 -0
- numpy-1.10.0.post2/numpy/_build_utils/waf.py +531 -0
- numpy-1.10.0.post2/numpy/_import_tools.py +353 -0
- numpy-1.10.0.post2/numpy/add_newdocs.py +7611 -0
- numpy-1.10.0.post2/numpy/compat/_inspect.py +194 -0
- numpy-1.10.0.post2/numpy/compat/py3k.py +88 -0
- numpy-1.10.0.post2/numpy/compat/setup.py +12 -0
- numpy-1.10.0.post2/numpy/core/__init__.py +89 -0
- numpy-1.10.0.post2/numpy/core/_internal.py +761 -0
- numpy-1.10.0.post2/numpy/core/_methods.py +133 -0
- numpy-1.10.0.post2/numpy/core/arrayprint.py +760 -0
- numpy-1.10.0.post2/numpy/core/code_generators/cversions.txt +34 -0
- numpy-1.10.0.post2/numpy/core/code_generators/generate_ufunc_api.py +219 -0
- numpy-1.10.0.post2/numpy/core/code_generators/generate_umath.py +1017 -0
- numpy-1.10.0.post2/numpy/core/code_generators/numpy_api.py +415 -0
- numpy-1.10.0.post2/numpy/core/code_generators/ufunc_docstrings.py +3442 -0
- numpy-1.10.0.post2/numpy/core/defchararray.py +2689 -0
- numpy-1.10.0.post2/numpy/core/fromnumeric.py +3089 -0
- numpy-1.10.0.post2/numpy/core/function_base.py +203 -0
- numpy-1.10.0.post2/numpy/core/getlimits.py +308 -0
- numpy-1.10.0.post2/numpy/core/include/numpy/ndarrayobject.h +246 -0
- numpy-1.10.0.post2/numpy/core/include/numpy/ndarraytypes.h +1797 -0
- numpy-1.10.0.post2/numpy/core/include/numpy/npy_3kcompat.h +448 -0
- numpy-1.10.0.post2/numpy/core/include/numpy/npy_common.h +1051 -0
- numpy-1.10.0.post2/numpy/core/include/numpy/npy_cpu.h +92 -0
- numpy-1.10.0.post2/numpy/core/include/numpy/npy_endian.h +61 -0
- numpy-1.10.0.post2/numpy/core/include/numpy/npy_math.h +525 -0
- numpy-1.10.0.post2/numpy/core/include/numpy/numpyconfig.h +36 -0
- numpy-1.10.0.post2/numpy/core/machar.py +342 -0
- numpy-1.10.0.post2/numpy/core/memmap.py +311 -0
- numpy-1.10.0.post2/numpy/core/numeric.py +2893 -0
- numpy-1.10.0.post2/numpy/core/numerictypes.py +1036 -0
- numpy-1.10.0.post2/numpy/core/records.py +846 -0
- numpy-1.10.0.post2/numpy/core/setup.py +983 -0
- numpy-1.10.0.post2/numpy/core/setup_common.py +352 -0
- numpy-1.10.0.post2/numpy/core/shape_base.py +350 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/alloc.c +244 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/arrayobject.c +1858 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/arraytypes.c.src +4738 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/arraytypes.h +37 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/buffer.c +981 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/calculation.c +1224 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/cblasfuncs.c +812 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/cblasfuncs.h +10 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/common.c +911 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/common.h +250 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/compiled_base.c +1664 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/compiled_base.h +24 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/conversion_utils.c +1217 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/convert.c +590 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/convert_datatype.c +2155 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/ctors.c +3838 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/datetime.c +3821 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/datetime_busday.c +1322 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/datetime_busdaycal.c +552 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/datetime_strings.c +1772 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/descriptor.c +3719 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/dtype_transfer.c +4239 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/einsum.c.src +3005 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/getset.c +986 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/hashdescr.c +318 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/item_selection.c +2413 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/iterators.c +2192 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/lowlevel_strided_loops.c.src +1769 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/mapping.c +3380 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/mapping.h +77 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/methods.c +2514 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/multiarray_tests.c.src +1035 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/multiarraymodule.c +4628 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/multiarraymodule.h +15 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/nditer_api.c +2809 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/nditer_constr.c +3160 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/nditer_pywrap.c +2499 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/number.c +1106 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/number.h +77 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/numpymemoryview.c +308 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/numpyos.c +683 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/scalarapi.c +870 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/scalartypes.c.src +4343 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/scalartypes.h +55 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/shape.c +1131 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/ucsnarrow.c +174 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/vdot.c +180 -0
- numpy-1.10.0.post2/numpy/core/src/multiarray/vdot.h +18 -0
- numpy-1.10.0.post2/numpy/core/src/npymath/ieee754.c.src +808 -0
- numpy-1.10.0.post2/numpy/core/src/npymath/npy_math.c.src +597 -0
- numpy-1.10.0.post2/numpy/core/src/npymath/npy_math_complex.c.src +1788 -0
- numpy-1.10.0.post2/numpy/core/src/npymath/npy_math_private.h +544 -0
- numpy-1.10.0.post2/numpy/core/src/npysort/heapsort.c.src +402 -0
- numpy-1.10.0.post2/numpy/core/src/npysort/mergesort.c.src +488 -0
- numpy-1.10.0.post2/numpy/core/src/npysort/npysort_common.h +360 -0
- numpy-1.10.0.post2/numpy/core/src/npysort/quicksort.c.src +523 -0
- numpy-1.10.0.post2/numpy/core/src/npysort/selection.c.src +426 -0
- numpy-1.10.0.post2/numpy/core/src/private/npy_cblas.h +584 -0
- numpy-1.10.0.post2/numpy/core/src/private/npy_config.h +101 -0
- numpy-1.10.0.post2/numpy/core/src/private/npy_import.h +32 -0
- numpy-1.10.0.post2/numpy/core/src/private/npy_partition.h.src +122 -0
- numpy-1.10.0.post2/numpy/core/src/private/npy_sort.h +196 -0
- numpy-1.10.0.post2/numpy/core/src/private/templ_common.h.src +43 -0
- numpy-1.10.0.post2/numpy/core/src/private/ufunc_override.h +397 -0
- numpy-1.10.0.post2/numpy/core/src/umath/funcs.inc.src +356 -0
- numpy-1.10.0.post2/numpy/core/src/umath/loops.c.src +2675 -0
- numpy-1.10.0.post2/numpy/core/src/umath/loops.h.src +497 -0
- numpy-1.10.0.post2/numpy/core/src/umath/operand_flag_tests.c.src +105 -0
- numpy-1.10.0.post2/numpy/core/src/umath/scalarmath.c.src +1738 -0
- numpy-1.10.0.post2/numpy/core/src/umath/simd.inc.src +903 -0
- numpy-1.10.0.post2/numpy/core/src/umath/test_rational.c.src +1404 -0
- numpy-1.10.0.post2/numpy/core/src/umath/ufunc_object.c +5703 -0
- numpy-1.10.0.post2/numpy/core/src/umath/ufunc_type_resolution.c +2159 -0
- numpy-1.10.0.post2/numpy/core/src/umath/umath_tests.c.src +392 -0
- numpy-1.10.0.post2/numpy/core/src/umath/umathmodule.c +443 -0
- numpy-1.10.0.post2/numpy/core/tests/test_abc.py +47 -0
- numpy-1.10.0.post2/numpy/core/tests/test_api.py +515 -0
- numpy-1.10.0.post2/numpy/core/tests/test_arrayprint.py +171 -0
- numpy-1.10.0.post2/numpy/core/tests/test_datetime.py +1820 -0
- numpy-1.10.0.post2/numpy/core/tests/test_defchararray.py +703 -0
- numpy-1.10.0.post2/numpy/core/tests/test_deprecations.py +619 -0
- numpy-1.10.0.post2/numpy/core/tests/test_dtype.py +578 -0
- numpy-1.10.0.post2/numpy/core/tests/test_einsum.py +627 -0
- numpy-1.10.0.post2/numpy/core/tests/test_errstate.py +52 -0
- numpy-1.10.0.post2/numpy/core/tests/test_function_base.py +142 -0
- numpy-1.10.0.post2/numpy/core/tests/test_getlimits.py +77 -0
- numpy-1.10.0.post2/numpy/core/tests/test_half.py +436 -0
- numpy-1.10.0.post2/numpy/core/tests/test_indexerrors.py +126 -0
- numpy-1.10.0.post2/numpy/core/tests/test_indexing.py +1047 -0
- numpy-1.10.0.post2/numpy/core/tests/test_item_selection.py +73 -0
- numpy-1.10.0.post2/numpy/core/tests/test_machar.py +29 -0
- numpy-1.10.0.post2/numpy/core/tests/test_memmap.py +130 -0
- numpy-1.10.0.post2/numpy/core/tests/test_multiarray.py +5924 -0
- numpy-1.10.0.post2/numpy/core/tests/test_multiarray_assignment.py +84 -0
- numpy-1.10.0.post2/numpy/core/tests/test_nditer.py +2638 -0
- numpy-1.10.0.post2/numpy/core/tests/test_numeric.py +2204 -0
- numpy-1.10.0.post2/numpy/core/tests/test_numerictypes.py +382 -0
- numpy-1.10.0.post2/numpy/core/tests/test_print.py +248 -0
- numpy-1.10.0.post2/numpy/core/tests/test_records.py +299 -0
- numpy-1.10.0.post2/numpy/core/tests/test_regression.py +2177 -0
- numpy-1.10.0.post2/numpy/core/tests/test_scalarinherit.py +41 -0
- numpy-1.10.0.post2/numpy/core/tests/test_scalarmath.py +316 -0
- numpy-1.10.0.post2/numpy/core/tests/test_shape_base.py +319 -0
- numpy-1.10.0.post2/numpy/core/tests/test_ufunc.py +1227 -0
- numpy-1.10.0.post2/numpy/core/tests/test_umath.py +1933 -0
- numpy-1.10.0.post2/numpy/core/tests/test_umath_complex.py +538 -0
- numpy-1.10.0.post2/numpy/core/tests/test_unicode.py +360 -0
- numpy-1.10.0.post2/numpy/distutils/__init__.py +23 -0
- numpy-1.10.0.post2/numpy/distutils/ccompiler.py +690 -0
- numpy-1.10.0.post2/numpy/distutils/command/autodist.py +94 -0
- numpy-1.10.0.post2/numpy/distutils/command/build.py +47 -0
- numpy-1.10.0.post2/numpy/distutils/command/build_clib.py +295 -0
- numpy-1.10.0.post2/numpy/distutils/command/build_ext.py +522 -0
- numpy-1.10.0.post2/numpy/distutils/command/config.py +437 -0
- numpy-1.10.0.post2/numpy/distutils/exec_command.py +651 -0
- numpy-1.10.0.post2/numpy/distutils/fcompiler/compaq.py +128 -0
- numpy-1.10.0.post2/numpy/distutils/fcompiler/gnu.py +403 -0
- numpy-1.10.0.post2/numpy/distutils/fcompiler/intel.py +217 -0
- numpy-1.10.0.post2/numpy/distutils/fcompiler/pg.py +63 -0
- numpy-1.10.0.post2/numpy/distutils/fcompiler/sun.py +55 -0
- numpy-1.10.0.post2/numpy/distutils/intelccompiler.py +95 -0
- numpy-1.10.0.post2/numpy/distutils/lib2def.py +116 -0
- numpy-1.10.0.post2/numpy/distutils/mingw32ccompiler.py +599 -0
- numpy-1.10.0.post2/numpy/distutils/misc_util.py +2306 -0
- numpy-1.10.0.post2/numpy/distutils/msvc9compiler.py +23 -0
- numpy-1.10.0.post2/numpy/distutils/msvccompiler.py +17 -0
- numpy-1.10.0.post2/numpy/distutils/npy_pkg_config.py +451 -0
- numpy-1.10.0.post2/numpy/distutils/system_info.py +2397 -0
- numpy-1.10.0.post2/numpy/distutils/tests/f2py_ext/tests/test_fib2.py +12 -0
- numpy-1.10.0.post2/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py +11 -0
- numpy-1.10.0.post2/numpy/distutils/tests/gen_ext/tests/test_fib3.py +11 -0
- numpy-1.10.0.post2/numpy/distutils/tests/pyrex_ext/tests/test_primes.py +13 -0
- numpy-1.10.0.post2/numpy/distutils/tests/swig_ext/__init__.py +1 -0
- numpy-1.10.0.post2/numpy/distutils/tests/swig_ext/tests/test_example.py +17 -0
- numpy-1.10.0.post2/numpy/distutils/tests/swig_ext/tests/test_example2.py +15 -0
- numpy-1.10.0.post2/numpy/distutils/tests/test_fcompiler_gnu.py +60 -0
- numpy-1.10.0.post2/numpy/distutils/tests/test_fcompiler_intel.py +36 -0
- numpy-1.10.0.post2/numpy/distutils/tests/test_misc_util.py +79 -0
- numpy-1.10.0.post2/numpy/distutils/tests/test_npy_pkg_config.py +102 -0
- numpy-1.10.0.post2/numpy/distutils/tests/test_system_info.py +209 -0
- numpy-1.10.0.post2/numpy/distutils/unixccompiler.py +125 -0
- numpy-1.10.0.post2/numpy/doc/byteswapping.py +156 -0
- numpy-1.10.0.post2/numpy/doc/creation.py +144 -0
- numpy-1.10.0.post2/numpy/doc/glossary.py +423 -0
- numpy-1.10.0.post2/numpy/doc/indexing.py +439 -0
- numpy-1.10.0.post2/numpy/doc/structured_arrays.py +290 -0
- numpy-1.10.0.post2/numpy/f2py/__init__.py +49 -0
- numpy-1.10.0.post2/numpy/f2py/__main__.py +25 -0
- numpy-1.10.0.post2/numpy/f2py/auxfuncs.py +858 -0
- numpy-1.10.0.post2/numpy/f2py/capi_maps.py +851 -0
- numpy-1.10.0.post2/numpy/f2py/cb_rules.py +554 -0
- numpy-1.10.0.post2/numpy/f2py/cfuncs.py +1261 -0
- numpy-1.10.0.post2/numpy/f2py/common_rules.py +150 -0
- numpy-1.10.0.post2/numpy/f2py/crackfortran.py +3314 -0
- numpy-1.10.0.post2/numpy/f2py/diagnose.py +156 -0
- numpy-1.10.0.post2/numpy/f2py/f2py2e.py +656 -0
- numpy-1.10.0.post2/numpy/f2py/f2py_testing.py +48 -0
- numpy-1.10.0.post2/numpy/f2py/f90mod_rules.py +272 -0
- numpy-1.10.0.post2/numpy/f2py/func2subr.py +299 -0
- numpy-1.10.0.post2/numpy/f2py/rules.py +1475 -0
- numpy-1.10.0.post2/numpy/f2py/setup.py +117 -0
- numpy-1.10.0.post2/numpy/f2py/src/fortranobject.c +1037 -0
- numpy-1.10.0.post2/numpy/f2py/src/fortranobject.h +162 -0
- numpy-1.10.0.post2/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c +223 -0
- numpy-1.10.0.post2/numpy/f2py/tests/test_array_from_pyobj.py +593 -0
- numpy-1.10.0.post2/numpy/f2py/tests/test_assumed_shape.py +35 -0
- numpy-1.10.0.post2/numpy/f2py/tests/test_callback.py +136 -0
- numpy-1.10.0.post2/numpy/f2py/tests/test_kind.py +36 -0
- numpy-1.10.0.post2/numpy/f2py/tests/test_mixed.py +40 -0
- numpy-1.10.0.post2/numpy/f2py/tests/test_regression.py +34 -0
- numpy-1.10.0.post2/numpy/f2py/tests/test_return_character.py +148 -0
- numpy-1.10.0.post2/numpy/f2py/tests/test_return_complex.py +170 -0
- numpy-1.10.0.post2/numpy/f2py/tests/test_return_integer.py +180 -0
- numpy-1.10.0.post2/numpy/f2py/tests/test_return_logical.py +189 -0
- numpy-1.10.0.post2/numpy/f2py/tests/test_return_real.py +206 -0
- numpy-1.10.0.post2/numpy/f2py/tests/test_size.py +44 -0
- numpy-1.10.0.post2/numpy/f2py/tests/util.py +367 -0
- numpy-1.10.0.post2/numpy/f2py/use_rules.py +115 -0
- numpy-1.10.0.post2/numpy/fft/fftpack.c +1501 -0
- numpy-1.10.0.post2/numpy/fft/fftpack.h +28 -0
- numpy-1.10.0.post2/numpy/fft/fftpack.py +1241 -0
- numpy-1.10.0.post2/numpy/fft/fftpack_litemodule.c +363 -0
- numpy-1.10.0.post2/numpy/fft/info.py +187 -0
- numpy-1.10.0.post2/numpy/fft/setup.py +19 -0
- numpy-1.10.0.post2/numpy/fft/tests/test_fftpack.py +166 -0
- numpy-1.10.0.post2/numpy/fft/tests/test_helper.py +78 -0
- numpy-1.10.0.post2/numpy/lib/_iotools.py +917 -0
- numpy-1.10.0.post2/numpy/lib/arraypad.py +1497 -0
- numpy-1.10.0.post2/numpy/lib/arraysetops.py +480 -0
- numpy-1.10.0.post2/numpy/lib/arrayterator.py +226 -0
- numpy-1.10.0.post2/numpy/lib/financial.py +737 -0
- numpy-1.10.0.post2/numpy/lib/format.py +814 -0
- numpy-1.10.0.post2/numpy/lib/function_base.py +4150 -0
- numpy-1.10.0.post2/numpy/lib/index_tricks.py +874 -0
- numpy-1.10.0.post2/numpy/lib/info.py +152 -0
- numpy-1.10.0.post2/numpy/lib/nanfunctions.py +1237 -0
- numpy-1.10.0.post2/numpy/lib/npyio.py +1992 -0
- numpy-1.10.0.post2/numpy/lib/polynomial.py +1277 -0
- numpy-1.10.0.post2/numpy/lib/recfunctions.py +1003 -0
- numpy-1.10.0.post2/numpy/lib/setup.py +12 -0
- numpy-1.10.0.post2/numpy/lib/shape_base.py +872 -0
- numpy-1.10.0.post2/numpy/lib/stride_tricks.py +200 -0
- numpy-1.10.0.post2/numpy/lib/tests/data/py2-objarr.npy +0 -0
- numpy-1.10.0.post2/numpy/lib/tests/data/py2-objarr.npz +0 -0
- numpy-1.10.0.post2/numpy/lib/tests/data/py3-objarr.npy +0 -0
- numpy-1.10.0.post2/numpy/lib/tests/data/py3-objarr.npz +0 -0
- numpy-1.10.0.post2/numpy/lib/tests/test__iotools.py +348 -0
- numpy-1.10.0.post2/numpy/lib/tests/test__version.py +70 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_arraypad.py +1047 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_arraysetops.py +309 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_financial.py +163 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_format.py +841 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_function_base.py +2555 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_index_tricks.py +326 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_io.py +1916 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_nanfunctions.py +707 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_packbits.py +26 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_polynomial.py +188 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_recfunctions.py +734 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_shape_base.py +386 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_stride_tricks.py +405 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_twodim_base.py +535 -0
- numpy-1.10.0.post2/numpy/lib/tests/test_type_check.py +332 -0
- numpy-1.10.0.post2/numpy/lib/twodim_base.py +1007 -0
- numpy-1.10.0.post2/numpy/lib/type_check.py +596 -0
- numpy-1.10.0.post2/numpy/lib/utils.py +1122 -0
- numpy-1.10.0.post2/numpy/linalg/lapack_lite/python_xerbla.c +46 -0
- numpy-1.10.0.post2/numpy/linalg/lapack_litemodule.c +358 -0
- numpy-1.10.0.post2/numpy/linalg/linalg.py +2406 -0
- numpy-1.10.0.post2/numpy/linalg/tests/test_build.py +59 -0
- numpy-1.10.0.post2/numpy/linalg/tests/test_linalg.py +1351 -0
- numpy-1.10.0.post2/numpy/linalg/tests/test_regression.py +95 -0
- numpy-1.10.0.post2/numpy/linalg/umath_linalg.c.src +3236 -0
- numpy-1.10.0.post2/numpy/ma/__init__.py +56 -0
- numpy-1.10.0.post2/numpy/ma/bench.py +131 -0
- numpy-1.10.0.post2/numpy/ma/core.py +7608 -0
- numpy-1.10.0.post2/numpy/ma/extras.py +1953 -0
- numpy-1.10.0.post2/numpy/ma/mrecords.py +796 -0
- numpy-1.10.0.post2/numpy/ma/setup.py +13 -0
- numpy-1.10.0.post2/numpy/ma/tests/test_core.py +4100 -0
- numpy-1.10.0.post2/numpy/ma/tests/test_extras.py +1132 -0
- numpy-1.10.0.post2/numpy/ma/tests/test_mrecords.py +520 -0
- numpy-1.10.0.post2/numpy/ma/tests/test_old_ma.py +879 -0
- numpy-1.10.0.post2/numpy/ma/tests/test_regression.py +80 -0
- numpy-1.10.0.post2/numpy/ma/tests/test_subclassing.py +338 -0
- numpy-1.10.0.post2/numpy/ma/testutils.py +289 -0
- numpy-1.10.0.post2/numpy/ma/timer_comparison.py +440 -0
- numpy-1.10.0.post2/numpy/matlib.py +358 -0
- numpy-1.10.0.post2/numpy/matrixlib/defmatrix.py +1232 -0
- numpy-1.10.0.post2/numpy/matrixlib/tests/test_defmatrix.py +449 -0
- numpy-1.10.0.post2/numpy/matrixlib/tests/test_multiarray.py +23 -0
- numpy-1.10.0.post2/numpy/matrixlib/tests/test_numeric.py +23 -0
- numpy-1.10.0.post2/numpy/matrixlib/tests/test_regression.py +37 -0
- numpy-1.10.0.post2/numpy/polynomial/_polybase.py +962 -0
- numpy-1.10.0.post2/numpy/polynomial/chebyshev.py +2056 -0
- numpy-1.10.0.post2/numpy/polynomial/hermite.py +1831 -0
- numpy-1.10.0.post2/numpy/polynomial/hermite_e.py +1828 -0
- numpy-1.10.0.post2/numpy/polynomial/laguerre.py +1780 -0
- numpy-1.10.0.post2/numpy/polynomial/legendre.py +1808 -0
- numpy-1.10.0.post2/numpy/polynomial/polyutils.py +403 -0
- numpy-1.10.0.post2/numpy/random/mtrand/distributions.c +912 -0
- numpy-1.10.0.post2/numpy/random/mtrand/mtrand.c +34805 -0
- numpy-1.10.0.post2/numpy/random/mtrand/mtrand.pyx +4766 -0
- numpy-1.10.0.post2/numpy/random/setup.py +61 -0
- numpy-1.10.0.post2/numpy/random/tests/test_random.py +723 -0
- numpy-1.10.0.post2/numpy/random/tests/test_regression.py +117 -0
- numpy-1.10.0.post2/numpy/setup.py +29 -0
- numpy-1.10.0.post2/numpy/testing/__init__.py +15 -0
- numpy-1.10.0.post2/numpy/testing/decorators.py +271 -0
- numpy-1.10.0.post2/numpy/testing/noseclasses.py +353 -0
- numpy-1.10.0.post2/numpy/testing/nosetester.py +511 -0
- numpy-1.10.0.post2/numpy/testing/print_coercion_tables.py +91 -0
- numpy-1.10.0.post2/numpy/testing/setup.py +20 -0
- numpy-1.10.0.post2/numpy/testing/tests/test_decorators.py +182 -0
- numpy-1.10.0.post2/numpy/testing/tests/test_utils.py +781 -0
- numpy-1.10.0.post2/numpy/testing/utils.py +1831 -0
- numpy-1.10.0.post2/numpy/tests/test_ctypeslib.py +106 -0
- numpy-1.10.0.post2/numpy/tests/test_matlib.py +55 -0
- numpy-1.10.0.post2/numpy/tests/test_scripts.py +69 -0
- numpy-1.10.0.post2/numpy/version.py +10 -0
- numpy-1.10.0.post2/setup.py +260 -0
- numpy-1.10.0.post2/site.cfg.example +193 -0
- numpy-1.10.0.post2/tmp.txt +789 -0
- numpy-1.10.0.post2/tools/swig/README +145 -0
- numpy-1.10.0.post2/tools/swig/numpy.i +3161 -0
- numpy-1.10.0.post2/tools/swig/test/Array.i +135 -0
- numpy-1.10.0.post2/tools/swig/test/ArrayZ.cxx +131 -0
- numpy-1.10.0.post2/tools/swig/test/ArrayZ.h +56 -0
- numpy-1.10.0.post2/tools/swig/test/Flat.cxx +36 -0
- numpy-1.10.0.post2/tools/swig/test/Flat.h +34 -0
- numpy-1.10.0.post2/tools/swig/test/Flat.i +36 -0
- numpy-1.10.0.post2/tools/swig/test/Makefile +37 -0
- numpy-1.10.0.post2/tools/swig/test/setup.py +71 -0
- numpy-1.10.0.post2/tools/swig/test/testArray.py +385 -0
- numpy-1.10.0.post2/tools/swig/test/testFarray.py +159 -0
- numpy-1.10.0.post2/tools/swig/test/testFlat.py +200 -0
- numpy-1.10.0.post2/tools/swig/test/testFortran.py +173 -0
- numpy-1.10.0.post2/tools/swig/test/testMatrix.py +362 -0
- numpy-1.10.0.post2/tools/swig/test/testSuperTensor.py +388 -0
- numpy-1.10.0.post2/tools/swig/test/testTensor.py +402 -0
- numpy-1.10.0.post2/tools/swig/test/testVector.py +381 -0
- numpy-1.9.3/INSTALL.txt +0 -138
- numpy-1.9.3/LICENSE.txt +0 -30
- numpy-1.9.3/MANIFEST.in +0 -26
- numpy-1.9.3/PKG-INFO +0 -39
- numpy-1.9.3/doc/release/1.9.3-notes.rst +0 -23
- numpy-1.9.3/doc/source/conf.py +0 -331
- numpy-1.9.3/doc/source/dev/gitwash/branch_list.png +0 -0
- numpy-1.9.3/doc/source/dev/gitwash/branch_list_compare.png +0 -0
- numpy-1.9.3/doc/source/dev/gitwash/development_workflow.rst +0 -568
- numpy-1.9.3/doc/source/dev/gitwash/git_links.inc +0 -88
- numpy-1.9.3/doc/source/dev/gitwash/index.rst +0 -14
- numpy-1.9.3/doc/source/dev/index.rst +0 -10
- numpy-1.9.3/doc/source/reference/arrays.classes.rst +0 -427
- numpy-1.9.3/doc/source/reference/arrays.dtypes.rst +0 -534
- numpy-1.9.3/doc/source/reference/arrays.indexing.rst +0 -550
- numpy-1.9.3/doc/source/reference/arrays.interface.rst +0 -336
- numpy-1.9.3/doc/source/reference/arrays.ndarray.rst +0 -609
- numpy-1.9.3/doc/source/reference/arrays.scalars.rst +0 -291
- numpy-1.9.3/doc/source/reference/c-api.array.rst +0 -3362
- numpy-1.9.3/doc/source/reference/c-api.config.rst +0 -103
- numpy-1.9.3/doc/source/reference/c-api.coremath.rst +0 -420
- numpy-1.9.3/doc/source/reference/c-api.dtype.rst +0 -376
- numpy-1.9.3/doc/source/reference/c-api.generalized-ufuncs.rst +0 -171
- numpy-1.9.3/doc/source/reference/c-api.iterator.rst +0 -1298
- numpy-1.9.3/doc/source/reference/c-api.types-and-structures.rst +0 -1204
- numpy-1.9.3/doc/source/reference/c-api.ufunc.rst +0 -399
- numpy-1.9.3/doc/source/reference/index.rst +0 -44
- numpy-1.9.3/doc/source/reference/internals.code-explanations.rst +0 -666
- numpy-1.9.3/doc/source/reference/routines.array-manipulation.rst +0 -113
- numpy-1.9.3/doc/source/reference/routines.io.rst +0 -74
- numpy-1.9.3/doc/source/reference/routines.linalg.rst +0 -88
- numpy-1.9.3/doc/source/reference/routines.ma.rst +0 -405
- numpy-1.9.3/doc/source/reference/routines.sort.rst +0 -42
- numpy-1.9.3/doc/source/reference/routines.statistics.rst +0 -55
- numpy-1.9.3/doc/source/reference/swig.interface-file.rst +0 -1055
- numpy-1.9.3/doc/source/reference/swig.testing.rst +0 -166
- numpy-1.9.3/doc/source/reference/ufuncs.rst +0 -651
- numpy-1.9.3/doc/source/release.rst +0 -19
- numpy-1.9.3/doc/source/user/basics.io.genfromtxt.rst +0 -531
- numpy-1.9.3/doc/source/user/basics.rec.rst +0 -7
- numpy-1.9.3/doc/source/user/c-info.beyond-basics.rst +0 -560
- numpy-1.9.3/doc/source/user/c-info.how-to-extend.rst +0 -642
- numpy-1.9.3/doc/source/user/c-info.python-as-glue.rst +0 -1528
- numpy-1.9.3/doc/source/user/c-info.ufunc-tutorial.rst +0 -1211
- numpy-1.9.3/doc/source/user/install.rst +0 -180
- numpy-1.9.3/numpy/__init__.py +0 -216
- numpy-1.9.3/numpy/_import_tools.py +0 -348
- numpy-1.9.3/numpy/add_newdocs.py +0 -7518
- numpy-1.9.3/numpy/compat/_inspect.py +0 -221
- numpy-1.9.3/numpy/compat/py3k.py +0 -89
- numpy-1.9.3/numpy/compat/setup.py +0 -12
- numpy-1.9.3/numpy/core/__init__.py +0 -78
- numpy-1.9.3/numpy/core/_internal.py +0 -570
- numpy-1.9.3/numpy/core/_methods.py +0 -134
- numpy-1.9.3/numpy/core/arrayprint.py +0 -752
- numpy-1.9.3/numpy/core/blasdot/_dotblas.c +0 -1255
- numpy-1.9.3/numpy/core/blasdot/apple_sgemv_patch.c +0 -216
- numpy-1.9.3/numpy/core/blasdot/cblas.h +0 -578
- numpy-1.9.3/numpy/core/code_generators/cversions.txt +0 -31
- numpy-1.9.3/numpy/core/code_generators/generate_ufunc_api.py +0 -219
- numpy-1.9.3/numpy/core/code_generators/generate_umath.py +0 -972
- numpy-1.9.3/numpy/core/code_generators/numpy_api.py +0 -412
- numpy-1.9.3/numpy/core/code_generators/ufunc_docstrings.py +0 -3419
- numpy-1.9.3/numpy/core/defchararray.py +0 -2687
- numpy-1.9.3/numpy/core/fromnumeric.py +0 -2938
- numpy-1.9.3/numpy/core/function_base.py +0 -190
- numpy-1.9.3/numpy/core/getlimits.py +0 -306
- numpy-1.9.3/numpy/core/include/numpy/fenv/fenv.c +0 -38
- numpy-1.9.3/numpy/core/include/numpy/fenv/fenv.h +0 -224
- numpy-1.9.3/numpy/core/include/numpy/ndarrayobject.h +0 -237
- numpy-1.9.3/numpy/core/include/numpy/ndarraytypes.h +0 -1820
- numpy-1.9.3/numpy/core/include/numpy/npy_3kcompat.h +0 -506
- numpy-1.9.3/numpy/core/include/numpy/npy_common.h +0 -1038
- numpy-1.9.3/numpy/core/include/numpy/npy_cpu.h +0 -122
- numpy-1.9.3/numpy/core/include/numpy/npy_endian.h +0 -49
- numpy-1.9.3/numpy/core/include/numpy/npy_math.h +0 -479
- numpy-1.9.3/numpy/core/include/numpy/numpyconfig.h +0 -35
- numpy-1.9.3/numpy/core/machar.py +0 -338
- numpy-1.9.3/numpy/core/memmap.py +0 -308
- numpy-1.9.3/numpy/core/numeric.py +0 -2842
- numpy-1.9.3/numpy/core/numerictypes.py +0 -1042
- numpy-1.9.3/numpy/core/records.py +0 -804
- numpy-1.9.3/numpy/core/setup.py +0 -1016
- numpy-1.9.3/numpy/core/setup_common.py +0 -330
- numpy-1.9.3/numpy/core/shape_base.py +0 -277
- numpy-1.9.3/numpy/core/src/multiarray/alloc.c +0 -241
- numpy-1.9.3/numpy/core/src/multiarray/arrayobject.c +0 -1791
- numpy-1.9.3/numpy/core/src/multiarray/arraytypes.c.src +0 -4372
- numpy-1.9.3/numpy/core/src/multiarray/arraytypes.h +0 -13
- numpy-1.9.3/numpy/core/src/multiarray/buffer.c +0 -954
- numpy-1.9.3/numpy/core/src/multiarray/calculation.c +0 -1229
- numpy-1.9.3/numpy/core/src/multiarray/common.c +0 -798
- numpy-1.9.3/numpy/core/src/multiarray/common.h +0 -328
- numpy-1.9.3/numpy/core/src/multiarray/conversion_utils.c +0 -1240
- numpy-1.9.3/numpy/core/src/multiarray/convert.c +0 -589
- numpy-1.9.3/numpy/core/src/multiarray/convert_datatype.c +0 -2199
- numpy-1.9.3/numpy/core/src/multiarray/ctors.c +0 -3785
- numpy-1.9.3/numpy/core/src/multiarray/datetime.c +0 -3823
- numpy-1.9.3/numpy/core/src/multiarray/datetime_busday.c +0 -1322
- numpy-1.9.3/numpy/core/src/multiarray/datetime_busdaycal.c +0 -552
- numpy-1.9.3/numpy/core/src/multiarray/datetime_strings.c +0 -1772
- numpy-1.9.3/numpy/core/src/multiarray/descriptor.c +0 -3658
- numpy-1.9.3/numpy/core/src/multiarray/dtype_transfer.c +0 -4232
- numpy-1.9.3/numpy/core/src/multiarray/einsum.c.src +0 -3013
- numpy-1.9.3/numpy/core/src/multiarray/getset.c +0 -984
- numpy-1.9.3/numpy/core/src/multiarray/hashdescr.c +0 -319
- numpy-1.9.3/numpy/core/src/multiarray/item_selection.c +0 -2711
- numpy-1.9.3/numpy/core/src/multiarray/iterators.c +0 -2160
- numpy-1.9.3/numpy/core/src/multiarray/lowlevel_strided_loops.c.src +0 -1767
- numpy-1.9.3/numpy/core/src/multiarray/mapping.c +0 -3316
- numpy-1.9.3/numpy/core/src/multiarray/mapping.h +0 -73
- numpy-1.9.3/numpy/core/src/multiarray/methods.c +0 -2497
- numpy-1.9.3/numpy/core/src/multiarray/multiarray_tests.c.src +0 -977
- numpy-1.9.3/numpy/core/src/multiarray/multiarraymodule.c +0 -4200
- numpy-1.9.3/numpy/core/src/multiarray/multiarraymodule.h +0 -4
- numpy-1.9.3/numpy/core/src/multiarray/nditer_api.c +0 -2809
- numpy-1.9.3/numpy/core/src/multiarray/nditer_constr.c +0 -3159
- numpy-1.9.3/numpy/core/src/multiarray/nditer_pywrap.c +0 -2492
- numpy-1.9.3/numpy/core/src/multiarray/number.c +0 -1057
- numpy-1.9.3/numpy/core/src/multiarray/number.h +0 -76
- numpy-1.9.3/numpy/core/src/multiarray/numpymemoryview.c +0 -309
- numpy-1.9.3/numpy/core/src/multiarray/numpyos.c +0 -683
- numpy-1.9.3/numpy/core/src/multiarray/scalarapi.c +0 -861
- numpy-1.9.3/numpy/core/src/multiarray/scalartypes.c.src +0 -4270
- numpy-1.9.3/numpy/core/src/multiarray/scalartypes.h +0 -52
- numpy-1.9.3/numpy/core/src/multiarray/shape.c +0 -1141
- numpy-1.9.3/numpy/core/src/multiarray/ucsnarrow.c +0 -173
- numpy-1.9.3/numpy/core/src/npymath/ieee754.c.src +0 -814
- numpy-1.9.3/numpy/core/src/npymath/npy_math.c.src +0 -527
- numpy-1.9.3/numpy/core/src/npymath/npy_math_complex.c.src +0 -291
- numpy-1.9.3/numpy/core/src/npymath/npy_math_private.h +0 -539
- numpy-1.9.3/numpy/core/src/npysort/heapsort.c.src +0 -341
- numpy-1.9.3/numpy/core/src/npysort/mergesort.c.src +0 -428
- numpy-1.9.3/numpy/core/src/npysort/npysort_common.h +0 -367
- numpy-1.9.3/numpy/core/src/npysort/quicksort.c.src +0 -363
- numpy-1.9.3/numpy/core/src/npysort/selection.c.src +0 -474
- numpy-1.9.3/numpy/core/src/private/npy_config.h +0 -68
- numpy-1.9.3/numpy/core/src/private/npy_partition.h.src +0 -138
- numpy-1.9.3/numpy/core/src/private/npy_sort.h +0 -194
- numpy-1.9.3/numpy/core/src/private/scalarmathmodule.h.src +0 -42
- numpy-1.9.3/numpy/core/src/private/ufunc_override.h +0 -384
- numpy-1.9.3/numpy/core/src/scalarmathmodule.c.src +0 -1980
- numpy-1.9.3/numpy/core/src/umath/funcs.inc.src +0 -715
- numpy-1.9.3/numpy/core/src/umath/loops.c.src +0 -2654
- numpy-1.9.3/numpy/core/src/umath/loops.h.src +0 -501
- numpy-1.9.3/numpy/core/src/umath/operand_flag_tests.c.src +0 -105
- numpy-1.9.3/numpy/core/src/umath/simd.inc.src +0 -881
- numpy-1.9.3/numpy/core/src/umath/test_rational.c.src +0 -1404
- numpy-1.9.3/numpy/core/src/umath/ufunc_object.c +0 -5520
- numpy-1.9.3/numpy/core/src/umath/ufunc_type_resolution.c +0 -2164
- numpy-1.9.3/numpy/core/src/umath/umath_tests.c.src +0 -341
- numpy-1.9.3/numpy/core/src/umath/umathmodule.c +0 -561
- numpy-1.9.3/numpy/core/tests/test_abc.py +0 -45
- numpy-1.9.3/numpy/core/tests/test_api.py +0 -514
- numpy-1.9.3/numpy/core/tests/test_arrayprint.py +0 -167
- numpy-1.9.3/numpy/core/tests/test_blasdot.py +0 -249
- numpy-1.9.3/numpy/core/tests/test_datetime.py +0 -1781
- numpy-1.9.3/numpy/core/tests/test_defchararray.py +0 -642
- numpy-1.9.3/numpy/core/tests/test_deprecations.py +0 -512
- numpy-1.9.3/numpy/core/tests/test_dtype.py +0 -542
- numpy-1.9.3/numpy/core/tests/test_einsum.py +0 -583
- numpy-1.9.3/numpy/core/tests/test_errstate.py +0 -51
- numpy-1.9.3/numpy/core/tests/test_function_base.py +0 -111
- numpy-1.9.3/numpy/core/tests/test_getlimits.py +0 -86
- numpy-1.9.3/numpy/core/tests/test_half.py +0 -439
- numpy-1.9.3/numpy/core/tests/test_indexerrors.py +0 -127
- numpy-1.9.3/numpy/core/tests/test_indexing.py +0 -1014
- numpy-1.9.3/numpy/core/tests/test_item_selection.py +0 -70
- numpy-1.9.3/numpy/core/tests/test_machar.py +0 -30
- numpy-1.9.3/numpy/core/tests/test_memmap.py +0 -127
- numpy-1.9.3/numpy/core/tests/test_multiarray.py +0 -4645
- numpy-1.9.3/numpy/core/tests/test_multiarray_assignment.py +0 -80
- numpy-1.9.3/numpy/core/tests/test_nditer.py +0 -2630
- numpy-1.9.3/numpy/core/tests/test_numeric.py +0 -2117
- numpy-1.9.3/numpy/core/tests/test_numerictypes.py +0 -377
- numpy-1.9.3/numpy/core/tests/test_print.py +0 -245
- numpy-1.9.3/numpy/core/tests/test_records.py +0 -185
- numpy-1.9.3/numpy/core/tests/test_regression.py +0 -2115
- numpy-1.9.3/numpy/core/tests/test_scalarinherit.py +0 -34
- numpy-1.9.3/numpy/core/tests/test_scalarmath.py +0 -275
- numpy-1.9.3/numpy/core/tests/test_shape_base.py +0 -250
- numpy-1.9.3/numpy/core/tests/test_ufunc.py +0 -1153
- numpy-1.9.3/numpy/core/tests/test_umath.py +0 -1695
- numpy-1.9.3/numpy/core/tests/test_umath_complex.py +0 -537
- numpy-1.9.3/numpy/core/tests/test_unicode.py +0 -357
- numpy-1.9.3/numpy/distutils/__init__.py +0 -39
- numpy-1.9.3/numpy/distutils/ccompiler.py +0 -656
- numpy-1.9.3/numpy/distutils/command/autodist.py +0 -43
- numpy-1.9.3/numpy/distutils/command/build.py +0 -39
- numpy-1.9.3/numpy/distutils/command/build_clib.py +0 -284
- numpy-1.9.3/numpy/distutils/command/build_ext.py +0 -515
- numpy-1.9.3/numpy/distutils/command/config.py +0 -476
- numpy-1.9.3/numpy/distutils/exec_command.py +0 -618
- numpy-1.9.3/numpy/distutils/fcompiler/compaq.py +0 -128
- numpy-1.9.3/numpy/distutils/fcompiler/gnu.py +0 -390
- numpy-1.9.3/numpy/distutils/fcompiler/intel.py +0 -205
- numpy-1.9.3/numpy/distutils/fcompiler/pg.py +0 -60
- numpy-1.9.3/numpy/distutils/fcompiler/sun.py +0 -52
- numpy-1.9.3/numpy/distutils/intelccompiler.py +0 -45
- numpy-1.9.3/numpy/distutils/lib2def.py +0 -116
- numpy-1.9.3/numpy/distutils/mingw32ccompiler.py +0 -582
- numpy-1.9.3/numpy/distutils/misc_util.py +0 -2271
- numpy-1.9.3/numpy/distutils/npy_pkg_config.py +0 -464
- numpy-1.9.3/numpy/distutils/system_info.py +0 -2319
- numpy-1.9.3/numpy/distutils/tests/f2py_ext/tests/test_fib2.py +0 -13
- numpy-1.9.3/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py +0 -12
- numpy-1.9.3/numpy/distutils/tests/gen_ext/tests/test_fib3.py +0 -12
- numpy-1.9.3/numpy/distutils/tests/pyrex_ext/tests/test_primes.py +0 -14
- numpy-1.9.3/numpy/distutils/tests/swig_ext/tests/test_example.py +0 -18
- numpy-1.9.3/numpy/distutils/tests/swig_ext/tests/test_example2.py +0 -16
- numpy-1.9.3/numpy/distutils/tests/test_fcompiler_gnu.py +0 -53
- numpy-1.9.3/numpy/distutils/tests/test_fcompiler_intel.py +0 -36
- numpy-1.9.3/numpy/distutils/tests/test_misc_util.py +0 -75
- numpy-1.9.3/numpy/distutils/tests/test_npy_pkg_config.py +0 -98
- numpy-1.9.3/numpy/distutils/unixccompiler.py +0 -113
- numpy-1.9.3/numpy/doc/byteswapping.py +0 -147
- numpy-1.9.3/numpy/doc/creation.py +0 -144
- numpy-1.9.3/numpy/doc/glossary.py +0 -418
- numpy-1.9.3/numpy/doc/indexing.py +0 -437
- numpy-1.9.3/numpy/doc/structured_arrays.py +0 -223
- numpy-1.9.3/numpy/f2py/__init__.py +0 -49
- numpy-1.9.3/numpy/f2py/auxfuncs.py +0 -711
- numpy-1.9.3/numpy/f2py/capi_maps.py +0 -773
- numpy-1.9.3/numpy/f2py/cb_rules.py +0 -539
- numpy-1.9.3/numpy/f2py/cfuncs.py +0 -1224
- numpy-1.9.3/numpy/f2py/common_rules.py +0 -132
- numpy-1.9.3/numpy/f2py/crackfortran.py +0 -2870
- numpy-1.9.3/numpy/f2py/diagnose.py +0 -149
- numpy-1.9.3/numpy/f2py/f2py2e.py +0 -598
- numpy-1.9.3/numpy/f2py/f2py_testing.py +0 -46
- numpy-1.9.3/numpy/f2py/f90mod_rules.py +0 -246
- numpy-1.9.3/numpy/f2py/func2subr.py +0 -291
- numpy-1.9.3/numpy/f2py/rules.py +0 -1448
- numpy-1.9.3/numpy/f2py/setup.py +0 -129
- numpy-1.9.3/numpy/f2py/src/fortranobject.c +0 -972
- numpy-1.9.3/numpy/f2py/src/fortranobject.h +0 -162
- numpy-1.9.3/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c +0 -223
- numpy-1.9.3/numpy/f2py/tests/test_array_from_pyobj.py +0 -559
- numpy-1.9.3/numpy/f2py/tests/test_assumed_shape.py +0 -37
- numpy-1.9.3/numpy/f2py/tests/test_callback.py +0 -132
- numpy-1.9.3/numpy/f2py/tests/test_kind.py +0 -36
- numpy-1.9.3/numpy/f2py/tests/test_mixed.py +0 -41
- numpy-1.9.3/numpy/f2py/tests/test_regression.py +0 -32
- numpy-1.9.3/numpy/f2py/tests/test_return_character.py +0 -142
- numpy-1.9.3/numpy/f2py/tests/test_return_complex.py +0 -169
- numpy-1.9.3/numpy/f2py/tests/test_return_integer.py +0 -178
- numpy-1.9.3/numpy/f2py/tests/test_return_logical.py +0 -187
- numpy-1.9.3/numpy/f2py/tests/test_return_real.py +0 -203
- numpy-1.9.3/numpy/f2py/tests/test_size.py +0 -47
- numpy-1.9.3/numpy/f2py/tests/util.py +0 -353
- numpy-1.9.3/numpy/f2py/use_rules.py +0 -109
- numpy-1.9.3/numpy/fft/fftpack.c +0 -1501
- numpy-1.9.3/numpy/fft/fftpack.h +0 -28
- numpy-1.9.3/numpy/fft/fftpack.py +0 -1169
- numpy-1.9.3/numpy/fft/fftpack_litemodule.c +0 -371
- numpy-1.9.3/numpy/fft/info.py +0 -179
- numpy-1.9.3/numpy/fft/setup.py +0 -20
- numpy-1.9.3/numpy/fft/tests/test_fftpack.py +0 -75
- numpy-1.9.3/numpy/fft/tests/test_helper.py +0 -78
- numpy-1.9.3/numpy/lib/_iotools.py +0 -891
- numpy-1.9.3/numpy/lib/arraypad.py +0 -1475
- numpy-1.9.3/numpy/lib/arraysetops.py +0 -464
- numpy-1.9.3/numpy/lib/arrayterator.py +0 -226
- numpy-1.9.3/numpy/lib/financial.py +0 -737
- numpy-1.9.3/numpy/lib/format.py +0 -771
- numpy-1.9.3/numpy/lib/function_base.py +0 -3884
- numpy-1.9.3/numpy/lib/index_tricks.py +0 -869
- numpy-1.9.3/numpy/lib/info.py +0 -151
- numpy-1.9.3/numpy/lib/nanfunctions.py +0 -1158
- numpy-1.9.3/numpy/lib/npyio.py +0 -1871
- numpy-1.9.3/numpy/lib/polynomial.py +0 -1271
- numpy-1.9.3/numpy/lib/recfunctions.py +0 -1003
- numpy-1.9.3/numpy/lib/setup.py +0 -23
- numpy-1.9.3/numpy/lib/shape_base.py +0 -865
- numpy-1.9.3/numpy/lib/src/_compiled_base.c +0 -1761
- numpy-1.9.3/numpy/lib/stride_tricks.py +0 -123
- numpy-1.9.3/numpy/lib/tests/test__iotools.py +0 -326
- numpy-1.9.3/numpy/lib/tests/test__version.py +0 -57
- numpy-1.9.3/numpy/lib/tests/test_arraypad.py +0 -560
- numpy-1.9.3/numpy/lib/tests/test_arraysetops.py +0 -301
- numpy-1.9.3/numpy/lib/tests/test_financial.py +0 -160
- numpy-1.9.3/numpy/lib/tests/test_format.py +0 -716
- numpy-1.9.3/numpy/lib/tests/test_function_base.py +0 -2145
- numpy-1.9.3/numpy/lib/tests/test_index_tricks.py +0 -289
- numpy-1.9.3/numpy/lib/tests/test_io.py +0 -1754
- numpy-1.9.3/numpy/lib/tests/test_nanfunctions.py +0 -774
- numpy-1.9.3/numpy/lib/tests/test_polynomial.py +0 -177
- numpy-1.9.3/numpy/lib/tests/test_recfunctions.py +0 -705
- numpy-1.9.3/numpy/lib/tests/test_shape_base.py +0 -368
- numpy-1.9.3/numpy/lib/tests/test_stride_tricks.py +0 -238
- numpy-1.9.3/numpy/lib/tests/test_twodim_base.py +0 -504
- numpy-1.9.3/numpy/lib/tests/test_type_check.py +0 -328
- numpy-1.9.3/numpy/lib/twodim_base.py +0 -1003
- numpy-1.9.3/numpy/lib/type_check.py +0 -605
- numpy-1.9.3/numpy/lib/utils.py +0 -1176
- numpy-1.9.3/numpy/linalg/lapack_lite/python_xerbla.c +0 -47
- numpy-1.9.3/numpy/linalg/lapack_litemodule.c +0 -362
- numpy-1.9.3/numpy/linalg/linalg.py +0 -2136
- numpy-1.9.3/numpy/linalg/tests/test_build.py +0 -53
- numpy-1.9.3/numpy/linalg/tests/test_linalg.py +0 -1156
- numpy-1.9.3/numpy/linalg/tests/test_regression.py +0 -90
- numpy-1.9.3/numpy/linalg/umath_linalg.c.src +0 -3210
- numpy-1.9.3/numpy/ma/__init__.py +0 -58
- numpy-1.9.3/numpy/ma/bench.py +0 -166
- numpy-1.9.3/numpy/ma/core.py +0 -7374
- numpy-1.9.3/numpy/ma/extras.py +0 -1932
- numpy-1.9.3/numpy/ma/mrecords.py +0 -734
- numpy-1.9.3/numpy/ma/setup.py +0 -20
- numpy-1.9.3/numpy/ma/tests/test_core.py +0 -3706
- numpy-1.9.3/numpy/ma/tests/test_extras.py +0 -954
- numpy-1.9.3/numpy/ma/tests/test_mrecords.py +0 -521
- numpy-1.9.3/numpy/ma/tests/test_old_ma.py +0 -869
- numpy-1.9.3/numpy/ma/tests/test_regression.py +0 -75
- numpy-1.9.3/numpy/ma/tests/test_subclassing.py +0 -236
- numpy-1.9.3/numpy/ma/testutils.py +0 -240
- numpy-1.9.3/numpy/ma/timer_comparison.py +0 -459
- numpy-1.9.3/numpy/matlib.py +0 -358
- numpy-1.9.3/numpy/matrixlib/defmatrix.py +0 -1094
- numpy-1.9.3/numpy/matrixlib/tests/test_defmatrix.py +0 -400
- numpy-1.9.3/numpy/matrixlib/tests/test_multiarray.py +0 -18
- numpy-1.9.3/numpy/matrixlib/tests/test_numeric.py +0 -10
- numpy-1.9.3/numpy/matrixlib/tests/test_regression.py +0 -34
- numpy-1.9.3/numpy/polynomial/_polybase.py +0 -962
- numpy-1.9.3/numpy/polynomial/chebyshev.py +0 -2056
- numpy-1.9.3/numpy/polynomial/hermite.py +0 -1789
- numpy-1.9.3/numpy/polynomial/hermite_e.py +0 -1786
- numpy-1.9.3/numpy/polynomial/laguerre.py +0 -1781
- numpy-1.9.3/numpy/polynomial/legendre.py +0 -1809
- numpy-1.9.3/numpy/polynomial/polytemplate.py +0 -927
- numpy-1.9.3/numpy/polynomial/polyutils.py +0 -403
- numpy-1.9.3/numpy/random/mtrand/distributions.c +0 -892
- numpy-1.9.3/numpy/random/mtrand/mtrand.c +0 -36656
- numpy-1.9.3/numpy/random/mtrand/mtrand.pyx +0 -4706
- numpy-1.9.3/numpy/random/setup.py +0 -74
- numpy-1.9.3/numpy/random/tests/test_random.py +0 -707
- numpy-1.9.3/numpy/random/tests/test_regression.py +0 -86
- numpy-1.9.3/numpy/setup.py +0 -27
- numpy-1.9.3/numpy/testing/__init__.py +0 -16
- numpy-1.9.3/numpy/testing/decorators.py +0 -271
- numpy-1.9.3/numpy/testing/noseclasses.py +0 -353
- numpy-1.9.3/numpy/testing/nosetester.py +0 -504
- numpy-1.9.3/numpy/testing/print_coercion_tables.py +0 -89
- numpy-1.9.3/numpy/testing/setup.py +0 -20
- numpy-1.9.3/numpy/testing/tests/test_decorators.py +0 -185
- numpy-1.9.3/numpy/testing/tests/test_utils.py +0 -558
- numpy-1.9.3/numpy/testing/utils.py +0 -1715
- numpy-1.9.3/numpy/tests/test_ctypeslib.py +0 -102
- numpy-1.9.3/numpy/tests/test_matlib.py +0 -55
- numpy-1.9.3/numpy/version.py +0 -10
- numpy-1.9.3/setup.py +0 -251
- numpy-1.9.3/site.cfg.example +0 -157
- numpy-1.9.3/tools/swig/README +0 -135
- numpy-1.9.3/tools/swig/numpy.i +0 -3085
- numpy-1.9.3/tools/swig/test/Array.i +0 -102
- numpy-1.9.3/tools/swig/test/Makefile +0 -34
- numpy-1.9.3/tools/swig/test/setup.py +0 -64
- numpy-1.9.3/tools/swig/test/testArray.py +0 -284
- numpy-1.9.3/tools/swig/test/testFarray.py +0 -159
- numpy-1.9.3/tools/swig/test/testFortran.py +0 -173
- numpy-1.9.3/tools/swig/test/testMatrix.py +0 -362
- numpy-1.9.3/tools/swig/test/testSuperTensor.py +0 -388
- numpy-1.9.3/tools/swig/test/testTensor.py +0 -402
- numpy-1.9.3/tools/swig/test/testVector.py +0 -381
- {numpy-1.9.3 → numpy-1.10.0.post2}/BENTO_BUILD.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/COMPATIBILITY +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/DEV_README.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/README.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/THANKS.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/Makefile +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/BUGS.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/FAQ.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/HISTORY.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/Makefile +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/OLDNEWS.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/README.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/Release-1.x.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/Release-2.x.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/Release-3.x.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/Release-4.x.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/TESTING.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/THANKS.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/TODO.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/apps.tex +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/bugs.tex +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/collectinput.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/commands.tex +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/default.css +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/docutils.conf +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/ex1/arr.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/ex1/bar.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/ex1/foo.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/ex1/foobar-smart.f90 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/ex1/foobar.f90 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/ex1/foobarmodule.tex +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/ex1/runme +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/f2py.1 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/f2py2e.tex +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/README.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/aerostructure.jpg +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/flow.jpg +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/mk_html.sh +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/mk_pdf.sh +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/mk_ps.sh +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/src/examples/exp1.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/src/examples/exp1mess.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/src/examples/exp1session.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/src/examples/foo.pyf +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/src/examples/foom.pyf +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/f2python9-final/structure.jpg +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/fortranobject.tex +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/hello.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/index.html +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/intro.tex +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/multiarray/array_from_pyobj.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/multiarray/bar.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/multiarray/foo.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/multiarray/fortran_array_from_pyobj.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/multiarray/fun.pyf +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/multiarray/run.pyf +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/multiarray/transpose.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/multiarrays.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/notes.tex +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/oldnews.html +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/options.tex +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/pyforttest.pyf +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/pytest.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/python9.tex +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/signaturefile.tex +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/simple.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/simple_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/using_F_compiler.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/f2py/win32_notes.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/postprocess.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.3.0-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.4.0-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.5.0-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.6.0-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.6.1-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.6.2-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.7.0-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.7.1-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.7.2-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.8.0-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.8.1-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.8.2-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.9.0-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.9.1-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/1.9.2-notes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/release/time_based_proposal.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/.git +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/.gitignore +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/Makefile +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/README.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_static/scipyshiny_small.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/layout.html +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/searchbox.html +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/sourcelink.html +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/css/extend.css +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/css/pygments.css +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/css/scipy-central.css +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/css/spc-bootstrap.css +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/css/spc-extend.css +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/all-icons.svg +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/contents.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/create-new-account-icon.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/external-link-icon-shrunk.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/external-link-icon.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/external-link-icon.svg +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/external-link-list-icon-tiniest.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/external-link-list-icon-tiny.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/external-link-list-icon.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ad.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ae.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-af.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ag.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ai.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-al.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-am.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ao.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-aq.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ar.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-as.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-at.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-au.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-aw.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-az.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ba.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bb.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bd.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-be.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bf.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bg.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bh.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bi.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bj.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bl.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bm.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bn.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bo.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-br.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bs.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bt.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bw.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-by.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-bz.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ca.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cc.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cd.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cf.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cg.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ch.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ci.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ck.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cl.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cm.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cn.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-co.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cr.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cu.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cv.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cw.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cx.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cy.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-cz.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-de.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-dj.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-dk.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-dm.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-do.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-dz.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ec.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ee.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-eg.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-er.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-es.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-et.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-fi.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-fj.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-fk.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-fm.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-fo.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-fr.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ga.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gb.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gd.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ge.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gf.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gg.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gh.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gi.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gl.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gm.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gn.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gq.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gr.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gs.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gt.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gu.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gw.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-gy.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-hk.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-hm.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-hn.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-hr.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ht.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-hu.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-id.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ie.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-il.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-im.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-in.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-io.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-iq.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ir.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-is.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-it.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-je.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-jm.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-jo.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-jp.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ke.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-kg.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-kh.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ki.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-km.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-kn.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-kp.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-kr.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-kw.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ky.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-kz.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-la.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-lb.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-lc.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-li.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-lk.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-lr.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ls.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-lt.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-lu.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-lv.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ly.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ma.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mc.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-md.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-me.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mf.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mg.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mh.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mk.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ml.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mm.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mn.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mo.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mp.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mq.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mr.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ms.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mt.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mu.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mv.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mw.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mx.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-my.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-mz.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-na.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-nc.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ne.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-nf.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ng.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ni.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-nl.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-no.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-np.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-nr.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-nu.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-nz.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-om.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pa.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pe.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pf.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pg.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ph.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pk.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pl.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pm.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pn.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pr.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ps.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pt.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-pw.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-py.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-qa.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-re.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ro.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-rs.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ru.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-rw.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sa.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sb.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sc.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sd.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-se.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sg.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sh.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-si.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sj.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sk.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sl.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sm.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sn.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-so.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sr.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-st.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sv.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sy.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-sz.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tc.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-td.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tf.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tg.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-th.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tj.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tk.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tl.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tm.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tn.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-to.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tr.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tt.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tv.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tw.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-tz.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ua.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ug.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-um.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-us.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-uy.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-uz.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-va.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-vc.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ve.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-vg.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-vi.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-vn.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-vu.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-wf.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ws.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-ye.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-za.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-zm.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/flags/flag-zw.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/glyphicons-halflings-white.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/glyphicons-halflings.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/important-icon.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/information-icon.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/internet-web-browser.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/multiple-file-icon-shrunk.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/multiple-file-icon.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/multiple-file-icon.svg +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/multiple-file-list-icon-tiny.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/multiple-file-list-icon.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/navigation.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/person-list-icon-tiny.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/person-list-icon.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/scipy-logo.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/scipy_org_logo.gif +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/scipycentral_logo.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/scipyshiny_small.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/send-email-icon.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/single-file-icon-shrunk.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/single-file-icon.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/single-file-icon.svg +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/single-file-list-icon-tiniest.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/single-file-list-icon-tiny.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/single-file-list-icon.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/transparent-pixel.gif +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/img/ui-anim_basic_16x16.gif +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/js/copybutton.js +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/accordion.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/alerts.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/bootstrap.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/breadcrumbs.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/button-groups.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/buttons.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/carousel.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/close.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/code.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/component-animations.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/dropdowns.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/forms.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/grid.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/hero-unit.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/labels-badges.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/layouts.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/media.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/mixins.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/modals.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/navbar.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/navs.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/pager.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/pagination.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/popovers.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/progress-bars.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/reset.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/responsive-1200px-min.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/responsive-767px-max.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/responsive-768px-979px.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/responsive-navbar.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/responsive-utilities.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/responsive.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/scaffolding.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/sprites.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/tables.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/thumbnails.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/tooltip.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/type.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/utilities.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/variables.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/bootstrap/wells.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/spc-bootstrap.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/spc-content.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/spc-extend.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/spc-footer.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/spc-header.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/spc-rightsidebar.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/less/spc-utils.less +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/static/scipy.css_t +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/_theme/scipy/theme.conf +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/conf.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/index.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/test_autodoc.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/test_autodoc_2.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/test_autodoc_3.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/test_autodoc_4.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/scipy-sphinx-theme/test_optimize.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/_templates/autosummary/class.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/_templates/indexcontent.html +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/_templates/indexsidebar.html +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/_templates/layout.html +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/about.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/bugs.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/contents.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/dev/gitwash/configure_git.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/dev/gitwash/development_setup.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/dev/gitwash/dot2_dot3.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/dev/gitwash/following_latest.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/dev/gitwash/forking_button.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/dev/gitwash/git_development.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/dev/gitwash/git_intro.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/dev/gitwash/git_resources.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/dev/gitwash/pull_button.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/dev/gitwash_links.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/advanced.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/allocarr.f90 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/allocarr_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/array.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/array_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/calculate.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/calculate_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/callback.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/callback2.pyf +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/callback_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/common.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/common_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/compile_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/distutils.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/extcallback.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/extcallback_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/fib1.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/fib1.pyf +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/fib2.pyf +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/fib3.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/ftype.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/ftype_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/getting-started.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/index.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/moddata.f90 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/moddata_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/python-usage.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/run_main_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/scalar.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/scalar_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/setup_example.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/signature-file.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/spam.pyf +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/spam_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/string.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/string_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/usage.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/var.pyf +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/f2py/var_session.dat +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/glossary.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/license.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/neps/datetime-proposal.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/neps/datetime-proposal3.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/neps/deferred-ufunc-evaluation.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/neps/generalized-ufuncs.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/neps/groupby_additions.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/neps/index.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/neps/math_config_clean.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/neps/missing-data.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/neps/new-iterator-ufunc.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/neps/newbugtracker.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/neps/npy-format.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/neps/structured_array_extensions.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/neps/ufunc-overrides.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/neps/warnfix.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/arrays.datetime.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/arrays.nditer.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/arrays.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/c-api.deprecations.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/c-api.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/distutils.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/figures/dtype-hierarchy.dia +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/figures/dtype-hierarchy.pdf +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/figures/dtype-hierarchy.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/figures/threefundamental.fig +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/figures/threefundamental.pdf +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/figures/threefundamental.png +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/internals.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/maskedarray.baseclass.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/maskedarray.generic.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/maskedarray.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.array-creation.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.bitwise.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.char.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.ctypeslib.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.datetime.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.dtype.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.dual.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.emath.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.err.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.fft.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.financial.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.functional.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.help.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.indexing.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.logic.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.math.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.matlib.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.numarray.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.oldnumeric.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.other.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.padding.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.chebyshev.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.classes.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.hermite.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.hermite_e.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.laguerre.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.legendre.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.package.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.poly1d.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.polynomial.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.polynomials.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.random.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.set.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.testing.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/routines.window.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/reference/swig.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/basics.broadcasting.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/basics.byteswapping.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/basics.creation.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/basics.indexing.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/basics.io.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/basics.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/basics.subclassing.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/basics.types.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/c-info.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/howtofind.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/index.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/introduction.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/misc.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/performance.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/source/user/whatisnumpy.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/.git +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/.gitignore +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/.travis.yml +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/LICENSE.txt +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/MANIFEST.in +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/README.rst +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/comment_eater.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/compiler_unparse.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/docscrape.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/docscrape_sphinx.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/linkcode.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/numpydoc.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/phantom_import.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/plot_directive.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/tests/test_docscrape.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/tests/test_linkcode.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/tests/test_phantom_import.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/tests/test_plot_directive.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/tests/test_traitsdoc.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/numpydoc/traitsdoc.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/doc/sphinxext/setup.py +0 -0
- {numpy-1.9.3/numpy/core/code_generators → numpy-1.10.0.post2/numpy/_build_utils}/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/compat/__init__.py +0 -0
- {numpy-1.9.3/numpy/distutils/tests/f2py_ext → numpy-1.10.0.post2/numpy/core/code_generators}/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/code_generators/genapi.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/code_generators/generate_numpy_api.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/cversions.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/include/numpy/_neighborhood_iterator_imp.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/include/numpy/_numpyconfig.h.in +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/include/numpy/arrayobject.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/include/numpy/arrayscalars.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/include/numpy/halffloat.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/include/numpy/noprefix.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/include/numpy/npy_1_7_deprecated_api.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/include/numpy/npy_interrupt.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/include/numpy/npy_no_deprecated_api.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/include/numpy/npy_os.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/include/numpy/old_defines.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/include/numpy/oldnumeric.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/include/numpy/ufuncobject.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/include/numpy/utils.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/info.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/mlib.ini.in +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/npymath.ini.in +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/dummymodule.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/_datetime.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/alloc.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/array_assign.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/array_assign.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/array_assign_array.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/array_assign_scalar.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/arrayobject.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/buffer.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/calculation.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/conversion_utils.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/convert.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/convert_datatype.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/ctors.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/datetime_busday.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/datetime_busdaycal.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/datetime_strings.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/descriptor.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/flagsobject.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/getset.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/hashdescr.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/item_selection.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/iterators.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/methods.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/nditer_impl.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/nditer_pywrap.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/nditer_templ.c.src +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/numpymemoryview.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/numpyos.h +0 -0
- {numpy-1.9.3/numpy/core/blasdot → numpy-1.10.0.post2/numpy/core/src/multiarray}/python_xerbla.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/refcount.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/refcount.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/sequence.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/sequence.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/shape.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/ucsnarrow.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/usertypes.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/multiarray/usertypes.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/npymath/_signbit.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/npymath/halffloat.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/npymath/npy_math_common.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/npysort/binsearch.c.src +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/private/lowlevel_strided_loops.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/private/npy_binsearch.h.src +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/private/npy_fpmath.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/private/npy_pycompat.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/umath/reduction.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/umath/reduction.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/umath/struct_ufunc_test.c.src +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/umath/ufunc_object.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/src/umath/ufunc_type_resolution.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/tests/data/astype_copy.pkl +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/tests/data/recarray_from_file.fits +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/core/tests/test_scalarprint.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/ctypeslib.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/__version__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/command/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/command/bdist_rpm.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/command/build_py.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/command/build_scripts.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/command/build_src.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/command/config_compiler.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/command/develop.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/command/egg_info.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/command/install.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/command/install_clib.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/command/install_data.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/command/install_headers.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/command/sdist.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/compat.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/conv_template.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/core.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/cpuinfo.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/environment.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/extension.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/absoft.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/g95.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/hpux.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/ibm.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/lahey.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/mips.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/nag.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/none.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/pathf95.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/fcompiler/vast.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/from_template.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/info.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/line_endings.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/log.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/mingw/gfortran_vs2003_hack.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/numpy_distribution.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/pathccompiler.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/setup.py +0 -0
- {numpy-1.9.3/numpy/distutils/tests/f2py_f90_ext → numpy-1.10.0.post2/numpy/distutils/tests/f2py_ext}/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/f2py_ext/setup.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/f2py_ext/src/fib1.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/f2py_ext/src/fib2.pyf +0 -0
- {numpy-1.9.3/numpy/distutils/tests/gen_ext → numpy-1.10.0.post2/numpy/distutils/tests/f2py_f90_ext}/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/f2py_f90_ext/include/body.f90 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/f2py_f90_ext/setup.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/f2py_f90_ext/src/foo_free.f90 +0 -0
- {numpy-1.9.3/numpy/distutils/tests/pyrex_ext → numpy-1.10.0.post2/numpy/distutils/tests/gen_ext}/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/gen_ext/setup.py +0 -0
- {numpy-1.9.3/numpy/distutils/tests/swig_ext → numpy-1.10.0.post2/numpy/distutils/tests/pyrex_ext}/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/pyrex_ext/primes.pyx +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/pyrex_ext/setup.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/setup.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/swig_ext/setup.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/swig_ext/src/example.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/swig_ext/src/example.i +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/swig_ext/src/zoo.cc +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/swig_ext/src/zoo.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/swig_ext/src/zoo.i +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/distutils/tests/test_exec_command.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/doc/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/doc/basics.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/doc/broadcasting.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/doc/constants.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/doc/howtofind.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/doc/internals.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/doc/io.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/doc/jargon.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/doc/methods_vs_functions.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/doc/misc.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/doc/performance.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/doc/subclassing.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/doc/ufuncs.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/dual.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/f2py/__version__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/f2py/info.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/f2py/tests/src/assumed_shape/.f2py_f2cmap +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/f2py/tests/src/assumed_shape/foo_free.f90 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/f2py/tests/src/assumed_shape/foo_mod.f90 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/f2py/tests/src/assumed_shape/foo_use.f90 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/f2py/tests/src/assumed_shape/precision.f90 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/f2py/tests/src/kind/foo.f90 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/f2py/tests/src/mixed/foo.f +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/f2py/tests/src/mixed/foo_fixed.f90 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/f2py/tests/src/mixed/foo_free.f90 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/f2py/tests/src/regression/inout.f90 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/f2py/tests/src/size/foo.f90 +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/fft/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/fft/helper.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/lib/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/lib/_datasource.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/lib/_version.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/lib/scimath.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/lib/tests/data/python3.npy +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/lib/tests/data/win64python2.npy +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/lib/tests/test__datasource.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/lib/tests/test_arrayterator.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/lib/tests/test_regression.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/lib/tests/test_ufunclike.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/lib/tests/test_utils.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/lib/ufunclike.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/lib/user_array.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/linalg/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/linalg/info.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/linalg/lapack_lite/blas_lite.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/linalg/lapack_lite/dlamch.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/linalg/lapack_lite/dlapack_lite.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/linalg/lapack_lite/f2c.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/linalg/lapack_lite/f2c_lite.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/linalg/lapack_lite/zlapack_lite.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/linalg/setup.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/linalg/tests/test_deprecations.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/ma/version.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/matrixlib/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/matrixlib/setup.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/polynomial/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/polynomial/polynomial.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/polynomial/setup.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_chebyshev.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_classes.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_hermite.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_hermite_e.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_laguerre.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_legendre.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_polynomial.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_polyutils.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/polynomial/tests/test_printing.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/random/__init__.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/random/info.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/random/mtrand/Python.pxi +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/random/mtrand/distributions.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/random/mtrand/generate_mtrand_c.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/random/mtrand/initarray.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/random/mtrand/initarray.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/random/mtrand/mtrand_py_helper.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/random/mtrand/numpy.pxd +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/random/mtrand/randomkit.c +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/random/mtrand/randomkit.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/numpy/testing/tests/test_doctesting.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/setupegg.py +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/Makefile +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/pyfragments.swg +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Array1.cxx +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Array1.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Array2.cxx +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Array2.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Farray.cxx +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Farray.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Farray.i +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Fortran.cxx +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Fortran.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Fortran.i +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Matrix.cxx +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Matrix.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Matrix.i +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/SuperTensor.cxx +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/SuperTensor.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/SuperTensor.i +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Tensor.cxx +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Tensor.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Tensor.i +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Vector.cxx +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Vector.h +0 -0
- {numpy-1.9.3 → numpy-1.10.0.post2}/tools/swig/test/Vector.i +0 -0
|
@@ -1,4706 +0,0 @@
|
|
|
1
|
-
# mtrand.pyx -- A Pyrex wrapper of Jean-Sebastien Roy's RandomKit
|
|
2
|
-
#
|
|
3
|
-
# Copyright 2005 Robert Kern (robert.kern@gmail.com)
|
|
4
|
-
#
|
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
6
|
-
# copy of this software and associated documentation files (the
|
|
7
|
-
# "Software"), to deal in the Software without restriction, including
|
|
8
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
# the following conditions:
|
|
12
|
-
#
|
|
13
|
-
# The above copyright notice and this permission notice shall be included
|
|
14
|
-
# in all copies or substantial portions of the Software.
|
|
15
|
-
#
|
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
17
|
-
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
-
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
-
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
-
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
-
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
-
|
|
24
|
-
include "Python.pxi"
|
|
25
|
-
include "numpy.pxd"
|
|
26
|
-
|
|
27
|
-
cdef extern from "math.h":
|
|
28
|
-
double exp(double x)
|
|
29
|
-
double log(double x)
|
|
30
|
-
double floor(double x)
|
|
31
|
-
double sin(double x)
|
|
32
|
-
double cos(double x)
|
|
33
|
-
|
|
34
|
-
cdef extern from "mtrand_py_helper.h":
|
|
35
|
-
object empty_py_bytes(npy_intp length, void **bytes)
|
|
36
|
-
|
|
37
|
-
cdef extern from "randomkit.h":
|
|
38
|
-
|
|
39
|
-
ctypedef struct rk_state:
|
|
40
|
-
unsigned long key[624]
|
|
41
|
-
int pos
|
|
42
|
-
int has_gauss
|
|
43
|
-
double gauss
|
|
44
|
-
|
|
45
|
-
ctypedef enum rk_error:
|
|
46
|
-
RK_NOERR = 0
|
|
47
|
-
RK_ENODEV = 1
|
|
48
|
-
RK_ERR_MAX = 2
|
|
49
|
-
|
|
50
|
-
char *rk_strerror[2]
|
|
51
|
-
|
|
52
|
-
# 0xFFFFFFFFUL
|
|
53
|
-
unsigned long RK_MAX
|
|
54
|
-
|
|
55
|
-
void rk_seed(unsigned long seed, rk_state *state)
|
|
56
|
-
rk_error rk_randomseed(rk_state *state)
|
|
57
|
-
unsigned long rk_random(rk_state *state)
|
|
58
|
-
long rk_long(rk_state *state) nogil
|
|
59
|
-
unsigned long rk_ulong(rk_state *state) nogil
|
|
60
|
-
unsigned long rk_interval(unsigned long max, rk_state *state) nogil
|
|
61
|
-
double rk_double(rk_state *state) nogil
|
|
62
|
-
void rk_fill(void *buffer, size_t size, rk_state *state) nogil
|
|
63
|
-
rk_error rk_devfill(void *buffer, size_t size, int strong)
|
|
64
|
-
rk_error rk_altfill(void *buffer, size_t size, int strong,
|
|
65
|
-
rk_state *state) nogil
|
|
66
|
-
double rk_gauss(rk_state *state) nogil
|
|
67
|
-
|
|
68
|
-
cdef extern from "distributions.h":
|
|
69
|
-
# do not need the GIL, but they do need a lock on the state !! */
|
|
70
|
-
|
|
71
|
-
double rk_normal(rk_state *state, double loc, double scale) nogil
|
|
72
|
-
double rk_standard_exponential(rk_state *state) nogil
|
|
73
|
-
double rk_exponential(rk_state *state, double scale) nogil
|
|
74
|
-
double rk_uniform(rk_state *state, double loc, double scale) nogil
|
|
75
|
-
double rk_standard_gamma(rk_state *state, double shape) nogil
|
|
76
|
-
double rk_gamma(rk_state *state, double shape, double scale) nogil
|
|
77
|
-
double rk_beta(rk_state *state, double a, double b) nogil
|
|
78
|
-
double rk_chisquare(rk_state *state, double df) nogil
|
|
79
|
-
double rk_noncentral_chisquare(rk_state *state, double df, double nonc) nogil
|
|
80
|
-
double rk_f(rk_state *state, double dfnum, double dfden) nogil
|
|
81
|
-
double rk_noncentral_f(rk_state *state, double dfnum, double dfden, double nonc) nogil
|
|
82
|
-
double rk_standard_cauchy(rk_state *state) nogil
|
|
83
|
-
double rk_standard_t(rk_state *state, double df) nogil
|
|
84
|
-
double rk_vonmises(rk_state *state, double mu, double kappa) nogil
|
|
85
|
-
double rk_pareto(rk_state *state, double a) nogil
|
|
86
|
-
double rk_weibull(rk_state *state, double a) nogil
|
|
87
|
-
double rk_power(rk_state *state, double a) nogil
|
|
88
|
-
double rk_laplace(rk_state *state, double loc, double scale) nogil
|
|
89
|
-
double rk_gumbel(rk_state *state, double loc, double scale) nogil
|
|
90
|
-
double rk_logistic(rk_state *state, double loc, double scale) nogil
|
|
91
|
-
double rk_lognormal(rk_state *state, double mode, double sigma) nogil
|
|
92
|
-
double rk_rayleigh(rk_state *state, double mode) nogil
|
|
93
|
-
double rk_wald(rk_state *state, double mean, double scale) nogil
|
|
94
|
-
double rk_triangular(rk_state *state, double left, double mode, double right) nogil
|
|
95
|
-
|
|
96
|
-
long rk_binomial(rk_state *state, long n, double p) nogil
|
|
97
|
-
long rk_binomial_btpe(rk_state *state, long n, double p) nogil
|
|
98
|
-
long rk_binomial_inversion(rk_state *state, long n, double p) nogil
|
|
99
|
-
long rk_negative_binomial(rk_state *state, double n, double p) nogil
|
|
100
|
-
long rk_poisson(rk_state *state, double lam) nogil
|
|
101
|
-
long rk_poisson_mult(rk_state *state, double lam) nogil
|
|
102
|
-
long rk_poisson_ptrs(rk_state *state, double lam) nogil
|
|
103
|
-
long rk_zipf(rk_state *state, double a) nogil
|
|
104
|
-
long rk_geometric(rk_state *state, double p) nogil
|
|
105
|
-
long rk_hypergeometric(rk_state *state, long good, long bad, long sample) nogil
|
|
106
|
-
long rk_logseries(rk_state *state, double p) nogil
|
|
107
|
-
|
|
108
|
-
ctypedef double (* rk_cont0)(rk_state *state) nogil
|
|
109
|
-
ctypedef double (* rk_cont1)(rk_state *state, double a) nogil
|
|
110
|
-
ctypedef double (* rk_cont2)(rk_state *state, double a, double b) nogil
|
|
111
|
-
ctypedef double (* rk_cont3)(rk_state *state, double a, double b, double c) nogil
|
|
112
|
-
|
|
113
|
-
ctypedef long (* rk_disc0)(rk_state *state) nogil
|
|
114
|
-
ctypedef long (* rk_discnp)(rk_state *state, long n, double p) nogil
|
|
115
|
-
ctypedef long (* rk_discdd)(rk_state *state, double n, double p) nogil
|
|
116
|
-
ctypedef long (* rk_discnmN)(rk_state *state, long n, long m, long N) nogil
|
|
117
|
-
ctypedef long (* rk_discd)(rk_state *state, double a) nogil
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
cdef extern from "initarray.h":
|
|
121
|
-
void init_by_array(rk_state *self, unsigned long *init_key,
|
|
122
|
-
npy_intp key_length)
|
|
123
|
-
|
|
124
|
-
# Initialize numpy
|
|
125
|
-
import_array()
|
|
126
|
-
|
|
127
|
-
import numpy as np
|
|
128
|
-
import operator
|
|
129
|
-
import warnings
|
|
130
|
-
try:
|
|
131
|
-
from threading import Lock
|
|
132
|
-
except ImportError:
|
|
133
|
-
from dummy_threading import Lock
|
|
134
|
-
|
|
135
|
-
cdef object cont0_array(rk_state *state, rk_cont0 func, object size,
|
|
136
|
-
object lock):
|
|
137
|
-
cdef double *array_data
|
|
138
|
-
cdef ndarray array "arrayObject"
|
|
139
|
-
cdef npy_intp length
|
|
140
|
-
cdef npy_intp i
|
|
141
|
-
|
|
142
|
-
if size is None:
|
|
143
|
-
return func(state)
|
|
144
|
-
else:
|
|
145
|
-
array = <ndarray>np.empty(size, np.float64)
|
|
146
|
-
length = PyArray_SIZE(array)
|
|
147
|
-
array_data = <double *>PyArray_DATA(array)
|
|
148
|
-
with lock, nogil:
|
|
149
|
-
for i from 0 <= i < length:
|
|
150
|
-
array_data[i] = func(state)
|
|
151
|
-
return array
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
cdef object cont1_array_sc(rk_state *state, rk_cont1 func, object size, double a,
|
|
155
|
-
object lock):
|
|
156
|
-
cdef double *array_data
|
|
157
|
-
cdef ndarray array "arrayObject"
|
|
158
|
-
cdef npy_intp length
|
|
159
|
-
cdef npy_intp i
|
|
160
|
-
|
|
161
|
-
if size is None:
|
|
162
|
-
return func(state, a)
|
|
163
|
-
else:
|
|
164
|
-
array = <ndarray>np.empty(size, np.float64)
|
|
165
|
-
length = PyArray_SIZE(array)
|
|
166
|
-
array_data = <double *>PyArray_DATA(array)
|
|
167
|
-
with lock, nogil:
|
|
168
|
-
for i from 0 <= i < length:
|
|
169
|
-
array_data[i] = func(state, a)
|
|
170
|
-
return array
|
|
171
|
-
|
|
172
|
-
cdef object cont1_array(rk_state *state, rk_cont1 func, object size,
|
|
173
|
-
ndarray oa, object lock):
|
|
174
|
-
cdef double *array_data
|
|
175
|
-
cdef double *oa_data
|
|
176
|
-
cdef ndarray array "arrayObject"
|
|
177
|
-
cdef npy_intp length
|
|
178
|
-
cdef npy_intp i
|
|
179
|
-
cdef flatiter itera
|
|
180
|
-
cdef broadcast multi
|
|
181
|
-
|
|
182
|
-
if size is None:
|
|
183
|
-
array = <ndarray>PyArray_SimpleNew(PyArray_NDIM(oa),
|
|
184
|
-
PyArray_DIMS(oa) , NPY_DOUBLE)
|
|
185
|
-
length = PyArray_SIZE(array)
|
|
186
|
-
array_data = <double *>PyArray_DATA(array)
|
|
187
|
-
itera = <flatiter>PyArray_IterNew(<object>oa)
|
|
188
|
-
with lock, nogil:
|
|
189
|
-
for i from 0 <= i < length:
|
|
190
|
-
array_data[i] = func(state, (<double *>(itera.dataptr))[0])
|
|
191
|
-
PyArray_ITER_NEXT(itera)
|
|
192
|
-
else:
|
|
193
|
-
array = <ndarray>np.empty(size, np.float64)
|
|
194
|
-
array_data = <double *>PyArray_DATA(array)
|
|
195
|
-
multi = <broadcast>PyArray_MultiIterNew(2, <void *>array,
|
|
196
|
-
<void *>oa)
|
|
197
|
-
if (multi.size != PyArray_SIZE(array)):
|
|
198
|
-
raise ValueError("size is not compatible with inputs")
|
|
199
|
-
with lock, nogil:
|
|
200
|
-
for i from 0 <= i < multi.size:
|
|
201
|
-
oa_data = <double *>PyArray_MultiIter_DATA(multi, 1)
|
|
202
|
-
array_data[i] = func(state, oa_data[0])
|
|
203
|
-
PyArray_MultiIter_NEXTi(multi, 1)
|
|
204
|
-
return array
|
|
205
|
-
|
|
206
|
-
cdef object cont2_array_sc(rk_state *state, rk_cont2 func, object size, double a,
|
|
207
|
-
double b, object lock):
|
|
208
|
-
cdef double *array_data
|
|
209
|
-
cdef ndarray array "arrayObject"
|
|
210
|
-
cdef npy_intp length
|
|
211
|
-
cdef npy_intp i
|
|
212
|
-
|
|
213
|
-
if size is None:
|
|
214
|
-
return func(state, a, b)
|
|
215
|
-
else:
|
|
216
|
-
array = <ndarray>np.empty(size, np.float64)
|
|
217
|
-
length = PyArray_SIZE(array)
|
|
218
|
-
array_data = <double *>PyArray_DATA(array)
|
|
219
|
-
with lock, nogil:
|
|
220
|
-
for i from 0 <= i < length:
|
|
221
|
-
array_data[i] = func(state, a, b)
|
|
222
|
-
return array
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
cdef object cont2_array(rk_state *state, rk_cont2 func, object size,
|
|
226
|
-
ndarray oa, ndarray ob, object lock):
|
|
227
|
-
cdef double *array_data
|
|
228
|
-
cdef double *oa_data
|
|
229
|
-
cdef double *ob_data
|
|
230
|
-
cdef ndarray array "arrayObject"
|
|
231
|
-
cdef npy_intp length
|
|
232
|
-
cdef npy_intp i
|
|
233
|
-
cdef broadcast multi
|
|
234
|
-
|
|
235
|
-
if size is None:
|
|
236
|
-
multi = <broadcast> PyArray_MultiIterNew(2, <void *>oa, <void *>ob)
|
|
237
|
-
array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_DOUBLE)
|
|
238
|
-
array_data = <double *>PyArray_DATA(array)
|
|
239
|
-
with lock, nogil:
|
|
240
|
-
for i from 0 <= i < multi.size:
|
|
241
|
-
oa_data = <double *>PyArray_MultiIter_DATA(multi, 0)
|
|
242
|
-
ob_data = <double *>PyArray_MultiIter_DATA(multi, 1)
|
|
243
|
-
array_data[i] = func(state, oa_data[0], ob_data[0])
|
|
244
|
-
PyArray_MultiIter_NEXT(multi)
|
|
245
|
-
else:
|
|
246
|
-
array = <ndarray>np.empty(size, np.float64)
|
|
247
|
-
array_data = <double *>PyArray_DATA(array)
|
|
248
|
-
multi = <broadcast>PyArray_MultiIterNew(3, <void*>array, <void *>oa, <void *>ob)
|
|
249
|
-
if (multi.size != PyArray_SIZE(array)):
|
|
250
|
-
raise ValueError("size is not compatible with inputs")
|
|
251
|
-
with lock, nogil:
|
|
252
|
-
for i from 0 <= i < multi.size:
|
|
253
|
-
oa_data = <double *>PyArray_MultiIter_DATA(multi, 1)
|
|
254
|
-
ob_data = <double *>PyArray_MultiIter_DATA(multi, 2)
|
|
255
|
-
array_data[i] = func(state, oa_data[0], ob_data[0])
|
|
256
|
-
PyArray_MultiIter_NEXTi(multi, 1)
|
|
257
|
-
PyArray_MultiIter_NEXTi(multi, 2)
|
|
258
|
-
return array
|
|
259
|
-
|
|
260
|
-
cdef object cont3_array_sc(rk_state *state, rk_cont3 func, object size, double a,
|
|
261
|
-
double b, double c, object lock):
|
|
262
|
-
|
|
263
|
-
cdef double *array_data
|
|
264
|
-
cdef ndarray array "arrayObject"
|
|
265
|
-
cdef npy_intp length
|
|
266
|
-
cdef npy_intp i
|
|
267
|
-
|
|
268
|
-
if size is None:
|
|
269
|
-
return func(state, a, b, c)
|
|
270
|
-
else:
|
|
271
|
-
array = <ndarray>np.empty(size, np.float64)
|
|
272
|
-
length = PyArray_SIZE(array)
|
|
273
|
-
array_data = <double *>PyArray_DATA(array)
|
|
274
|
-
with lock, nogil:
|
|
275
|
-
for i from 0 <= i < length:
|
|
276
|
-
array_data[i] = func(state, a, b, c)
|
|
277
|
-
return array
|
|
278
|
-
|
|
279
|
-
cdef object cont3_array(rk_state *state, rk_cont3 func, object size,
|
|
280
|
-
ndarray oa, ndarray ob, ndarray oc, object lock):
|
|
281
|
-
|
|
282
|
-
cdef double *array_data
|
|
283
|
-
cdef double *oa_data
|
|
284
|
-
cdef double *ob_data
|
|
285
|
-
cdef double *oc_data
|
|
286
|
-
cdef ndarray array "arrayObject"
|
|
287
|
-
cdef npy_intp length
|
|
288
|
-
cdef npy_intp i
|
|
289
|
-
cdef broadcast multi
|
|
290
|
-
|
|
291
|
-
if size is None:
|
|
292
|
-
multi = <broadcast> PyArray_MultiIterNew(3, <void *>oa, <void *>ob, <void *>oc)
|
|
293
|
-
array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_DOUBLE)
|
|
294
|
-
array_data = <double *>PyArray_DATA(array)
|
|
295
|
-
with lock, nogil:
|
|
296
|
-
for i from 0 <= i < multi.size:
|
|
297
|
-
oa_data = <double *>PyArray_MultiIter_DATA(multi, 0)
|
|
298
|
-
ob_data = <double *>PyArray_MultiIter_DATA(multi, 1)
|
|
299
|
-
oc_data = <double *>PyArray_MultiIter_DATA(multi, 2)
|
|
300
|
-
array_data[i] = func(state, oa_data[0], ob_data[0], oc_data[0])
|
|
301
|
-
PyArray_MultiIter_NEXT(multi)
|
|
302
|
-
else:
|
|
303
|
-
array = <ndarray>np.empty(size, np.float64)
|
|
304
|
-
array_data = <double *>PyArray_DATA(array)
|
|
305
|
-
multi = <broadcast>PyArray_MultiIterNew(4, <void*>array, <void *>oa,
|
|
306
|
-
<void *>ob, <void *>oc)
|
|
307
|
-
if (multi.size != PyArray_SIZE(array)):
|
|
308
|
-
raise ValueError("size is not compatible with inputs")
|
|
309
|
-
with lock, nogil:
|
|
310
|
-
for i from 0 <= i < multi.size:
|
|
311
|
-
oa_data = <double *>PyArray_MultiIter_DATA(multi, 1)
|
|
312
|
-
ob_data = <double *>PyArray_MultiIter_DATA(multi, 2)
|
|
313
|
-
oc_data = <double *>PyArray_MultiIter_DATA(multi, 3)
|
|
314
|
-
array_data[i] = func(state, oa_data[0], ob_data[0], oc_data[0])
|
|
315
|
-
PyArray_MultiIter_NEXT(multi)
|
|
316
|
-
return array
|
|
317
|
-
|
|
318
|
-
cdef object disc0_array(rk_state *state, rk_disc0 func, object size, object lock):
|
|
319
|
-
cdef long *array_data
|
|
320
|
-
cdef ndarray array "arrayObject"
|
|
321
|
-
cdef npy_intp length
|
|
322
|
-
cdef npy_intp i
|
|
323
|
-
|
|
324
|
-
if size is None:
|
|
325
|
-
return func(state)
|
|
326
|
-
else:
|
|
327
|
-
array = <ndarray>np.empty(size, int)
|
|
328
|
-
length = PyArray_SIZE(array)
|
|
329
|
-
array_data = <long *>PyArray_DATA(array)
|
|
330
|
-
with lock, nogil:
|
|
331
|
-
for i from 0 <= i < length:
|
|
332
|
-
array_data[i] = func(state)
|
|
333
|
-
return array
|
|
334
|
-
|
|
335
|
-
cdef object discnp_array_sc(rk_state *state, rk_discnp func, object size,
|
|
336
|
-
long n, double p, object lock):
|
|
337
|
-
cdef long *array_data
|
|
338
|
-
cdef ndarray array "arrayObject"
|
|
339
|
-
cdef npy_intp length
|
|
340
|
-
cdef npy_intp i
|
|
341
|
-
|
|
342
|
-
if size is None:
|
|
343
|
-
return func(state, n, p)
|
|
344
|
-
else:
|
|
345
|
-
array = <ndarray>np.empty(size, int)
|
|
346
|
-
length = PyArray_SIZE(array)
|
|
347
|
-
array_data = <long *>PyArray_DATA(array)
|
|
348
|
-
with lock, nogil:
|
|
349
|
-
for i from 0 <= i < length:
|
|
350
|
-
array_data[i] = func(state, n, p)
|
|
351
|
-
return array
|
|
352
|
-
|
|
353
|
-
cdef object discnp_array(rk_state *state, rk_discnp func, object size,
|
|
354
|
-
ndarray on, ndarray op, object lock):
|
|
355
|
-
cdef long *array_data
|
|
356
|
-
cdef ndarray array "arrayObject"
|
|
357
|
-
cdef npy_intp length
|
|
358
|
-
cdef npy_intp i
|
|
359
|
-
cdef double *op_data
|
|
360
|
-
cdef long *on_data
|
|
361
|
-
cdef broadcast multi
|
|
362
|
-
|
|
363
|
-
if size is None:
|
|
364
|
-
multi = <broadcast> PyArray_MultiIterNew(2, <void *>on, <void *>op)
|
|
365
|
-
array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_LONG)
|
|
366
|
-
array_data = <long *>PyArray_DATA(array)
|
|
367
|
-
with lock, nogil:
|
|
368
|
-
for i from 0 <= i < multi.size:
|
|
369
|
-
on_data = <long *>PyArray_MultiIter_DATA(multi, 0)
|
|
370
|
-
op_data = <double *>PyArray_MultiIter_DATA(multi, 1)
|
|
371
|
-
array_data[i] = func(state, on_data[0], op_data[0])
|
|
372
|
-
PyArray_MultiIter_NEXT(multi)
|
|
373
|
-
else:
|
|
374
|
-
array = <ndarray>np.empty(size, int)
|
|
375
|
-
array_data = <long *>PyArray_DATA(array)
|
|
376
|
-
multi = <broadcast>PyArray_MultiIterNew(3, <void*>array, <void *>on, <void *>op)
|
|
377
|
-
if (multi.size != PyArray_SIZE(array)):
|
|
378
|
-
raise ValueError("size is not compatible with inputs")
|
|
379
|
-
with lock, nogil:
|
|
380
|
-
for i from 0 <= i < multi.size:
|
|
381
|
-
on_data = <long *>PyArray_MultiIter_DATA(multi, 1)
|
|
382
|
-
op_data = <double *>PyArray_MultiIter_DATA(multi, 2)
|
|
383
|
-
array_data[i] = func(state, on_data[0], op_data[0])
|
|
384
|
-
PyArray_MultiIter_NEXTi(multi, 1)
|
|
385
|
-
PyArray_MultiIter_NEXTi(multi, 2)
|
|
386
|
-
|
|
387
|
-
return array
|
|
388
|
-
|
|
389
|
-
cdef object discdd_array_sc(rk_state *state, rk_discdd func, object size,
|
|
390
|
-
double n, double p, object lock):
|
|
391
|
-
cdef long *array_data
|
|
392
|
-
cdef ndarray array "arrayObject"
|
|
393
|
-
cdef npy_intp length
|
|
394
|
-
cdef npy_intp i
|
|
395
|
-
|
|
396
|
-
if size is None:
|
|
397
|
-
return func(state, n, p)
|
|
398
|
-
else:
|
|
399
|
-
array = <ndarray>np.empty(size, int)
|
|
400
|
-
length = PyArray_SIZE(array)
|
|
401
|
-
array_data = <long *>PyArray_DATA(array)
|
|
402
|
-
with lock, nogil:
|
|
403
|
-
for i from 0 <= i < length:
|
|
404
|
-
array_data[i] = func(state, n, p)
|
|
405
|
-
return array
|
|
406
|
-
|
|
407
|
-
cdef object discdd_array(rk_state *state, rk_discdd func, object size,
|
|
408
|
-
ndarray on, ndarray op, object lock):
|
|
409
|
-
cdef long *array_data
|
|
410
|
-
cdef ndarray array "arrayObject"
|
|
411
|
-
cdef npy_intp length
|
|
412
|
-
cdef npy_intp i
|
|
413
|
-
cdef double *op_data
|
|
414
|
-
cdef double *on_data
|
|
415
|
-
cdef broadcast multi
|
|
416
|
-
|
|
417
|
-
if size is None:
|
|
418
|
-
multi = <broadcast> PyArray_MultiIterNew(2, <void *>on, <void *>op)
|
|
419
|
-
array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_LONG)
|
|
420
|
-
array_data = <long *>PyArray_DATA(array)
|
|
421
|
-
with lock, nogil:
|
|
422
|
-
for i from 0 <= i < multi.size:
|
|
423
|
-
on_data = <double *>PyArray_MultiIter_DATA(multi, 0)
|
|
424
|
-
op_data = <double *>PyArray_MultiIter_DATA(multi, 1)
|
|
425
|
-
array_data[i] = func(state, on_data[0], op_data[0])
|
|
426
|
-
PyArray_MultiIter_NEXT(multi)
|
|
427
|
-
else:
|
|
428
|
-
array = <ndarray>np.empty(size, int)
|
|
429
|
-
array_data = <long *>PyArray_DATA(array)
|
|
430
|
-
multi = <broadcast>PyArray_MultiIterNew(3, <void*>array, <void *>on, <void *>op)
|
|
431
|
-
if (multi.size != PyArray_SIZE(array)):
|
|
432
|
-
raise ValueError("size is not compatible with inputs")
|
|
433
|
-
with lock, nogil:
|
|
434
|
-
for i from 0 <= i < multi.size:
|
|
435
|
-
on_data = <double *>PyArray_MultiIter_DATA(multi, 1)
|
|
436
|
-
op_data = <double *>PyArray_MultiIter_DATA(multi, 2)
|
|
437
|
-
array_data[i] = func(state, on_data[0], op_data[0])
|
|
438
|
-
PyArray_MultiIter_NEXTi(multi, 1)
|
|
439
|
-
PyArray_MultiIter_NEXTi(multi, 2)
|
|
440
|
-
|
|
441
|
-
return array
|
|
442
|
-
|
|
443
|
-
cdef object discnmN_array_sc(rk_state *state, rk_discnmN func, object size,
|
|
444
|
-
long n, long m, long N, object lock):
|
|
445
|
-
cdef long *array_data
|
|
446
|
-
cdef ndarray array "arrayObject"
|
|
447
|
-
cdef npy_intp length
|
|
448
|
-
cdef npy_intp i
|
|
449
|
-
|
|
450
|
-
if size is None:
|
|
451
|
-
return func(state, n, m, N)
|
|
452
|
-
else:
|
|
453
|
-
array = <ndarray>np.empty(size, int)
|
|
454
|
-
length = PyArray_SIZE(array)
|
|
455
|
-
array_data = <long *>PyArray_DATA(array)
|
|
456
|
-
with lock, nogil:
|
|
457
|
-
for i from 0 <= i < length:
|
|
458
|
-
array_data[i] = func(state, n, m, N)
|
|
459
|
-
return array
|
|
460
|
-
|
|
461
|
-
cdef object discnmN_array(rk_state *state, rk_discnmN func, object size,
|
|
462
|
-
ndarray on, ndarray om, ndarray oN, object lock):
|
|
463
|
-
cdef long *array_data
|
|
464
|
-
cdef long *on_data
|
|
465
|
-
cdef long *om_data
|
|
466
|
-
cdef long *oN_data
|
|
467
|
-
cdef ndarray array "arrayObject"
|
|
468
|
-
cdef npy_intp length
|
|
469
|
-
cdef npy_intp i
|
|
470
|
-
cdef broadcast multi
|
|
471
|
-
|
|
472
|
-
if size is None:
|
|
473
|
-
multi = <broadcast> PyArray_MultiIterNew(3, <void *>on, <void *>om, <void *>oN)
|
|
474
|
-
array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_LONG)
|
|
475
|
-
array_data = <long *>PyArray_DATA(array)
|
|
476
|
-
with lock, nogil:
|
|
477
|
-
for i from 0 <= i < multi.size:
|
|
478
|
-
on_data = <long *>PyArray_MultiIter_DATA(multi, 0)
|
|
479
|
-
om_data = <long *>PyArray_MultiIter_DATA(multi, 1)
|
|
480
|
-
oN_data = <long *>PyArray_MultiIter_DATA(multi, 2)
|
|
481
|
-
array_data[i] = func(state, on_data[0], om_data[0], oN_data[0])
|
|
482
|
-
PyArray_MultiIter_NEXT(multi)
|
|
483
|
-
else:
|
|
484
|
-
array = <ndarray>np.empty(size, int)
|
|
485
|
-
array_data = <long *>PyArray_DATA(array)
|
|
486
|
-
multi = <broadcast>PyArray_MultiIterNew(4, <void*>array, <void *>on, <void *>om,
|
|
487
|
-
<void *>oN)
|
|
488
|
-
if (multi.size != PyArray_SIZE(array)):
|
|
489
|
-
raise ValueError("size is not compatible with inputs")
|
|
490
|
-
with lock, nogil:
|
|
491
|
-
for i from 0 <= i < multi.size:
|
|
492
|
-
on_data = <long *>PyArray_MultiIter_DATA(multi, 1)
|
|
493
|
-
om_data = <long *>PyArray_MultiIter_DATA(multi, 2)
|
|
494
|
-
oN_data = <long *>PyArray_MultiIter_DATA(multi, 3)
|
|
495
|
-
array_data[i] = func(state, on_data[0], om_data[0], oN_data[0])
|
|
496
|
-
PyArray_MultiIter_NEXT(multi)
|
|
497
|
-
|
|
498
|
-
return array
|
|
499
|
-
|
|
500
|
-
cdef object discd_array_sc(rk_state *state, rk_discd func, object size,
|
|
501
|
-
double a, object lock):
|
|
502
|
-
cdef long *array_data
|
|
503
|
-
cdef ndarray array "arrayObject"
|
|
504
|
-
cdef npy_intp length
|
|
505
|
-
cdef npy_intp i
|
|
506
|
-
|
|
507
|
-
if size is None:
|
|
508
|
-
return func(state, a)
|
|
509
|
-
else:
|
|
510
|
-
array = <ndarray>np.empty(size, int)
|
|
511
|
-
length = PyArray_SIZE(array)
|
|
512
|
-
array_data = <long *>PyArray_DATA(array)
|
|
513
|
-
with lock, nogil:
|
|
514
|
-
for i from 0 <= i < length:
|
|
515
|
-
array_data[i] = func(state, a)
|
|
516
|
-
return array
|
|
517
|
-
|
|
518
|
-
cdef object discd_array(rk_state *state, rk_discd func, object size, ndarray oa,
|
|
519
|
-
object lock):
|
|
520
|
-
cdef long *array_data
|
|
521
|
-
cdef double *oa_data
|
|
522
|
-
cdef ndarray array "arrayObject"
|
|
523
|
-
cdef npy_intp length
|
|
524
|
-
cdef npy_intp i
|
|
525
|
-
cdef broadcast multi
|
|
526
|
-
cdef flatiter itera
|
|
527
|
-
|
|
528
|
-
if size is None:
|
|
529
|
-
array = <ndarray>PyArray_SimpleNew(PyArray_NDIM(oa),
|
|
530
|
-
PyArray_DIMS(oa), NPY_LONG)
|
|
531
|
-
length = PyArray_SIZE(array)
|
|
532
|
-
array_data = <long *>PyArray_DATA(array)
|
|
533
|
-
itera = <flatiter>PyArray_IterNew(<object>oa)
|
|
534
|
-
with lock, nogil:
|
|
535
|
-
for i from 0 <= i < length:
|
|
536
|
-
array_data[i] = func(state, (<double *>(itera.dataptr))[0])
|
|
537
|
-
PyArray_ITER_NEXT(itera)
|
|
538
|
-
else:
|
|
539
|
-
array = <ndarray>np.empty(size, int)
|
|
540
|
-
array_data = <long *>PyArray_DATA(array)
|
|
541
|
-
multi = <broadcast>PyArray_MultiIterNew(2, <void *>array, <void *>oa)
|
|
542
|
-
if (multi.size != PyArray_SIZE(array)):
|
|
543
|
-
raise ValueError("size is not compatible with inputs")
|
|
544
|
-
with lock, nogil:
|
|
545
|
-
for i from 0 <= i < multi.size:
|
|
546
|
-
oa_data = <double *>PyArray_MultiIter_DATA(multi, 1)
|
|
547
|
-
array_data[i] = func(state, oa_data[0])
|
|
548
|
-
PyArray_MultiIter_NEXTi(multi, 1)
|
|
549
|
-
return array
|
|
550
|
-
|
|
551
|
-
cdef double kahan_sum(double *darr, npy_intp n):
|
|
552
|
-
cdef double c, y, t, sum
|
|
553
|
-
cdef npy_intp i
|
|
554
|
-
sum = darr[0]
|
|
555
|
-
c = 0.0
|
|
556
|
-
for i from 1 <= i < n:
|
|
557
|
-
y = darr[i] - c
|
|
558
|
-
t = sum + y
|
|
559
|
-
c = (t-sum) - y
|
|
560
|
-
sum = t
|
|
561
|
-
return sum
|
|
562
|
-
|
|
563
|
-
def _shape_from_size(size, d):
|
|
564
|
-
if size is None:
|
|
565
|
-
shape = (d,)
|
|
566
|
-
else:
|
|
567
|
-
try:
|
|
568
|
-
shape = (operator.index(size), d)
|
|
569
|
-
except TypeError:
|
|
570
|
-
shape = tuple(size) + (d,)
|
|
571
|
-
return shape
|
|
572
|
-
|
|
573
|
-
cdef class RandomState:
|
|
574
|
-
"""
|
|
575
|
-
RandomState(seed=None)
|
|
576
|
-
|
|
577
|
-
Container for the Mersenne Twister pseudo-random number generator.
|
|
578
|
-
|
|
579
|
-
`RandomState` exposes a number of methods for generating random numbers
|
|
580
|
-
drawn from a variety of probability distributions. In addition to the
|
|
581
|
-
distribution-specific arguments, each method takes a keyword argument
|
|
582
|
-
`size` that defaults to ``None``. If `size` is ``None``, then a single
|
|
583
|
-
value is generated and returned. If `size` is an integer, then a 1-D
|
|
584
|
-
array filled with generated values is returned. If `size` is a tuple,
|
|
585
|
-
then an array with that shape is filled and returned.
|
|
586
|
-
|
|
587
|
-
Parameters
|
|
588
|
-
----------
|
|
589
|
-
seed : {None, int, array_like}, optional
|
|
590
|
-
Random seed initializing the pseudo-random number generator.
|
|
591
|
-
Can be an integer, an array (or other sequence) of integers of
|
|
592
|
-
any length, or ``None`` (the default).
|
|
593
|
-
If `seed` is ``None``, then `RandomState` will try to read data from
|
|
594
|
-
``/dev/urandom`` (or the Windows analogue) if available or seed from
|
|
595
|
-
the clock otherwise.
|
|
596
|
-
|
|
597
|
-
Notes
|
|
598
|
-
-----
|
|
599
|
-
The Python stdlib module "random" also contains a Mersenne Twister
|
|
600
|
-
pseudo-random number generator with a number of methods that are similar
|
|
601
|
-
to the ones available in `RandomState`. `RandomState`, besides being
|
|
602
|
-
NumPy-aware, has the advantage that it provides a much larger number
|
|
603
|
-
of probability distributions to choose from.
|
|
604
|
-
|
|
605
|
-
"""
|
|
606
|
-
cdef rk_state *internal_state
|
|
607
|
-
cdef object lock
|
|
608
|
-
poisson_lam_max = np.iinfo('l').max - np.sqrt(np.iinfo('l').max)*10
|
|
609
|
-
|
|
610
|
-
def __init__(self, seed=None):
|
|
611
|
-
self.internal_state = <rk_state*>PyMem_Malloc(sizeof(rk_state))
|
|
612
|
-
|
|
613
|
-
self.lock = Lock()
|
|
614
|
-
self.seed(seed)
|
|
615
|
-
|
|
616
|
-
def __dealloc__(self):
|
|
617
|
-
if self.internal_state != NULL:
|
|
618
|
-
PyMem_Free(self.internal_state)
|
|
619
|
-
self.internal_state = NULL
|
|
620
|
-
|
|
621
|
-
def seed(self, seed=None):
|
|
622
|
-
"""
|
|
623
|
-
seed(seed=None)
|
|
624
|
-
|
|
625
|
-
Seed the generator.
|
|
626
|
-
|
|
627
|
-
This method is called when `RandomState` is initialized. It can be
|
|
628
|
-
called again to re-seed the generator. For details, see `RandomState`.
|
|
629
|
-
|
|
630
|
-
Parameters
|
|
631
|
-
----------
|
|
632
|
-
seed : int or array_like, optional
|
|
633
|
-
Seed for `RandomState`.
|
|
634
|
-
Must be convertable to 32 bit unsigned integers.
|
|
635
|
-
|
|
636
|
-
See Also
|
|
637
|
-
--------
|
|
638
|
-
RandomState
|
|
639
|
-
|
|
640
|
-
"""
|
|
641
|
-
cdef rk_error errcode
|
|
642
|
-
cdef ndarray obj "arrayObject_obj"
|
|
643
|
-
try:
|
|
644
|
-
if seed is None:
|
|
645
|
-
with self.lock:
|
|
646
|
-
errcode = rk_randomseed(self.internal_state)
|
|
647
|
-
else:
|
|
648
|
-
idx = operator.index(seed)
|
|
649
|
-
if idx > int(2**32 - 1) or idx < 0:
|
|
650
|
-
raise ValueError("Seed must be between 0 and 4294967295")
|
|
651
|
-
with self.lock:
|
|
652
|
-
rk_seed(idx, self.internal_state)
|
|
653
|
-
except TypeError:
|
|
654
|
-
obj = np.asarray(seed).astype(np.int64, casting='safe')
|
|
655
|
-
if ((obj > int(2**32 - 1)) | (obj < 0)).any():
|
|
656
|
-
raise ValueError("Seed must be between 0 and 4294967295")
|
|
657
|
-
obj = obj.astype('L', casting='unsafe')
|
|
658
|
-
with self.lock:
|
|
659
|
-
init_by_array(self.internal_state, <unsigned long *>PyArray_DATA(obj),
|
|
660
|
-
PyArray_DIM(obj, 0))
|
|
661
|
-
|
|
662
|
-
def get_state(self):
|
|
663
|
-
"""
|
|
664
|
-
get_state()
|
|
665
|
-
|
|
666
|
-
Return a tuple representing the internal state of the generator.
|
|
667
|
-
|
|
668
|
-
For more details, see `set_state`.
|
|
669
|
-
|
|
670
|
-
Returns
|
|
671
|
-
-------
|
|
672
|
-
out : tuple(str, ndarray of 624 uints, int, int, float)
|
|
673
|
-
The returned tuple has the following items:
|
|
674
|
-
|
|
675
|
-
1. the string 'MT19937'.
|
|
676
|
-
2. a 1-D array of 624 unsigned integer keys.
|
|
677
|
-
3. an integer ``pos``.
|
|
678
|
-
4. an integer ``has_gauss``.
|
|
679
|
-
5. a float ``cached_gaussian``.
|
|
680
|
-
|
|
681
|
-
See Also
|
|
682
|
-
--------
|
|
683
|
-
set_state
|
|
684
|
-
|
|
685
|
-
Notes
|
|
686
|
-
-----
|
|
687
|
-
`set_state` and `get_state` are not needed to work with any of the
|
|
688
|
-
random distributions in NumPy. If the internal state is manually altered,
|
|
689
|
-
the user should know exactly what he/she is doing.
|
|
690
|
-
|
|
691
|
-
"""
|
|
692
|
-
cdef ndarray state "arrayObject_state"
|
|
693
|
-
state = <ndarray>np.empty(624, np.uint)
|
|
694
|
-
with self.lock:
|
|
695
|
-
memcpy(<void*>PyArray_DATA(state), <void*>(self.internal_state.key), 624*sizeof(long))
|
|
696
|
-
has_gauss = self.internal_state.has_gauss
|
|
697
|
-
gauss = self.internal_state.gauss
|
|
698
|
-
pos = self.internal_state.pos
|
|
699
|
-
state = <ndarray>np.asarray(state, np.uint32)
|
|
700
|
-
return ('MT19937', state, pos, has_gauss, gauss)
|
|
701
|
-
|
|
702
|
-
def set_state(self, state):
|
|
703
|
-
"""
|
|
704
|
-
set_state(state)
|
|
705
|
-
|
|
706
|
-
Set the internal state of the generator from a tuple.
|
|
707
|
-
|
|
708
|
-
For use if one has reason to manually (re-)set the internal state of the
|
|
709
|
-
"Mersenne Twister"[1]_ pseudo-random number generating algorithm.
|
|
710
|
-
|
|
711
|
-
Parameters
|
|
712
|
-
----------
|
|
713
|
-
state : tuple(str, ndarray of 624 uints, int, int, float)
|
|
714
|
-
The `state` tuple has the following items:
|
|
715
|
-
|
|
716
|
-
1. the string 'MT19937', specifying the Mersenne Twister algorithm.
|
|
717
|
-
2. a 1-D array of 624 unsigned integers ``keys``.
|
|
718
|
-
3. an integer ``pos``.
|
|
719
|
-
4. an integer ``has_gauss``.
|
|
720
|
-
5. a float ``cached_gaussian``.
|
|
721
|
-
|
|
722
|
-
Returns
|
|
723
|
-
-------
|
|
724
|
-
out : None
|
|
725
|
-
Returns 'None' on success.
|
|
726
|
-
|
|
727
|
-
See Also
|
|
728
|
-
--------
|
|
729
|
-
get_state
|
|
730
|
-
|
|
731
|
-
Notes
|
|
732
|
-
-----
|
|
733
|
-
`set_state` and `get_state` are not needed to work with any of the
|
|
734
|
-
random distributions in NumPy. If the internal state is manually altered,
|
|
735
|
-
the user should know exactly what he/she is doing.
|
|
736
|
-
|
|
737
|
-
For backwards compatibility, the form (str, array of 624 uints, int) is
|
|
738
|
-
also accepted although it is missing some information about the cached
|
|
739
|
-
Gaussian value: ``state = ('MT19937', keys, pos)``.
|
|
740
|
-
|
|
741
|
-
References
|
|
742
|
-
----------
|
|
743
|
-
.. [1] M. Matsumoto and T. Nishimura, "Mersenne Twister: A
|
|
744
|
-
623-dimensionally equidistributed uniform pseudorandom number
|
|
745
|
-
generator," *ACM Trans. on Modeling and Computer Simulation*,
|
|
746
|
-
Vol. 8, No. 1, pp. 3-30, Jan. 1998.
|
|
747
|
-
|
|
748
|
-
"""
|
|
749
|
-
cdef ndarray obj "arrayObject_obj"
|
|
750
|
-
cdef int pos
|
|
751
|
-
algorithm_name = state[0]
|
|
752
|
-
if algorithm_name != 'MT19937':
|
|
753
|
-
raise ValueError("algorithm must be 'MT19937'")
|
|
754
|
-
key, pos = state[1:3]
|
|
755
|
-
if len(state) == 3:
|
|
756
|
-
has_gauss = 0
|
|
757
|
-
cached_gaussian = 0.0
|
|
758
|
-
else:
|
|
759
|
-
has_gauss, cached_gaussian = state[3:5]
|
|
760
|
-
try:
|
|
761
|
-
obj = <ndarray>PyArray_ContiguousFromObject(key, NPY_ULONG, 1, 1)
|
|
762
|
-
except TypeError:
|
|
763
|
-
# compatibility -- could be an older pickle
|
|
764
|
-
obj = <ndarray>PyArray_ContiguousFromObject(key, NPY_LONG, 1, 1)
|
|
765
|
-
if PyArray_DIM(obj, 0) != 624:
|
|
766
|
-
raise ValueError("state must be 624 longs")
|
|
767
|
-
with self.lock:
|
|
768
|
-
memcpy(<void*>(self.internal_state.key), <void*>PyArray_DATA(obj), 624*sizeof(long))
|
|
769
|
-
self.internal_state.pos = pos
|
|
770
|
-
self.internal_state.has_gauss = has_gauss
|
|
771
|
-
self.internal_state.gauss = cached_gaussian
|
|
772
|
-
|
|
773
|
-
# Pickling support:
|
|
774
|
-
def __getstate__(self):
|
|
775
|
-
return self.get_state()
|
|
776
|
-
|
|
777
|
-
def __setstate__(self, state):
|
|
778
|
-
self.set_state(state)
|
|
779
|
-
|
|
780
|
-
def __reduce__(self):
|
|
781
|
-
return (np.random.__RandomState_ctor, (), self.get_state())
|
|
782
|
-
|
|
783
|
-
# Basic distributions:
|
|
784
|
-
def random_sample(self, size=None):
|
|
785
|
-
"""
|
|
786
|
-
random_sample(size=None)
|
|
787
|
-
|
|
788
|
-
Return random floats in the half-open interval [0.0, 1.0).
|
|
789
|
-
|
|
790
|
-
Results are from the "continuous uniform" distribution over the
|
|
791
|
-
stated interval. To sample :math:`Unif[a, b), b > a` multiply
|
|
792
|
-
the output of `random_sample` by `(b-a)` and add `a`::
|
|
793
|
-
|
|
794
|
-
(b - a) * random_sample() + a
|
|
795
|
-
|
|
796
|
-
Parameters
|
|
797
|
-
----------
|
|
798
|
-
size : int or tuple of ints, optional
|
|
799
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
800
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
801
|
-
single value is returned.
|
|
802
|
-
|
|
803
|
-
Returns
|
|
804
|
-
-------
|
|
805
|
-
out : float or ndarray of floats
|
|
806
|
-
Array of random floats of shape `size` (unless ``size=None``, in which
|
|
807
|
-
case a single float is returned).
|
|
808
|
-
|
|
809
|
-
Examples
|
|
810
|
-
--------
|
|
811
|
-
>>> np.random.random_sample()
|
|
812
|
-
0.47108547995356098
|
|
813
|
-
>>> type(np.random.random_sample())
|
|
814
|
-
<type 'float'>
|
|
815
|
-
>>> np.random.random_sample((5,))
|
|
816
|
-
array([ 0.30220482, 0.86820401, 0.1654503 , 0.11659149, 0.54323428])
|
|
817
|
-
|
|
818
|
-
Three-by-two array of random numbers from [-5, 0):
|
|
819
|
-
|
|
820
|
-
>>> 5 * np.random.random_sample((3, 2)) - 5
|
|
821
|
-
array([[-3.99149989, -0.52338984],
|
|
822
|
-
[-2.99091858, -0.79479508],
|
|
823
|
-
[-1.23204345, -1.75224494]])
|
|
824
|
-
|
|
825
|
-
"""
|
|
826
|
-
return cont0_array(self.internal_state, rk_double, size, self.lock)
|
|
827
|
-
|
|
828
|
-
def tomaxint(self, size=None):
|
|
829
|
-
"""
|
|
830
|
-
tomaxint(size=None)
|
|
831
|
-
|
|
832
|
-
Random integers between 0 and ``sys.maxint``, inclusive.
|
|
833
|
-
|
|
834
|
-
Return a sample of uniformly distributed random integers in the interval
|
|
835
|
-
[0, ``sys.maxint``].
|
|
836
|
-
|
|
837
|
-
Parameters
|
|
838
|
-
----------
|
|
839
|
-
size : int or tuple of ints, optional
|
|
840
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
841
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
842
|
-
single value is returned.
|
|
843
|
-
|
|
844
|
-
Returns
|
|
845
|
-
-------
|
|
846
|
-
out : ndarray
|
|
847
|
-
Drawn samples, with shape `size`.
|
|
848
|
-
|
|
849
|
-
See Also
|
|
850
|
-
--------
|
|
851
|
-
randint : Uniform sampling over a given half-open interval of integers.
|
|
852
|
-
random_integers : Uniform sampling over a given closed interval of
|
|
853
|
-
integers.
|
|
854
|
-
|
|
855
|
-
Examples
|
|
856
|
-
--------
|
|
857
|
-
>>> RS = np.random.mtrand.RandomState() # need a RandomState object
|
|
858
|
-
>>> RS.tomaxint((2,2,2))
|
|
859
|
-
array([[[1170048599, 1600360186],
|
|
860
|
-
[ 739731006, 1947757578]],
|
|
861
|
-
[[1871712945, 752307660],
|
|
862
|
-
[1601631370, 1479324245]]])
|
|
863
|
-
>>> import sys
|
|
864
|
-
>>> sys.maxint
|
|
865
|
-
2147483647
|
|
866
|
-
>>> RS.tomaxint((2,2,2)) < sys.maxint
|
|
867
|
-
array([[[ True, True],
|
|
868
|
-
[ True, True]],
|
|
869
|
-
[[ True, True],
|
|
870
|
-
[ True, True]]], dtype=bool)
|
|
871
|
-
|
|
872
|
-
"""
|
|
873
|
-
return disc0_array(self.internal_state, rk_long, size, self.lock)
|
|
874
|
-
|
|
875
|
-
def randint(self, low, high=None, size=None):
|
|
876
|
-
"""
|
|
877
|
-
randint(low, high=None, size=None)
|
|
878
|
-
|
|
879
|
-
Return random integers from `low` (inclusive) to `high` (exclusive).
|
|
880
|
-
|
|
881
|
-
Return random integers from the "discrete uniform" distribution in the
|
|
882
|
-
"half-open" interval [`low`, `high`). If `high` is None (the default),
|
|
883
|
-
then results are from [0, `low`).
|
|
884
|
-
|
|
885
|
-
Parameters
|
|
886
|
-
----------
|
|
887
|
-
low : int
|
|
888
|
-
Lowest (signed) integer to be drawn from the distribution (unless
|
|
889
|
-
``high=None``, in which case this parameter is the *highest* such
|
|
890
|
-
integer).
|
|
891
|
-
high : int, optional
|
|
892
|
-
If provided, one above the largest (signed) integer to be drawn
|
|
893
|
-
from the distribution (see above for behavior if ``high=None``).
|
|
894
|
-
size : int or tuple of ints, optional
|
|
895
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
896
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
897
|
-
single value is returned.
|
|
898
|
-
|
|
899
|
-
Returns
|
|
900
|
-
-------
|
|
901
|
-
out : int or ndarray of ints
|
|
902
|
-
`size`-shaped array of random integers from the appropriate
|
|
903
|
-
distribution, or a single such random int if `size` not provided.
|
|
904
|
-
|
|
905
|
-
See Also
|
|
906
|
-
--------
|
|
907
|
-
random.random_integers : similar to `randint`, only for the closed
|
|
908
|
-
interval [`low`, `high`], and 1 is the lowest value if `high` is
|
|
909
|
-
omitted. In particular, this other one is the one to use to generate
|
|
910
|
-
uniformly distributed discrete non-integers.
|
|
911
|
-
|
|
912
|
-
Examples
|
|
913
|
-
--------
|
|
914
|
-
>>> np.random.randint(2, size=10)
|
|
915
|
-
array([1, 0, 0, 0, 1, 1, 0, 0, 1, 0])
|
|
916
|
-
>>> np.random.randint(1, size=10)
|
|
917
|
-
array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
|
|
918
|
-
|
|
919
|
-
Generate a 2 x 4 array of ints between 0 and 4, inclusive:
|
|
920
|
-
|
|
921
|
-
>>> np.random.randint(5, size=(2, 4))
|
|
922
|
-
array([[4, 0, 2, 1],
|
|
923
|
-
[3, 2, 2, 0]])
|
|
924
|
-
|
|
925
|
-
"""
|
|
926
|
-
cdef long lo, hi, rv
|
|
927
|
-
cdef unsigned long diff
|
|
928
|
-
cdef long *array_data
|
|
929
|
-
cdef ndarray array "arrayObject"
|
|
930
|
-
cdef npy_intp length
|
|
931
|
-
cdef npy_intp i
|
|
932
|
-
|
|
933
|
-
if high is None:
|
|
934
|
-
lo = 0
|
|
935
|
-
hi = low
|
|
936
|
-
else:
|
|
937
|
-
lo = low
|
|
938
|
-
hi = high
|
|
939
|
-
|
|
940
|
-
if lo >= hi :
|
|
941
|
-
raise ValueError("low >= high")
|
|
942
|
-
|
|
943
|
-
diff = <unsigned long>hi - <unsigned long>lo - 1UL
|
|
944
|
-
if size is None:
|
|
945
|
-
with self.lock:
|
|
946
|
-
rv = lo + <long>rk_interval(diff, self. internal_state)
|
|
947
|
-
return rv
|
|
948
|
-
else:
|
|
949
|
-
array = <ndarray>np.empty(size, int)
|
|
950
|
-
length = PyArray_SIZE(array)
|
|
951
|
-
array_data = <long *>PyArray_DATA(array)
|
|
952
|
-
with self.lock, nogil:
|
|
953
|
-
for i from 0 <= i < length:
|
|
954
|
-
rv = lo + <long>rk_interval(diff, self. internal_state)
|
|
955
|
-
array_data[i] = rv
|
|
956
|
-
return array
|
|
957
|
-
|
|
958
|
-
def bytes(self, npy_intp length):
|
|
959
|
-
"""
|
|
960
|
-
bytes(length)
|
|
961
|
-
|
|
962
|
-
Return random bytes.
|
|
963
|
-
|
|
964
|
-
Parameters
|
|
965
|
-
----------
|
|
966
|
-
length : int
|
|
967
|
-
Number of random bytes.
|
|
968
|
-
|
|
969
|
-
Returns
|
|
970
|
-
-------
|
|
971
|
-
out : str
|
|
972
|
-
String of length `length`.
|
|
973
|
-
|
|
974
|
-
Examples
|
|
975
|
-
--------
|
|
976
|
-
>>> np.random.bytes(10)
|
|
977
|
-
' eh\\x85\\x022SZ\\xbf\\xa4' #random
|
|
978
|
-
|
|
979
|
-
"""
|
|
980
|
-
cdef void *bytes
|
|
981
|
-
bytestring = empty_py_bytes(length, &bytes)
|
|
982
|
-
with self.lock, nogil:
|
|
983
|
-
rk_fill(bytes, length, self.internal_state)
|
|
984
|
-
return bytestring
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
def choice(self, a, size=None, replace=True, p=None):
|
|
988
|
-
"""
|
|
989
|
-
choice(a, size=None, replace=True, p=None)
|
|
990
|
-
|
|
991
|
-
Generates a random sample from a given 1-D array
|
|
992
|
-
|
|
993
|
-
.. versionadded:: 1.7.0
|
|
994
|
-
|
|
995
|
-
Parameters
|
|
996
|
-
-----------
|
|
997
|
-
a : 1-D array-like or int
|
|
998
|
-
If an ndarray, a random sample is generated from its elements.
|
|
999
|
-
If an int, the random sample is generated as if a was np.arange(n)
|
|
1000
|
-
size : int or tuple of ints, optional
|
|
1001
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
1002
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
1003
|
-
single value is returned.
|
|
1004
|
-
replace : boolean, optional
|
|
1005
|
-
Whether the sample is with or without replacement
|
|
1006
|
-
p : 1-D array-like, optional
|
|
1007
|
-
The probabilities associated with each entry in a.
|
|
1008
|
-
If not given the sample assumes a uniform distribution over all
|
|
1009
|
-
entries in a.
|
|
1010
|
-
|
|
1011
|
-
Returns
|
|
1012
|
-
--------
|
|
1013
|
-
samples : 1-D ndarray, shape (size,)
|
|
1014
|
-
The generated random samples
|
|
1015
|
-
|
|
1016
|
-
Raises
|
|
1017
|
-
-------
|
|
1018
|
-
ValueError
|
|
1019
|
-
If a is an int and less than zero, if a or p are not 1-dimensional,
|
|
1020
|
-
if a is an array-like of size 0, if p is not a vector of
|
|
1021
|
-
probabilities, if a and p have different lengths, or if
|
|
1022
|
-
replace=False and the sample size is greater than the population
|
|
1023
|
-
size
|
|
1024
|
-
|
|
1025
|
-
See Also
|
|
1026
|
-
---------
|
|
1027
|
-
randint, shuffle, permutation
|
|
1028
|
-
|
|
1029
|
-
Examples
|
|
1030
|
-
---------
|
|
1031
|
-
Generate a uniform random sample from np.arange(5) of size 3:
|
|
1032
|
-
|
|
1033
|
-
>>> np.random.choice(5, 3)
|
|
1034
|
-
array([0, 3, 4])
|
|
1035
|
-
>>> #This is equivalent to np.random.randint(0,5,3)
|
|
1036
|
-
|
|
1037
|
-
Generate a non-uniform random sample from np.arange(5) of size 3:
|
|
1038
|
-
|
|
1039
|
-
>>> np.random.choice(5, 3, p=[0.1, 0, 0.3, 0.6, 0])
|
|
1040
|
-
array([3, 3, 0])
|
|
1041
|
-
|
|
1042
|
-
Generate a uniform random sample from np.arange(5) of size 3 without
|
|
1043
|
-
replacement:
|
|
1044
|
-
|
|
1045
|
-
>>> np.random.choice(5, 3, replace=False)
|
|
1046
|
-
array([3,1,0])
|
|
1047
|
-
>>> #This is equivalent to np.random.permutation(np.arange(5))[:3]
|
|
1048
|
-
|
|
1049
|
-
Generate a non-uniform random sample from np.arange(5) of size
|
|
1050
|
-
3 without replacement:
|
|
1051
|
-
|
|
1052
|
-
>>> np.random.choice(5, 3, replace=False, p=[0.1, 0, 0.3, 0.6, 0])
|
|
1053
|
-
array([2, 3, 0])
|
|
1054
|
-
|
|
1055
|
-
Any of the above can be repeated with an arbitrary array-like
|
|
1056
|
-
instead of just integers. For instance:
|
|
1057
|
-
|
|
1058
|
-
>>> aa_milne_arr = ['pooh', 'rabbit', 'piglet', 'Christopher']
|
|
1059
|
-
>>> np.random.choice(aa_milne_arr, 5, p=[0.5, 0.1, 0.1, 0.3])
|
|
1060
|
-
array(['pooh', 'pooh', 'pooh', 'Christopher', 'piglet'],
|
|
1061
|
-
dtype='|S11')
|
|
1062
|
-
|
|
1063
|
-
"""
|
|
1064
|
-
|
|
1065
|
-
# Format and Verify input
|
|
1066
|
-
a = np.array(a, copy=False)
|
|
1067
|
-
if a.ndim == 0:
|
|
1068
|
-
try:
|
|
1069
|
-
# __index__ must return an integer by python rules.
|
|
1070
|
-
pop_size = operator.index(a.item())
|
|
1071
|
-
except TypeError:
|
|
1072
|
-
raise ValueError("a must be 1-dimensional or an integer")
|
|
1073
|
-
if pop_size <= 0:
|
|
1074
|
-
raise ValueError("a must be greater than 0")
|
|
1075
|
-
elif a.ndim != 1:
|
|
1076
|
-
raise ValueError("a must be 1-dimensional")
|
|
1077
|
-
else:
|
|
1078
|
-
pop_size = a.shape[0]
|
|
1079
|
-
if pop_size is 0:
|
|
1080
|
-
raise ValueError("a must be non-empty")
|
|
1081
|
-
|
|
1082
|
-
if p is not None:
|
|
1083
|
-
d = len(p)
|
|
1084
|
-
p = <ndarray>PyArray_ContiguousFromObject(p, NPY_DOUBLE, 1, 1)
|
|
1085
|
-
pix = <double*>PyArray_DATA(p)
|
|
1086
|
-
|
|
1087
|
-
if p.ndim != 1:
|
|
1088
|
-
raise ValueError("p must be 1-dimensional")
|
|
1089
|
-
if p.size != pop_size:
|
|
1090
|
-
raise ValueError("a and p must have same size")
|
|
1091
|
-
if np.logical_or.reduce(p < 0):
|
|
1092
|
-
raise ValueError("probabilities are not non-negative")
|
|
1093
|
-
if abs(kahan_sum(pix, d) - 1.) > 1e-8:
|
|
1094
|
-
raise ValueError("probabilities do not sum to 1")
|
|
1095
|
-
|
|
1096
|
-
shape = size
|
|
1097
|
-
if shape is not None:
|
|
1098
|
-
size = np.prod(shape, dtype=np.intp)
|
|
1099
|
-
else:
|
|
1100
|
-
size = 1
|
|
1101
|
-
|
|
1102
|
-
# Actual sampling
|
|
1103
|
-
if replace:
|
|
1104
|
-
if p is not None:
|
|
1105
|
-
cdf = p.cumsum()
|
|
1106
|
-
cdf /= cdf[-1]
|
|
1107
|
-
uniform_samples = self.random_sample(shape)
|
|
1108
|
-
idx = cdf.searchsorted(uniform_samples, side='right')
|
|
1109
|
-
idx = np.array(idx, copy=False) # searchsorted returns a scalar
|
|
1110
|
-
else:
|
|
1111
|
-
idx = self.randint(0, pop_size, size=shape)
|
|
1112
|
-
else:
|
|
1113
|
-
if size > pop_size:
|
|
1114
|
-
raise ValueError("Cannot take a larger sample than "
|
|
1115
|
-
"population when 'replace=False'")
|
|
1116
|
-
|
|
1117
|
-
if p is not None:
|
|
1118
|
-
if np.count_nonzero(p > 0) < size:
|
|
1119
|
-
raise ValueError("Fewer non-zero entries in p than size")
|
|
1120
|
-
n_uniq = 0
|
|
1121
|
-
p = p.copy()
|
|
1122
|
-
found = np.zeros(shape, dtype=np.int)
|
|
1123
|
-
flat_found = found.ravel()
|
|
1124
|
-
while n_uniq < size:
|
|
1125
|
-
x = self.rand(size - n_uniq)
|
|
1126
|
-
if n_uniq > 0:
|
|
1127
|
-
p[flat_found[0:n_uniq]] = 0
|
|
1128
|
-
cdf = np.cumsum(p)
|
|
1129
|
-
cdf /= cdf[-1]
|
|
1130
|
-
new = cdf.searchsorted(x, side='right')
|
|
1131
|
-
_, unique_indices = np.unique(new, return_index=True)
|
|
1132
|
-
unique_indices.sort()
|
|
1133
|
-
new = new.take(unique_indices)
|
|
1134
|
-
flat_found[n_uniq:n_uniq + new.size] = new
|
|
1135
|
-
n_uniq += new.size
|
|
1136
|
-
idx = found
|
|
1137
|
-
else:
|
|
1138
|
-
idx = self.permutation(pop_size)[:size]
|
|
1139
|
-
if shape is not None:
|
|
1140
|
-
idx.shape = shape
|
|
1141
|
-
|
|
1142
|
-
if shape is None and isinstance(idx, np.ndarray):
|
|
1143
|
-
# In most cases a scalar will have been made an array
|
|
1144
|
-
idx = idx.item(0)
|
|
1145
|
-
|
|
1146
|
-
#Use samples as indices for a if a is array-like
|
|
1147
|
-
if a.ndim == 0:
|
|
1148
|
-
return idx
|
|
1149
|
-
|
|
1150
|
-
if shape is not None and idx.ndim == 0:
|
|
1151
|
-
# If size == () then the user requested a 0-d array as opposed to
|
|
1152
|
-
# a scalar object when size is None. However a[idx] is always a
|
|
1153
|
-
# scalar and not an array. So this makes sure the result is an
|
|
1154
|
-
# array, taking into account that np.array(item) may not work
|
|
1155
|
-
# for object arrays.
|
|
1156
|
-
res = np.empty((), dtype=a.dtype)
|
|
1157
|
-
res[()] = a[idx]
|
|
1158
|
-
return res
|
|
1159
|
-
|
|
1160
|
-
return a[idx]
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
def uniform(self, low=0.0, high=1.0, size=None):
|
|
1164
|
-
"""
|
|
1165
|
-
uniform(low=0.0, high=1.0, size=None)
|
|
1166
|
-
|
|
1167
|
-
Draw samples from a uniform distribution.
|
|
1168
|
-
|
|
1169
|
-
Samples are uniformly distributed over the half-open interval
|
|
1170
|
-
``[low, high)`` (includes low, but excludes high). In other words,
|
|
1171
|
-
any value within the given interval is equally likely to be drawn
|
|
1172
|
-
by `uniform`.
|
|
1173
|
-
|
|
1174
|
-
Parameters
|
|
1175
|
-
----------
|
|
1176
|
-
low : float, optional
|
|
1177
|
-
Lower boundary of the output interval. All values generated will be
|
|
1178
|
-
greater than or equal to low. The default value is 0.
|
|
1179
|
-
high : float
|
|
1180
|
-
Upper boundary of the output interval. All values generated will be
|
|
1181
|
-
less than high. The default value is 1.0.
|
|
1182
|
-
size : int or tuple of ints, optional
|
|
1183
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
1184
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
1185
|
-
single value is returned.
|
|
1186
|
-
|
|
1187
|
-
Returns
|
|
1188
|
-
-------
|
|
1189
|
-
out : ndarray
|
|
1190
|
-
Drawn samples, with shape `size`.
|
|
1191
|
-
|
|
1192
|
-
See Also
|
|
1193
|
-
--------
|
|
1194
|
-
randint : Discrete uniform distribution, yielding integers.
|
|
1195
|
-
random_integers : Discrete uniform distribution over the closed
|
|
1196
|
-
interval ``[low, high]``.
|
|
1197
|
-
random_sample : Floats uniformly distributed over ``[0, 1)``.
|
|
1198
|
-
random : Alias for `random_sample`.
|
|
1199
|
-
rand : Convenience function that accepts dimensions as input, e.g.,
|
|
1200
|
-
``rand(2,2)`` would generate a 2-by-2 array of floats,
|
|
1201
|
-
uniformly distributed over ``[0, 1)``.
|
|
1202
|
-
|
|
1203
|
-
Notes
|
|
1204
|
-
-----
|
|
1205
|
-
The probability density function of the uniform distribution is
|
|
1206
|
-
|
|
1207
|
-
.. math:: p(x) = \\frac{1}{b - a}
|
|
1208
|
-
|
|
1209
|
-
anywhere within the interval ``[a, b)``, and zero elsewhere.
|
|
1210
|
-
|
|
1211
|
-
Examples
|
|
1212
|
-
--------
|
|
1213
|
-
Draw samples from the distribution:
|
|
1214
|
-
|
|
1215
|
-
>>> s = np.random.uniform(-1,0,1000)
|
|
1216
|
-
|
|
1217
|
-
All values are within the given interval:
|
|
1218
|
-
|
|
1219
|
-
>>> np.all(s >= -1)
|
|
1220
|
-
True
|
|
1221
|
-
>>> np.all(s < 0)
|
|
1222
|
-
True
|
|
1223
|
-
|
|
1224
|
-
Display the histogram of the samples, along with the
|
|
1225
|
-
probability density function:
|
|
1226
|
-
|
|
1227
|
-
>>> import matplotlib.pyplot as plt
|
|
1228
|
-
>>> count, bins, ignored = plt.hist(s, 15, normed=True)
|
|
1229
|
-
>>> plt.plot(bins, np.ones_like(bins), linewidth=2, color='r')
|
|
1230
|
-
>>> plt.show()
|
|
1231
|
-
|
|
1232
|
-
"""
|
|
1233
|
-
cdef ndarray olow, ohigh, odiff
|
|
1234
|
-
cdef double flow, fhigh
|
|
1235
|
-
cdef object temp
|
|
1236
|
-
|
|
1237
|
-
flow = PyFloat_AsDouble(low)
|
|
1238
|
-
fhigh = PyFloat_AsDouble(high)
|
|
1239
|
-
if not PyErr_Occurred():
|
|
1240
|
-
return cont2_array_sc(self.internal_state, rk_uniform, size, flow,
|
|
1241
|
-
fhigh-flow, self.lock)
|
|
1242
|
-
|
|
1243
|
-
PyErr_Clear()
|
|
1244
|
-
olow = <ndarray>PyArray_FROM_OTF(low, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
1245
|
-
ohigh = <ndarray>PyArray_FROM_OTF(high, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
1246
|
-
temp = np.subtract(ohigh, olow)
|
|
1247
|
-
Py_INCREF(temp) # needed to get around Pyrex's automatic reference-counting
|
|
1248
|
-
# rules because EnsureArray steals a reference
|
|
1249
|
-
odiff = <ndarray>PyArray_EnsureArray(temp)
|
|
1250
|
-
return cont2_array(self.internal_state, rk_uniform, size, olow, odiff,
|
|
1251
|
-
self.lock)
|
|
1252
|
-
|
|
1253
|
-
def rand(self, *args):
|
|
1254
|
-
"""
|
|
1255
|
-
rand(d0, d1, ..., dn)
|
|
1256
|
-
|
|
1257
|
-
Random values in a given shape.
|
|
1258
|
-
|
|
1259
|
-
Create an array of the given shape and propagate it with
|
|
1260
|
-
random samples from a uniform distribution
|
|
1261
|
-
over ``[0, 1)``.
|
|
1262
|
-
|
|
1263
|
-
Parameters
|
|
1264
|
-
----------
|
|
1265
|
-
d0, d1, ..., dn : int, optional
|
|
1266
|
-
The dimensions of the returned array, should all be positive.
|
|
1267
|
-
If no argument is given a single Python float is returned.
|
|
1268
|
-
|
|
1269
|
-
Returns
|
|
1270
|
-
-------
|
|
1271
|
-
out : ndarray, shape ``(d0, d1, ..., dn)``
|
|
1272
|
-
Random values.
|
|
1273
|
-
|
|
1274
|
-
See Also
|
|
1275
|
-
--------
|
|
1276
|
-
random
|
|
1277
|
-
|
|
1278
|
-
Notes
|
|
1279
|
-
-----
|
|
1280
|
-
This is a convenience function. If you want an interface that
|
|
1281
|
-
takes a shape-tuple as the first argument, refer to
|
|
1282
|
-
np.random.random_sample .
|
|
1283
|
-
|
|
1284
|
-
Examples
|
|
1285
|
-
--------
|
|
1286
|
-
>>> np.random.rand(3,2)
|
|
1287
|
-
array([[ 0.14022471, 0.96360618], #random
|
|
1288
|
-
[ 0.37601032, 0.25528411], #random
|
|
1289
|
-
[ 0.49313049, 0.94909878]]) #random
|
|
1290
|
-
|
|
1291
|
-
"""
|
|
1292
|
-
if len(args) == 0:
|
|
1293
|
-
return self.random_sample()
|
|
1294
|
-
else:
|
|
1295
|
-
return self.random_sample(size=args)
|
|
1296
|
-
|
|
1297
|
-
def randn(self, *args):
|
|
1298
|
-
"""
|
|
1299
|
-
randn(d0, d1, ..., dn)
|
|
1300
|
-
|
|
1301
|
-
Return a sample (or samples) from the "standard normal" distribution.
|
|
1302
|
-
|
|
1303
|
-
If positive, int_like or int-convertible arguments are provided,
|
|
1304
|
-
`randn` generates an array of shape ``(d0, d1, ..., dn)``, filled
|
|
1305
|
-
with random floats sampled from a univariate "normal" (Gaussian)
|
|
1306
|
-
distribution of mean 0 and variance 1 (if any of the :math:`d_i` are
|
|
1307
|
-
floats, they are first converted to integers by truncation). A single
|
|
1308
|
-
float randomly sampled from the distribution is returned if no
|
|
1309
|
-
argument is provided.
|
|
1310
|
-
|
|
1311
|
-
This is a convenience function. If you want an interface that takes a
|
|
1312
|
-
tuple as the first argument, use `numpy.random.standard_normal` instead.
|
|
1313
|
-
|
|
1314
|
-
Parameters
|
|
1315
|
-
----------
|
|
1316
|
-
d0, d1, ..., dn : int, optional
|
|
1317
|
-
The dimensions of the returned array, should be all positive.
|
|
1318
|
-
If no argument is given a single Python float is returned.
|
|
1319
|
-
|
|
1320
|
-
Returns
|
|
1321
|
-
-------
|
|
1322
|
-
Z : ndarray or float
|
|
1323
|
-
A ``(d0, d1, ..., dn)``-shaped array of floating-point samples from
|
|
1324
|
-
the standard normal distribution, or a single such float if
|
|
1325
|
-
no parameters were supplied.
|
|
1326
|
-
|
|
1327
|
-
See Also
|
|
1328
|
-
--------
|
|
1329
|
-
random.standard_normal : Similar, but takes a tuple as its argument.
|
|
1330
|
-
|
|
1331
|
-
Notes
|
|
1332
|
-
-----
|
|
1333
|
-
For random samples from :math:`N(\\mu, \\sigma^2)`, use:
|
|
1334
|
-
|
|
1335
|
-
``sigma * np.random.randn(...) + mu``
|
|
1336
|
-
|
|
1337
|
-
Examples
|
|
1338
|
-
--------
|
|
1339
|
-
>>> np.random.randn()
|
|
1340
|
-
2.1923875335537315 #random
|
|
1341
|
-
|
|
1342
|
-
Two-by-four array of samples from N(3, 6.25):
|
|
1343
|
-
|
|
1344
|
-
>>> 2.5 * np.random.randn(2, 4) + 3
|
|
1345
|
-
array([[-4.49401501, 4.00950034, -1.81814867, 7.29718677], #random
|
|
1346
|
-
[ 0.39924804, 4.68456316, 4.99394529, 4.84057254]]) #random
|
|
1347
|
-
|
|
1348
|
-
"""
|
|
1349
|
-
if len(args) == 0:
|
|
1350
|
-
return self.standard_normal()
|
|
1351
|
-
else:
|
|
1352
|
-
return self.standard_normal(args)
|
|
1353
|
-
|
|
1354
|
-
def random_integers(self, low, high=None, size=None):
|
|
1355
|
-
"""
|
|
1356
|
-
random_integers(low, high=None, size=None)
|
|
1357
|
-
|
|
1358
|
-
Return random integers between `low` and `high`, inclusive.
|
|
1359
|
-
|
|
1360
|
-
Return random integers from the "discrete uniform" distribution in the
|
|
1361
|
-
closed interval [`low`, `high`]. If `high` is None (the default),
|
|
1362
|
-
then results are from [1, `low`].
|
|
1363
|
-
|
|
1364
|
-
Parameters
|
|
1365
|
-
----------
|
|
1366
|
-
low : int
|
|
1367
|
-
Lowest (signed) integer to be drawn from the distribution (unless
|
|
1368
|
-
``high=None``, in which case this parameter is the *highest* such
|
|
1369
|
-
integer).
|
|
1370
|
-
high : int, optional
|
|
1371
|
-
If provided, the largest (signed) integer to be drawn from the
|
|
1372
|
-
distribution (see above for behavior if ``high=None``).
|
|
1373
|
-
size : int or tuple of ints, optional
|
|
1374
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
1375
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
1376
|
-
single value is returned.
|
|
1377
|
-
|
|
1378
|
-
Returns
|
|
1379
|
-
-------
|
|
1380
|
-
out : int or ndarray of ints
|
|
1381
|
-
`size`-shaped array of random integers from the appropriate
|
|
1382
|
-
distribution, or a single such random int if `size` not provided.
|
|
1383
|
-
|
|
1384
|
-
See Also
|
|
1385
|
-
--------
|
|
1386
|
-
random.randint : Similar to `random_integers`, only for the half-open
|
|
1387
|
-
interval [`low`, `high`), and 0 is the lowest value if `high` is
|
|
1388
|
-
omitted.
|
|
1389
|
-
|
|
1390
|
-
Notes
|
|
1391
|
-
-----
|
|
1392
|
-
To sample from N evenly spaced floating-point numbers between a and b,
|
|
1393
|
-
use::
|
|
1394
|
-
|
|
1395
|
-
a + (b - a) * (np.random.random_integers(N) - 1) / (N - 1.)
|
|
1396
|
-
|
|
1397
|
-
Examples
|
|
1398
|
-
--------
|
|
1399
|
-
>>> np.random.random_integers(5)
|
|
1400
|
-
4
|
|
1401
|
-
>>> type(np.random.random_integers(5))
|
|
1402
|
-
<type 'int'>
|
|
1403
|
-
>>> np.random.random_integers(5, size=(3.,2.))
|
|
1404
|
-
array([[5, 4],
|
|
1405
|
-
[3, 3],
|
|
1406
|
-
[4, 5]])
|
|
1407
|
-
|
|
1408
|
-
Choose five random numbers from the set of five evenly-spaced
|
|
1409
|
-
numbers between 0 and 2.5, inclusive (*i.e.*, from the set
|
|
1410
|
-
:math:`{0, 5/8, 10/8, 15/8, 20/8}`):
|
|
1411
|
-
|
|
1412
|
-
>>> 2.5 * (np.random.random_integers(5, size=(5,)) - 1) / 4.
|
|
1413
|
-
array([ 0.625, 1.25 , 0.625, 0.625, 2.5 ])
|
|
1414
|
-
|
|
1415
|
-
Roll two six sided dice 1000 times and sum the results:
|
|
1416
|
-
|
|
1417
|
-
>>> d1 = np.random.random_integers(1, 6, 1000)
|
|
1418
|
-
>>> d2 = np.random.random_integers(1, 6, 1000)
|
|
1419
|
-
>>> dsums = d1 + d2
|
|
1420
|
-
|
|
1421
|
-
Display results as a histogram:
|
|
1422
|
-
|
|
1423
|
-
>>> import matplotlib.pyplot as plt
|
|
1424
|
-
>>> count, bins, ignored = plt.hist(dsums, 11, normed=True)
|
|
1425
|
-
>>> plt.show()
|
|
1426
|
-
|
|
1427
|
-
"""
|
|
1428
|
-
if high is None:
|
|
1429
|
-
high = low
|
|
1430
|
-
low = 1
|
|
1431
|
-
return self.randint(low, high+1, size)
|
|
1432
|
-
|
|
1433
|
-
# Complicated, continuous distributions:
|
|
1434
|
-
def standard_normal(self, size=None):
|
|
1435
|
-
"""
|
|
1436
|
-
standard_normal(size=None)
|
|
1437
|
-
|
|
1438
|
-
Returns samples from a Standard Normal distribution (mean=0, stdev=1).
|
|
1439
|
-
|
|
1440
|
-
Parameters
|
|
1441
|
-
----------
|
|
1442
|
-
size : int or tuple of ints, optional
|
|
1443
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
1444
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
1445
|
-
single value is returned.
|
|
1446
|
-
|
|
1447
|
-
Returns
|
|
1448
|
-
-------
|
|
1449
|
-
out : float or ndarray
|
|
1450
|
-
Drawn samples.
|
|
1451
|
-
|
|
1452
|
-
Examples
|
|
1453
|
-
--------
|
|
1454
|
-
>>> s = np.random.standard_normal(8000)
|
|
1455
|
-
>>> s
|
|
1456
|
-
array([ 0.6888893 , 0.78096262, -0.89086505, ..., 0.49876311, #random
|
|
1457
|
-
-0.38672696, -0.4685006 ]) #random
|
|
1458
|
-
>>> s.shape
|
|
1459
|
-
(8000,)
|
|
1460
|
-
>>> s = np.random.standard_normal(size=(3, 4, 2))
|
|
1461
|
-
>>> s.shape
|
|
1462
|
-
(3, 4, 2)
|
|
1463
|
-
|
|
1464
|
-
"""
|
|
1465
|
-
return cont0_array(self.internal_state, rk_gauss, size, self.lock)
|
|
1466
|
-
|
|
1467
|
-
def normal(self, loc=0.0, scale=1.0, size=None):
|
|
1468
|
-
"""
|
|
1469
|
-
normal(loc=0.0, scale=1.0, size=None)
|
|
1470
|
-
|
|
1471
|
-
Draw random samples from a normal (Gaussian) distribution.
|
|
1472
|
-
|
|
1473
|
-
The probability density function of the normal distribution, first
|
|
1474
|
-
derived by De Moivre and 200 years later by both Gauss and Laplace
|
|
1475
|
-
independently [2]_, is often called the bell curve because of
|
|
1476
|
-
its characteristic shape (see the example below).
|
|
1477
|
-
|
|
1478
|
-
The normal distributions occurs often in nature. For example, it
|
|
1479
|
-
describes the commonly occurring distribution of samples influenced
|
|
1480
|
-
by a large number of tiny, random disturbances, each with its own
|
|
1481
|
-
unique distribution [2]_.
|
|
1482
|
-
|
|
1483
|
-
Parameters
|
|
1484
|
-
----------
|
|
1485
|
-
loc : float
|
|
1486
|
-
Mean ("centre") of the distribution.
|
|
1487
|
-
scale : float
|
|
1488
|
-
Standard deviation (spread or "width") of the distribution.
|
|
1489
|
-
size : int or tuple of ints, optional
|
|
1490
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
1491
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
1492
|
-
single value is returned.
|
|
1493
|
-
|
|
1494
|
-
See Also
|
|
1495
|
-
--------
|
|
1496
|
-
scipy.stats.distributions.norm : probability density function,
|
|
1497
|
-
distribution or cumulative density function, etc.
|
|
1498
|
-
|
|
1499
|
-
Notes
|
|
1500
|
-
-----
|
|
1501
|
-
The probability density for the Gaussian distribution is
|
|
1502
|
-
|
|
1503
|
-
.. math:: p(x) = \\frac{1}{\\sqrt{ 2 \\pi \\sigma^2 }}
|
|
1504
|
-
e^{ - \\frac{ (x - \\mu)^2 } {2 \\sigma^2} },
|
|
1505
|
-
|
|
1506
|
-
where :math:`\\mu` is the mean and :math:`\\sigma` the standard deviation.
|
|
1507
|
-
The square of the standard deviation, :math:`\\sigma^2`, is called the
|
|
1508
|
-
variance.
|
|
1509
|
-
|
|
1510
|
-
The function has its peak at the mean, and its "spread" increases with
|
|
1511
|
-
the standard deviation (the function reaches 0.607 times its maximum at
|
|
1512
|
-
:math:`x + \\sigma` and :math:`x - \\sigma` [2]_). This implies that
|
|
1513
|
-
`numpy.random.normal` is more likely to return samples lying close to the
|
|
1514
|
-
mean, rather than those far away.
|
|
1515
|
-
|
|
1516
|
-
References
|
|
1517
|
-
----------
|
|
1518
|
-
.. [1] Wikipedia, "Normal distribution",
|
|
1519
|
-
http://en.wikipedia.org/wiki/Normal_distribution
|
|
1520
|
-
.. [2] P. R. Peebles Jr., "Central Limit Theorem" in "Probability, Random
|
|
1521
|
-
Variables and Random Signal Principles", 4th ed., 2001,
|
|
1522
|
-
pp. 51, 51, 125.
|
|
1523
|
-
|
|
1524
|
-
Examples
|
|
1525
|
-
--------
|
|
1526
|
-
Draw samples from the distribution:
|
|
1527
|
-
|
|
1528
|
-
>>> mu, sigma = 0, 0.1 # mean and standard deviation
|
|
1529
|
-
>>> s = np.random.normal(mu, sigma, 1000)
|
|
1530
|
-
|
|
1531
|
-
Verify the mean and the variance:
|
|
1532
|
-
|
|
1533
|
-
>>> abs(mu - np.mean(s)) < 0.01
|
|
1534
|
-
True
|
|
1535
|
-
|
|
1536
|
-
>>> abs(sigma - np.std(s, ddof=1)) < 0.01
|
|
1537
|
-
True
|
|
1538
|
-
|
|
1539
|
-
Display the histogram of the samples, along with
|
|
1540
|
-
the probability density function:
|
|
1541
|
-
|
|
1542
|
-
>>> import matplotlib.pyplot as plt
|
|
1543
|
-
>>> count, bins, ignored = plt.hist(s, 30, normed=True)
|
|
1544
|
-
>>> plt.plot(bins, 1/(sigma * np.sqrt(2 * np.pi)) *
|
|
1545
|
-
... np.exp( - (bins - mu)**2 / (2 * sigma**2) ),
|
|
1546
|
-
... linewidth=2, color='r')
|
|
1547
|
-
>>> plt.show()
|
|
1548
|
-
|
|
1549
|
-
"""
|
|
1550
|
-
cdef ndarray oloc, oscale
|
|
1551
|
-
cdef double floc, fscale
|
|
1552
|
-
|
|
1553
|
-
floc = PyFloat_AsDouble(loc)
|
|
1554
|
-
fscale = PyFloat_AsDouble(scale)
|
|
1555
|
-
if not PyErr_Occurred():
|
|
1556
|
-
if fscale <= 0:
|
|
1557
|
-
raise ValueError("scale <= 0")
|
|
1558
|
-
return cont2_array_sc(self.internal_state, rk_normal, size, floc,
|
|
1559
|
-
fscale, self.lock)
|
|
1560
|
-
|
|
1561
|
-
PyErr_Clear()
|
|
1562
|
-
|
|
1563
|
-
oloc = <ndarray>PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
1564
|
-
oscale = <ndarray>PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
1565
|
-
if np.any(np.less_equal(oscale, 0)):
|
|
1566
|
-
raise ValueError("scale <= 0")
|
|
1567
|
-
return cont2_array(self.internal_state, rk_normal, size, oloc, oscale,
|
|
1568
|
-
self.lock)
|
|
1569
|
-
|
|
1570
|
-
def beta(self, a, b, size=None):
|
|
1571
|
-
"""
|
|
1572
|
-
beta(a, b, size=None)
|
|
1573
|
-
|
|
1574
|
-
The Beta distribution over ``[0, 1]``.
|
|
1575
|
-
|
|
1576
|
-
The Beta distribution is a special case of the Dirichlet distribution,
|
|
1577
|
-
and is related to the Gamma distribution. It has the probability
|
|
1578
|
-
distribution function
|
|
1579
|
-
|
|
1580
|
-
.. math:: f(x; a,b) = \\frac{1}{B(\\alpha, \\beta)} x^{\\alpha - 1}
|
|
1581
|
-
(1 - x)^{\\beta - 1},
|
|
1582
|
-
|
|
1583
|
-
where the normalisation, B, is the beta function,
|
|
1584
|
-
|
|
1585
|
-
.. math:: B(\\alpha, \\beta) = \\int_0^1 t^{\\alpha - 1}
|
|
1586
|
-
(1 - t)^{\\beta - 1} dt.
|
|
1587
|
-
|
|
1588
|
-
It is often seen in Bayesian inference and order statistics.
|
|
1589
|
-
|
|
1590
|
-
Parameters
|
|
1591
|
-
----------
|
|
1592
|
-
a : float
|
|
1593
|
-
Alpha, non-negative.
|
|
1594
|
-
b : float
|
|
1595
|
-
Beta, non-negative.
|
|
1596
|
-
size : int or tuple of ints, optional
|
|
1597
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
1598
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
1599
|
-
single value is returned.
|
|
1600
|
-
|
|
1601
|
-
Returns
|
|
1602
|
-
-------
|
|
1603
|
-
out : ndarray
|
|
1604
|
-
Array of the given shape, containing values drawn from a
|
|
1605
|
-
Beta distribution.
|
|
1606
|
-
|
|
1607
|
-
"""
|
|
1608
|
-
cdef ndarray oa, ob
|
|
1609
|
-
cdef double fa, fb
|
|
1610
|
-
|
|
1611
|
-
fa = PyFloat_AsDouble(a)
|
|
1612
|
-
fb = PyFloat_AsDouble(b)
|
|
1613
|
-
if not PyErr_Occurred():
|
|
1614
|
-
if fa <= 0:
|
|
1615
|
-
raise ValueError("a <= 0")
|
|
1616
|
-
if fb <= 0:
|
|
1617
|
-
raise ValueError("b <= 0")
|
|
1618
|
-
return cont2_array_sc(self.internal_state, rk_beta, size, fa, fb,
|
|
1619
|
-
self.lock)
|
|
1620
|
-
|
|
1621
|
-
PyErr_Clear()
|
|
1622
|
-
|
|
1623
|
-
oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
1624
|
-
ob = <ndarray>PyArray_FROM_OTF(b, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
1625
|
-
if np.any(np.less_equal(oa, 0)):
|
|
1626
|
-
raise ValueError("a <= 0")
|
|
1627
|
-
if np.any(np.less_equal(ob, 0)):
|
|
1628
|
-
raise ValueError("b <= 0")
|
|
1629
|
-
return cont2_array(self.internal_state, rk_beta, size, oa, ob,
|
|
1630
|
-
self.lock)
|
|
1631
|
-
|
|
1632
|
-
def exponential(self, scale=1.0, size=None):
|
|
1633
|
-
"""
|
|
1634
|
-
exponential(scale=1.0, size=None)
|
|
1635
|
-
|
|
1636
|
-
Exponential distribution.
|
|
1637
|
-
|
|
1638
|
-
Its probability density function is
|
|
1639
|
-
|
|
1640
|
-
.. math:: f(x; \\frac{1}{\\beta}) = \\frac{1}{\\beta} \\exp(-\\frac{x}{\\beta}),
|
|
1641
|
-
|
|
1642
|
-
for ``x > 0`` and 0 elsewhere. :math:`\\beta` is the scale parameter,
|
|
1643
|
-
which is the inverse of the rate parameter :math:`\\lambda = 1/\\beta`.
|
|
1644
|
-
The rate parameter is an alternative, widely used parameterization
|
|
1645
|
-
of the exponential distribution [3]_.
|
|
1646
|
-
|
|
1647
|
-
The exponential distribution is a continuous analogue of the
|
|
1648
|
-
geometric distribution. It describes many common situations, such as
|
|
1649
|
-
the size of raindrops measured over many rainstorms [1]_, or the time
|
|
1650
|
-
between page requests to Wikipedia [2]_.
|
|
1651
|
-
|
|
1652
|
-
Parameters
|
|
1653
|
-
----------
|
|
1654
|
-
scale : float
|
|
1655
|
-
The scale parameter, :math:`\\beta = 1/\\lambda`.
|
|
1656
|
-
size : int or tuple of ints, optional
|
|
1657
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
1658
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
1659
|
-
single value is returned.
|
|
1660
|
-
|
|
1661
|
-
References
|
|
1662
|
-
----------
|
|
1663
|
-
.. [1] Peyton Z. Peebles Jr., "Probability, Random Variables and
|
|
1664
|
-
Random Signal Principles", 4th ed, 2001, p. 57.
|
|
1665
|
-
.. [2] "Poisson Process", Wikipedia,
|
|
1666
|
-
http://en.wikipedia.org/wiki/Poisson_process
|
|
1667
|
-
.. [3] "Exponential Distribution, Wikipedia,
|
|
1668
|
-
http://en.wikipedia.org/wiki/Exponential_distribution
|
|
1669
|
-
|
|
1670
|
-
"""
|
|
1671
|
-
cdef ndarray oscale
|
|
1672
|
-
cdef double fscale
|
|
1673
|
-
|
|
1674
|
-
fscale = PyFloat_AsDouble(scale)
|
|
1675
|
-
if not PyErr_Occurred():
|
|
1676
|
-
if fscale <= 0:
|
|
1677
|
-
raise ValueError("scale <= 0")
|
|
1678
|
-
return cont1_array_sc(self.internal_state, rk_exponential, size,
|
|
1679
|
-
fscale, self.lock)
|
|
1680
|
-
|
|
1681
|
-
PyErr_Clear()
|
|
1682
|
-
|
|
1683
|
-
oscale = <ndarray> PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
1684
|
-
if np.any(np.less_equal(oscale, 0.0)):
|
|
1685
|
-
raise ValueError("scale <= 0")
|
|
1686
|
-
return cont1_array(self.internal_state, rk_exponential, size, oscale,
|
|
1687
|
-
self.lock)
|
|
1688
|
-
|
|
1689
|
-
def standard_exponential(self, size=None):
|
|
1690
|
-
"""
|
|
1691
|
-
standard_exponential(size=None)
|
|
1692
|
-
|
|
1693
|
-
Draw samples from the standard exponential distribution.
|
|
1694
|
-
|
|
1695
|
-
`standard_exponential` is identical to the exponential distribution
|
|
1696
|
-
with a scale parameter of 1.
|
|
1697
|
-
|
|
1698
|
-
Parameters
|
|
1699
|
-
----------
|
|
1700
|
-
size : int or tuple of ints, optional
|
|
1701
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
1702
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
1703
|
-
single value is returned.
|
|
1704
|
-
|
|
1705
|
-
Returns
|
|
1706
|
-
-------
|
|
1707
|
-
out : float or ndarray
|
|
1708
|
-
Drawn samples.
|
|
1709
|
-
|
|
1710
|
-
Examples
|
|
1711
|
-
--------
|
|
1712
|
-
Output a 3x8000 array:
|
|
1713
|
-
|
|
1714
|
-
>>> n = np.random.standard_exponential((3, 8000))
|
|
1715
|
-
|
|
1716
|
-
"""
|
|
1717
|
-
return cont0_array(self.internal_state, rk_standard_exponential, size,
|
|
1718
|
-
self.lock)
|
|
1719
|
-
|
|
1720
|
-
def standard_gamma(self, shape, size=None):
|
|
1721
|
-
"""
|
|
1722
|
-
standard_gamma(shape, size=None)
|
|
1723
|
-
|
|
1724
|
-
Draw samples from a Standard Gamma distribution.
|
|
1725
|
-
|
|
1726
|
-
Samples are drawn from a Gamma distribution with specified parameters,
|
|
1727
|
-
shape (sometimes designated "k") and scale=1.
|
|
1728
|
-
|
|
1729
|
-
Parameters
|
|
1730
|
-
----------
|
|
1731
|
-
shape : float
|
|
1732
|
-
Parameter, should be > 0.
|
|
1733
|
-
size : int or tuple of ints, optional
|
|
1734
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
1735
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
1736
|
-
single value is returned.
|
|
1737
|
-
|
|
1738
|
-
Returns
|
|
1739
|
-
-------
|
|
1740
|
-
samples : ndarray or scalar
|
|
1741
|
-
The drawn samples.
|
|
1742
|
-
|
|
1743
|
-
See Also
|
|
1744
|
-
--------
|
|
1745
|
-
scipy.stats.distributions.gamma : probability density function,
|
|
1746
|
-
distribution or cumulative density function, etc.
|
|
1747
|
-
|
|
1748
|
-
Notes
|
|
1749
|
-
-----
|
|
1750
|
-
The probability density for the Gamma distribution is
|
|
1751
|
-
|
|
1752
|
-
.. math:: p(x) = x^{k-1}\\frac{e^{-x/\\theta}}{\\theta^k\\Gamma(k)},
|
|
1753
|
-
|
|
1754
|
-
where :math:`k` is the shape and :math:`\\theta` the scale,
|
|
1755
|
-
and :math:`\\Gamma` is the Gamma function.
|
|
1756
|
-
|
|
1757
|
-
The Gamma distribution is often used to model the times to failure of
|
|
1758
|
-
electronic components, and arises naturally in processes for which the
|
|
1759
|
-
waiting times between Poisson distributed events are relevant.
|
|
1760
|
-
|
|
1761
|
-
References
|
|
1762
|
-
----------
|
|
1763
|
-
.. [1] Weisstein, Eric W. "Gamma Distribution." From MathWorld--A
|
|
1764
|
-
Wolfram Web Resource.
|
|
1765
|
-
http://mathworld.wolfram.com/GammaDistribution.html
|
|
1766
|
-
.. [2] Wikipedia, "Gamma-distribution",
|
|
1767
|
-
http://en.wikipedia.org/wiki/Gamma-distribution
|
|
1768
|
-
|
|
1769
|
-
Examples
|
|
1770
|
-
--------
|
|
1771
|
-
Draw samples from the distribution:
|
|
1772
|
-
|
|
1773
|
-
>>> shape, scale = 2., 1. # mean and width
|
|
1774
|
-
>>> s = np.random.standard_gamma(shape, 1000000)
|
|
1775
|
-
|
|
1776
|
-
Display the histogram of the samples, along with
|
|
1777
|
-
the probability density function:
|
|
1778
|
-
|
|
1779
|
-
>>> import matplotlib.pyplot as plt
|
|
1780
|
-
>>> import scipy.special as sps
|
|
1781
|
-
>>> count, bins, ignored = plt.hist(s, 50, normed=True)
|
|
1782
|
-
>>> y = bins**(shape-1) * ((np.exp(-bins/scale))/ \\
|
|
1783
|
-
... (sps.gamma(shape) * scale**shape))
|
|
1784
|
-
>>> plt.plot(bins, y, linewidth=2, color='r')
|
|
1785
|
-
>>> plt.show()
|
|
1786
|
-
|
|
1787
|
-
"""
|
|
1788
|
-
cdef ndarray oshape
|
|
1789
|
-
cdef double fshape
|
|
1790
|
-
|
|
1791
|
-
fshape = PyFloat_AsDouble(shape)
|
|
1792
|
-
if not PyErr_Occurred():
|
|
1793
|
-
if fshape <= 0:
|
|
1794
|
-
raise ValueError("shape <= 0")
|
|
1795
|
-
return cont1_array_sc(self.internal_state, rk_standard_gamma, size, fshape, self.lock)
|
|
1796
|
-
|
|
1797
|
-
PyErr_Clear()
|
|
1798
|
-
oshape = <ndarray> PyArray_FROM_OTF(shape, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
1799
|
-
if np.any(np.less_equal(oshape, 0.0)):
|
|
1800
|
-
raise ValueError("shape <= 0")
|
|
1801
|
-
return cont1_array(self.internal_state, rk_standard_gamma, size,
|
|
1802
|
-
oshape, self.lock)
|
|
1803
|
-
|
|
1804
|
-
def gamma(self, shape, scale=1.0, size=None):
|
|
1805
|
-
"""
|
|
1806
|
-
gamma(shape, scale=1.0, size=None)
|
|
1807
|
-
|
|
1808
|
-
Draw samples from a Gamma distribution.
|
|
1809
|
-
|
|
1810
|
-
Samples are drawn from a Gamma distribution with specified parameters,
|
|
1811
|
-
`shape` (sometimes designated "k") and `scale` (sometimes designated
|
|
1812
|
-
"theta"), where both parameters are > 0.
|
|
1813
|
-
|
|
1814
|
-
Parameters
|
|
1815
|
-
----------
|
|
1816
|
-
shape : scalar > 0
|
|
1817
|
-
The shape of the gamma distribution.
|
|
1818
|
-
scale : scalar > 0, optional
|
|
1819
|
-
The scale of the gamma distribution. Default is equal to 1.
|
|
1820
|
-
size : int or tuple of ints, optional
|
|
1821
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
1822
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
1823
|
-
single value is returned.
|
|
1824
|
-
|
|
1825
|
-
Returns
|
|
1826
|
-
-------
|
|
1827
|
-
out : ndarray, float
|
|
1828
|
-
Returns one sample unless `size` parameter is specified.
|
|
1829
|
-
|
|
1830
|
-
See Also
|
|
1831
|
-
--------
|
|
1832
|
-
scipy.stats.distributions.gamma : probability density function,
|
|
1833
|
-
distribution or cumulative density function, etc.
|
|
1834
|
-
|
|
1835
|
-
Notes
|
|
1836
|
-
-----
|
|
1837
|
-
The probability density for the Gamma distribution is
|
|
1838
|
-
|
|
1839
|
-
.. math:: p(x) = x^{k-1}\\frac{e^{-x/\\theta}}{\\theta^k\\Gamma(k)},
|
|
1840
|
-
|
|
1841
|
-
where :math:`k` is the shape and :math:`\\theta` the scale,
|
|
1842
|
-
and :math:`\\Gamma` is the Gamma function.
|
|
1843
|
-
|
|
1844
|
-
The Gamma distribution is often used to model the times to failure of
|
|
1845
|
-
electronic components, and arises naturally in processes for which the
|
|
1846
|
-
waiting times between Poisson distributed events are relevant.
|
|
1847
|
-
|
|
1848
|
-
References
|
|
1849
|
-
----------
|
|
1850
|
-
.. [1] Weisstein, Eric W. "Gamma Distribution." From MathWorld--A
|
|
1851
|
-
Wolfram Web Resource.
|
|
1852
|
-
http://mathworld.wolfram.com/GammaDistribution.html
|
|
1853
|
-
.. [2] Wikipedia, "Gamma-distribution",
|
|
1854
|
-
http://en.wikipedia.org/wiki/Gamma-distribution
|
|
1855
|
-
|
|
1856
|
-
Examples
|
|
1857
|
-
--------
|
|
1858
|
-
Draw samples from the distribution:
|
|
1859
|
-
|
|
1860
|
-
>>> shape, scale = 2., 2. # mean and dispersion
|
|
1861
|
-
>>> s = np.random.gamma(shape, scale, 1000)
|
|
1862
|
-
|
|
1863
|
-
Display the histogram of the samples, along with
|
|
1864
|
-
the probability density function:
|
|
1865
|
-
|
|
1866
|
-
>>> import matplotlib.pyplot as plt
|
|
1867
|
-
>>> import scipy.special as sps
|
|
1868
|
-
>>> count, bins, ignored = plt.hist(s, 50, normed=True)
|
|
1869
|
-
>>> y = bins**(shape-1)*(np.exp(-bins/scale) /
|
|
1870
|
-
... (sps.gamma(shape)*scale**shape))
|
|
1871
|
-
>>> plt.plot(bins, y, linewidth=2, color='r')
|
|
1872
|
-
>>> plt.show()
|
|
1873
|
-
|
|
1874
|
-
"""
|
|
1875
|
-
cdef ndarray oshape, oscale
|
|
1876
|
-
cdef double fshape, fscale
|
|
1877
|
-
|
|
1878
|
-
fshape = PyFloat_AsDouble(shape)
|
|
1879
|
-
fscale = PyFloat_AsDouble(scale)
|
|
1880
|
-
if not PyErr_Occurred():
|
|
1881
|
-
if fshape <= 0:
|
|
1882
|
-
raise ValueError("shape <= 0")
|
|
1883
|
-
if fscale <= 0:
|
|
1884
|
-
raise ValueError("scale <= 0")
|
|
1885
|
-
return cont2_array_sc(self.internal_state, rk_gamma, size, fshape,
|
|
1886
|
-
fscale, self.lock)
|
|
1887
|
-
|
|
1888
|
-
PyErr_Clear()
|
|
1889
|
-
oshape = <ndarray>PyArray_FROM_OTF(shape, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
1890
|
-
oscale = <ndarray>PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
1891
|
-
if np.any(np.less_equal(oshape, 0.0)):
|
|
1892
|
-
raise ValueError("shape <= 0")
|
|
1893
|
-
if np.any(np.less_equal(oscale, 0.0)):
|
|
1894
|
-
raise ValueError("scale <= 0")
|
|
1895
|
-
return cont2_array(self.internal_state, rk_gamma, size, oshape, oscale,
|
|
1896
|
-
self.lock)
|
|
1897
|
-
|
|
1898
|
-
def f(self, dfnum, dfden, size=None):
|
|
1899
|
-
"""
|
|
1900
|
-
f(dfnum, dfden, size=None)
|
|
1901
|
-
|
|
1902
|
-
Draw samples from a F distribution.
|
|
1903
|
-
|
|
1904
|
-
Samples are drawn from an F distribution with specified parameters,
|
|
1905
|
-
`dfnum` (degrees of freedom in numerator) and `dfden` (degrees of freedom
|
|
1906
|
-
in denominator), where both parameters should be greater than zero.
|
|
1907
|
-
|
|
1908
|
-
The random variate of the F distribution (also known as the
|
|
1909
|
-
Fisher distribution) is a continuous probability distribution
|
|
1910
|
-
that arises in ANOVA tests, and is the ratio of two chi-square
|
|
1911
|
-
variates.
|
|
1912
|
-
|
|
1913
|
-
Parameters
|
|
1914
|
-
----------
|
|
1915
|
-
dfnum : float
|
|
1916
|
-
Degrees of freedom in numerator. Should be greater than zero.
|
|
1917
|
-
dfden : float
|
|
1918
|
-
Degrees of freedom in denominator. Should be greater than zero.
|
|
1919
|
-
size : int or tuple of ints, optional
|
|
1920
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
1921
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
1922
|
-
single value is returned.
|
|
1923
|
-
|
|
1924
|
-
Returns
|
|
1925
|
-
-------
|
|
1926
|
-
samples : {ndarray, scalar}
|
|
1927
|
-
Samples from the Fisher distribution.
|
|
1928
|
-
|
|
1929
|
-
See Also
|
|
1930
|
-
--------
|
|
1931
|
-
scipy.stats.distributions.f : probability density function,
|
|
1932
|
-
distribution or cumulative density function, etc.
|
|
1933
|
-
|
|
1934
|
-
Notes
|
|
1935
|
-
-----
|
|
1936
|
-
The F statistic is used to compare in-group variances to between-group
|
|
1937
|
-
variances. Calculating the distribution depends on the sampling, and
|
|
1938
|
-
so it is a function of the respective degrees of freedom in the
|
|
1939
|
-
problem. The variable `dfnum` is the number of samples minus one, the
|
|
1940
|
-
between-groups degrees of freedom, while `dfden` is the within-groups
|
|
1941
|
-
degrees of freedom, the sum of the number of samples in each group
|
|
1942
|
-
minus the number of groups.
|
|
1943
|
-
|
|
1944
|
-
References
|
|
1945
|
-
----------
|
|
1946
|
-
.. [1] Glantz, Stanton A. "Primer of Biostatistics.", McGraw-Hill,
|
|
1947
|
-
Fifth Edition, 2002.
|
|
1948
|
-
.. [2] Wikipedia, "F-distribution",
|
|
1949
|
-
http://en.wikipedia.org/wiki/F-distribution
|
|
1950
|
-
|
|
1951
|
-
Examples
|
|
1952
|
-
--------
|
|
1953
|
-
An example from Glantz[1], pp 47-40.
|
|
1954
|
-
Two groups, children of diabetics (25 people) and children from people
|
|
1955
|
-
without diabetes (25 controls). Fasting blood glucose was measured,
|
|
1956
|
-
case group had a mean value of 86.1, controls had a mean value of
|
|
1957
|
-
82.2. Standard deviations were 2.09 and 2.49 respectively. Are these
|
|
1958
|
-
data consistent with the null hypothesis that the parents diabetic
|
|
1959
|
-
status does not affect their children's blood glucose levels?
|
|
1960
|
-
Calculating the F statistic from the data gives a value of 36.01.
|
|
1961
|
-
|
|
1962
|
-
Draw samples from the distribution:
|
|
1963
|
-
|
|
1964
|
-
>>> dfnum = 1. # between group degrees of freedom
|
|
1965
|
-
>>> dfden = 48. # within groups degrees of freedom
|
|
1966
|
-
>>> s = np.random.f(dfnum, dfden, 1000)
|
|
1967
|
-
|
|
1968
|
-
The lower bound for the top 1% of the samples is :
|
|
1969
|
-
|
|
1970
|
-
>>> sort(s)[-10]
|
|
1971
|
-
7.61988120985
|
|
1972
|
-
|
|
1973
|
-
So there is about a 1% chance that the F statistic will exceed 7.62,
|
|
1974
|
-
the measured value is 36, so the null hypothesis is rejected at the 1%
|
|
1975
|
-
level.
|
|
1976
|
-
|
|
1977
|
-
"""
|
|
1978
|
-
cdef ndarray odfnum, odfden
|
|
1979
|
-
cdef double fdfnum, fdfden
|
|
1980
|
-
|
|
1981
|
-
fdfnum = PyFloat_AsDouble(dfnum)
|
|
1982
|
-
fdfden = PyFloat_AsDouble(dfden)
|
|
1983
|
-
if not PyErr_Occurred():
|
|
1984
|
-
if fdfnum <= 0:
|
|
1985
|
-
raise ValueError("shape <= 0")
|
|
1986
|
-
if fdfden <= 0:
|
|
1987
|
-
raise ValueError("scale <= 0")
|
|
1988
|
-
return cont2_array_sc(self.internal_state, rk_f, size, fdfnum,
|
|
1989
|
-
fdfden, self.lock)
|
|
1990
|
-
|
|
1991
|
-
PyErr_Clear()
|
|
1992
|
-
|
|
1993
|
-
odfnum = <ndarray>PyArray_FROM_OTF(dfnum, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
1994
|
-
odfden = <ndarray>PyArray_FROM_OTF(dfden, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
1995
|
-
if np.any(np.less_equal(odfnum, 0.0)):
|
|
1996
|
-
raise ValueError("dfnum <= 0")
|
|
1997
|
-
if np.any(np.less_equal(odfden, 0.0)):
|
|
1998
|
-
raise ValueError("dfden <= 0")
|
|
1999
|
-
return cont2_array(self.internal_state, rk_f, size, odfnum, odfden,
|
|
2000
|
-
self.lock)
|
|
2001
|
-
|
|
2002
|
-
def noncentral_f(self, dfnum, dfden, nonc, size=None):
|
|
2003
|
-
"""
|
|
2004
|
-
noncentral_f(dfnum, dfden, nonc, size=None)
|
|
2005
|
-
|
|
2006
|
-
Draw samples from the noncentral F distribution.
|
|
2007
|
-
|
|
2008
|
-
Samples are drawn from an F distribution with specified parameters,
|
|
2009
|
-
`dfnum` (degrees of freedom in numerator) and `dfden` (degrees of
|
|
2010
|
-
freedom in denominator), where both parameters > 1.
|
|
2011
|
-
`nonc` is the non-centrality parameter.
|
|
2012
|
-
|
|
2013
|
-
Parameters
|
|
2014
|
-
----------
|
|
2015
|
-
dfnum : int
|
|
2016
|
-
Parameter, should be > 1.
|
|
2017
|
-
dfden : int
|
|
2018
|
-
Parameter, should be > 1.
|
|
2019
|
-
nonc : float
|
|
2020
|
-
Parameter, should be >= 0.
|
|
2021
|
-
size : int or tuple of ints, optional
|
|
2022
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
2023
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
2024
|
-
single value is returned.
|
|
2025
|
-
|
|
2026
|
-
Returns
|
|
2027
|
-
-------
|
|
2028
|
-
samples : scalar or ndarray
|
|
2029
|
-
Drawn samples.
|
|
2030
|
-
|
|
2031
|
-
Notes
|
|
2032
|
-
-----
|
|
2033
|
-
When calculating the power of an experiment (power = probability of
|
|
2034
|
-
rejecting the null hypothesis when a specific alternative is true) the
|
|
2035
|
-
non-central F statistic becomes important. When the null hypothesis is
|
|
2036
|
-
true, the F statistic follows a central F distribution. When the null
|
|
2037
|
-
hypothesis is not true, then it follows a non-central F statistic.
|
|
2038
|
-
|
|
2039
|
-
References
|
|
2040
|
-
----------
|
|
2041
|
-
Weisstein, Eric W. "Noncentral F-Distribution." From MathWorld--A Wolfram
|
|
2042
|
-
Web Resource. http://mathworld.wolfram.com/NoncentralF-Distribution.html
|
|
2043
|
-
|
|
2044
|
-
Wikipedia, "Noncentral F distribution",
|
|
2045
|
-
http://en.wikipedia.org/wiki/Noncentral_F-distribution
|
|
2046
|
-
|
|
2047
|
-
Examples
|
|
2048
|
-
--------
|
|
2049
|
-
In a study, testing for a specific alternative to the null hypothesis
|
|
2050
|
-
requires use of the Noncentral F distribution. We need to calculate the
|
|
2051
|
-
area in the tail of the distribution that exceeds the value of the F
|
|
2052
|
-
distribution for the null hypothesis. We'll plot the two probability
|
|
2053
|
-
distributions for comparison.
|
|
2054
|
-
|
|
2055
|
-
>>> dfnum = 3 # between group deg of freedom
|
|
2056
|
-
>>> dfden = 20 # within groups degrees of freedom
|
|
2057
|
-
>>> nonc = 3.0
|
|
2058
|
-
>>> nc_vals = np.random.noncentral_f(dfnum, dfden, nonc, 1000000)
|
|
2059
|
-
>>> NF = np.histogram(nc_vals, bins=50, normed=True)
|
|
2060
|
-
>>> c_vals = np.random.f(dfnum, dfden, 1000000)
|
|
2061
|
-
>>> F = np.histogram(c_vals, bins=50, normed=True)
|
|
2062
|
-
>>> plt.plot(F[1][1:], F[0])
|
|
2063
|
-
>>> plt.plot(NF[1][1:], NF[0])
|
|
2064
|
-
>>> plt.show()
|
|
2065
|
-
|
|
2066
|
-
"""
|
|
2067
|
-
cdef ndarray odfnum, odfden, ononc
|
|
2068
|
-
cdef double fdfnum, fdfden, fnonc
|
|
2069
|
-
|
|
2070
|
-
fdfnum = PyFloat_AsDouble(dfnum)
|
|
2071
|
-
fdfden = PyFloat_AsDouble(dfden)
|
|
2072
|
-
fnonc = PyFloat_AsDouble(nonc)
|
|
2073
|
-
if not PyErr_Occurred():
|
|
2074
|
-
if fdfnum <= 1:
|
|
2075
|
-
raise ValueError("dfnum <= 1")
|
|
2076
|
-
if fdfden <= 0:
|
|
2077
|
-
raise ValueError("dfden <= 0")
|
|
2078
|
-
if fnonc < 0:
|
|
2079
|
-
raise ValueError("nonc < 0")
|
|
2080
|
-
return cont3_array_sc(self.internal_state, rk_noncentral_f, size,
|
|
2081
|
-
fdfnum, fdfden, fnonc, self.lock)
|
|
2082
|
-
|
|
2083
|
-
PyErr_Clear()
|
|
2084
|
-
|
|
2085
|
-
odfnum = <ndarray>PyArray_FROM_OTF(dfnum, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
2086
|
-
odfden = <ndarray>PyArray_FROM_OTF(dfden, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
2087
|
-
ononc = <ndarray>PyArray_FROM_OTF(nonc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
2088
|
-
|
|
2089
|
-
if np.any(np.less_equal(odfnum, 1.0)):
|
|
2090
|
-
raise ValueError("dfnum <= 1")
|
|
2091
|
-
if np.any(np.less_equal(odfden, 0.0)):
|
|
2092
|
-
raise ValueError("dfden <= 0")
|
|
2093
|
-
if np.any(np.less(ononc, 0.0)):
|
|
2094
|
-
raise ValueError("nonc < 0")
|
|
2095
|
-
return cont3_array(self.internal_state, rk_noncentral_f, size, odfnum,
|
|
2096
|
-
odfden, ononc, self.lock)
|
|
2097
|
-
|
|
2098
|
-
def chisquare(self, df, size=None):
|
|
2099
|
-
"""
|
|
2100
|
-
chisquare(df, size=None)
|
|
2101
|
-
|
|
2102
|
-
Draw samples from a chi-square distribution.
|
|
2103
|
-
|
|
2104
|
-
When `df` independent random variables, each with standard normal
|
|
2105
|
-
distributions (mean 0, variance 1), are squared and summed, the
|
|
2106
|
-
resulting distribution is chi-square (see Notes). This distribution
|
|
2107
|
-
is often used in hypothesis testing.
|
|
2108
|
-
|
|
2109
|
-
Parameters
|
|
2110
|
-
----------
|
|
2111
|
-
df : int
|
|
2112
|
-
Number of degrees of freedom.
|
|
2113
|
-
size : int or tuple of ints, optional
|
|
2114
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
2115
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
2116
|
-
single value is returned.
|
|
2117
|
-
|
|
2118
|
-
Returns
|
|
2119
|
-
-------
|
|
2120
|
-
output : ndarray
|
|
2121
|
-
Samples drawn from the distribution, packed in a `size`-shaped
|
|
2122
|
-
array.
|
|
2123
|
-
|
|
2124
|
-
Raises
|
|
2125
|
-
------
|
|
2126
|
-
ValueError
|
|
2127
|
-
When `df` <= 0 or when an inappropriate `size` (e.g. ``size=-1``)
|
|
2128
|
-
is given.
|
|
2129
|
-
|
|
2130
|
-
Notes
|
|
2131
|
-
-----
|
|
2132
|
-
The variable obtained by summing the squares of `df` independent,
|
|
2133
|
-
standard normally distributed random variables:
|
|
2134
|
-
|
|
2135
|
-
.. math:: Q = \\sum_{i=0}^{\\mathtt{df}} X^2_i
|
|
2136
|
-
|
|
2137
|
-
is chi-square distributed, denoted
|
|
2138
|
-
|
|
2139
|
-
.. math:: Q \\sim \\chi^2_k.
|
|
2140
|
-
|
|
2141
|
-
The probability density function of the chi-squared distribution is
|
|
2142
|
-
|
|
2143
|
-
.. math:: p(x) = \\frac{(1/2)^{k/2}}{\\Gamma(k/2)}
|
|
2144
|
-
x^{k/2 - 1} e^{-x/2},
|
|
2145
|
-
|
|
2146
|
-
where :math:`\\Gamma` is the gamma function,
|
|
2147
|
-
|
|
2148
|
-
.. math:: \\Gamma(x) = \\int_0^{-\\infty} t^{x - 1} e^{-t} dt.
|
|
2149
|
-
|
|
2150
|
-
References
|
|
2151
|
-
----------
|
|
2152
|
-
`NIST/SEMATECH e-Handbook of Statistical Methods
|
|
2153
|
-
<http://www.itl.nist.gov/div898/handbook/eda/section3/eda3666.htm>`_
|
|
2154
|
-
|
|
2155
|
-
Examples
|
|
2156
|
-
--------
|
|
2157
|
-
>>> np.random.chisquare(2,4)
|
|
2158
|
-
array([ 1.89920014, 9.00867716, 3.13710533, 5.62318272])
|
|
2159
|
-
|
|
2160
|
-
"""
|
|
2161
|
-
cdef ndarray odf
|
|
2162
|
-
cdef double fdf
|
|
2163
|
-
|
|
2164
|
-
fdf = PyFloat_AsDouble(df)
|
|
2165
|
-
if not PyErr_Occurred():
|
|
2166
|
-
if fdf <= 0:
|
|
2167
|
-
raise ValueError("df <= 0")
|
|
2168
|
-
return cont1_array_sc(self.internal_state, rk_chisquare, size, fdf,
|
|
2169
|
-
self.lock)
|
|
2170
|
-
|
|
2171
|
-
PyErr_Clear()
|
|
2172
|
-
|
|
2173
|
-
odf = <ndarray>PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
2174
|
-
if np.any(np.less_equal(odf, 0.0)):
|
|
2175
|
-
raise ValueError("df <= 0")
|
|
2176
|
-
return cont1_array(self.internal_state, rk_chisquare, size, odf,
|
|
2177
|
-
self.lock)
|
|
2178
|
-
|
|
2179
|
-
def noncentral_chisquare(self, df, nonc, size=None):
|
|
2180
|
-
"""
|
|
2181
|
-
noncentral_chisquare(df, nonc, size=None)
|
|
2182
|
-
|
|
2183
|
-
Draw samples from a noncentral chi-square distribution.
|
|
2184
|
-
|
|
2185
|
-
The noncentral :math:`\\chi^2` distribution is a generalisation of
|
|
2186
|
-
the :math:`\\chi^2` distribution.
|
|
2187
|
-
|
|
2188
|
-
Parameters
|
|
2189
|
-
----------
|
|
2190
|
-
df : int
|
|
2191
|
-
Degrees of freedom, should be >= 1.
|
|
2192
|
-
nonc : float
|
|
2193
|
-
Non-centrality, should be > 0.
|
|
2194
|
-
size : int or tuple of ints, optional
|
|
2195
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
2196
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
2197
|
-
single value is returned.
|
|
2198
|
-
|
|
2199
|
-
Notes
|
|
2200
|
-
-----
|
|
2201
|
-
The probability density function for the noncentral Chi-square distribution
|
|
2202
|
-
is
|
|
2203
|
-
|
|
2204
|
-
.. math:: P(x;df,nonc) = \\sum^{\\infty}_{i=0}
|
|
2205
|
-
\\frac{e^{-nonc/2}(nonc/2)^{i}}{i!}P_{Y_{df+2i}}(x),
|
|
2206
|
-
|
|
2207
|
-
where :math:`Y_{q}` is the Chi-square with q degrees of freedom.
|
|
2208
|
-
|
|
2209
|
-
In Delhi (2007), it is noted that the noncentral chi-square is useful in
|
|
2210
|
-
bombing and coverage problems, the probability of killing the point target
|
|
2211
|
-
given by the noncentral chi-squared distribution.
|
|
2212
|
-
|
|
2213
|
-
References
|
|
2214
|
-
----------
|
|
2215
|
-
.. [1] Delhi, M.S. Holla, "On a noncentral chi-square distribution in the
|
|
2216
|
-
analysis of weapon systems effectiveness", Metrika, Volume 15,
|
|
2217
|
-
Number 1 / December, 1970.
|
|
2218
|
-
.. [2] Wikipedia, "Noncentral chi-square distribution"
|
|
2219
|
-
http://en.wikipedia.org/wiki/Noncentral_chi-square_distribution
|
|
2220
|
-
|
|
2221
|
-
Examples
|
|
2222
|
-
--------
|
|
2223
|
-
Draw values from the distribution and plot the histogram
|
|
2224
|
-
|
|
2225
|
-
>>> import matplotlib.pyplot as plt
|
|
2226
|
-
>>> values = plt.hist(np.random.noncentral_chisquare(3, 20, 100000),
|
|
2227
|
-
... bins=200, normed=True)
|
|
2228
|
-
>>> plt.show()
|
|
2229
|
-
|
|
2230
|
-
Draw values from a noncentral chisquare with very small noncentrality,
|
|
2231
|
-
and compare to a chisquare.
|
|
2232
|
-
|
|
2233
|
-
>>> plt.figure()
|
|
2234
|
-
>>> values = plt.hist(np.random.noncentral_chisquare(3, .0000001, 100000),
|
|
2235
|
-
... bins=np.arange(0., 25, .1), normed=True)
|
|
2236
|
-
>>> values2 = plt.hist(np.random.chisquare(3, 100000),
|
|
2237
|
-
... bins=np.arange(0., 25, .1), normed=True)
|
|
2238
|
-
>>> plt.plot(values[1][0:-1], values[0]-values2[0], 'ob')
|
|
2239
|
-
>>> plt.show()
|
|
2240
|
-
|
|
2241
|
-
Demonstrate how large values of non-centrality lead to a more symmetric
|
|
2242
|
-
distribution.
|
|
2243
|
-
|
|
2244
|
-
>>> plt.figure()
|
|
2245
|
-
>>> values = plt.hist(np.random.noncentral_chisquare(3, 20, 100000),
|
|
2246
|
-
... bins=200, normed=True)
|
|
2247
|
-
>>> plt.show()
|
|
2248
|
-
|
|
2249
|
-
"""
|
|
2250
|
-
cdef ndarray odf, ononc
|
|
2251
|
-
cdef double fdf, fnonc
|
|
2252
|
-
fdf = PyFloat_AsDouble(df)
|
|
2253
|
-
fnonc = PyFloat_AsDouble(nonc)
|
|
2254
|
-
if not PyErr_Occurred():
|
|
2255
|
-
if fdf <= 1:
|
|
2256
|
-
raise ValueError("df <= 0")
|
|
2257
|
-
if fnonc <= 0:
|
|
2258
|
-
raise ValueError("nonc <= 0")
|
|
2259
|
-
return cont2_array_sc(self.internal_state, rk_noncentral_chisquare,
|
|
2260
|
-
size, fdf, fnonc, self.lock)
|
|
2261
|
-
|
|
2262
|
-
PyErr_Clear()
|
|
2263
|
-
|
|
2264
|
-
odf = <ndarray>PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
2265
|
-
ononc = <ndarray>PyArray_FROM_OTF(nonc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
2266
|
-
if np.any(np.less_equal(odf, 0.0)):
|
|
2267
|
-
raise ValueError("df <= 1")
|
|
2268
|
-
if np.any(np.less_equal(ononc, 0.0)):
|
|
2269
|
-
raise ValueError("nonc < 0")
|
|
2270
|
-
return cont2_array(self.internal_state, rk_noncentral_chisquare, size,
|
|
2271
|
-
odf, ononc, self.lock)
|
|
2272
|
-
|
|
2273
|
-
def standard_cauchy(self, size=None):
|
|
2274
|
-
"""
|
|
2275
|
-
standard_cauchy(size=None)
|
|
2276
|
-
|
|
2277
|
-
Standard Cauchy distribution with mode = 0.
|
|
2278
|
-
|
|
2279
|
-
Also known as the Lorentz distribution.
|
|
2280
|
-
|
|
2281
|
-
Parameters
|
|
2282
|
-
----------
|
|
2283
|
-
size : int or tuple of ints, optional
|
|
2284
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
2285
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
2286
|
-
single value is returned.
|
|
2287
|
-
|
|
2288
|
-
Returns
|
|
2289
|
-
-------
|
|
2290
|
-
samples : ndarray or scalar
|
|
2291
|
-
The drawn samples.
|
|
2292
|
-
|
|
2293
|
-
Notes
|
|
2294
|
-
-----
|
|
2295
|
-
The probability density function for the full Cauchy distribution is
|
|
2296
|
-
|
|
2297
|
-
.. math:: P(x; x_0, \\gamma) = \\frac{1}{\\pi \\gamma \\bigl[ 1+
|
|
2298
|
-
(\\frac{x-x_0}{\\gamma})^2 \\bigr] }
|
|
2299
|
-
|
|
2300
|
-
and the Standard Cauchy distribution just sets :math:`x_0=0` and
|
|
2301
|
-
:math:`\\gamma=1`
|
|
2302
|
-
|
|
2303
|
-
The Cauchy distribution arises in the solution to the driven harmonic
|
|
2304
|
-
oscillator problem, and also describes spectral line broadening. It
|
|
2305
|
-
also describes the distribution of values at which a line tilted at
|
|
2306
|
-
a random angle will cut the x axis.
|
|
2307
|
-
|
|
2308
|
-
When studying hypothesis tests that assume normality, seeing how the
|
|
2309
|
-
tests perform on data from a Cauchy distribution is a good indicator of
|
|
2310
|
-
their sensitivity to a heavy-tailed distribution, since the Cauchy looks
|
|
2311
|
-
very much like a Gaussian distribution, but with heavier tails.
|
|
2312
|
-
|
|
2313
|
-
References
|
|
2314
|
-
----------
|
|
2315
|
-
.. [1] NIST/SEMATECH e-Handbook of Statistical Methods, "Cauchy
|
|
2316
|
-
Distribution",
|
|
2317
|
-
http://www.itl.nist.gov/div898/handbook/eda/section3/eda3663.htm
|
|
2318
|
-
.. [2] Weisstein, Eric W. "Cauchy Distribution." From MathWorld--A
|
|
2319
|
-
Wolfram Web Resource.
|
|
2320
|
-
http://mathworld.wolfram.com/CauchyDistribution.html
|
|
2321
|
-
.. [3] Wikipedia, "Cauchy distribution"
|
|
2322
|
-
http://en.wikipedia.org/wiki/Cauchy_distribution
|
|
2323
|
-
|
|
2324
|
-
Examples
|
|
2325
|
-
--------
|
|
2326
|
-
Draw samples and plot the distribution:
|
|
2327
|
-
|
|
2328
|
-
>>> s = np.random.standard_cauchy(1000000)
|
|
2329
|
-
>>> s = s[(s>-25) & (s<25)] # truncate distribution so it plots well
|
|
2330
|
-
>>> plt.hist(s, bins=100)
|
|
2331
|
-
>>> plt.show()
|
|
2332
|
-
|
|
2333
|
-
"""
|
|
2334
|
-
return cont0_array(self.internal_state, rk_standard_cauchy, size,
|
|
2335
|
-
self.lock)
|
|
2336
|
-
|
|
2337
|
-
def standard_t(self, df, size=None):
|
|
2338
|
-
"""
|
|
2339
|
-
standard_t(df, size=None)
|
|
2340
|
-
|
|
2341
|
-
Standard Student's t distribution with df degrees of freedom.
|
|
2342
|
-
|
|
2343
|
-
A special case of the hyperbolic distribution.
|
|
2344
|
-
As `df` gets large, the result resembles that of the standard normal
|
|
2345
|
-
distribution (`standard_normal`).
|
|
2346
|
-
|
|
2347
|
-
Parameters
|
|
2348
|
-
----------
|
|
2349
|
-
df : int
|
|
2350
|
-
Degrees of freedom, should be > 0.
|
|
2351
|
-
size : int or tuple of ints, optional
|
|
2352
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
2353
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
2354
|
-
single value is returned.
|
|
2355
|
-
|
|
2356
|
-
Returns
|
|
2357
|
-
-------
|
|
2358
|
-
samples : ndarray or scalar
|
|
2359
|
-
Drawn samples.
|
|
2360
|
-
|
|
2361
|
-
Notes
|
|
2362
|
-
-----
|
|
2363
|
-
The probability density function for the t distribution is
|
|
2364
|
-
|
|
2365
|
-
.. math:: P(x, df) = \\frac{\\Gamma(\\frac{df+1}{2})}{\\sqrt{\\pi df}
|
|
2366
|
-
\\Gamma(\\frac{df}{2})}\\Bigl( 1+\\frac{x^2}{df} \\Bigr)^{-(df+1)/2}
|
|
2367
|
-
|
|
2368
|
-
The t test is based on an assumption that the data come from a Normal
|
|
2369
|
-
distribution. The t test provides a way to test whether the sample mean
|
|
2370
|
-
(that is the mean calculated from the data) is a good estimate of the true
|
|
2371
|
-
mean.
|
|
2372
|
-
|
|
2373
|
-
The derivation of the t-distribution was forst published in 1908 by William
|
|
2374
|
-
Gisset while working for the Guinness Brewery in Dublin. Due to proprietary
|
|
2375
|
-
issues, he had to publish under a pseudonym, and so he used the name
|
|
2376
|
-
Student.
|
|
2377
|
-
|
|
2378
|
-
References
|
|
2379
|
-
----------
|
|
2380
|
-
.. [1] Dalgaard, Peter, "Introductory Statistics With R",
|
|
2381
|
-
Springer, 2002.
|
|
2382
|
-
.. [2] Wikipedia, "Student's t-distribution"
|
|
2383
|
-
http://en.wikipedia.org/wiki/Student's_t-distribution
|
|
2384
|
-
|
|
2385
|
-
Examples
|
|
2386
|
-
--------
|
|
2387
|
-
From Dalgaard page 83 [1]_, suppose the daily energy intake for 11
|
|
2388
|
-
women in Kj is:
|
|
2389
|
-
|
|
2390
|
-
>>> intake = np.array([5260., 5470, 5640, 6180, 6390, 6515, 6805, 7515, \\
|
|
2391
|
-
... 7515, 8230, 8770])
|
|
2392
|
-
|
|
2393
|
-
Does their energy intake deviate systematically from the recommended
|
|
2394
|
-
value of 7725 kJ?
|
|
2395
|
-
|
|
2396
|
-
We have 10 degrees of freedom, so is the sample mean within 95% of the
|
|
2397
|
-
recommended value?
|
|
2398
|
-
|
|
2399
|
-
>>> s = np.random.standard_t(10, size=100000)
|
|
2400
|
-
>>> np.mean(intake)
|
|
2401
|
-
6753.636363636364
|
|
2402
|
-
>>> intake.std(ddof=1)
|
|
2403
|
-
1142.1232221373727
|
|
2404
|
-
|
|
2405
|
-
Calculate the t statistic, setting the ddof parameter to the unbiased
|
|
2406
|
-
value so the divisor in the standard deviation will be degrees of
|
|
2407
|
-
freedom, N-1.
|
|
2408
|
-
|
|
2409
|
-
>>> t = (np.mean(intake)-7725)/(intake.std(ddof=1)/np.sqrt(len(intake)))
|
|
2410
|
-
>>> import matplotlib.pyplot as plt
|
|
2411
|
-
>>> h = plt.hist(s, bins=100, normed=True)
|
|
2412
|
-
|
|
2413
|
-
For a one-sided t-test, how far out in the distribution does the t
|
|
2414
|
-
statistic appear?
|
|
2415
|
-
|
|
2416
|
-
>>> >>> np.sum(s<t) / float(len(s))
|
|
2417
|
-
0.0090699999999999999 #random
|
|
2418
|
-
|
|
2419
|
-
So the p-value is about 0.009, which says the null hypothesis has a
|
|
2420
|
-
probability of about 99% of being true.
|
|
2421
|
-
|
|
2422
|
-
"""
|
|
2423
|
-
cdef ndarray odf
|
|
2424
|
-
cdef double fdf
|
|
2425
|
-
|
|
2426
|
-
fdf = PyFloat_AsDouble(df)
|
|
2427
|
-
if not PyErr_Occurred():
|
|
2428
|
-
if fdf <= 0:
|
|
2429
|
-
raise ValueError("df <= 0")
|
|
2430
|
-
return cont1_array_sc(self.internal_state, rk_standard_t, size,
|
|
2431
|
-
fdf, self.lock)
|
|
2432
|
-
|
|
2433
|
-
PyErr_Clear()
|
|
2434
|
-
|
|
2435
|
-
odf = <ndarray> PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
2436
|
-
if np.any(np.less_equal(odf, 0.0)):
|
|
2437
|
-
raise ValueError("df <= 0")
|
|
2438
|
-
return cont1_array(self.internal_state, rk_standard_t, size, odf,
|
|
2439
|
-
self.lock)
|
|
2440
|
-
|
|
2441
|
-
def vonmises(self, mu, kappa, size=None):
|
|
2442
|
-
"""
|
|
2443
|
-
vonmises(mu, kappa, size=None)
|
|
2444
|
-
|
|
2445
|
-
Draw samples from a von Mises distribution.
|
|
2446
|
-
|
|
2447
|
-
Samples are drawn from a von Mises distribution with specified mode
|
|
2448
|
-
(mu) and dispersion (kappa), on the interval [-pi, pi].
|
|
2449
|
-
|
|
2450
|
-
The von Mises distribution (also known as the circular normal
|
|
2451
|
-
distribution) is a continuous probability distribution on the unit
|
|
2452
|
-
circle. It may be thought of as the circular analogue of the normal
|
|
2453
|
-
distribution.
|
|
2454
|
-
|
|
2455
|
-
Parameters
|
|
2456
|
-
----------
|
|
2457
|
-
mu : float
|
|
2458
|
-
Mode ("center") of the distribution.
|
|
2459
|
-
kappa : float
|
|
2460
|
-
Dispersion of the distribution, has to be >=0.
|
|
2461
|
-
size : int or tuple of ints, optional
|
|
2462
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
2463
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
2464
|
-
single value is returned.
|
|
2465
|
-
|
|
2466
|
-
Returns
|
|
2467
|
-
-------
|
|
2468
|
-
samples : scalar or ndarray
|
|
2469
|
-
The returned samples, which are in the interval [-pi, pi].
|
|
2470
|
-
|
|
2471
|
-
See Also
|
|
2472
|
-
--------
|
|
2473
|
-
scipy.stats.distributions.vonmises : probability density function,
|
|
2474
|
-
distribution, or cumulative density function, etc.
|
|
2475
|
-
|
|
2476
|
-
Notes
|
|
2477
|
-
-----
|
|
2478
|
-
The probability density for the von Mises distribution is
|
|
2479
|
-
|
|
2480
|
-
.. math:: p(x) = \\frac{e^{\\kappa cos(x-\\mu)}}{2\\pi I_0(\\kappa)},
|
|
2481
|
-
|
|
2482
|
-
where :math:`\\mu` is the mode and :math:`\\kappa` the dispersion,
|
|
2483
|
-
and :math:`I_0(\\kappa)` is the modified Bessel function of order 0.
|
|
2484
|
-
|
|
2485
|
-
The von Mises is named for Richard Edler von Mises, who was born in
|
|
2486
|
-
Austria-Hungary, in what is now the Ukraine. He fled to the United
|
|
2487
|
-
States in 1939 and became a professor at Harvard. He worked in
|
|
2488
|
-
probability theory, aerodynamics, fluid mechanics, and philosophy of
|
|
2489
|
-
science.
|
|
2490
|
-
|
|
2491
|
-
References
|
|
2492
|
-
----------
|
|
2493
|
-
Abramowitz, M. and Stegun, I. A. (ed.), *Handbook of Mathematical
|
|
2494
|
-
Functions*, New York: Dover, 1965.
|
|
2495
|
-
|
|
2496
|
-
von Mises, R., *Mathematical Theory of Probability and Statistics*,
|
|
2497
|
-
New York: Academic Press, 1964.
|
|
2498
|
-
|
|
2499
|
-
Examples
|
|
2500
|
-
--------
|
|
2501
|
-
Draw samples from the distribution:
|
|
2502
|
-
|
|
2503
|
-
>>> mu, kappa = 0.0, 4.0 # mean and dispersion
|
|
2504
|
-
>>> s = np.random.vonmises(mu, kappa, 1000)
|
|
2505
|
-
|
|
2506
|
-
Display the histogram of the samples, along with
|
|
2507
|
-
the probability density function:
|
|
2508
|
-
|
|
2509
|
-
>>> import matplotlib.pyplot as plt
|
|
2510
|
-
>>> import scipy.special as sps
|
|
2511
|
-
>>> count, bins, ignored = plt.hist(s, 50, normed=True)
|
|
2512
|
-
>>> x = np.arange(-np.pi, np.pi, 2*np.pi/50.)
|
|
2513
|
-
>>> y = -np.exp(kappa*np.cos(x-mu))/(2*np.pi*sps.jn(0,kappa))
|
|
2514
|
-
>>> plt.plot(x, y/max(y), linewidth=2, color='r')
|
|
2515
|
-
>>> plt.show()
|
|
2516
|
-
|
|
2517
|
-
"""
|
|
2518
|
-
cdef ndarray omu, okappa
|
|
2519
|
-
cdef double fmu, fkappa
|
|
2520
|
-
|
|
2521
|
-
fmu = PyFloat_AsDouble(mu)
|
|
2522
|
-
fkappa = PyFloat_AsDouble(kappa)
|
|
2523
|
-
if not PyErr_Occurred():
|
|
2524
|
-
if fkappa < 0:
|
|
2525
|
-
raise ValueError("kappa < 0")
|
|
2526
|
-
return cont2_array_sc(self.internal_state, rk_vonmises, size, fmu,
|
|
2527
|
-
fkappa, self.lock)
|
|
2528
|
-
|
|
2529
|
-
PyErr_Clear()
|
|
2530
|
-
|
|
2531
|
-
omu = <ndarray> PyArray_FROM_OTF(mu, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
2532
|
-
okappa = <ndarray> PyArray_FROM_OTF(kappa, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
2533
|
-
if np.any(np.less(okappa, 0.0)):
|
|
2534
|
-
raise ValueError("kappa < 0")
|
|
2535
|
-
return cont2_array(self.internal_state, rk_vonmises, size, omu, okappa,
|
|
2536
|
-
self.lock)
|
|
2537
|
-
|
|
2538
|
-
def pareto(self, a, size=None):
|
|
2539
|
-
"""
|
|
2540
|
-
pareto(a, size=None)
|
|
2541
|
-
|
|
2542
|
-
Draw samples from a Pareto II or Lomax distribution with specified shape.
|
|
2543
|
-
|
|
2544
|
-
The Lomax or Pareto II distribution is a shifted Pareto distribution. The
|
|
2545
|
-
classical Pareto distribution can be obtained from the Lomax distribution
|
|
2546
|
-
by adding 1 and multiplying by the scale parameter ``m`` (see Notes).
|
|
2547
|
-
The smallest value of the Lomax distribution is zero while for the
|
|
2548
|
-
classical Pareto distribution it is ``mu``, where the standard Pareto
|
|
2549
|
-
distribution has location ``mu = 1``. Lomax can also be considered as a
|
|
2550
|
-
simplified version of the Generalized Pareto distribution (available in
|
|
2551
|
-
SciPy), with the scale set to one and the location set to zero.
|
|
2552
|
-
|
|
2553
|
-
The Pareto distribution must be greater than zero, and is unbounded above.
|
|
2554
|
-
It is also known as the "80-20 rule". In this distribution, 80 percent of
|
|
2555
|
-
the weights are in the lowest 20 percent of the range, while the other 20
|
|
2556
|
-
percent fill the remaining 80 percent of the range.
|
|
2557
|
-
|
|
2558
|
-
Parameters
|
|
2559
|
-
----------
|
|
2560
|
-
shape : float, > 0.
|
|
2561
|
-
Shape of the distribution.
|
|
2562
|
-
size : int or tuple of ints, optional
|
|
2563
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
2564
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
2565
|
-
single value is returned.
|
|
2566
|
-
|
|
2567
|
-
See Also
|
|
2568
|
-
--------
|
|
2569
|
-
scipy.stats.distributions.lomax.pdf : probability density function,
|
|
2570
|
-
distribution or cumulative density function, etc.
|
|
2571
|
-
scipy.stats.distributions.genpareto.pdf : probability density function,
|
|
2572
|
-
distribution or cumulative density function, etc.
|
|
2573
|
-
|
|
2574
|
-
Notes
|
|
2575
|
-
-----
|
|
2576
|
-
The probability density for the Pareto distribution is
|
|
2577
|
-
|
|
2578
|
-
.. math:: p(x) = \\frac{am^a}{x^{a+1}}
|
|
2579
|
-
|
|
2580
|
-
where :math:`a` is the shape and :math:`m` the scale.
|
|
2581
|
-
|
|
2582
|
-
The Pareto distribution, named after the Italian economist Vilfredo Pareto,
|
|
2583
|
-
is a power law probability distribution useful in many real world problems.
|
|
2584
|
-
Outside the field of economics it is generally referred to as the Bradford
|
|
2585
|
-
distribution. Pareto developed the distribution to describe the
|
|
2586
|
-
distribution of wealth in an economy. It has also found use in insurance,
|
|
2587
|
-
web page access statistics, oil field sizes, and many other problems,
|
|
2588
|
-
including the download frequency for projects in Sourceforge [1]_. It is
|
|
2589
|
-
one of the so-called "fat-tailed" distributions.
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
References
|
|
2593
|
-
----------
|
|
2594
|
-
.. [1] Francis Hunt and Paul Johnson, On the Pareto Distribution of
|
|
2595
|
-
Sourceforge projects.
|
|
2596
|
-
.. [2] Pareto, V. (1896). Course of Political Economy. Lausanne.
|
|
2597
|
-
.. [3] Reiss, R.D., Thomas, M.(2001), Statistical Analysis of Extreme
|
|
2598
|
-
Values, Birkhauser Verlag, Basel, pp 23-30.
|
|
2599
|
-
.. [4] Wikipedia, "Pareto distribution",
|
|
2600
|
-
http://en.wikipedia.org/wiki/Pareto_distribution
|
|
2601
|
-
|
|
2602
|
-
Examples
|
|
2603
|
-
--------
|
|
2604
|
-
Draw samples from the distribution:
|
|
2605
|
-
|
|
2606
|
-
>>> a, m = 3., 2. # shape and mode
|
|
2607
|
-
>>> s = (np.random.pareto(a, 1000) + 1) * m
|
|
2608
|
-
|
|
2609
|
-
Display the histogram of the samples, along with the probability
|
|
2610
|
-
density function:
|
|
2611
|
-
|
|
2612
|
-
>>> import matplotlib.pyplot as plt
|
|
2613
|
-
>>> count, bins, _ = plt.hist(s, 100, normed=True)
|
|
2614
|
-
>>> fit = a*m**a / bins**(a+1)
|
|
2615
|
-
>>> plt.plot(bins, max(count)*fit/max(fit), linewidth=2, color='r')
|
|
2616
|
-
>>> plt.show()
|
|
2617
|
-
|
|
2618
|
-
"""
|
|
2619
|
-
cdef ndarray oa
|
|
2620
|
-
cdef double fa
|
|
2621
|
-
|
|
2622
|
-
fa = PyFloat_AsDouble(a)
|
|
2623
|
-
if not PyErr_Occurred():
|
|
2624
|
-
if fa <= 0:
|
|
2625
|
-
raise ValueError("a <= 0")
|
|
2626
|
-
return cont1_array_sc(self.internal_state, rk_pareto, size, fa,
|
|
2627
|
-
self.lock)
|
|
2628
|
-
|
|
2629
|
-
PyErr_Clear()
|
|
2630
|
-
|
|
2631
|
-
oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
2632
|
-
if np.any(np.less_equal(oa, 0.0)):
|
|
2633
|
-
raise ValueError("a <= 0")
|
|
2634
|
-
return cont1_array(self.internal_state, rk_pareto, size, oa, self.lock)
|
|
2635
|
-
|
|
2636
|
-
def weibull(self, a, size=None):
|
|
2637
|
-
"""
|
|
2638
|
-
weibull(a, size=None)
|
|
2639
|
-
|
|
2640
|
-
Weibull distribution.
|
|
2641
|
-
|
|
2642
|
-
Draw samples from a 1-parameter Weibull distribution with the given
|
|
2643
|
-
shape parameter `a`.
|
|
2644
|
-
|
|
2645
|
-
.. math:: X = (-ln(U))^{1/a}
|
|
2646
|
-
|
|
2647
|
-
Here, U is drawn from the uniform distribution over (0,1].
|
|
2648
|
-
|
|
2649
|
-
The more common 2-parameter Weibull, including a scale parameter
|
|
2650
|
-
:math:`\\lambda` is just :math:`X = \\lambda(-ln(U))^{1/a}`.
|
|
2651
|
-
|
|
2652
|
-
Parameters
|
|
2653
|
-
----------
|
|
2654
|
-
a : float
|
|
2655
|
-
Shape of the distribution.
|
|
2656
|
-
size : int or tuple of ints, optional
|
|
2657
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
2658
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
2659
|
-
single value is returned.
|
|
2660
|
-
|
|
2661
|
-
See Also
|
|
2662
|
-
--------
|
|
2663
|
-
scipy.stats.distributions.weibull_max
|
|
2664
|
-
scipy.stats.distributions.weibull_min
|
|
2665
|
-
scipy.stats.distributions.genextreme
|
|
2666
|
-
gumbel
|
|
2667
|
-
|
|
2668
|
-
Notes
|
|
2669
|
-
-----
|
|
2670
|
-
The Weibull (or Type III asymptotic extreme value distribution for smallest
|
|
2671
|
-
values, SEV Type III, or Rosin-Rammler distribution) is one of a class of
|
|
2672
|
-
Generalized Extreme Value (GEV) distributions used in modeling extreme
|
|
2673
|
-
value problems. This class includes the Gumbel and Frechet distributions.
|
|
2674
|
-
|
|
2675
|
-
The probability density for the Weibull distribution is
|
|
2676
|
-
|
|
2677
|
-
.. math:: p(x) = \\frac{a}
|
|
2678
|
-
{\\lambda}(\\frac{x}{\\lambda})^{a-1}e^{-(x/\\lambda)^a},
|
|
2679
|
-
|
|
2680
|
-
where :math:`a` is the shape and :math:`\\lambda` the scale.
|
|
2681
|
-
|
|
2682
|
-
The function has its peak (the mode) at
|
|
2683
|
-
:math:`\\lambda(\\frac{a-1}{a})^{1/a}`.
|
|
2684
|
-
|
|
2685
|
-
When ``a = 1``, the Weibull distribution reduces to the exponential
|
|
2686
|
-
distribution.
|
|
2687
|
-
|
|
2688
|
-
References
|
|
2689
|
-
----------
|
|
2690
|
-
.. [1] Waloddi Weibull, Professor, Royal Technical University, Stockholm,
|
|
2691
|
-
1939 "A Statistical Theory Of The Strength Of Materials",
|
|
2692
|
-
Ingeniorsvetenskapsakademiens Handlingar Nr 151, 1939,
|
|
2693
|
-
Generalstabens Litografiska Anstalts Forlag, Stockholm.
|
|
2694
|
-
.. [2] Waloddi Weibull, 1951 "A Statistical Distribution Function of Wide
|
|
2695
|
-
Applicability", Journal Of Applied Mechanics ASME Paper.
|
|
2696
|
-
.. [3] Wikipedia, "Weibull distribution",
|
|
2697
|
-
http://en.wikipedia.org/wiki/Weibull_distribution
|
|
2698
|
-
|
|
2699
|
-
Examples
|
|
2700
|
-
--------
|
|
2701
|
-
Draw samples from the distribution:
|
|
2702
|
-
|
|
2703
|
-
>>> a = 5. # shape
|
|
2704
|
-
>>> s = np.random.weibull(a, 1000)
|
|
2705
|
-
|
|
2706
|
-
Display the histogram of the samples, along with
|
|
2707
|
-
the probability density function:
|
|
2708
|
-
|
|
2709
|
-
>>> import matplotlib.pyplot as plt
|
|
2710
|
-
>>> x = np.arange(1,100.)/50.
|
|
2711
|
-
>>> def weib(x,n,a):
|
|
2712
|
-
... return (a / n) * (x / n)**(a - 1) * np.exp(-(x / n)**a)
|
|
2713
|
-
|
|
2714
|
-
>>> count, bins, ignored = plt.hist(np.random.weibull(5.,1000))
|
|
2715
|
-
>>> x = np.arange(1,100.)/50.
|
|
2716
|
-
>>> scale = count.max()/weib(x, 1., 5.).max()
|
|
2717
|
-
>>> plt.plot(x, weib(x, 1., 5.)*scale)
|
|
2718
|
-
>>> plt.show()
|
|
2719
|
-
|
|
2720
|
-
"""
|
|
2721
|
-
cdef ndarray oa
|
|
2722
|
-
cdef double fa
|
|
2723
|
-
|
|
2724
|
-
fa = PyFloat_AsDouble(a)
|
|
2725
|
-
if not PyErr_Occurred():
|
|
2726
|
-
if fa <= 0:
|
|
2727
|
-
raise ValueError("a <= 0")
|
|
2728
|
-
return cont1_array_sc(self.internal_state, rk_weibull, size, fa,
|
|
2729
|
-
self.lock)
|
|
2730
|
-
|
|
2731
|
-
PyErr_Clear()
|
|
2732
|
-
|
|
2733
|
-
oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
2734
|
-
if np.any(np.less_equal(oa, 0.0)):
|
|
2735
|
-
raise ValueError("a <= 0")
|
|
2736
|
-
return cont1_array(self.internal_state, rk_weibull, size, oa,
|
|
2737
|
-
self.lock)
|
|
2738
|
-
|
|
2739
|
-
def power(self, a, size=None):
|
|
2740
|
-
"""
|
|
2741
|
-
power(a, size=None)
|
|
2742
|
-
|
|
2743
|
-
Draws samples in [0, 1] from a power distribution with positive
|
|
2744
|
-
exponent a - 1.
|
|
2745
|
-
|
|
2746
|
-
Also known as the power function distribution.
|
|
2747
|
-
|
|
2748
|
-
Parameters
|
|
2749
|
-
----------
|
|
2750
|
-
a : float
|
|
2751
|
-
parameter, > 0
|
|
2752
|
-
size : int or tuple of ints, optional
|
|
2753
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
2754
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
2755
|
-
single value is returned.
|
|
2756
|
-
|
|
2757
|
-
Returns
|
|
2758
|
-
-------
|
|
2759
|
-
samples : {ndarray, scalar}
|
|
2760
|
-
The returned samples lie in [0, 1].
|
|
2761
|
-
|
|
2762
|
-
Raises
|
|
2763
|
-
------
|
|
2764
|
-
ValueError
|
|
2765
|
-
If a<1.
|
|
2766
|
-
|
|
2767
|
-
Notes
|
|
2768
|
-
-----
|
|
2769
|
-
The probability density function is
|
|
2770
|
-
|
|
2771
|
-
.. math:: P(x; a) = ax^{a-1}, 0 \\le x \\le 1, a>0.
|
|
2772
|
-
|
|
2773
|
-
The power function distribution is just the inverse of the Pareto
|
|
2774
|
-
distribution. It may also be seen as a special case of the Beta
|
|
2775
|
-
distribution.
|
|
2776
|
-
|
|
2777
|
-
It is used, for example, in modeling the over-reporting of insurance
|
|
2778
|
-
claims.
|
|
2779
|
-
|
|
2780
|
-
References
|
|
2781
|
-
----------
|
|
2782
|
-
.. [1] Christian Kleiber, Samuel Kotz, "Statistical size distributions
|
|
2783
|
-
in economics and actuarial sciences", Wiley, 2003.
|
|
2784
|
-
.. [2] Heckert, N. A. and Filliben, James J. (2003). NIST Handbook 148:
|
|
2785
|
-
Dataplot Reference Manual, Volume 2: Let Subcommands and Library
|
|
2786
|
-
Functions", National Institute of Standards and Technology Handbook
|
|
2787
|
-
Series, June 2003.
|
|
2788
|
-
http://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/powpdf.pdf
|
|
2789
|
-
|
|
2790
|
-
Examples
|
|
2791
|
-
--------
|
|
2792
|
-
Draw samples from the distribution:
|
|
2793
|
-
|
|
2794
|
-
>>> a = 5. # shape
|
|
2795
|
-
>>> samples = 1000
|
|
2796
|
-
>>> s = np.random.power(a, samples)
|
|
2797
|
-
|
|
2798
|
-
Display the histogram of the samples, along with
|
|
2799
|
-
the probability density function:
|
|
2800
|
-
|
|
2801
|
-
>>> import matplotlib.pyplot as plt
|
|
2802
|
-
>>> count, bins, ignored = plt.hist(s, bins=30)
|
|
2803
|
-
>>> x = np.linspace(0, 1, 100)
|
|
2804
|
-
>>> y = a*x**(a-1.)
|
|
2805
|
-
>>> normed_y = samples*np.diff(bins)[0]*y
|
|
2806
|
-
>>> plt.plot(x, normed_y)
|
|
2807
|
-
>>> plt.show()
|
|
2808
|
-
|
|
2809
|
-
Compare the power function distribution to the inverse of the Pareto.
|
|
2810
|
-
|
|
2811
|
-
>>> from scipy import stats
|
|
2812
|
-
>>> rvs = np.random.power(5, 1000000)
|
|
2813
|
-
>>> rvsp = np.random.pareto(5, 1000000)
|
|
2814
|
-
>>> xx = np.linspace(0,1,100)
|
|
2815
|
-
>>> powpdf = stats.powerlaw.pdf(xx,5)
|
|
2816
|
-
|
|
2817
|
-
>>> plt.figure()
|
|
2818
|
-
>>> plt.hist(rvs, bins=50, normed=True)
|
|
2819
|
-
>>> plt.plot(xx,powpdf,'r-')
|
|
2820
|
-
>>> plt.title('np.random.power(5)')
|
|
2821
|
-
|
|
2822
|
-
>>> plt.figure()
|
|
2823
|
-
>>> plt.hist(1./(1.+rvsp), bins=50, normed=True)
|
|
2824
|
-
>>> plt.plot(xx,powpdf,'r-')
|
|
2825
|
-
>>> plt.title('inverse of 1 + np.random.pareto(5)')
|
|
2826
|
-
|
|
2827
|
-
>>> plt.figure()
|
|
2828
|
-
>>> plt.hist(1./(1.+rvsp), bins=50, normed=True)
|
|
2829
|
-
>>> plt.plot(xx,powpdf,'r-')
|
|
2830
|
-
>>> plt.title('inverse of stats.pareto(5)')
|
|
2831
|
-
|
|
2832
|
-
"""
|
|
2833
|
-
cdef ndarray oa
|
|
2834
|
-
cdef double fa
|
|
2835
|
-
|
|
2836
|
-
fa = PyFloat_AsDouble(a)
|
|
2837
|
-
if not PyErr_Occurred():
|
|
2838
|
-
if fa <= 0:
|
|
2839
|
-
raise ValueError("a <= 0")
|
|
2840
|
-
return cont1_array_sc(self.internal_state, rk_power, size, fa,
|
|
2841
|
-
self.lock)
|
|
2842
|
-
|
|
2843
|
-
PyErr_Clear()
|
|
2844
|
-
|
|
2845
|
-
oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
2846
|
-
if np.any(np.less_equal(oa, 0.0)):
|
|
2847
|
-
raise ValueError("a <= 0")
|
|
2848
|
-
return cont1_array(self.internal_state, rk_power, size, oa, self.lock)
|
|
2849
|
-
|
|
2850
|
-
def laplace(self, loc=0.0, scale=1.0, size=None):
|
|
2851
|
-
"""
|
|
2852
|
-
laplace(loc=0.0, scale=1.0, size=None)
|
|
2853
|
-
|
|
2854
|
-
Draw samples from the Laplace or double exponential distribution with
|
|
2855
|
-
specified location (or mean) and scale (decay).
|
|
2856
|
-
|
|
2857
|
-
The Laplace distribution is similar to the Gaussian/normal distribution,
|
|
2858
|
-
but is sharper at the peak and has fatter tails. It represents the
|
|
2859
|
-
difference between two independent, identically distributed exponential
|
|
2860
|
-
random variables.
|
|
2861
|
-
|
|
2862
|
-
Parameters
|
|
2863
|
-
----------
|
|
2864
|
-
loc : float
|
|
2865
|
-
The position, :math:`\\mu`, of the distribution peak.
|
|
2866
|
-
scale : float
|
|
2867
|
-
:math:`\\lambda`, the exponential decay.
|
|
2868
|
-
size : int or tuple of ints, optional
|
|
2869
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
2870
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
2871
|
-
single value is returned.
|
|
2872
|
-
|
|
2873
|
-
Notes
|
|
2874
|
-
-----
|
|
2875
|
-
It has the probability density function
|
|
2876
|
-
|
|
2877
|
-
.. math:: f(x; \\mu, \\lambda) = \\frac{1}{2\\lambda}
|
|
2878
|
-
\\exp\\left(-\\frac{|x - \\mu|}{\\lambda}\\right).
|
|
2879
|
-
|
|
2880
|
-
The first law of Laplace, from 1774, states that the frequency of an error
|
|
2881
|
-
can be expressed as an exponential function of the absolute magnitude of
|
|
2882
|
-
the error, which leads to the Laplace distribution. For many problems in
|
|
2883
|
-
Economics and Health sciences, this distribution seems to model the data
|
|
2884
|
-
better than the standard Gaussian distribution
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
References
|
|
2888
|
-
----------
|
|
2889
|
-
.. [1] Abramowitz, M. and Stegun, I. A. (Eds.). Handbook of Mathematical
|
|
2890
|
-
Functions with Formulas, Graphs, and Mathematical Tables, 9th
|
|
2891
|
-
printing. New York: Dover, 1972.
|
|
2892
|
-
|
|
2893
|
-
.. [2] The Laplace distribution and generalizations
|
|
2894
|
-
By Samuel Kotz, Tomasz J. Kozubowski, Krzysztof Podgorski,
|
|
2895
|
-
Birkhauser, 2001.
|
|
2896
|
-
|
|
2897
|
-
.. [3] Weisstein, Eric W. "Laplace Distribution."
|
|
2898
|
-
From MathWorld--A Wolfram Web Resource.
|
|
2899
|
-
http://mathworld.wolfram.com/LaplaceDistribution.html
|
|
2900
|
-
|
|
2901
|
-
.. [4] Wikipedia, "Laplace distribution",
|
|
2902
|
-
http://en.wikipedia.org/wiki/Laplace_distribution
|
|
2903
|
-
|
|
2904
|
-
Examples
|
|
2905
|
-
--------
|
|
2906
|
-
Draw samples from the distribution
|
|
2907
|
-
|
|
2908
|
-
>>> loc, scale = 0., 1.
|
|
2909
|
-
>>> s = np.random.laplace(loc, scale, 1000)
|
|
2910
|
-
|
|
2911
|
-
Display the histogram of the samples, along with
|
|
2912
|
-
the probability density function:
|
|
2913
|
-
|
|
2914
|
-
>>> import matplotlib.pyplot as plt
|
|
2915
|
-
>>> count, bins, ignored = plt.hist(s, 30, normed=True)
|
|
2916
|
-
>>> x = np.arange(-8., 8., .01)
|
|
2917
|
-
>>> pdf = np.exp(-abs(x-loc)/scale)/(2.*scale)
|
|
2918
|
-
>>> plt.plot(x, pdf)
|
|
2919
|
-
|
|
2920
|
-
Plot Gaussian for comparison:
|
|
2921
|
-
|
|
2922
|
-
>>> g = (1/(scale * np.sqrt(2 * np.pi)) *
|
|
2923
|
-
... np.exp(-(x - loc)**2 / (2 * scale**2)))
|
|
2924
|
-
>>> plt.plot(x,g)
|
|
2925
|
-
|
|
2926
|
-
"""
|
|
2927
|
-
cdef ndarray oloc, oscale
|
|
2928
|
-
cdef double floc, fscale
|
|
2929
|
-
|
|
2930
|
-
floc = PyFloat_AsDouble(loc)
|
|
2931
|
-
fscale = PyFloat_AsDouble(scale)
|
|
2932
|
-
if not PyErr_Occurred():
|
|
2933
|
-
if fscale <= 0:
|
|
2934
|
-
raise ValueError("scale <= 0")
|
|
2935
|
-
return cont2_array_sc(self.internal_state, rk_laplace, size, floc,
|
|
2936
|
-
fscale, self.lock)
|
|
2937
|
-
|
|
2938
|
-
PyErr_Clear()
|
|
2939
|
-
oloc = PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
2940
|
-
oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
2941
|
-
if np.any(np.less_equal(oscale, 0.0)):
|
|
2942
|
-
raise ValueError("scale <= 0")
|
|
2943
|
-
return cont2_array(self.internal_state, rk_laplace, size, oloc, oscale,
|
|
2944
|
-
self.lock)
|
|
2945
|
-
|
|
2946
|
-
def gumbel(self, loc=0.0, scale=1.0, size=None):
|
|
2947
|
-
"""
|
|
2948
|
-
gumbel(loc=0.0, scale=1.0, size=None)
|
|
2949
|
-
|
|
2950
|
-
Gumbel distribution.
|
|
2951
|
-
|
|
2952
|
-
Draw samples from a Gumbel distribution with specified location and scale.
|
|
2953
|
-
For more information on the Gumbel distribution, see Notes and References
|
|
2954
|
-
below.
|
|
2955
|
-
|
|
2956
|
-
Parameters
|
|
2957
|
-
----------
|
|
2958
|
-
loc : float
|
|
2959
|
-
The location of the mode of the distribution.
|
|
2960
|
-
scale : float
|
|
2961
|
-
The scale parameter of the distribution.
|
|
2962
|
-
size : int or tuple of ints, optional
|
|
2963
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
2964
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
2965
|
-
single value is returned.
|
|
2966
|
-
|
|
2967
|
-
Returns
|
|
2968
|
-
-------
|
|
2969
|
-
out : ndarray
|
|
2970
|
-
The samples
|
|
2971
|
-
|
|
2972
|
-
See Also
|
|
2973
|
-
--------
|
|
2974
|
-
scipy.stats.gumbel_l
|
|
2975
|
-
scipy.stats.gumbel_r
|
|
2976
|
-
scipy.stats.genextreme
|
|
2977
|
-
probability density function, distribution, or cumulative density
|
|
2978
|
-
function, etc. for each of the above
|
|
2979
|
-
weibull
|
|
2980
|
-
|
|
2981
|
-
Notes
|
|
2982
|
-
-----
|
|
2983
|
-
The Gumbel (or Smallest Extreme Value (SEV) or the Smallest Extreme Value
|
|
2984
|
-
Type I) distribution is one of a class of Generalized Extreme Value (GEV)
|
|
2985
|
-
distributions used in modeling extreme value problems. The Gumbel is a
|
|
2986
|
-
special case of the Extreme Value Type I distribution for maximums from
|
|
2987
|
-
distributions with "exponential-like" tails.
|
|
2988
|
-
|
|
2989
|
-
The probability density for the Gumbel distribution is
|
|
2990
|
-
|
|
2991
|
-
.. math:: p(x) = \\frac{e^{-(x - \\mu)/ \\beta}}{\\beta} e^{ -e^{-(x - \\mu)/
|
|
2992
|
-
\\beta}},
|
|
2993
|
-
|
|
2994
|
-
where :math:`\\mu` is the mode, a location parameter, and :math:`\\beta` is
|
|
2995
|
-
the scale parameter.
|
|
2996
|
-
|
|
2997
|
-
The Gumbel (named for German mathematician Emil Julius Gumbel) was used
|
|
2998
|
-
very early in the hydrology literature, for modeling the occurrence of
|
|
2999
|
-
flood events. It is also used for modeling maximum wind speed and rainfall
|
|
3000
|
-
rates. It is a "fat-tailed" distribution - the probability of an event in
|
|
3001
|
-
the tail of the distribution is larger than if one used a Gaussian, hence
|
|
3002
|
-
the surprisingly frequent occurrence of 100-year floods. Floods were
|
|
3003
|
-
initially modeled as a Gaussian process, which underestimated the frequency
|
|
3004
|
-
of extreme events.
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
It is one of a class of extreme value distributions, the Generalized
|
|
3008
|
-
Extreme Value (GEV) distributions, which also includes the Weibull and
|
|
3009
|
-
Frechet.
|
|
3010
|
-
|
|
3011
|
-
The function has a mean of :math:`\\mu + 0.57721\\beta` and a variance of
|
|
3012
|
-
:math:`\\frac{\\pi^2}{6}\\beta^2`.
|
|
3013
|
-
|
|
3014
|
-
References
|
|
3015
|
-
----------
|
|
3016
|
-
Gumbel, E. J., *Statistics of Extremes*, New York: Columbia University
|
|
3017
|
-
Press, 1958.
|
|
3018
|
-
|
|
3019
|
-
Reiss, R.-D. and Thomas, M., *Statistical Analysis of Extreme Values from
|
|
3020
|
-
Insurance, Finance, Hydrology and Other Fields*, Basel: Birkhauser Verlag,
|
|
3021
|
-
2001.
|
|
3022
|
-
|
|
3023
|
-
Examples
|
|
3024
|
-
--------
|
|
3025
|
-
Draw samples from the distribution:
|
|
3026
|
-
|
|
3027
|
-
>>> mu, beta = 0, 0.1 # location and scale
|
|
3028
|
-
>>> s = np.random.gumbel(mu, beta, 1000)
|
|
3029
|
-
|
|
3030
|
-
Display the histogram of the samples, along with
|
|
3031
|
-
the probability density function:
|
|
3032
|
-
|
|
3033
|
-
>>> import matplotlib.pyplot as plt
|
|
3034
|
-
>>> count, bins, ignored = plt.hist(s, 30, normed=True)
|
|
3035
|
-
>>> plt.plot(bins, (1/beta)*np.exp(-(bins - mu)/beta)
|
|
3036
|
-
... * np.exp( -np.exp( -(bins - mu) /beta) ),
|
|
3037
|
-
... linewidth=2, color='r')
|
|
3038
|
-
>>> plt.show()
|
|
3039
|
-
|
|
3040
|
-
Show how an extreme value distribution can arise from a Gaussian process
|
|
3041
|
-
and compare to a Gaussian:
|
|
3042
|
-
|
|
3043
|
-
>>> means = []
|
|
3044
|
-
>>> maxima = []
|
|
3045
|
-
>>> for i in range(0,1000) :
|
|
3046
|
-
... a = np.random.normal(mu, beta, 1000)
|
|
3047
|
-
... means.append(a.mean())
|
|
3048
|
-
... maxima.append(a.max())
|
|
3049
|
-
>>> count, bins, ignored = plt.hist(maxima, 30, normed=True)
|
|
3050
|
-
>>> beta = np.std(maxima)*np.pi/np.sqrt(6)
|
|
3051
|
-
>>> mu = np.mean(maxima) - 0.57721*beta
|
|
3052
|
-
>>> plt.plot(bins, (1/beta)*np.exp(-(bins - mu)/beta)
|
|
3053
|
-
... * np.exp(-np.exp(-(bins - mu)/beta)),
|
|
3054
|
-
... linewidth=2, color='r')
|
|
3055
|
-
>>> plt.plot(bins, 1/(beta * np.sqrt(2 * np.pi))
|
|
3056
|
-
... * np.exp(-(bins - mu)**2 / (2 * beta**2)),
|
|
3057
|
-
... linewidth=2, color='g')
|
|
3058
|
-
>>> plt.show()
|
|
3059
|
-
|
|
3060
|
-
"""
|
|
3061
|
-
cdef ndarray oloc, oscale
|
|
3062
|
-
cdef double floc, fscale
|
|
3063
|
-
|
|
3064
|
-
floc = PyFloat_AsDouble(loc)
|
|
3065
|
-
fscale = PyFloat_AsDouble(scale)
|
|
3066
|
-
if not PyErr_Occurred():
|
|
3067
|
-
if fscale <= 0:
|
|
3068
|
-
raise ValueError("scale <= 0")
|
|
3069
|
-
return cont2_array_sc(self.internal_state, rk_gumbel, size, floc,
|
|
3070
|
-
fscale, self.lock)
|
|
3071
|
-
|
|
3072
|
-
PyErr_Clear()
|
|
3073
|
-
oloc = PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3074
|
-
oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3075
|
-
if np.any(np.less_equal(oscale, 0.0)):
|
|
3076
|
-
raise ValueError("scale <= 0")
|
|
3077
|
-
return cont2_array(self.internal_state, rk_gumbel, size, oloc, oscale,
|
|
3078
|
-
self.lock)
|
|
3079
|
-
|
|
3080
|
-
def logistic(self, loc=0.0, scale=1.0, size=None):
|
|
3081
|
-
"""
|
|
3082
|
-
logistic(loc=0.0, scale=1.0, size=None)
|
|
3083
|
-
|
|
3084
|
-
Draw samples from a Logistic distribution.
|
|
3085
|
-
|
|
3086
|
-
Samples are drawn from a Logistic distribution with specified
|
|
3087
|
-
parameters, loc (location or mean, also median), and scale (>0).
|
|
3088
|
-
|
|
3089
|
-
Parameters
|
|
3090
|
-
----------
|
|
3091
|
-
loc : float
|
|
3092
|
-
|
|
3093
|
-
scale : float > 0.
|
|
3094
|
-
|
|
3095
|
-
size : int or tuple of ints, optional
|
|
3096
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
3097
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
3098
|
-
single value is returned.
|
|
3099
|
-
|
|
3100
|
-
Returns
|
|
3101
|
-
-------
|
|
3102
|
-
samples : {ndarray, scalar}
|
|
3103
|
-
where the values are all integers in [0, n].
|
|
3104
|
-
|
|
3105
|
-
See Also
|
|
3106
|
-
--------
|
|
3107
|
-
scipy.stats.distributions.logistic : probability density function,
|
|
3108
|
-
distribution or cumulative density function, etc.
|
|
3109
|
-
|
|
3110
|
-
Notes
|
|
3111
|
-
-----
|
|
3112
|
-
The probability density for the Logistic distribution is
|
|
3113
|
-
|
|
3114
|
-
.. math:: P(x) = P(x) = \\frac{e^{-(x-\\mu)/s}}{s(1+e^{-(x-\\mu)/s})^2},
|
|
3115
|
-
|
|
3116
|
-
where :math:`\\mu` = location and :math:`s` = scale.
|
|
3117
|
-
|
|
3118
|
-
The Logistic distribution is used in Extreme Value problems where it
|
|
3119
|
-
can act as a mixture of Gumbel distributions, in Epidemiology, and by
|
|
3120
|
-
the World Chess Federation (FIDE) where it is used in the Elo ranking
|
|
3121
|
-
system, assuming the performance of each player is a logistically
|
|
3122
|
-
distributed random variable.
|
|
3123
|
-
|
|
3124
|
-
References
|
|
3125
|
-
----------
|
|
3126
|
-
.. [1] Reiss, R.-D. and Thomas M. (2001), Statistical Analysis of Extreme
|
|
3127
|
-
Values, from Insurance, Finance, Hydrology and Other Fields,
|
|
3128
|
-
Birkhauser Verlag, Basel, pp 132-133.
|
|
3129
|
-
.. [2] Weisstein, Eric W. "Logistic Distribution." From
|
|
3130
|
-
MathWorld--A Wolfram Web Resource.
|
|
3131
|
-
http://mathworld.wolfram.com/LogisticDistribution.html
|
|
3132
|
-
.. [3] Wikipedia, "Logistic-distribution",
|
|
3133
|
-
http://en.wikipedia.org/wiki/Logistic-distribution
|
|
3134
|
-
|
|
3135
|
-
Examples
|
|
3136
|
-
--------
|
|
3137
|
-
Draw samples from the distribution:
|
|
3138
|
-
|
|
3139
|
-
>>> loc, scale = 10, 1
|
|
3140
|
-
>>> s = np.random.logistic(loc, scale, 10000)
|
|
3141
|
-
>>> count, bins, ignored = plt.hist(s, bins=50)
|
|
3142
|
-
|
|
3143
|
-
# plot against distribution
|
|
3144
|
-
|
|
3145
|
-
>>> def logist(x, loc, scale):
|
|
3146
|
-
... return exp((loc-x)/scale)/(scale*(1+exp((loc-x)/scale))**2)
|
|
3147
|
-
>>> plt.plot(bins, logist(bins, loc, scale)*count.max()/\\
|
|
3148
|
-
... logist(bins, loc, scale).max())
|
|
3149
|
-
>>> plt.show()
|
|
3150
|
-
|
|
3151
|
-
"""
|
|
3152
|
-
cdef ndarray oloc, oscale
|
|
3153
|
-
cdef double floc, fscale
|
|
3154
|
-
|
|
3155
|
-
floc = PyFloat_AsDouble(loc)
|
|
3156
|
-
fscale = PyFloat_AsDouble(scale)
|
|
3157
|
-
if not PyErr_Occurred():
|
|
3158
|
-
if fscale <= 0:
|
|
3159
|
-
raise ValueError("scale <= 0")
|
|
3160
|
-
return cont2_array_sc(self.internal_state, rk_logistic, size, floc,
|
|
3161
|
-
fscale, self.lock)
|
|
3162
|
-
|
|
3163
|
-
PyErr_Clear()
|
|
3164
|
-
oloc = PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3165
|
-
oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3166
|
-
if np.any(np.less_equal(oscale, 0.0)):
|
|
3167
|
-
raise ValueError("scale <= 0")
|
|
3168
|
-
return cont2_array(self.internal_state, rk_logistic, size, oloc,
|
|
3169
|
-
oscale, self.lock)
|
|
3170
|
-
|
|
3171
|
-
def lognormal(self, mean=0.0, sigma=1.0, size=None):
|
|
3172
|
-
"""
|
|
3173
|
-
lognormal(mean=0.0, sigma=1.0, size=None)
|
|
3174
|
-
|
|
3175
|
-
Return samples drawn from a log-normal distribution.
|
|
3176
|
-
|
|
3177
|
-
Draw samples from a log-normal distribution with specified mean,
|
|
3178
|
-
standard deviation, and array shape. Note that the mean and standard
|
|
3179
|
-
deviation are not the values for the distribution itself, but of the
|
|
3180
|
-
underlying normal distribution it is derived from.
|
|
3181
|
-
|
|
3182
|
-
Parameters
|
|
3183
|
-
----------
|
|
3184
|
-
mean : float
|
|
3185
|
-
Mean value of the underlying normal distribution
|
|
3186
|
-
sigma : float, > 0.
|
|
3187
|
-
Standard deviation of the underlying normal distribution
|
|
3188
|
-
size : int or tuple of ints, optional
|
|
3189
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
3190
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
3191
|
-
single value is returned.
|
|
3192
|
-
|
|
3193
|
-
Returns
|
|
3194
|
-
-------
|
|
3195
|
-
samples : ndarray or float
|
|
3196
|
-
The desired samples. An array of the same shape as `size` if given,
|
|
3197
|
-
if `size` is None a float is returned.
|
|
3198
|
-
|
|
3199
|
-
See Also
|
|
3200
|
-
--------
|
|
3201
|
-
scipy.stats.lognorm : probability density function, distribution,
|
|
3202
|
-
cumulative density function, etc.
|
|
3203
|
-
|
|
3204
|
-
Notes
|
|
3205
|
-
-----
|
|
3206
|
-
A variable `x` has a log-normal distribution if `log(x)` is normally
|
|
3207
|
-
distributed. The probability density function for the log-normal
|
|
3208
|
-
distribution is:
|
|
3209
|
-
|
|
3210
|
-
.. math:: p(x) = \\frac{1}{\\sigma x \\sqrt{2\\pi}}
|
|
3211
|
-
e^{(-\\frac{(ln(x)-\\mu)^2}{2\\sigma^2})}
|
|
3212
|
-
|
|
3213
|
-
where :math:`\\mu` is the mean and :math:`\\sigma` is the standard
|
|
3214
|
-
deviation of the normally distributed logarithm of the variable.
|
|
3215
|
-
A log-normal distribution results if a random variable is the *product*
|
|
3216
|
-
of a large number of independent, identically-distributed variables in
|
|
3217
|
-
the same way that a normal distribution results if the variable is the
|
|
3218
|
-
*sum* of a large number of independent, identically-distributed
|
|
3219
|
-
variables.
|
|
3220
|
-
|
|
3221
|
-
References
|
|
3222
|
-
----------
|
|
3223
|
-
Limpert, E., Stahel, W. A., and Abbt, M., "Log-normal Distributions
|
|
3224
|
-
across the Sciences: Keys and Clues," *BioScience*, Vol. 51, No. 5,
|
|
3225
|
-
May, 2001. http://stat.ethz.ch/~stahel/lognormal/bioscience.pdf
|
|
3226
|
-
|
|
3227
|
-
Reiss, R.D. and Thomas, M., *Statistical Analysis of Extreme Values*,
|
|
3228
|
-
Basel: Birkhauser Verlag, 2001, pp. 31-32.
|
|
3229
|
-
|
|
3230
|
-
Examples
|
|
3231
|
-
--------
|
|
3232
|
-
Draw samples from the distribution:
|
|
3233
|
-
|
|
3234
|
-
>>> mu, sigma = 3., 1. # mean and standard deviation
|
|
3235
|
-
>>> s = np.random.lognormal(mu, sigma, 1000)
|
|
3236
|
-
|
|
3237
|
-
Display the histogram of the samples, along with
|
|
3238
|
-
the probability density function:
|
|
3239
|
-
|
|
3240
|
-
>>> import matplotlib.pyplot as plt
|
|
3241
|
-
>>> count, bins, ignored = plt.hist(s, 100, normed=True, align='mid')
|
|
3242
|
-
|
|
3243
|
-
>>> x = np.linspace(min(bins), max(bins), 10000)
|
|
3244
|
-
>>> pdf = (np.exp(-(np.log(x) - mu)**2 / (2 * sigma**2))
|
|
3245
|
-
... / (x * sigma * np.sqrt(2 * np.pi)))
|
|
3246
|
-
|
|
3247
|
-
>>> plt.plot(x, pdf, linewidth=2, color='r')
|
|
3248
|
-
>>> plt.axis('tight')
|
|
3249
|
-
>>> plt.show()
|
|
3250
|
-
|
|
3251
|
-
Demonstrate that taking the products of random samples from a uniform
|
|
3252
|
-
distribution can be fit well by a log-normal probability density function.
|
|
3253
|
-
|
|
3254
|
-
>>> # Generate a thousand samples: each is the product of 100 random
|
|
3255
|
-
>>> # values, drawn from a normal distribution.
|
|
3256
|
-
>>> b = []
|
|
3257
|
-
>>> for i in range(1000):
|
|
3258
|
-
... a = 10. + np.random.random(100)
|
|
3259
|
-
... b.append(np.product(a))
|
|
3260
|
-
|
|
3261
|
-
>>> b = np.array(b) / np.min(b) # scale values to be positive
|
|
3262
|
-
>>> count, bins, ignored = plt.hist(b, 100, normed=True, align='center')
|
|
3263
|
-
>>> sigma = np.std(np.log(b))
|
|
3264
|
-
>>> mu = np.mean(np.log(b))
|
|
3265
|
-
|
|
3266
|
-
>>> x = np.linspace(min(bins), max(bins), 10000)
|
|
3267
|
-
>>> pdf = (np.exp(-(np.log(x) - mu)**2 / (2 * sigma**2))
|
|
3268
|
-
... / (x * sigma * np.sqrt(2 * np.pi)))
|
|
3269
|
-
|
|
3270
|
-
>>> plt.plot(x, pdf, color='r', linewidth=2)
|
|
3271
|
-
>>> plt.show()
|
|
3272
|
-
|
|
3273
|
-
"""
|
|
3274
|
-
cdef ndarray omean, osigma
|
|
3275
|
-
cdef double fmean, fsigma
|
|
3276
|
-
|
|
3277
|
-
fmean = PyFloat_AsDouble(mean)
|
|
3278
|
-
fsigma = PyFloat_AsDouble(sigma)
|
|
3279
|
-
|
|
3280
|
-
if not PyErr_Occurred():
|
|
3281
|
-
if fsigma <= 0:
|
|
3282
|
-
raise ValueError("sigma <= 0")
|
|
3283
|
-
return cont2_array_sc(self.internal_state, rk_lognormal, size,
|
|
3284
|
-
fmean, fsigma, self.lock)
|
|
3285
|
-
|
|
3286
|
-
PyErr_Clear()
|
|
3287
|
-
|
|
3288
|
-
omean = PyArray_FROM_OTF(mean, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3289
|
-
osigma = PyArray_FROM_OTF(sigma, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3290
|
-
if np.any(np.less_equal(osigma, 0.0)):
|
|
3291
|
-
raise ValueError("sigma <= 0.0")
|
|
3292
|
-
return cont2_array(self.internal_state, rk_lognormal, size, omean,
|
|
3293
|
-
osigma, self.lock)
|
|
3294
|
-
|
|
3295
|
-
def rayleigh(self, scale=1.0, size=None):
|
|
3296
|
-
"""
|
|
3297
|
-
rayleigh(scale=1.0, size=None)
|
|
3298
|
-
|
|
3299
|
-
Draw samples from a Rayleigh distribution.
|
|
3300
|
-
|
|
3301
|
-
The :math:`\\chi` and Weibull distributions are generalizations of the
|
|
3302
|
-
Rayleigh.
|
|
3303
|
-
|
|
3304
|
-
Parameters
|
|
3305
|
-
----------
|
|
3306
|
-
scale : scalar
|
|
3307
|
-
Scale, also equals the mode. Should be >= 0.
|
|
3308
|
-
size : int or tuple of ints, optional
|
|
3309
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
3310
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
3311
|
-
single value is returned.
|
|
3312
|
-
|
|
3313
|
-
Notes
|
|
3314
|
-
-----
|
|
3315
|
-
The probability density function for the Rayleigh distribution is
|
|
3316
|
-
|
|
3317
|
-
.. math:: P(x;scale) = \\frac{x}{scale^2}e^{\\frac{-x^2}{2 \\cdotp scale^2}}
|
|
3318
|
-
|
|
3319
|
-
The Rayleigh distribution arises if the wind speed and wind direction are
|
|
3320
|
-
both gaussian variables, then the vector wind velocity forms a Rayleigh
|
|
3321
|
-
distribution. The Rayleigh distribution is used to model the expected
|
|
3322
|
-
output from wind turbines.
|
|
3323
|
-
|
|
3324
|
-
References
|
|
3325
|
-
----------
|
|
3326
|
-
.. [1] Brighton Webs Ltd., Rayleigh Distribution,
|
|
3327
|
-
http://www.brighton-webs.co.uk/distributions/rayleigh.asp
|
|
3328
|
-
.. [2] Wikipedia, "Rayleigh distribution"
|
|
3329
|
-
http://en.wikipedia.org/wiki/Rayleigh_distribution
|
|
3330
|
-
|
|
3331
|
-
Examples
|
|
3332
|
-
--------
|
|
3333
|
-
Draw values from the distribution and plot the histogram
|
|
3334
|
-
|
|
3335
|
-
>>> values = hist(np.random.rayleigh(3, 100000), bins=200, normed=True)
|
|
3336
|
-
|
|
3337
|
-
Wave heights tend to follow a Rayleigh distribution. If the mean wave
|
|
3338
|
-
height is 1 meter, what fraction of waves are likely to be larger than 3
|
|
3339
|
-
meters?
|
|
3340
|
-
|
|
3341
|
-
>>> meanvalue = 1
|
|
3342
|
-
>>> modevalue = np.sqrt(2 / np.pi) * meanvalue
|
|
3343
|
-
>>> s = np.random.rayleigh(modevalue, 1000000)
|
|
3344
|
-
|
|
3345
|
-
The percentage of waves larger than 3 meters is:
|
|
3346
|
-
|
|
3347
|
-
>>> 100.*sum(s>3)/1000000.
|
|
3348
|
-
0.087300000000000003
|
|
3349
|
-
|
|
3350
|
-
"""
|
|
3351
|
-
cdef ndarray oscale
|
|
3352
|
-
cdef double fscale
|
|
3353
|
-
|
|
3354
|
-
fscale = PyFloat_AsDouble(scale)
|
|
3355
|
-
|
|
3356
|
-
if not PyErr_Occurred():
|
|
3357
|
-
if fscale <= 0:
|
|
3358
|
-
raise ValueError("scale <= 0")
|
|
3359
|
-
return cont1_array_sc(self.internal_state, rk_rayleigh, size,
|
|
3360
|
-
fscale, self.lock)
|
|
3361
|
-
|
|
3362
|
-
PyErr_Clear()
|
|
3363
|
-
|
|
3364
|
-
oscale = <ndarray>PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3365
|
-
if np.any(np.less_equal(oscale, 0.0)):
|
|
3366
|
-
raise ValueError("scale <= 0.0")
|
|
3367
|
-
return cont1_array(self.internal_state, rk_rayleigh, size, oscale,
|
|
3368
|
-
self.lock)
|
|
3369
|
-
|
|
3370
|
-
def wald(self, mean, scale, size=None):
|
|
3371
|
-
"""
|
|
3372
|
-
wald(mean, scale, size=None)
|
|
3373
|
-
|
|
3374
|
-
Draw samples from a Wald, or Inverse Gaussian, distribution.
|
|
3375
|
-
|
|
3376
|
-
As the scale approaches infinity, the distribution becomes more like a
|
|
3377
|
-
Gaussian.
|
|
3378
|
-
|
|
3379
|
-
Some references claim that the Wald is an Inverse Gaussian with mean=1, but
|
|
3380
|
-
this is by no means universal.
|
|
3381
|
-
|
|
3382
|
-
The Inverse Gaussian distribution was first studied in relationship to
|
|
3383
|
-
Brownian motion. In 1956 M.C.K. Tweedie used the name Inverse Gaussian
|
|
3384
|
-
because there is an inverse relationship between the time to cover a unit
|
|
3385
|
-
distance and distance covered in unit time.
|
|
3386
|
-
|
|
3387
|
-
Parameters
|
|
3388
|
-
----------
|
|
3389
|
-
mean : scalar
|
|
3390
|
-
Distribution mean, should be > 0.
|
|
3391
|
-
scale : scalar
|
|
3392
|
-
Scale parameter, should be >= 0.
|
|
3393
|
-
size : int or tuple of ints, optional
|
|
3394
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
3395
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
3396
|
-
single value is returned.
|
|
3397
|
-
|
|
3398
|
-
Returns
|
|
3399
|
-
-------
|
|
3400
|
-
samples : ndarray or scalar
|
|
3401
|
-
Drawn sample, all greater than zero.
|
|
3402
|
-
|
|
3403
|
-
Notes
|
|
3404
|
-
-----
|
|
3405
|
-
The probability density function for the Wald distribution is
|
|
3406
|
-
|
|
3407
|
-
.. math:: P(x;mean,scale) = \\sqrt{\\frac{scale}{2\\pi x^3}}e^
|
|
3408
|
-
\\frac{-scale(x-mean)^2}{2\\cdotp mean^2x}
|
|
3409
|
-
|
|
3410
|
-
As noted above the Inverse Gaussian distribution first arise from attempts
|
|
3411
|
-
to model Brownian Motion. It is also a competitor to the Weibull for use in
|
|
3412
|
-
reliability modeling and modeling stock returns and interest rate
|
|
3413
|
-
processes.
|
|
3414
|
-
|
|
3415
|
-
References
|
|
3416
|
-
----------
|
|
3417
|
-
.. [1] Brighton Webs Ltd., Wald Distribution,
|
|
3418
|
-
http://www.brighton-webs.co.uk/distributions/wald.asp
|
|
3419
|
-
.. [2] Chhikara, Raj S., and Folks, J. Leroy, "The Inverse Gaussian
|
|
3420
|
-
Distribution: Theory : Methodology, and Applications", CRC Press,
|
|
3421
|
-
1988.
|
|
3422
|
-
.. [3] Wikipedia, "Wald distribution"
|
|
3423
|
-
http://en.wikipedia.org/wiki/Wald_distribution
|
|
3424
|
-
|
|
3425
|
-
Examples
|
|
3426
|
-
--------
|
|
3427
|
-
Draw values from the distribution and plot the histogram:
|
|
3428
|
-
|
|
3429
|
-
>>> import matplotlib.pyplot as plt
|
|
3430
|
-
>>> h = plt.hist(np.random.wald(3, 2, 100000), bins=200, normed=True)
|
|
3431
|
-
>>> plt.show()
|
|
3432
|
-
|
|
3433
|
-
"""
|
|
3434
|
-
cdef ndarray omean, oscale
|
|
3435
|
-
cdef double fmean, fscale
|
|
3436
|
-
|
|
3437
|
-
fmean = PyFloat_AsDouble(mean)
|
|
3438
|
-
fscale = PyFloat_AsDouble(scale)
|
|
3439
|
-
if not PyErr_Occurred():
|
|
3440
|
-
if fmean <= 0:
|
|
3441
|
-
raise ValueError("mean <= 0")
|
|
3442
|
-
if fscale <= 0:
|
|
3443
|
-
raise ValueError("scale <= 0")
|
|
3444
|
-
return cont2_array_sc(self.internal_state, rk_wald, size, fmean,
|
|
3445
|
-
fscale, self.lock)
|
|
3446
|
-
|
|
3447
|
-
PyErr_Clear()
|
|
3448
|
-
omean = PyArray_FROM_OTF(mean, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3449
|
-
oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3450
|
-
if np.any(np.less_equal(omean,0.0)):
|
|
3451
|
-
raise ValueError("mean <= 0.0")
|
|
3452
|
-
elif np.any(np.less_equal(oscale,0.0)):
|
|
3453
|
-
raise ValueError("scale <= 0.0")
|
|
3454
|
-
return cont2_array(self.internal_state, rk_wald, size, omean, oscale,
|
|
3455
|
-
self.lock)
|
|
3456
|
-
|
|
3457
|
-
def triangular(self, left, mode, right, size=None):
|
|
3458
|
-
"""
|
|
3459
|
-
triangular(left, mode, right, size=None)
|
|
3460
|
-
|
|
3461
|
-
Draw samples from the triangular distribution.
|
|
3462
|
-
|
|
3463
|
-
The triangular distribution is a continuous probability distribution with
|
|
3464
|
-
lower limit left, peak at mode, and upper limit right. Unlike the other
|
|
3465
|
-
distributions, these parameters directly define the shape of the pdf.
|
|
3466
|
-
|
|
3467
|
-
Parameters
|
|
3468
|
-
----------
|
|
3469
|
-
left : scalar
|
|
3470
|
-
Lower limit.
|
|
3471
|
-
mode : scalar
|
|
3472
|
-
The value where the peak of the distribution occurs.
|
|
3473
|
-
The value should fulfill the condition ``left <= mode <= right``.
|
|
3474
|
-
right : scalar
|
|
3475
|
-
Upper limit, should be larger than `left`.
|
|
3476
|
-
size : int or tuple of ints, optional
|
|
3477
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
3478
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
3479
|
-
single value is returned.
|
|
3480
|
-
|
|
3481
|
-
Returns
|
|
3482
|
-
-------
|
|
3483
|
-
samples : ndarray or scalar
|
|
3484
|
-
The returned samples all lie in the interval [left, right].
|
|
3485
|
-
|
|
3486
|
-
Notes
|
|
3487
|
-
-----
|
|
3488
|
-
The probability density function for the Triangular distribution is
|
|
3489
|
-
|
|
3490
|
-
.. math:: P(x;l, m, r) = \\begin{cases}
|
|
3491
|
-
\\frac{2(x-l)}{(r-l)(m-l)}& \\text{for $l \\leq x \\leq m$},\\\\
|
|
3492
|
-
\\frac{2(m-x)}{(r-l)(r-m)}& \\text{for $m \\leq x \\leq r$},\\\\
|
|
3493
|
-
0& \\text{otherwise}.
|
|
3494
|
-
\\end{cases}
|
|
3495
|
-
|
|
3496
|
-
The triangular distribution is often used in ill-defined problems where the
|
|
3497
|
-
underlying distribution is not known, but some knowledge of the limits and
|
|
3498
|
-
mode exists. Often it is used in simulations.
|
|
3499
|
-
|
|
3500
|
-
References
|
|
3501
|
-
----------
|
|
3502
|
-
.. [1] Wikipedia, "Triangular distribution"
|
|
3503
|
-
http://en.wikipedia.org/wiki/Triangular_distribution
|
|
3504
|
-
|
|
3505
|
-
Examples
|
|
3506
|
-
--------
|
|
3507
|
-
Draw values from the distribution and plot the histogram:
|
|
3508
|
-
|
|
3509
|
-
>>> import matplotlib.pyplot as plt
|
|
3510
|
-
>>> h = plt.hist(np.random.triangular(-3, 0, 8, 100000), bins=200,
|
|
3511
|
-
... normed=True)
|
|
3512
|
-
>>> plt.show()
|
|
3513
|
-
|
|
3514
|
-
"""
|
|
3515
|
-
cdef ndarray oleft, omode, oright
|
|
3516
|
-
cdef double fleft, fmode, fright
|
|
3517
|
-
|
|
3518
|
-
fleft = PyFloat_AsDouble(left)
|
|
3519
|
-
fright = PyFloat_AsDouble(right)
|
|
3520
|
-
fmode = PyFloat_AsDouble(mode)
|
|
3521
|
-
if not PyErr_Occurred():
|
|
3522
|
-
if fleft > fmode:
|
|
3523
|
-
raise ValueError("left > mode")
|
|
3524
|
-
if fmode > fright:
|
|
3525
|
-
raise ValueError("mode > right")
|
|
3526
|
-
if fleft == fright:
|
|
3527
|
-
raise ValueError("left == right")
|
|
3528
|
-
return cont3_array_sc(self.internal_state, rk_triangular, size, fleft,
|
|
3529
|
-
fmode, fright, self.lock)
|
|
3530
|
-
|
|
3531
|
-
PyErr_Clear()
|
|
3532
|
-
oleft = <ndarray>PyArray_FROM_OTF(left, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3533
|
-
omode = <ndarray>PyArray_FROM_OTF(mode, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3534
|
-
oright = <ndarray>PyArray_FROM_OTF(right, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3535
|
-
|
|
3536
|
-
if np.any(np.greater(oleft, omode)):
|
|
3537
|
-
raise ValueError("left > mode")
|
|
3538
|
-
if np.any(np.greater(omode, oright)):
|
|
3539
|
-
raise ValueError("mode > right")
|
|
3540
|
-
if np.any(np.equal(oleft, oright)):
|
|
3541
|
-
raise ValueError("left == right")
|
|
3542
|
-
return cont3_array(self.internal_state, rk_triangular, size, oleft,
|
|
3543
|
-
omode, oright, self.lock)
|
|
3544
|
-
|
|
3545
|
-
# Complicated, discrete distributions:
|
|
3546
|
-
def binomial(self, n, p, size=None):
|
|
3547
|
-
"""
|
|
3548
|
-
binomial(n, p, size=None)
|
|
3549
|
-
|
|
3550
|
-
Draw samples from a binomial distribution.
|
|
3551
|
-
|
|
3552
|
-
Samples are drawn from a Binomial distribution with specified
|
|
3553
|
-
parameters, n trials and p probability of success where
|
|
3554
|
-
n an integer >= 0 and p is in the interval [0,1]. (n may be
|
|
3555
|
-
input as a float, but it is truncated to an integer in use)
|
|
3556
|
-
|
|
3557
|
-
Parameters
|
|
3558
|
-
----------
|
|
3559
|
-
n : float (but truncated to an integer)
|
|
3560
|
-
parameter, >= 0.
|
|
3561
|
-
p : float
|
|
3562
|
-
parameter, >= 0 and <=1.
|
|
3563
|
-
size : int or tuple of ints, optional
|
|
3564
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
3565
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
3566
|
-
single value is returned.
|
|
3567
|
-
|
|
3568
|
-
Returns
|
|
3569
|
-
-------
|
|
3570
|
-
samples : {ndarray, scalar}
|
|
3571
|
-
where the values are all integers in [0, n].
|
|
3572
|
-
|
|
3573
|
-
See Also
|
|
3574
|
-
--------
|
|
3575
|
-
scipy.stats.distributions.binom : probability density function,
|
|
3576
|
-
distribution or cumulative density function, etc.
|
|
3577
|
-
|
|
3578
|
-
Notes
|
|
3579
|
-
-----
|
|
3580
|
-
The probability density for the Binomial distribution is
|
|
3581
|
-
|
|
3582
|
-
.. math:: P(N) = \\binom{n}{N}p^N(1-p)^{n-N},
|
|
3583
|
-
|
|
3584
|
-
where :math:`n` is the number of trials, :math:`p` is the probability
|
|
3585
|
-
of success, and :math:`N` is the number of successes.
|
|
3586
|
-
|
|
3587
|
-
When estimating the standard error of a proportion in a population by
|
|
3588
|
-
using a random sample, the normal distribution works well unless the
|
|
3589
|
-
product p*n <=5, where p = population proportion estimate, and n =
|
|
3590
|
-
number of samples, in which case the binomial distribution is used
|
|
3591
|
-
instead. For example, a sample of 15 people shows 4 who are left
|
|
3592
|
-
handed, and 11 who are right handed. Then p = 4/15 = 27%. 0.27*15 = 4,
|
|
3593
|
-
so the binomial distribution should be used in this case.
|
|
3594
|
-
|
|
3595
|
-
References
|
|
3596
|
-
----------
|
|
3597
|
-
.. [1] Dalgaard, Peter, "Introductory Statistics with R",
|
|
3598
|
-
Springer-Verlag, 2002.
|
|
3599
|
-
.. [2] Glantz, Stanton A. "Primer of Biostatistics.", McGraw-Hill,
|
|
3600
|
-
Fifth Edition, 2002.
|
|
3601
|
-
.. [3] Lentner, Marvin, "Elementary Applied Statistics", Bogden
|
|
3602
|
-
and Quigley, 1972.
|
|
3603
|
-
.. [4] Weisstein, Eric W. "Binomial Distribution." From MathWorld--A
|
|
3604
|
-
Wolfram Web Resource.
|
|
3605
|
-
http://mathworld.wolfram.com/BinomialDistribution.html
|
|
3606
|
-
.. [5] Wikipedia, "Binomial-distribution",
|
|
3607
|
-
http://en.wikipedia.org/wiki/Binomial_distribution
|
|
3608
|
-
|
|
3609
|
-
Examples
|
|
3610
|
-
--------
|
|
3611
|
-
Draw samples from the distribution:
|
|
3612
|
-
|
|
3613
|
-
>>> n, p = 10, .5 # number of trials, probability of each trial
|
|
3614
|
-
>>> s = np.random.binomial(n, p, 1000)
|
|
3615
|
-
# result of flipping a coin 10 times, tested 1000 times.
|
|
3616
|
-
|
|
3617
|
-
A real world example. A company drills 9 wild-cat oil exploration
|
|
3618
|
-
wells, each with an estimated probability of success of 0.1. All nine
|
|
3619
|
-
wells fail. What is the probability of that happening?
|
|
3620
|
-
|
|
3621
|
-
Let's do 20,000 trials of the model, and count the number that
|
|
3622
|
-
generate zero positive results.
|
|
3623
|
-
|
|
3624
|
-
>>> sum(np.random.binomial(9,0.1,20000)==0)/20000.
|
|
3625
|
-
answer = 0.38885, or 38%.
|
|
3626
|
-
|
|
3627
|
-
"""
|
|
3628
|
-
cdef ndarray on, op
|
|
3629
|
-
cdef long ln
|
|
3630
|
-
cdef double fp
|
|
3631
|
-
|
|
3632
|
-
fp = PyFloat_AsDouble(p)
|
|
3633
|
-
ln = PyInt_AsLong(n)
|
|
3634
|
-
if not PyErr_Occurred():
|
|
3635
|
-
if ln < 0:
|
|
3636
|
-
raise ValueError("n < 0")
|
|
3637
|
-
if fp < 0:
|
|
3638
|
-
raise ValueError("p < 0")
|
|
3639
|
-
elif fp > 1:
|
|
3640
|
-
raise ValueError("p > 1")
|
|
3641
|
-
elif np.isnan(fp):
|
|
3642
|
-
raise ValueError("p is nan")
|
|
3643
|
-
return discnp_array_sc(self.internal_state, rk_binomial, size, ln,
|
|
3644
|
-
fp, self.lock)
|
|
3645
|
-
|
|
3646
|
-
PyErr_Clear()
|
|
3647
|
-
|
|
3648
|
-
on = <ndarray>PyArray_FROM_OTF(n, NPY_LONG, NPY_ARRAY_ALIGNED)
|
|
3649
|
-
op = <ndarray>PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3650
|
-
if np.any(np.less(n, 0)):
|
|
3651
|
-
raise ValueError("n < 0")
|
|
3652
|
-
if np.any(np.less(p, 0)):
|
|
3653
|
-
raise ValueError("p < 0")
|
|
3654
|
-
if np.any(np.greater(p, 1)):
|
|
3655
|
-
raise ValueError("p > 1")
|
|
3656
|
-
return discnp_array(self.internal_state, rk_binomial, size, on, op,
|
|
3657
|
-
self.lock)
|
|
3658
|
-
|
|
3659
|
-
def negative_binomial(self, n, p, size=None):
|
|
3660
|
-
"""
|
|
3661
|
-
negative_binomial(n, p, size=None)
|
|
3662
|
-
|
|
3663
|
-
Draw samples from a negative_binomial distribution.
|
|
3664
|
-
|
|
3665
|
-
Samples are drawn from a negative_Binomial distribution with specified
|
|
3666
|
-
parameters, `n` trials and `p` probability of success where `n` is an
|
|
3667
|
-
integer > 0 and `p` is in the interval [0, 1].
|
|
3668
|
-
|
|
3669
|
-
Parameters
|
|
3670
|
-
----------
|
|
3671
|
-
n : int
|
|
3672
|
-
Parameter, > 0.
|
|
3673
|
-
p : float
|
|
3674
|
-
Parameter, >= 0 and <=1.
|
|
3675
|
-
size : int or tuple of ints, optional
|
|
3676
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
3677
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
3678
|
-
single value is returned.
|
|
3679
|
-
|
|
3680
|
-
Returns
|
|
3681
|
-
-------
|
|
3682
|
-
samples : int or ndarray of ints
|
|
3683
|
-
Drawn samples.
|
|
3684
|
-
|
|
3685
|
-
Notes
|
|
3686
|
-
-----
|
|
3687
|
-
The probability density for the Negative Binomial distribution is
|
|
3688
|
-
|
|
3689
|
-
.. math:: P(N;n,p) = \\binom{N+n-1}{n-1}p^{n}(1-p)^{N},
|
|
3690
|
-
|
|
3691
|
-
where :math:`n-1` is the number of successes, :math:`p` is the probability
|
|
3692
|
-
of success, and :math:`N+n-1` is the number of trials.
|
|
3693
|
-
|
|
3694
|
-
The negative binomial distribution gives the probability of n-1 successes
|
|
3695
|
-
and N failures in N+n-1 trials, and success on the (N+n)th trial.
|
|
3696
|
-
|
|
3697
|
-
If one throws a die repeatedly until the third time a "1" appears, then the
|
|
3698
|
-
probability distribution of the number of non-"1"s that appear before the
|
|
3699
|
-
third "1" is a negative binomial distribution.
|
|
3700
|
-
|
|
3701
|
-
References
|
|
3702
|
-
----------
|
|
3703
|
-
.. [1] Weisstein, Eric W. "Negative Binomial Distribution." From
|
|
3704
|
-
MathWorld--A Wolfram Web Resource.
|
|
3705
|
-
http://mathworld.wolfram.com/NegativeBinomialDistribution.html
|
|
3706
|
-
.. [2] Wikipedia, "Negative binomial distribution",
|
|
3707
|
-
http://en.wikipedia.org/wiki/Negative_binomial_distribution
|
|
3708
|
-
|
|
3709
|
-
Examples
|
|
3710
|
-
--------
|
|
3711
|
-
Draw samples from the distribution:
|
|
3712
|
-
|
|
3713
|
-
A real world example. A company drills wild-cat oil exploration wells, each
|
|
3714
|
-
with an estimated probability of success of 0.1. What is the probability
|
|
3715
|
-
of having one success for each successive well, that is what is the
|
|
3716
|
-
probability of a single success after drilling 5 wells, after 6 wells,
|
|
3717
|
-
etc.?
|
|
3718
|
-
|
|
3719
|
-
>>> s = np.random.negative_binomial(1, 0.1, 100000)
|
|
3720
|
-
>>> for i in range(1, 11):
|
|
3721
|
-
... probability = sum(s<i) / 100000.
|
|
3722
|
-
... print i, "wells drilled, probability of one success =", probability
|
|
3723
|
-
|
|
3724
|
-
"""
|
|
3725
|
-
cdef ndarray on
|
|
3726
|
-
cdef ndarray op
|
|
3727
|
-
cdef double fn
|
|
3728
|
-
cdef double fp
|
|
3729
|
-
|
|
3730
|
-
fp = PyFloat_AsDouble(p)
|
|
3731
|
-
fn = PyFloat_AsDouble(n)
|
|
3732
|
-
if not PyErr_Occurred():
|
|
3733
|
-
if fn <= 0:
|
|
3734
|
-
raise ValueError("n <= 0")
|
|
3735
|
-
if fp < 0:
|
|
3736
|
-
raise ValueError("p < 0")
|
|
3737
|
-
elif fp > 1:
|
|
3738
|
-
raise ValueError("p > 1")
|
|
3739
|
-
return discdd_array_sc(self.internal_state, rk_negative_binomial,
|
|
3740
|
-
size, fn, fp, self.lock)
|
|
3741
|
-
|
|
3742
|
-
PyErr_Clear()
|
|
3743
|
-
|
|
3744
|
-
on = <ndarray>PyArray_FROM_OTF(n, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3745
|
-
op = <ndarray>PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3746
|
-
if np.any(np.less_equal(n, 0)):
|
|
3747
|
-
raise ValueError("n <= 0")
|
|
3748
|
-
if np.any(np.less(p, 0)):
|
|
3749
|
-
raise ValueError("p < 0")
|
|
3750
|
-
if np.any(np.greater(p, 1)):
|
|
3751
|
-
raise ValueError("p > 1")
|
|
3752
|
-
return discdd_array(self.internal_state, rk_negative_binomial, size,
|
|
3753
|
-
on, op, self.lock)
|
|
3754
|
-
|
|
3755
|
-
def poisson(self, lam=1.0, size=None):
|
|
3756
|
-
"""
|
|
3757
|
-
poisson(lam=1.0, size=None)
|
|
3758
|
-
|
|
3759
|
-
Draw samples from a Poisson distribution.
|
|
3760
|
-
|
|
3761
|
-
The Poisson distribution is the limit of the Binomial
|
|
3762
|
-
distribution for large N.
|
|
3763
|
-
|
|
3764
|
-
Parameters
|
|
3765
|
-
----------
|
|
3766
|
-
lam : float or sequence of float
|
|
3767
|
-
Expectation of interval, should be >= 0. A sequence of expectation
|
|
3768
|
-
intervals must be broadcastable over the requested size.
|
|
3769
|
-
size : int or tuple of ints, optional
|
|
3770
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
3771
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
3772
|
-
single value is returned.
|
|
3773
|
-
|
|
3774
|
-
Notes
|
|
3775
|
-
-----
|
|
3776
|
-
The Poisson distribution
|
|
3777
|
-
|
|
3778
|
-
.. math:: f(k; \\lambda)=\\frac{\\lambda^k e^{-\\lambda}}{k!}
|
|
3779
|
-
|
|
3780
|
-
For events with an expected separation :math:`\\lambda` the Poisson
|
|
3781
|
-
distribution :math:`f(k; \\lambda)` describes the probability of
|
|
3782
|
-
:math:`k` events occurring within the observed interval :math:`\\lambda`.
|
|
3783
|
-
|
|
3784
|
-
Because the output is limited to the range of the C long type, a
|
|
3785
|
-
ValueError is raised when `lam` is within 10 sigma of the maximum
|
|
3786
|
-
representable value.
|
|
3787
|
-
|
|
3788
|
-
References
|
|
3789
|
-
----------
|
|
3790
|
-
.. [1] Weisstein, Eric W. "Poisson Distribution." From MathWorld--A Wolfram
|
|
3791
|
-
Web Resource. http://mathworld.wolfram.com/PoissonDistribution.html
|
|
3792
|
-
.. [2] Wikipedia, "Poisson distribution",
|
|
3793
|
-
http://en.wikipedia.org/wiki/Poisson_distribution
|
|
3794
|
-
|
|
3795
|
-
Examples
|
|
3796
|
-
--------
|
|
3797
|
-
Draw samples from the distribution:
|
|
3798
|
-
|
|
3799
|
-
>>> import numpy as np
|
|
3800
|
-
>>> s = np.random.poisson(5, 10000)
|
|
3801
|
-
|
|
3802
|
-
Display histogram of the sample:
|
|
3803
|
-
|
|
3804
|
-
>>> import matplotlib.pyplot as plt
|
|
3805
|
-
>>> count, bins, ignored = plt.hist(s, 14, normed=True)
|
|
3806
|
-
>>> plt.show()
|
|
3807
|
-
|
|
3808
|
-
Draw each 100 values for lambda 100 and 500:
|
|
3809
|
-
|
|
3810
|
-
>>> s = np.random.poisson(lam=(100., 500.), size=(100, 2))
|
|
3811
|
-
|
|
3812
|
-
"""
|
|
3813
|
-
cdef ndarray olam
|
|
3814
|
-
cdef double flam
|
|
3815
|
-
flam = PyFloat_AsDouble(lam)
|
|
3816
|
-
if not PyErr_Occurred():
|
|
3817
|
-
if lam < 0:
|
|
3818
|
-
raise ValueError("lam < 0")
|
|
3819
|
-
if lam > self.poisson_lam_max:
|
|
3820
|
-
raise ValueError("lam value too large")
|
|
3821
|
-
return discd_array_sc(self.internal_state, rk_poisson, size, flam,
|
|
3822
|
-
self.lock)
|
|
3823
|
-
|
|
3824
|
-
PyErr_Clear()
|
|
3825
|
-
|
|
3826
|
-
olam = <ndarray>PyArray_FROM_OTF(lam, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3827
|
-
if np.any(np.less(olam, 0)):
|
|
3828
|
-
raise ValueError("lam < 0")
|
|
3829
|
-
if np.any(np.greater(olam, self.poisson_lam_max)):
|
|
3830
|
-
raise ValueError("lam value too large.")
|
|
3831
|
-
return discd_array(self.internal_state, rk_poisson, size, olam, self.lock)
|
|
3832
|
-
|
|
3833
|
-
def zipf(self, a, size=None):
|
|
3834
|
-
"""
|
|
3835
|
-
zipf(a, size=None)
|
|
3836
|
-
|
|
3837
|
-
Draw samples from a Zipf distribution.
|
|
3838
|
-
|
|
3839
|
-
Samples are drawn from a Zipf distribution with specified parameter
|
|
3840
|
-
`a` > 1.
|
|
3841
|
-
|
|
3842
|
-
The Zipf distribution (also known as the zeta distribution) is a
|
|
3843
|
-
continuous probability distribution that satisfies Zipf's law: the
|
|
3844
|
-
frequency of an item is inversely proportional to its rank in a
|
|
3845
|
-
frequency table.
|
|
3846
|
-
|
|
3847
|
-
Parameters
|
|
3848
|
-
----------
|
|
3849
|
-
a : float > 1
|
|
3850
|
-
Distribution parameter.
|
|
3851
|
-
size : int or tuple of ints, optional
|
|
3852
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
3853
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
3854
|
-
single value is returned.
|
|
3855
|
-
|
|
3856
|
-
Returns
|
|
3857
|
-
-------
|
|
3858
|
-
samples : scalar or ndarray
|
|
3859
|
-
The returned samples are greater than or equal to one.
|
|
3860
|
-
|
|
3861
|
-
See Also
|
|
3862
|
-
--------
|
|
3863
|
-
scipy.stats.distributions.zipf : probability density function,
|
|
3864
|
-
distribution, or cumulative density function, etc.
|
|
3865
|
-
|
|
3866
|
-
Notes
|
|
3867
|
-
-----
|
|
3868
|
-
The probability density for the Zipf distribution is
|
|
3869
|
-
|
|
3870
|
-
.. math:: p(x) = \\frac{x^{-a}}{\\zeta(a)},
|
|
3871
|
-
|
|
3872
|
-
where :math:`\\zeta` is the Riemann Zeta function.
|
|
3873
|
-
|
|
3874
|
-
It is named for the American linguist George Kingsley Zipf, who noted
|
|
3875
|
-
that the frequency of any word in a sample of a language is inversely
|
|
3876
|
-
proportional to its rank in the frequency table.
|
|
3877
|
-
|
|
3878
|
-
References
|
|
3879
|
-
----------
|
|
3880
|
-
Zipf, G. K., *Selected Studies of the Principle of Relative Frequency
|
|
3881
|
-
in Language*, Cambridge, MA: Harvard Univ. Press, 1932.
|
|
3882
|
-
|
|
3883
|
-
Examples
|
|
3884
|
-
--------
|
|
3885
|
-
Draw samples from the distribution:
|
|
3886
|
-
|
|
3887
|
-
>>> a = 2. # parameter
|
|
3888
|
-
>>> s = np.random.zipf(a, 1000)
|
|
3889
|
-
|
|
3890
|
-
Display the histogram of the samples, along with
|
|
3891
|
-
the probability density function:
|
|
3892
|
-
|
|
3893
|
-
>>> import matplotlib.pyplot as plt
|
|
3894
|
-
>>> import scipy.special as sps
|
|
3895
|
-
Truncate s values at 50 so plot is interesting
|
|
3896
|
-
>>> count, bins, ignored = plt.hist(s[s<50], 50, normed=True)
|
|
3897
|
-
>>> x = np.arange(1., 50.)
|
|
3898
|
-
>>> y = x**(-a)/sps.zetac(a)
|
|
3899
|
-
>>> plt.plot(x, y/max(y), linewidth=2, color='r')
|
|
3900
|
-
>>> plt.show()
|
|
3901
|
-
|
|
3902
|
-
"""
|
|
3903
|
-
cdef ndarray oa
|
|
3904
|
-
cdef double fa
|
|
3905
|
-
|
|
3906
|
-
fa = PyFloat_AsDouble(a)
|
|
3907
|
-
if not PyErr_Occurred():
|
|
3908
|
-
if fa <= 1.0:
|
|
3909
|
-
raise ValueError("a <= 1.0")
|
|
3910
|
-
return discd_array_sc(self.internal_state, rk_zipf, size, fa,
|
|
3911
|
-
self.lock)
|
|
3912
|
-
|
|
3913
|
-
PyErr_Clear()
|
|
3914
|
-
|
|
3915
|
-
oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3916
|
-
if np.any(np.less_equal(oa, 1.0)):
|
|
3917
|
-
raise ValueError("a <= 1.0")
|
|
3918
|
-
return discd_array(self.internal_state, rk_zipf, size, oa, self.lock)
|
|
3919
|
-
|
|
3920
|
-
def geometric(self, p, size=None):
|
|
3921
|
-
"""
|
|
3922
|
-
geometric(p, size=None)
|
|
3923
|
-
|
|
3924
|
-
Draw samples from the geometric distribution.
|
|
3925
|
-
|
|
3926
|
-
Bernoulli trials are experiments with one of two outcomes:
|
|
3927
|
-
success or failure (an example of such an experiment is flipping
|
|
3928
|
-
a coin). The geometric distribution models the number of trials
|
|
3929
|
-
that must be run in order to achieve success. It is therefore
|
|
3930
|
-
supported on the positive integers, ``k = 1, 2, ...``.
|
|
3931
|
-
|
|
3932
|
-
The probability mass function of the geometric distribution is
|
|
3933
|
-
|
|
3934
|
-
.. math:: f(k) = (1 - p)^{k - 1} p
|
|
3935
|
-
|
|
3936
|
-
where `p` is the probability of success of an individual trial.
|
|
3937
|
-
|
|
3938
|
-
Parameters
|
|
3939
|
-
----------
|
|
3940
|
-
p : float
|
|
3941
|
-
The probability of success of an individual trial.
|
|
3942
|
-
size : int or tuple of ints, optional
|
|
3943
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
3944
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
3945
|
-
single value is returned.
|
|
3946
|
-
|
|
3947
|
-
Returns
|
|
3948
|
-
-------
|
|
3949
|
-
out : ndarray
|
|
3950
|
-
Samples from the geometric distribution, shaped according to
|
|
3951
|
-
`size`.
|
|
3952
|
-
|
|
3953
|
-
Examples
|
|
3954
|
-
--------
|
|
3955
|
-
Draw ten thousand values from the geometric distribution,
|
|
3956
|
-
with the probability of an individual success equal to 0.35:
|
|
3957
|
-
|
|
3958
|
-
>>> z = np.random.geometric(p=0.35, size=10000)
|
|
3959
|
-
|
|
3960
|
-
How many trials succeeded after a single run?
|
|
3961
|
-
|
|
3962
|
-
>>> (z == 1).sum() / 10000.
|
|
3963
|
-
0.34889999999999999 #random
|
|
3964
|
-
|
|
3965
|
-
"""
|
|
3966
|
-
cdef ndarray op
|
|
3967
|
-
cdef double fp
|
|
3968
|
-
|
|
3969
|
-
fp = PyFloat_AsDouble(p)
|
|
3970
|
-
if not PyErr_Occurred():
|
|
3971
|
-
if fp < 0.0:
|
|
3972
|
-
raise ValueError("p < 0.0")
|
|
3973
|
-
if fp > 1.0:
|
|
3974
|
-
raise ValueError("p > 1.0")
|
|
3975
|
-
return discd_array_sc(self.internal_state, rk_geometric, size, fp,
|
|
3976
|
-
self.lock)
|
|
3977
|
-
|
|
3978
|
-
PyErr_Clear()
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
op = <ndarray>PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
3982
|
-
if np.any(np.less(op, 0.0)):
|
|
3983
|
-
raise ValueError("p < 0.0")
|
|
3984
|
-
if np.any(np.greater(op, 1.0)):
|
|
3985
|
-
raise ValueError("p > 1.0")
|
|
3986
|
-
return discd_array(self.internal_state, rk_geometric, size, op, self.lock)
|
|
3987
|
-
|
|
3988
|
-
def hypergeometric(self, ngood, nbad, nsample, size=None):
|
|
3989
|
-
"""
|
|
3990
|
-
hypergeometric(ngood, nbad, nsample, size=None)
|
|
3991
|
-
|
|
3992
|
-
Draw samples from a Hypergeometric distribution.
|
|
3993
|
-
|
|
3994
|
-
Samples are drawn from a Hypergeometric distribution with specified
|
|
3995
|
-
parameters, ngood (ways to make a good selection), nbad (ways to make
|
|
3996
|
-
a bad selection), and nsample = number of items sampled, which is less
|
|
3997
|
-
than or equal to the sum ngood + nbad.
|
|
3998
|
-
|
|
3999
|
-
Parameters
|
|
4000
|
-
----------
|
|
4001
|
-
ngood : int or array_like
|
|
4002
|
-
Number of ways to make a good selection. Must be nonnegative.
|
|
4003
|
-
nbad : int or array_like
|
|
4004
|
-
Number of ways to make a bad selection. Must be nonnegative.
|
|
4005
|
-
nsample : int or array_like
|
|
4006
|
-
Number of items sampled. Must be at least 1 and at most
|
|
4007
|
-
``ngood + nbad``.
|
|
4008
|
-
size : int or tuple of ints, optional
|
|
4009
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
4010
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
4011
|
-
single value is returned.
|
|
4012
|
-
|
|
4013
|
-
Returns
|
|
4014
|
-
-------
|
|
4015
|
-
samples : ndarray or scalar
|
|
4016
|
-
The values are all integers in [0, n].
|
|
4017
|
-
|
|
4018
|
-
See Also
|
|
4019
|
-
--------
|
|
4020
|
-
scipy.stats.distributions.hypergeom : probability density function,
|
|
4021
|
-
distribution or cumulative density function, etc.
|
|
4022
|
-
|
|
4023
|
-
Notes
|
|
4024
|
-
-----
|
|
4025
|
-
The probability density for the Hypergeometric distribution is
|
|
4026
|
-
|
|
4027
|
-
.. math:: P(x) = \\frac{\\binom{m}{n}\\binom{N-m}{n-x}}{\\binom{N}{n}},
|
|
4028
|
-
|
|
4029
|
-
where :math:`0 \\le x \\le m` and :math:`n+m-N \\le x \\le n`
|
|
4030
|
-
|
|
4031
|
-
for P(x) the probability of x successes, n = ngood, m = nbad, and
|
|
4032
|
-
N = number of samples.
|
|
4033
|
-
|
|
4034
|
-
Consider an urn with black and white marbles in it, ngood of them
|
|
4035
|
-
black and nbad are white. If you draw nsample balls without
|
|
4036
|
-
replacement, then the Hypergeometric distribution describes the
|
|
4037
|
-
distribution of black balls in the drawn sample.
|
|
4038
|
-
|
|
4039
|
-
Note that this distribution is very similar to the Binomial
|
|
4040
|
-
distribution, except that in this case, samples are drawn without
|
|
4041
|
-
replacement, whereas in the Binomial case samples are drawn with
|
|
4042
|
-
replacement (or the sample space is infinite). As the sample space
|
|
4043
|
-
becomes large, this distribution approaches the Binomial.
|
|
4044
|
-
|
|
4045
|
-
References
|
|
4046
|
-
----------
|
|
4047
|
-
.. [1] Lentner, Marvin, "Elementary Applied Statistics", Bogden
|
|
4048
|
-
and Quigley, 1972.
|
|
4049
|
-
.. [2] Weisstein, Eric W. "Hypergeometric Distribution." From
|
|
4050
|
-
MathWorld--A Wolfram Web Resource.
|
|
4051
|
-
http://mathworld.wolfram.com/HypergeometricDistribution.html
|
|
4052
|
-
.. [3] Wikipedia, "Hypergeometric-distribution",
|
|
4053
|
-
http://en.wikipedia.org/wiki/Hypergeometric-distribution
|
|
4054
|
-
|
|
4055
|
-
Examples
|
|
4056
|
-
--------
|
|
4057
|
-
Draw samples from the distribution:
|
|
4058
|
-
|
|
4059
|
-
>>> ngood, nbad, nsamp = 100, 2, 10
|
|
4060
|
-
# number of good, number of bad, and number of samples
|
|
4061
|
-
>>> s = np.random.hypergeometric(ngood, nbad, nsamp, 1000)
|
|
4062
|
-
>>> hist(s)
|
|
4063
|
-
# note that it is very unlikely to grab both bad items
|
|
4064
|
-
|
|
4065
|
-
Suppose you have an urn with 15 white and 15 black marbles.
|
|
4066
|
-
If you pull 15 marbles at random, how likely is it that
|
|
4067
|
-
12 or more of them are one color?
|
|
4068
|
-
|
|
4069
|
-
>>> s = np.random.hypergeometric(15, 15, 15, 100000)
|
|
4070
|
-
>>> sum(s>=12)/100000. + sum(s<=3)/100000.
|
|
4071
|
-
# answer = 0.003 ... pretty unlikely!
|
|
4072
|
-
|
|
4073
|
-
"""
|
|
4074
|
-
cdef ndarray ongood, onbad, onsample
|
|
4075
|
-
cdef long lngood, lnbad, lnsample
|
|
4076
|
-
|
|
4077
|
-
lngood = PyInt_AsLong(ngood)
|
|
4078
|
-
lnbad = PyInt_AsLong(nbad)
|
|
4079
|
-
lnsample = PyInt_AsLong(nsample)
|
|
4080
|
-
if not PyErr_Occurred():
|
|
4081
|
-
if lngood < 0:
|
|
4082
|
-
raise ValueError("ngood < 0")
|
|
4083
|
-
if lnbad < 0:
|
|
4084
|
-
raise ValueError("nbad < 0")
|
|
4085
|
-
if lnsample < 1:
|
|
4086
|
-
raise ValueError("nsample < 1")
|
|
4087
|
-
if lngood + lnbad < lnsample:
|
|
4088
|
-
raise ValueError("ngood + nbad < nsample")
|
|
4089
|
-
return discnmN_array_sc(self.internal_state, rk_hypergeometric,
|
|
4090
|
-
size, lngood, lnbad, lnsample, self.lock)
|
|
4091
|
-
|
|
4092
|
-
PyErr_Clear()
|
|
4093
|
-
|
|
4094
|
-
ongood = <ndarray>PyArray_FROM_OTF(ngood, NPY_LONG, NPY_ARRAY_ALIGNED)
|
|
4095
|
-
onbad = <ndarray>PyArray_FROM_OTF(nbad, NPY_LONG, NPY_ARRAY_ALIGNED)
|
|
4096
|
-
onsample = <ndarray>PyArray_FROM_OTF(nsample, NPY_LONG, NPY_ARRAY_ALIGNED)
|
|
4097
|
-
if np.any(np.less(ongood, 0)):
|
|
4098
|
-
raise ValueError("ngood < 0")
|
|
4099
|
-
if np.any(np.less(onbad, 0)):
|
|
4100
|
-
raise ValueError("nbad < 0")
|
|
4101
|
-
if np.any(np.less(onsample, 1)):
|
|
4102
|
-
raise ValueError("nsample < 1")
|
|
4103
|
-
if np.any(np.less(np.add(ongood, onbad),onsample)):
|
|
4104
|
-
raise ValueError("ngood + nbad < nsample")
|
|
4105
|
-
return discnmN_array(self.internal_state, rk_hypergeometric, size,
|
|
4106
|
-
ongood, onbad, onsample, self.lock)
|
|
4107
|
-
|
|
4108
|
-
def logseries(self, p, size=None):
|
|
4109
|
-
"""
|
|
4110
|
-
logseries(p, size=None)
|
|
4111
|
-
|
|
4112
|
-
Draw samples from a Logarithmic Series distribution.
|
|
4113
|
-
|
|
4114
|
-
Samples are drawn from a Log Series distribution with specified
|
|
4115
|
-
parameter, p (probability, 0 < p < 1).
|
|
4116
|
-
|
|
4117
|
-
Parameters
|
|
4118
|
-
----------
|
|
4119
|
-
loc : float
|
|
4120
|
-
|
|
4121
|
-
scale : float > 0.
|
|
4122
|
-
|
|
4123
|
-
size : int or tuple of ints, optional
|
|
4124
|
-
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
|
|
4125
|
-
``m * n * k`` samples are drawn. Default is None, in which case a
|
|
4126
|
-
single value is returned.
|
|
4127
|
-
|
|
4128
|
-
Returns
|
|
4129
|
-
-------
|
|
4130
|
-
samples : {ndarray, scalar}
|
|
4131
|
-
where the values are all integers in [0, n].
|
|
4132
|
-
|
|
4133
|
-
See Also
|
|
4134
|
-
--------
|
|
4135
|
-
scipy.stats.distributions.logser : probability density function,
|
|
4136
|
-
distribution or cumulative density function, etc.
|
|
4137
|
-
|
|
4138
|
-
Notes
|
|
4139
|
-
-----
|
|
4140
|
-
The probability density for the Log Series distribution is
|
|
4141
|
-
|
|
4142
|
-
.. math:: P(k) = \\frac{-p^k}{k \\ln(1-p)},
|
|
4143
|
-
|
|
4144
|
-
where p = probability.
|
|
4145
|
-
|
|
4146
|
-
The Log Series distribution is frequently used to represent species
|
|
4147
|
-
richness and occurrence, first proposed by Fisher, Corbet, and
|
|
4148
|
-
Williams in 1943 [2]. It may also be used to model the numbers of
|
|
4149
|
-
occupants seen in cars [3].
|
|
4150
|
-
|
|
4151
|
-
References
|
|
4152
|
-
----------
|
|
4153
|
-
.. [1] Buzas, Martin A.; Culver, Stephen J., Understanding regional
|
|
4154
|
-
species diversity through the log series distribution of
|
|
4155
|
-
occurrences: BIODIVERSITY RESEARCH Diversity & Distributions,
|
|
4156
|
-
Volume 5, Number 5, September 1999 , pp. 187-195(9).
|
|
4157
|
-
.. [2] Fisher, R.A,, A.S. Corbet, and C.B. Williams. 1943. The
|
|
4158
|
-
relation between the number of species and the number of
|
|
4159
|
-
individuals in a random sample of an animal population.
|
|
4160
|
-
Journal of Animal Ecology, 12:42-58.
|
|
4161
|
-
.. [3] D. J. Hand, F. Daly, D. Lunn, E. Ostrowski, A Handbook of Small
|
|
4162
|
-
Data Sets, CRC Press, 1994.
|
|
4163
|
-
.. [4] Wikipedia, "Logarithmic-distribution",
|
|
4164
|
-
http://en.wikipedia.org/wiki/Logarithmic-distribution
|
|
4165
|
-
|
|
4166
|
-
Examples
|
|
4167
|
-
--------
|
|
4168
|
-
Draw samples from the distribution:
|
|
4169
|
-
|
|
4170
|
-
>>> a = .6
|
|
4171
|
-
>>> s = np.random.logseries(a, 10000)
|
|
4172
|
-
>>> count, bins, ignored = plt.hist(s)
|
|
4173
|
-
|
|
4174
|
-
# plot against distribution
|
|
4175
|
-
|
|
4176
|
-
>>> def logseries(k, p):
|
|
4177
|
-
... return -p**k/(k*log(1-p))
|
|
4178
|
-
>>> plt.plot(bins, logseries(bins, a)*count.max()/
|
|
4179
|
-
logseries(bins, a).max(), 'r')
|
|
4180
|
-
>>> plt.show()
|
|
4181
|
-
|
|
4182
|
-
"""
|
|
4183
|
-
cdef ndarray op
|
|
4184
|
-
cdef double fp
|
|
4185
|
-
|
|
4186
|
-
fp = PyFloat_AsDouble(p)
|
|
4187
|
-
if not PyErr_Occurred():
|
|
4188
|
-
if fp <= 0.0:
|
|
4189
|
-
raise ValueError("p <= 0.0")
|
|
4190
|
-
if fp >= 1.0:
|
|
4191
|
-
raise ValueError("p >= 1.0")
|
|
4192
|
-
return discd_array_sc(self.internal_state, rk_logseries, size, fp,
|
|
4193
|
-
self.lock)
|
|
4194
|
-
|
|
4195
|
-
PyErr_Clear()
|
|
4196
|
-
|
|
4197
|
-
op = <ndarray>PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
|
|
4198
|
-
if np.any(np.less_equal(op, 0.0)):
|
|
4199
|
-
raise ValueError("p <= 0.0")
|
|
4200
|
-
if np.any(np.greater_equal(op, 1.0)):
|
|
4201
|
-
raise ValueError("p >= 1.0")
|
|
4202
|
-
return discd_array(self.internal_state, rk_logseries, size, op, self.lock)
|
|
4203
|
-
|
|
4204
|
-
# Multivariate distributions:
|
|
4205
|
-
def multivariate_normal(self, mean, cov, size=None):
|
|
4206
|
-
"""
|
|
4207
|
-
multivariate_normal(mean, cov[, size])
|
|
4208
|
-
|
|
4209
|
-
Draw random samples from a multivariate normal distribution.
|
|
4210
|
-
|
|
4211
|
-
The multivariate normal, multinormal or Gaussian distribution is a
|
|
4212
|
-
generalization of the one-dimensional normal distribution to higher
|
|
4213
|
-
dimensions. Such a distribution is specified by its mean and
|
|
4214
|
-
covariance matrix. These parameters are analogous to the mean
|
|
4215
|
-
(average or "center") and variance (standard deviation, or "width,"
|
|
4216
|
-
squared) of the one-dimensional normal distribution.
|
|
4217
|
-
|
|
4218
|
-
Parameters
|
|
4219
|
-
----------
|
|
4220
|
-
mean : 1-D array_like, of length N
|
|
4221
|
-
Mean of the N-dimensional distribution.
|
|
4222
|
-
cov : 2-D array_like, of shape (N, N)
|
|
4223
|
-
Covariance matrix of the distribution. Must be symmetric and
|
|
4224
|
-
positive-semidefinite for "physically meaningful" results.
|
|
4225
|
-
size : int or tuple of ints, optional
|
|
4226
|
-
Given a shape of, for example, ``(m,n,k)``, ``m*n*k`` samples are
|
|
4227
|
-
generated, and packed in an `m`-by-`n`-by-`k` arrangement. Because
|
|
4228
|
-
each sample is `N`-dimensional, the output shape is ``(m,n,k,N)``.
|
|
4229
|
-
If no shape is specified, a single (`N`-D) sample is returned.
|
|
4230
|
-
|
|
4231
|
-
Returns
|
|
4232
|
-
-------
|
|
4233
|
-
out : ndarray
|
|
4234
|
-
The drawn samples, of shape *size*, if that was provided. If not,
|
|
4235
|
-
the shape is ``(N,)``.
|
|
4236
|
-
|
|
4237
|
-
In other words, each entry ``out[i,j,...,:]`` is an N-dimensional
|
|
4238
|
-
value drawn from the distribution.
|
|
4239
|
-
|
|
4240
|
-
Notes
|
|
4241
|
-
-----
|
|
4242
|
-
The mean is a coordinate in N-dimensional space, which represents the
|
|
4243
|
-
location where samples are most likely to be generated. This is
|
|
4244
|
-
analogous to the peak of the bell curve for the one-dimensional or
|
|
4245
|
-
univariate normal distribution.
|
|
4246
|
-
|
|
4247
|
-
Covariance indicates the level to which two variables vary together.
|
|
4248
|
-
From the multivariate normal distribution, we draw N-dimensional
|
|
4249
|
-
samples, :math:`X = [x_1, x_2, ... x_N]`. The covariance matrix
|
|
4250
|
-
element :math:`C_{ij}` is the covariance of :math:`x_i` and :math:`x_j`.
|
|
4251
|
-
The element :math:`C_{ii}` is the variance of :math:`x_i` (i.e. its
|
|
4252
|
-
"spread").
|
|
4253
|
-
|
|
4254
|
-
Instead of specifying the full covariance matrix, popular
|
|
4255
|
-
approximations include:
|
|
4256
|
-
|
|
4257
|
-
- Spherical covariance (*cov* is a multiple of the identity matrix)
|
|
4258
|
-
- Diagonal covariance (*cov* has non-negative elements, and only on
|
|
4259
|
-
the diagonal)
|
|
4260
|
-
|
|
4261
|
-
This geometrical property can be seen in two dimensions by plotting
|
|
4262
|
-
generated data-points:
|
|
4263
|
-
|
|
4264
|
-
>>> mean = [0,0]
|
|
4265
|
-
>>> cov = [[1,0],[0,100]] # diagonal covariance, points lie on x or y-axis
|
|
4266
|
-
|
|
4267
|
-
>>> import matplotlib.pyplot as plt
|
|
4268
|
-
>>> x,y = np.random.multivariate_normal(mean,cov,5000).T
|
|
4269
|
-
>>> plt.plot(x,y,'x'); plt.axis('equal'); plt.show()
|
|
4270
|
-
|
|
4271
|
-
Note that the covariance matrix must be non-negative definite.
|
|
4272
|
-
|
|
4273
|
-
References
|
|
4274
|
-
----------
|
|
4275
|
-
Papoulis, A., *Probability, Random Variables, and Stochastic Processes*,
|
|
4276
|
-
3rd ed., New York: McGraw-Hill, 1991.
|
|
4277
|
-
|
|
4278
|
-
Duda, R. O., Hart, P. E., and Stork, D. G., *Pattern Classification*,
|
|
4279
|
-
2nd ed., New York: Wiley, 2001.
|
|
4280
|
-
|
|
4281
|
-
Examples
|
|
4282
|
-
--------
|
|
4283
|
-
>>> mean = (1,2)
|
|
4284
|
-
>>> cov = [[1,0],[1,0]]
|
|
4285
|
-
>>> x = np.random.multivariate_normal(mean,cov,(3,3))
|
|
4286
|
-
>>> x.shape
|
|
4287
|
-
(3, 3, 2)
|
|
4288
|
-
|
|
4289
|
-
The following is probably true, given that 0.6 is roughly twice the
|
|
4290
|
-
standard deviation:
|
|
4291
|
-
|
|
4292
|
-
>>> print list( (x[0,0,:] - mean) < 0.6 )
|
|
4293
|
-
[True, True]
|
|
4294
|
-
|
|
4295
|
-
"""
|
|
4296
|
-
from numpy.dual import svd
|
|
4297
|
-
|
|
4298
|
-
# Check preconditions on arguments
|
|
4299
|
-
mean = np.array(mean)
|
|
4300
|
-
cov = np.array(cov)
|
|
4301
|
-
if size is None:
|
|
4302
|
-
shape = []
|
|
4303
|
-
elif isinstance(size, (int, long, np.integer)):
|
|
4304
|
-
shape = [size]
|
|
4305
|
-
else:
|
|
4306
|
-
shape = size
|
|
4307
|
-
|
|
4308
|
-
if len(mean.shape) != 1:
|
|
4309
|
-
raise ValueError("mean must be 1 dimensional")
|
|
4310
|
-
if (len(cov.shape) != 2) or (cov.shape[0] != cov.shape[1]):
|
|
4311
|
-
raise ValueError("cov must be 2 dimensional and square")
|
|
4312
|
-
if mean.shape[0] != cov.shape[0]:
|
|
4313
|
-
raise ValueError("mean and cov must have same length")
|
|
4314
|
-
|
|
4315
|
-
# Compute shape of output and create a matrix of independent
|
|
4316
|
-
# standard normally distributed random numbers. The matrix has rows
|
|
4317
|
-
# with the same length as mean and as many rows are necessary to
|
|
4318
|
-
# form a matrix of shape final_shape.
|
|
4319
|
-
final_shape = list(shape[:])
|
|
4320
|
-
final_shape.append(mean.shape[0])
|
|
4321
|
-
x = self.standard_normal(final_shape).reshape(-1, mean.shape[0])
|
|
4322
|
-
|
|
4323
|
-
# Transform matrix of standard normals into matrix where each row
|
|
4324
|
-
# contains multivariate normals with the desired covariance.
|
|
4325
|
-
# Compute A such that dot(transpose(A),A) == cov.
|
|
4326
|
-
# Then the matrix products of the rows of x and A has the desired
|
|
4327
|
-
# covariance. Note that sqrt(s)*v where (u,s,v) is the singular value
|
|
4328
|
-
# decomposition of cov is such an A.
|
|
4329
|
-
#
|
|
4330
|
-
# Also check that cov is positive-semidefinite. If so, the u.T and v
|
|
4331
|
-
# matrices should be equal up to roundoff error if cov is
|
|
4332
|
-
# symmetrical and the singular value of the corresponding row is
|
|
4333
|
-
# not zero. We continue to use the SVD rather than Cholesky in
|
|
4334
|
-
# order to preserve current outputs. Note that symmetry has not
|
|
4335
|
-
# been checked.
|
|
4336
|
-
(u, s, v) = svd(cov)
|
|
4337
|
-
neg = (np.sum(u.T * v, axis=1) < 0) & (s > 0)
|
|
4338
|
-
if np.any(neg):
|
|
4339
|
-
s[neg] = 0.
|
|
4340
|
-
warnings.warn("covariance is not positive-semidefinite.",
|
|
4341
|
-
RuntimeWarning)
|
|
4342
|
-
|
|
4343
|
-
x = np.dot(x, np.sqrt(s)[:, None] * v)
|
|
4344
|
-
x += mean
|
|
4345
|
-
x.shape = tuple(final_shape)
|
|
4346
|
-
return x
|
|
4347
|
-
|
|
4348
|
-
def multinomial(self, npy_intp n, object pvals, size=None):
|
|
4349
|
-
"""
|
|
4350
|
-
multinomial(n, pvals, size=None)
|
|
4351
|
-
|
|
4352
|
-
Draw samples from a multinomial distribution.
|
|
4353
|
-
|
|
4354
|
-
The multinomial distribution is a multivariate generalisation of the
|
|
4355
|
-
binomial distribution. Take an experiment with one of ``p``
|
|
4356
|
-
possible outcomes. An example of such an experiment is throwing a dice,
|
|
4357
|
-
where the outcome can be 1 through 6. Each sample drawn from the
|
|
4358
|
-
distribution represents `n` such experiments. Its values,
|
|
4359
|
-
``X_i = [X_0, X_1, ..., X_p]``, represent the number of times the outcome
|
|
4360
|
-
was ``i``.
|
|
4361
|
-
|
|
4362
|
-
Parameters
|
|
4363
|
-
----------
|
|
4364
|
-
n : int
|
|
4365
|
-
Number of experiments.
|
|
4366
|
-
pvals : sequence of floats, length p
|
|
4367
|
-
Probabilities of each of the ``p`` different outcomes. These
|
|
4368
|
-
should sum to 1 (however, the last element is always assumed to
|
|
4369
|
-
account for the remaining probability, as long as
|
|
4370
|
-
``sum(pvals[:-1]) <= 1)``.
|
|
4371
|
-
size : tuple of ints
|
|
4372
|
-
Given a `size` of ``(M, N, K)``, then ``M*N*K`` samples are drawn,
|
|
4373
|
-
and the output shape becomes ``(M, N, K, p)``, since each sample
|
|
4374
|
-
has shape ``(p,)``.
|
|
4375
|
-
|
|
4376
|
-
Examples
|
|
4377
|
-
--------
|
|
4378
|
-
Throw a dice 20 times:
|
|
4379
|
-
|
|
4380
|
-
>>> np.random.multinomial(20, [1/6.]*6, size=1)
|
|
4381
|
-
array([[4, 1, 7, 5, 2, 1]])
|
|
4382
|
-
|
|
4383
|
-
It landed 4 times on 1, once on 2, etc.
|
|
4384
|
-
|
|
4385
|
-
Now, throw the dice 20 times, and 20 times again:
|
|
4386
|
-
|
|
4387
|
-
>>> np.random.multinomial(20, [1/6.]*6, size=2)
|
|
4388
|
-
array([[3, 4, 3, 3, 4, 3],
|
|
4389
|
-
[2, 4, 3, 4, 0, 7]])
|
|
4390
|
-
|
|
4391
|
-
For the first run, we threw 3 times 1, 4 times 2, etc. For the second,
|
|
4392
|
-
we threw 2 times 1, 4 times 2, etc.
|
|
4393
|
-
|
|
4394
|
-
A loaded dice is more likely to land on number 6:
|
|
4395
|
-
|
|
4396
|
-
>>> np.random.multinomial(100, [1/7.]*5)
|
|
4397
|
-
array([13, 16, 13, 16, 42])
|
|
4398
|
-
|
|
4399
|
-
"""
|
|
4400
|
-
cdef npy_intp d
|
|
4401
|
-
cdef ndarray parr "arrayObject_parr", mnarr "arrayObject_mnarr"
|
|
4402
|
-
cdef double *pix
|
|
4403
|
-
cdef long *mnix
|
|
4404
|
-
cdef npy_intp i, j, dn, sz
|
|
4405
|
-
cdef double Sum
|
|
4406
|
-
|
|
4407
|
-
d = len(pvals)
|
|
4408
|
-
parr = <ndarray>PyArray_ContiguousFromObject(pvals, NPY_DOUBLE, 1, 1)
|
|
4409
|
-
pix = <double*>PyArray_DATA(parr)
|
|
4410
|
-
|
|
4411
|
-
if kahan_sum(pix, d-1) > (1.0 + 1e-12):
|
|
4412
|
-
raise ValueError("sum(pvals[:-1]) > 1.0")
|
|
4413
|
-
|
|
4414
|
-
shape = _shape_from_size(size, d)
|
|
4415
|
-
|
|
4416
|
-
multin = np.zeros(shape, int)
|
|
4417
|
-
mnarr = <ndarray>multin
|
|
4418
|
-
mnix = <long*>PyArray_DATA(mnarr)
|
|
4419
|
-
sz = PyArray_SIZE(mnarr)
|
|
4420
|
-
with self.lock, nogil:
|
|
4421
|
-
i = 0
|
|
4422
|
-
while i < sz:
|
|
4423
|
-
Sum = 1.0
|
|
4424
|
-
dn = n
|
|
4425
|
-
for j from 0 <= j < d-1:
|
|
4426
|
-
mnix[i+j] = rk_binomial(self.internal_state, dn, pix[j]/Sum)
|
|
4427
|
-
dn = dn - mnix[i+j]
|
|
4428
|
-
if dn <= 0:
|
|
4429
|
-
break
|
|
4430
|
-
Sum = Sum - pix[j]
|
|
4431
|
-
if dn > 0:
|
|
4432
|
-
mnix[i+d-1] = dn
|
|
4433
|
-
|
|
4434
|
-
i = i + d
|
|
4435
|
-
|
|
4436
|
-
return multin
|
|
4437
|
-
|
|
4438
|
-
def dirichlet(self, object alpha, size=None):
|
|
4439
|
-
"""
|
|
4440
|
-
dirichlet(alpha, size=None)
|
|
4441
|
-
|
|
4442
|
-
Draw samples from the Dirichlet distribution.
|
|
4443
|
-
|
|
4444
|
-
Draw `size` samples of dimension k from a Dirichlet distribution. A
|
|
4445
|
-
Dirichlet-distributed random variable can be seen as a multivariate
|
|
4446
|
-
generalization of a Beta distribution. Dirichlet pdf is the conjugate
|
|
4447
|
-
prior of a multinomial in Bayesian inference.
|
|
4448
|
-
|
|
4449
|
-
Parameters
|
|
4450
|
-
----------
|
|
4451
|
-
alpha : array
|
|
4452
|
-
Parameter of the distribution (k dimension for sample of
|
|
4453
|
-
dimension k).
|
|
4454
|
-
size : array
|
|
4455
|
-
Number of samples to draw.
|
|
4456
|
-
|
|
4457
|
-
Returns
|
|
4458
|
-
-------
|
|
4459
|
-
samples : ndarray,
|
|
4460
|
-
The drawn samples, of shape (alpha.ndim, size).
|
|
4461
|
-
|
|
4462
|
-
Notes
|
|
4463
|
-
-----
|
|
4464
|
-
.. math:: X \\approx \\prod_{i=1}^{k}{x^{\\alpha_i-1}_i}
|
|
4465
|
-
|
|
4466
|
-
Uses the following property for computation: for each dimension,
|
|
4467
|
-
draw a random sample y_i from a standard gamma generator of shape
|
|
4468
|
-
`alpha_i`, then
|
|
4469
|
-
:math:`X = \\frac{1}{\\sum_{i=1}^k{y_i}} (y_1, \\ldots, y_n)` is
|
|
4470
|
-
Dirichlet distributed.
|
|
4471
|
-
|
|
4472
|
-
References
|
|
4473
|
-
----------
|
|
4474
|
-
.. [1] David McKay, "Information Theory, Inference and Learning
|
|
4475
|
-
Algorithms," chapter 23,
|
|
4476
|
-
http://www.inference.phy.cam.ac.uk/mackay/
|
|
4477
|
-
.. [2] Wikipedia, "Dirichlet distribution",
|
|
4478
|
-
http://en.wikipedia.org/wiki/Dirichlet_distribution
|
|
4479
|
-
|
|
4480
|
-
Examples
|
|
4481
|
-
--------
|
|
4482
|
-
Taking an example cited in Wikipedia, this distribution can be used if
|
|
4483
|
-
one wanted to cut strings (each of initial length 1.0) into K pieces
|
|
4484
|
-
with different lengths, where each piece had, on average, a designated
|
|
4485
|
-
average length, but allowing some variation in the relative sizes of the
|
|
4486
|
-
pieces.
|
|
4487
|
-
|
|
4488
|
-
>>> s = np.random.dirichlet((10, 5, 3), 20).transpose()
|
|
4489
|
-
|
|
4490
|
-
>>> plt.barh(range(20), s[0])
|
|
4491
|
-
>>> plt.barh(range(20), s[1], left=s[0], color='g')
|
|
4492
|
-
>>> plt.barh(range(20), s[2], left=s[0]+s[1], color='r')
|
|
4493
|
-
>>> plt.title("Lengths of Strings")
|
|
4494
|
-
|
|
4495
|
-
"""
|
|
4496
|
-
|
|
4497
|
-
#=================
|
|
4498
|
-
# Pure python algo
|
|
4499
|
-
#=================
|
|
4500
|
-
#alpha = N.atleast_1d(alpha)
|
|
4501
|
-
#k = alpha.size
|
|
4502
|
-
|
|
4503
|
-
#if n == 1:
|
|
4504
|
-
# val = N.zeros(k)
|
|
4505
|
-
# for i in range(k):
|
|
4506
|
-
# val[i] = sgamma(alpha[i], n)
|
|
4507
|
-
# val /= N.sum(val)
|
|
4508
|
-
#else:
|
|
4509
|
-
# val = N.zeros((k, n))
|
|
4510
|
-
# for i in range(k):
|
|
4511
|
-
# val[i] = sgamma(alpha[i], n)
|
|
4512
|
-
# val /= N.sum(val, axis = 0)
|
|
4513
|
-
# val = val.T
|
|
4514
|
-
|
|
4515
|
-
#return val
|
|
4516
|
-
|
|
4517
|
-
cdef npy_intp k
|
|
4518
|
-
cdef npy_intp totsize
|
|
4519
|
-
cdef ndarray alpha_arr, val_arr
|
|
4520
|
-
cdef double *alpha_data
|
|
4521
|
-
cdef double *val_data
|
|
4522
|
-
cdef npy_intp i, j
|
|
4523
|
-
cdef double acc, invacc
|
|
4524
|
-
|
|
4525
|
-
k = len(alpha)
|
|
4526
|
-
alpha_arr = <ndarray>PyArray_ContiguousFromObject(alpha, NPY_DOUBLE, 1, 1)
|
|
4527
|
-
alpha_data = <double*>PyArray_DATA(alpha_arr)
|
|
4528
|
-
|
|
4529
|
-
shape = _shape_from_size(size, k)
|
|
4530
|
-
|
|
4531
|
-
diric = np.zeros(shape, np.float64)
|
|
4532
|
-
val_arr = <ndarray>diric
|
|
4533
|
-
val_data= <double*>PyArray_DATA(val_arr)
|
|
4534
|
-
|
|
4535
|
-
i = 0
|
|
4536
|
-
totsize = PyArray_SIZE(val_arr)
|
|
4537
|
-
with self.lock, nogil:
|
|
4538
|
-
while i < totsize:
|
|
4539
|
-
acc = 0.0
|
|
4540
|
-
for j from 0 <= j < k:
|
|
4541
|
-
val_data[i+j] = rk_standard_gamma(self.internal_state,
|
|
4542
|
-
alpha_data[j])
|
|
4543
|
-
acc = acc + val_data[i+j]
|
|
4544
|
-
invacc = 1/acc
|
|
4545
|
-
for j from 0 <= j < k:
|
|
4546
|
-
val_data[i+j] = val_data[i+j] * invacc
|
|
4547
|
-
i = i + k
|
|
4548
|
-
|
|
4549
|
-
return diric
|
|
4550
|
-
|
|
4551
|
-
# Shuffling and permutations:
|
|
4552
|
-
def shuffle(self, object x):
|
|
4553
|
-
"""
|
|
4554
|
-
shuffle(x)
|
|
4555
|
-
|
|
4556
|
-
Modify a sequence in-place by shuffling its contents.
|
|
4557
|
-
|
|
4558
|
-
Parameters
|
|
4559
|
-
----------
|
|
4560
|
-
x : array_like
|
|
4561
|
-
The array or list to be shuffled.
|
|
4562
|
-
|
|
4563
|
-
Returns
|
|
4564
|
-
-------
|
|
4565
|
-
None
|
|
4566
|
-
|
|
4567
|
-
Examples
|
|
4568
|
-
--------
|
|
4569
|
-
>>> arr = np.arange(10)
|
|
4570
|
-
>>> np.random.shuffle(arr)
|
|
4571
|
-
>>> arr
|
|
4572
|
-
[1 7 5 2 9 4 3 6 0 8]
|
|
4573
|
-
|
|
4574
|
-
This function only shuffles the array along the first index of a
|
|
4575
|
-
multi-dimensional array:
|
|
4576
|
-
|
|
4577
|
-
>>> arr = np.arange(9).reshape((3, 3))
|
|
4578
|
-
>>> np.random.shuffle(arr)
|
|
4579
|
-
>>> arr
|
|
4580
|
-
array([[3, 4, 5],
|
|
4581
|
-
[6, 7, 8],
|
|
4582
|
-
[0, 1, 2]])
|
|
4583
|
-
|
|
4584
|
-
"""
|
|
4585
|
-
cdef npy_intp i, j
|
|
4586
|
-
|
|
4587
|
-
i = len(x) - 1
|
|
4588
|
-
|
|
4589
|
-
# Logic adapted from random.shuffle()
|
|
4590
|
-
if isinstance(x, np.ndarray) and \
|
|
4591
|
-
(x.ndim > 1 or x.dtype.fields is not None):
|
|
4592
|
-
# For a multi-dimensional ndarray, indexing returns a view onto
|
|
4593
|
-
# each row. So we can't just use ordinary assignment to swap the
|
|
4594
|
-
# rows; we need a bounce buffer.
|
|
4595
|
-
buf = np.empty_like(x[0])
|
|
4596
|
-
with self.lock:
|
|
4597
|
-
while i > 0:
|
|
4598
|
-
j = rk_interval(i, self.internal_state)
|
|
4599
|
-
buf[...] = x[j]
|
|
4600
|
-
x[j] = x[i]
|
|
4601
|
-
x[i] = buf
|
|
4602
|
-
i = i - 1
|
|
4603
|
-
else:
|
|
4604
|
-
# For single-dimensional arrays, lists, and any other Python
|
|
4605
|
-
# sequence types, indexing returns a real object that's
|
|
4606
|
-
# independent of the array contents, so we can just swap directly.
|
|
4607
|
-
with self.lock:
|
|
4608
|
-
while i > 0:
|
|
4609
|
-
j = rk_interval(i, self.internal_state)
|
|
4610
|
-
x[i], x[j] = x[j], x[i]
|
|
4611
|
-
i = i - 1
|
|
4612
|
-
|
|
4613
|
-
def permutation(self, object x):
|
|
4614
|
-
"""
|
|
4615
|
-
permutation(x)
|
|
4616
|
-
|
|
4617
|
-
Randomly permute a sequence, or return a permuted range.
|
|
4618
|
-
|
|
4619
|
-
If `x` is a multi-dimensional array, it is only shuffled along its
|
|
4620
|
-
first index.
|
|
4621
|
-
|
|
4622
|
-
Parameters
|
|
4623
|
-
----------
|
|
4624
|
-
x : int or array_like
|
|
4625
|
-
If `x` is an integer, randomly permute ``np.arange(x)``.
|
|
4626
|
-
If `x` is an array, make a copy and shuffle the elements
|
|
4627
|
-
randomly.
|
|
4628
|
-
|
|
4629
|
-
Returns
|
|
4630
|
-
-------
|
|
4631
|
-
out : ndarray
|
|
4632
|
-
Permuted sequence or array range.
|
|
4633
|
-
|
|
4634
|
-
Examples
|
|
4635
|
-
--------
|
|
4636
|
-
>>> np.random.permutation(10)
|
|
4637
|
-
array([1, 7, 4, 3, 0, 9, 2, 5, 8, 6])
|
|
4638
|
-
|
|
4639
|
-
>>> np.random.permutation([1, 4, 9, 12, 15])
|
|
4640
|
-
array([15, 1, 9, 4, 12])
|
|
4641
|
-
|
|
4642
|
-
>>> arr = np.arange(9).reshape((3, 3))
|
|
4643
|
-
>>> np.random.permutation(arr)
|
|
4644
|
-
array([[6, 7, 8],
|
|
4645
|
-
[0, 1, 2],
|
|
4646
|
-
[3, 4, 5]])
|
|
4647
|
-
|
|
4648
|
-
"""
|
|
4649
|
-
if isinstance(x, (int, long, np.integer)):
|
|
4650
|
-
arr = np.arange(x)
|
|
4651
|
-
else:
|
|
4652
|
-
arr = np.array(x)
|
|
4653
|
-
self.shuffle(arr)
|
|
4654
|
-
return arr
|
|
4655
|
-
|
|
4656
|
-
_rand = RandomState()
|
|
4657
|
-
seed = _rand.seed
|
|
4658
|
-
get_state = _rand.get_state
|
|
4659
|
-
set_state = _rand.set_state
|
|
4660
|
-
random_sample = _rand.random_sample
|
|
4661
|
-
choice = _rand.choice
|
|
4662
|
-
randint = _rand.randint
|
|
4663
|
-
bytes = _rand.bytes
|
|
4664
|
-
uniform = _rand.uniform
|
|
4665
|
-
rand = _rand.rand
|
|
4666
|
-
randn = _rand.randn
|
|
4667
|
-
random_integers = _rand.random_integers
|
|
4668
|
-
standard_normal = _rand.standard_normal
|
|
4669
|
-
normal = _rand.normal
|
|
4670
|
-
beta = _rand.beta
|
|
4671
|
-
exponential = _rand.exponential
|
|
4672
|
-
standard_exponential = _rand.standard_exponential
|
|
4673
|
-
standard_gamma = _rand.standard_gamma
|
|
4674
|
-
gamma = _rand.gamma
|
|
4675
|
-
f = _rand.f
|
|
4676
|
-
noncentral_f = _rand.noncentral_f
|
|
4677
|
-
chisquare = _rand.chisquare
|
|
4678
|
-
noncentral_chisquare = _rand.noncentral_chisquare
|
|
4679
|
-
standard_cauchy = _rand.standard_cauchy
|
|
4680
|
-
standard_t = _rand.standard_t
|
|
4681
|
-
vonmises = _rand.vonmises
|
|
4682
|
-
pareto = _rand.pareto
|
|
4683
|
-
weibull = _rand.weibull
|
|
4684
|
-
power = _rand.power
|
|
4685
|
-
laplace = _rand.laplace
|
|
4686
|
-
gumbel = _rand.gumbel
|
|
4687
|
-
logistic = _rand.logistic
|
|
4688
|
-
lognormal = _rand.lognormal
|
|
4689
|
-
rayleigh = _rand.rayleigh
|
|
4690
|
-
wald = _rand.wald
|
|
4691
|
-
triangular = _rand.triangular
|
|
4692
|
-
|
|
4693
|
-
binomial = _rand.binomial
|
|
4694
|
-
negative_binomial = _rand.negative_binomial
|
|
4695
|
-
poisson = _rand.poisson
|
|
4696
|
-
zipf = _rand.zipf
|
|
4697
|
-
geometric = _rand.geometric
|
|
4698
|
-
hypergeometric = _rand.hypergeometric
|
|
4699
|
-
logseries = _rand.logseries
|
|
4700
|
-
|
|
4701
|
-
multivariate_normal = _rand.multivariate_normal
|
|
4702
|
-
multinomial = _rand.multinomial
|
|
4703
|
-
dirichlet = _rand.dirichlet
|
|
4704
|
-
|
|
4705
|
-
shuffle = _rand.shuffle
|
|
4706
|
-
permutation = _rand.permutation
|